diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-05-16 04:33:01 +0200 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-05-16 04:33:01 +0200 |
commit | 503ff0250240f487d7562ec1c83e4c3251479f0b (patch) | |
tree | 947dd8e01b54550cbb7b08b09e930c19af1f719c /src | |
parent | 7a8eabd1a066579d4dcb35f5950f87bad5667b37 (diff) |
LamMachine
Diffstat (limited to 'src')
-rw-r--r-- | src/LambdaCube/Compiler/Core.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/LambdaCube/Compiler/Core.hs b/src/LambdaCube/Compiler/Core.hs index e86e205a..6446aeb2 100644 --- a/src/LambdaCube/Compiler/Core.hs +++ b/src/LambdaCube/Compiler/Core.hs | |||
@@ -79,6 +79,7 @@ data Exp | |||
79 | | Neut Neutral | 79 | | Neut Neutral |
80 | | RHS Exp{-always in hnf-} | 80 | | RHS Exp{-always in hnf-} |
81 | | Let_ FreeVars ExpType Exp | 81 | | Let_ FreeVars ExpType Exp |
82 | | Up_ FreeVars [Int] Exp | ||
82 | 83 | ||
83 | data Neutral | 84 | data Neutral |
84 | = Var_ !Int{-De Bruijn index-} | 85 | = Var_ !Int{-De Bruijn index-} |
@@ -86,6 +87,7 @@ data Neutral | |||
86 | | CaseFun__ FreeVars CaseFunName [Exp] Neutral | 87 | | CaseFun__ FreeVars CaseFunName [Exp] Neutral |
87 | | TyCaseFun__ FreeVars TyCaseFunName [Exp] Neutral | 88 | | TyCaseFun__ FreeVars TyCaseFunName [Exp] Neutral |
88 | | Fun_ FreeVars FunName [Exp]{-given parameters, reversed-} Exp{-unfolded expression, in hnf-} | 89 | | Fun_ FreeVars FunName [Exp]{-given parameters, reversed-} Exp{-unfolded expression, in hnf-} |
90 | | UpN_ FreeVars [Int] Neutral | ||
89 | 91 | ||
90 | -------------------------------------------------------------------------------- auxiliary functions and patterns | 92 | -------------------------------------------------------------------------------- auxiliary functions and patterns |
91 | 93 | ||
@@ -190,7 +192,7 @@ delta = ELit (LString "<<delta function>>") -- TODO: build an error call | |||
190 | 192 | ||
191 | pattern TConstraint <- TTyCon0 F'Constraint where TConstraint = tTyCon0 F'Constraint $ error "cs 1" | 193 | pattern TConstraint <- TTyCon0 F'Constraint where TConstraint = tTyCon0 F'Constraint $ error "cs 1" |
192 | pattern Unit <- TTyCon0 F'Unit where Unit = tTyCon0 F'Unit [Unit] | 194 | pattern Unit <- TTyCon0 F'Unit where Unit = tTyCon0 F'Unit [Unit] |
193 | pattern TInt <- TTyCon0 F'Int where TInt = tTyCon0 F'Int $ error "cs 1" | 195 | pattern TInt <- TTyCon0 F'Int --where TInt = tTyCon0 F'Int $ error "cs 1" |
194 | pattern TNat <- TTyCon0 F'Nat where TNat = tTyCon0 F'Nat $ error "cs 3" | 196 | pattern TNat <- TTyCon0 F'Nat where TNat = tTyCon0 F'Nat $ error "cs 3" |
195 | pattern TBool <- TTyCon0 F'Bool where TBool = tTyCon0 F'Bool $ error "cs 4" | 197 | pattern TBool <- TTyCon0 F'Bool where TBool = tTyCon0 F'Bool $ error "cs 4" |
196 | pattern TFloat <- TTyCon0 F'Float where TFloat = tTyCon0 F'Float $ error "cs 5" | 198 | pattern TFloat <- TTyCon0 F'Float where TFloat = tTyCon0 F'Float $ error "cs 5" |