summaryrefslogtreecommitdiff
path: root/src/LambdaCube/Compiler/Core.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/LambdaCube/Compiler/Core.hs')
-rw-r--r--src/LambdaCube/Compiler/Core.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/LambdaCube/Compiler/Core.hs b/src/LambdaCube/Compiler/Core.hs
index a03dce77..83438bb9 100644
--- a/src/LambdaCube/Compiler/Core.hs
+++ b/src/LambdaCube/Compiler/Core.hs
@@ -77,7 +77,7 @@ instance PShow TyCaseFunName where pShow (TyCaseFunName n _) = text $ MatchName
77-------------------------------------------------------------------------------- core expression representation 77-------------------------------------------------------------------------------- core expression representation
78 78
79data Freq = CompileTime | RunTime -- TODO 79data Freq = CompileTime | RunTime -- TODO
80 deriving (Eq, Generic) 80 deriving (Eq, Generic, Show)
81 81
82data Exp 82data Exp
83 = ELit Lit 83 = ELit Lit
@@ -91,7 +91,7 @@ data Exp
91 | Let_ FreeVars ExpType Exp 91 | Let_ FreeVars ExpType Exp
92 | Up_ FreeVars [Int] Exp 92 | Up_ FreeVars [Int] Exp
93 | STOP String 93 | STOP String
94 deriving Generic 94 deriving (Generic, Show)
95 95
96data Neutral 96data Neutral
97 = Var_ !Int{-De Bruijn index-} 97 = Var_ !Int{-De Bruijn index-}
@@ -100,14 +100,14 @@ data Neutral
100 | TyCaseFun__ FreeVars TyCaseFunName [Exp] Neutral 100 | TyCaseFun__ FreeVars TyCaseFunName [Exp] Neutral
101 | Fun_ FreeVars FunName [Exp]{-given parameters, reversed-} Exp{-unfolded expression, in hnf-} 101 | Fun_ FreeVars FunName [Exp]{-given parameters, reversed-} Exp{-unfolded expression, in hnf-}
102 | UpN_ FreeVars [Int] Neutral 102 | UpN_ FreeVars [Int] Neutral
103 deriving Generic 103 deriving (Generic, Show)
104 104
105-------------------------------------------------------------------------------- auxiliary functions and patterns 105-------------------------------------------------------------------------------- auxiliary functions and patterns
106 106
107type Type = Exp 107type Type = Exp
108 108
109data ExpType = ET {expr :: Exp, ty :: Type} 109data ExpType = ET {expr :: Exp, ty :: Type}
110 deriving (Eq, Generic) 110 deriving (Eq, Generic, Show)
111{- 111{-
112pattern ET a b <- ET_ a b 112pattern ET a b <- ET_ a b
113 where ET a b = ET_ a (hnf b) 113 where ET a b = ET_ a (hnf b)