Safe Haskell | None |
---|---|
Language | Haskell98 |
- data PatSyn
- mkPatSyn :: Name -> Bool -> [Var] -> [TyVar] -> [TyVar] -> ThetaType -> ThetaType -> Type -> Id -> Maybe Id -> PatSyn
- patSynId :: PatSyn -> Id
- patSynType :: PatSyn -> Type
- patSynArity :: PatSyn -> Arity
- patSynIsInfix :: PatSyn -> Bool
- patSynArgs :: PatSyn -> [Var]
- patSynArgTys :: PatSyn -> [Type]
- patSynTyDetails :: PatSyn -> HsPatSynDetails Type
- patSynWrapper :: PatSyn -> Maybe Id
- patSynMatcher :: PatSyn -> Id
- patSynExTyVars :: PatSyn -> [TyVar]
- patSynSig :: PatSyn -> ([TyVar], [TyVar], (ThetaType, ThetaType))
- patSynInstArgTys :: PatSyn -> [Type] -> [Type]
Main data types
A pattern synonym
:: Name | |
-> Bool | Is the pattern synonym declared infix? |
-> [Var] | Original arguments |
-> [TyVar] | Universially-quantified type variables |
-> [TyVar] | Existentially-quantified type variables |
-> ThetaType | Wanted dicts |
-> ThetaType | Given dicts |
-> Type | Original result type |
-> Id | Name of matcher |
-> Maybe Id | Name of wrapper |
-> PatSyn |
Build a new pattern synonym
Type deconstruction
patSynType :: PatSyn -> TypeSource
patSynArity :: PatSyn -> AritySource
Arity of the pattern synonym
patSynIsInfix :: PatSyn -> BoolSource
Should the PatSyn
be presented infix?
patSynArgs :: PatSyn -> [Var]Source
patSynArgTys :: PatSyn -> [Type]Source
patSynWrapper :: PatSyn -> Maybe IdSource
patSynMatcher :: PatSyn -> IdSource
patSynExTyVars :: PatSyn -> [TyVar]Source
patSynInstArgTys :: PatSyn -> [Type] -> [Type]Source