regex-base-0.94.0.3: Common "Text.Regex.*" API for Regex matching

Copyright | (c) Chris Kuklewicz 2006
License | BSD-3-Clause
Maintainer | Andreas Abel
Stability | stable
Portability | non-portable (Text.Regex.Base needs MPTC+FD)
Safe Haskell | Safe
Language | Haskell2010

Text.Regex.Base.Impl

Description

Helper functions for defining certain instances of `RegexContext`. These help when defining instances of `RegexContext` with repeated types:

    instance (RegexLike regex source) => RegexContext regex source source where

runs into overlapping restrictions. To avoid this I have each backend define, for its own `Regex` type:

    instance RegexContext Regex String String where
      match = polymatch
      matchM = polymatchM

    instance RegexContext Regex ByteString ByteString where
      match = polymatch
      matchM = polymatchM

    instance RegexContext Regex Text Text where
      match = polymatch
      matchM = polymatchM

# Documentation

polymatch :: RegexLike a b => a -> b -> b Source #

polymatchM :: (RegexLike a b, MonadFail m) => a -> b -> m b Source #