zm-0.3.2: Language independent, reproducible, absolute types

Safe HaskellNone
LanguageHaskell2010

ZM.Transform

Contents

Description

Utilities to operate on the absolute type model

Synopsis

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