Djinn.HTypes

djinn-lib-0.0.1.2: Generate Haskell code from a type. Library extracted from djinn package.

Safe Haskell | Safe
Language | Haskell98

Djinn.HTypes

# Documentation

data HKind #

Constructors

KStar |
KArrow HKind HKind |
KVar Int |

Instances

Eq HKind # |
Methods (==) :: HKind -> HKind -> Bool # (/=) :: HKind -> HKind -> Bool #
Show HKind # |
Methods showsPrec :: Int -> HKind -> ShowS # show :: HKind -> String # showList :: [HKind] -> ShowS #

data HType #

Constructors

HTApp HType HType |
HTVar HSymbol |
HTCon HSymbol |
HTTuple [HType] |
HTArrow HType HType |
HTUnion [(HSymbol, [HType])] |
HTAbstract HSymbol HKind |

Instances

Eq HType # |
Methods (==) :: HType -> HType -> Bool # (/=) :: HType -> HType -> Bool #
Read HType # |
Methods readsPrec :: Int -> ReadS HType # readList :: ReadS [HType] # readPrec :: ReadPrec HType # readListPrec :: ReadPrec [HType] #
Show HType # |
Methods showsPrec :: Int -> HType -> ShowS # show :: HType -> String # showList :: [HType] -> ShowS #

type HSymbol = String #

hTypeToFormula :: [(HSymbol, ([HSymbol], HType, a))] -> HType -> Formula #

pHSymbol :: Bool -> ReadP HSymbol #

pHType :: ReadP HType #

pHDataType :: ReadP HType #

pHTAtom :: ReadP HType #

pHKind :: ReadP HKind #

prHSymbolOp :: HSymbol -> String #

htNot :: HSymbol -> HType #

isHTUnion :: HType -> Bool #

getHTVars :: HType -> [HSymbol] #

substHT :: [(HSymbol, HType)] -> HType -> HType #

data HClause #

Constructors

HClause HSymbol [HPat] HExpr |

Instances

Eq HClause # |
Methods (==) :: HClause -> HClause -> Bool # (/=) :: HClause -> HClause -> Bool #
Show HClause # |
Methods showsPrec :: Int -> HClause -> ShowS # show :: HClause -> String # showList :: [HClause] -> ShowS #

data HPat #

Constructors

HPVar HSymbol |
HPCon HSymbol |
HPTuple [HPat] |
HPAt HSymbol HPat |
HPApply HPat HPat |

Instances

Eq HPat # |
Methods (==) :: HPat -> HPat -> Bool # (/=) :: HPat -> HPat -> Bool #
Show HPat # |
Methods showsPrec :: Int -> HPat -> ShowS # show :: HPat -> String # showList :: [HPat] -> ShowS #

data HExpr #

Constructors

HELam [HPat] HExpr |
HEApply HExpr HExpr |
HECon HSymbol |
HEVar HSymbol |
HETuple [HExpr] |
HECase HExpr [(HPat, HExpr)] |

Instances

Eq HExpr # |
Methods (==) :: HExpr -> HExpr -> Bool # (/=) :: HExpr -> HExpr -> Bool #
Show HExpr # |
Methods showsPrec :: Int -> HExpr -> ShowS # show :: HExpr -> String # showList :: [HExpr] -> ShowS #

hPrClause :: HClause -> String #

hPrExpr :: HExpr -> String #

termToHExpr :: Term -> HExpr #

termToHClause :: HSymbol -> Term -> HClause #

getBinderVars :: HClause -> [HSymbol] #