Safe Haskell | None |
---|---|
Language | Haskell2010 |
Utilities to operate on the absolute type model
- type MapTypeTree = Map (Type AbsRef) (ConTree Identifier AbsRef)
- typeTree :: AbsTypeModel -> MapTypeTree
- solvedADT :: (Ord ref, Show ref) => Map ref (ADT name consName (ADTRef ref)) -> Type ref -> ADT name consName ref
- typeDefinition :: AbsEnv -> AbsType -> Either String [AbsADT]
- adtDefinition :: AbsEnv -> AbsRef -> Either String [AbsADT]
- innerReferences :: AbsADT -> [AbsRef]
- references :: AbsType -> [AbsRef]
Saturated ADTs
type MapTypeTree = Map (Type AbsRef) (ConTree Identifier AbsRef) Source #
A map of fully applied types to the corresponding saturated constructor tree
typeTree :: AbsTypeModel -> MapTypeTree Source #
Return the map of types to saturated constructor trees corresponding to the type model
solvedADT :: (Ord ref, Show ref) => Map ref (ADT name consName (ADTRef ref)) -> Type ref -> ADT name consName ref Source #
Convert a type to an equivalent concrete ADT whose variables have been substituted by the type parameters (e.g. Maybe Bool -> Maybe = Nothing | Just Bool)
Dependencies
typeDefinition :: AbsEnv -> AbsType -> Either String [AbsADT] Source #
Return all the ADTs referred, directly or indirectly, by the provided type, and defined in the provided environment
adtDefinition :: AbsEnv -> AbsRef -> Either String [AbsADT] Source #
Return all the ADTs referred, directly or indirectly, by the ADT identified by the provided reference, and defined in the provided environment
innerReferences :: AbsADT -> [AbsRef] Source #
Return the list of references found in the ADT definition
references :: AbsType -> [AbsRef] Source #
Return the list of references found in the absolute type