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 Source

Constructors

KStar |
KArrow HKind HKind |
KVar Int |

Instances

Eq HKind Source |
Show HKind Source |

data HType Source

Constructors

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

Instances

Eq HType Source |
Read HType Source |
Show HType Source |

type HSymbol = String Source

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

pHSymbol :: Bool -> ReadP HSymbol Source

pHType :: ReadP HType Source

pHDataType :: ReadP HType Source

pHTAtom :: ReadP HType Source

pHKind :: ReadP HKind Source

prHSymbolOp :: HSymbol -> String Source

htNot :: HSymbol -> HType Source

isHTUnion :: HType -> Bool Source

getHTVars :: HType -> [HSymbol] Source

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

data HClause Source

Constructors

HClause HSymbol [HPat] HExpr |

Instances

Eq HClause Source |
Show HClause Source |

data HPat Source

Constructors

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

Instances

Eq HPat Source |
Show HPat Source |

data HExpr Source

Constructors

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

Instances

Eq HExpr Source |
Show HExpr Source |

hPrClause :: HClause -> String Source

hPrExpr :: HExpr -> String Source

termToHExpr :: Term -> HExpr Source

termToHClause :: HSymbol -> Term -> HClause Source

getBinderVars :: HClause -> [HSymbol] Source