Safe Haskell | None |
---|---|
Language | Haskell2010 |
Derive absolute/canonical data type models
- absType :: Model a => Proxy a -> AbsType
- absTypeModel :: Model a => Proxy a -> AbsTypeModel
- absTypeModelMaybe :: Model a => Proxy a -> Either Errors AbsTypeModel
- absEnv :: HTypeEnv -> Either Errors AbsEnv
- absEnvWith :: AbsEnv -> HTypeEnv -> Either Errors AbsEnv
- refErrors :: AbsEnv -> Errors
- kindErrors :: AbsEnv -> Errors
Documentation
absType :: Model a => Proxy a -> AbsType Source #
Derive an absolute type for a type, or throw an error if derivation is impossible
absTypeModel :: Model a => Proxy a -> AbsTypeModel Source #
Derive an absolute type model for a type, or throw an error if derivation is impossible
absTypeModelMaybe :: Model a => Proxy a -> Either Errors AbsTypeModel Source #
Derive an absolute type model for a type, if possible.
absEnv :: HTypeEnv -> Either Errors AbsEnv Source #
Convert a set of relative ADTs to the equivalent ZM absolute ADTs
absEnvWith :: AbsEnv -> HTypeEnv -> Either Errors AbsEnv Source #
Convert a set of relative ADTs to the equivalent ZM absolute ADTs, with a starting set of known absolute ADTs.
Conversion will fail if the relative ADTs are mutually recursive or refer to undefined ADTs.
refErrors :: AbsEnv -> Errors Source #
Check that all internal references in the ADT definitions are to ADTs defined in the environment
kindErrors :: AbsEnv -> Errors Source #
Check that all type expressions have kind *, that's to say:
- Type constructors are fully applied
- Type variables have * kind