module TypeStructure.Model where
import TypeStructure.Prelude.Basic
import TypeStructure.Prelude.Data
type Graph = (Type, Dictionary)
data Type =
Type_App Type Type |
Type_Var TypeVar |
Type_Con TypeCon
deriving (Read, Show, Ord, Eq, Data, Typeable, Generic)
instance Hashable Type
type TypeVar = Name
type TypeCon = (Namespace, Name)
type Name = Text
type Namespace = Text
type Dictionary = [(TypeCon, Declaration)]
data Declaration =
Declaration_ADT [TypeVar] [Constructor] |
Declaration_Primitive |
Declaration_Synonym [TypeVar] Type
deriving (Read, Show, Ord, Eq, Data, Typeable, Generic)
instance Hashable Declaration
type Constructor = (Name, [Type])