| Copyright | (c) 2019-2020 Vaclav Svejcar |
|---|---|
| License | BSD-3-Clause |
| Maintainer | vaclav.svejcar@gmail.com |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Headroom.Data.Regex
Contents
Description
Extends functionalify provided by Text.Regex.PCRE.Light and Text.Regex.PCRE.Heavy that more suits the needs of this application.
Data Types
Represents compiled regex, encapsulates the actual implementation.
Constructors
| Regex Regex |
data RegexError Source #
Exception specific to the Headroom.Data.Regex module.
Constructors
| CompilationFailed !Text !Text | given input cannot be compiled as regex |
Instances
| Show RegexError Source # | |
Defined in Headroom.Data.Regex Methods showsPrec :: Int -> RegexError -> ShowS # show :: RegexError -> String # showList :: [RegexError] -> ShowS # | |
| Exception RegexError Source # | |
Defined in Headroom.Data.Regex Methods toException :: RegexError -> SomeException # fromException :: SomeException -> Maybe RegexError # displayException :: RegexError -> String # | |
Regex Functions
Arguments
| :: MonadThrow m | |
| => Text | regex to compile |
| -> m Regex | compiled regex |
Compiles given regex in runtime. If possible, prefer the re
quasi quotation version that does the same at compile time.
re :: QuasiQuoter Source #
A QuasiQuoter for regular expressions that does a compile time check.