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 |
Show HKind |

data HType

Constructors

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

Instances

Eq HType |
Read HType |
Show HType |

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 |
Show HClause |

data HPat

Constructors

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

Instances

Eq HPat |
Show HPat |

data HExpr

Constructors

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

Instances

Eq HExpr |
Show HExpr |

hPrClause :: HClause -> String

hPrExpr :: HExpr -> String

termToHExpr :: Term -> HExpr

termToHClause :: HSymbol -> Term -> HClause

getBinderVars :: HClause -> [HSymbol]