Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class (Ord loc, Var vt, Var v, MonadFix m) => Pmc vt v loc m | m -> vt v loc where
- getConstructors :: Type vt loc -> m (EnumeratedConstructors vt v loc)
- getConstructorVarTypes :: Type vt loc -> ConstructorReference -> m [Type vt loc]
- fresh :: m v
- getPrettyPrintEnv :: m PrettyPrintEnv
- data EnumeratedConstructors vt v loc
- = ConstructorType [(v, ConstructorReference, Type vt loc)]
- | AbilityType (Type vt loc) (Map ConstructorReference (v, Type vt loc))
- | SequenceType [(ListPat, [Type vt loc])]
- | BooleanType
- | OtherType
- traverseConstructorTypes :: Applicative f => (v -> ConstructorReference -> Type vt loc -> f (Type vt loc)) -> EnumeratedConstructors vt v loc -> f (EnumeratedConstructors vt v loc)
Documentation
class (Ord loc, Var vt, Var v, MonadFix m) => Pmc vt v loc m | m -> vt v loc where Source #
A typeclass for the queries required to perform pattern match coverage checking.
getConstructors :: Type vt loc -> m (EnumeratedConstructors vt v loc) Source #
Get the constructors of a type
getConstructorVarTypes :: Type vt loc -> ConstructorReference -> m [Type vt loc] Source #
Get the types of the arguments of a specific constructor
Get a fresh variable
data EnumeratedConstructors vt v loc Source #
ConstructorType [(v, ConstructorReference, Type vt loc)] | |
AbilityType (Type vt loc) (Map ConstructorReference (v, Type vt loc)) | |
SequenceType [(ListPat, [Type vt loc])] | |
BooleanType | |
OtherType |
Instances
(Show v, Show vt) => Show (EnumeratedConstructors vt v loc) Source # | |
Defined in Unison.PatternMatchCoverage.Class showsPrec :: Int -> EnumeratedConstructors vt v loc -> ShowS # show :: EnumeratedConstructors vt v loc -> String # showList :: [EnumeratedConstructors vt v loc] -> ShowS # |
traverseConstructorTypes :: Applicative f => (v -> ConstructorReference -> Type vt loc -> f (Type vt loc)) -> EnumeratedConstructors vt v loc -> f (EnumeratedConstructors vt v loc) Source #