Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Particularly simple simplification rules.
Synopsis
- type TypeLookup = SubExp -> Maybe Type
- type VarLookup rep = VName -> Maybe (Exp rep, Certificates)
- applySimpleRules :: VarLookup rep -> TypeLookup -> BasicOp -> Maybe (BasicOp, Certificates)
Documentation
type TypeLookup = SubExp -> Maybe Type Source #
A function that, given a subexpression, returns its type.
type VarLookup rep = VName -> Maybe (Exp rep, Certificates) Source #
A function that, given a variable name, returns its definition.
applySimpleRules :: VarLookup rep -> TypeLookup -> BasicOp -> Maybe (BasicOp, Certificates) Source #