Created
September 1, 2014 16:08
-
-
Save passy/2cc8b073bff87f2db088 to your computer and use it in GitHub Desktop.
Core.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type CoreExpr = Expr Var | |
data Expr b -- "b" for the type of binders, | |
= Var Id | |
| Lit Literal | |
| App (Expr b) (Arg b) | |
| Lam b (Expr b) | |
| Let (Bind b) (Expr b) | |
| Case (Expr b) b Type [Alt b] | |
| Cast (Expr b) Coercion | |
| Note Note (Expr b) | |
| Type Type | |
type Arg b = Expr b | |
type Alt b = (AltCon, [b], Expr b) | |
data AltCon = DataAlt DataCon | LitAlt Literal | DEFAULT | |
data Bind b = NonRec b (Expr b) | Rec [(b, (Expr b))] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment