regex-do-2.5: PCRE wrapper

Safe HaskellNone
LanguageHaskell2010

Text.Regex.Do.Pcre.Utf8.MatchHint

Description

see Text.Regex.Do.Pcre.Ascii.MatchHint about MatchHint vs Match

Synopsis

Documentation

class (Hint hint, Match enc a a (F hint a)) => MatchHint hint enc a where Source

picks Match instance where Pattern and Body are of the same type

Hint and inferrable Pattern or Body type determine the instance

handy when working with OverloadedStrings, in other cases when compiler needs a hint

Minimal complete definition

Nothing

Associated Types

type F hint a Source

Methods

match :: hint (Pattern (enc a)) -> Body (enc a) -> F hint a Source

Instances

MatchHint PosLen_ Utf8_ String Source 
MatchHint PosLen_ Utf8_ ByteString Source 
MatchHint PosLen' Utf8_ String Source
>>> PosLen' ("и"::String) =~ "бывает и хуже"

[(13,2)]

MatchHint PosLen' Utf8_ ByteString Source 
MatchHint All Utf8_ String Source 
MatchHint All Utf8_ ByteString Source 
MatchHint Once Utf8_ String Source
>>> Once ("^all"::String) =~ "all the time"

["all"]

MatchHint Once Utf8_ ByteString Source 
MatchHint Test Utf8_ String Source 
MatchHint Test Utf8_ ByteString Source
>>> Test (toByteString "в") =~ toByteString "тихо в лесу"

True

(=~) Source

Arguments

:: MatchHint hint Utf8_ a 
=> hint a

hint pattern

-> a

body

-> F hint a

type defined by the instance, determined by the hint