module Text.Regex.Do.Type.MatchHint where
newtype Test a = Test a
newtype Once a = Once a
deriving (Functor)
newtype All a = All a
deriving (Functor)
newtype PosLen' a = PosLen' a
newtype PosLen_ a = PosLen_ a
class Hint hint where
unhint::hint a -> a
hint::a -> hint a
instance Hint Test where
unhint (Test a0) = a0
hint = Test
instance Hint Once where
unhint (Once a0) = a0
hint = Once
instance Hint All where
unhint (All a0) = a0
hint = All
instance Hint PosLen' where
unhint (PosLen' a0) = a0
hint = PosLen'
instance Hint PosLen_ where
unhint (PosLen_ a0) = a0
hint = PosLen_
instance Applicative Once where
pure p0 = Once p0
(<*>) (Once f0) (Once a0) = Once $ f0 a0
instance Applicative All where
pure p0 = All p0
(<*>) (All f0) (All a0) = All $ f0 a0