summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-05-12 02:00:15 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-05-12 02:00:15 +0200
commit18ea057b94fbcce585314d661f8c0533a4c0c4f6 (patch)
tree34788884b3851cafd6fe6a1e6c6f060bf6b9a79e
parente21050f0561700eaccbfccf32bed86c62bd31299 (diff)
tweak hnf handling
-rw-r--r--src/LambdaCube/Compiler/Core.hs2
-rw-r--r--testdata/loopIssue.out4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/LambdaCube/Compiler/Core.hs b/src/LambdaCube/Compiler/Core.hs
index 809a8d9c..4f0c597a 100644
--- a/src/LambdaCube/Compiler/Core.hs
+++ b/src/LambdaCube/Compiler/Core.hs
@@ -259,7 +259,7 @@ reduce (Neut (ReducedN y)) = Just $ hnf y
259reduce (SubstLet x) = Just $ hnf x 259reduce (SubstLet x) = Just $ hnf x
260reduce _ = Nothing 260reduce _ = Nothing
261-} 261-}
262hnf (Reduced y) = y 262hnf (Reduced y) = hnf y -- TODO: review hnf call here
263hnf a = a 263hnf a = a
264 264
265outputType = tTyCon0 FOutput $ error "cs 9" 265outputType = tTyCon0 FOutput $ error "cs 9"
diff --git a/testdata/loopIssue.out b/testdata/loopIssue.out
index 6413ce9b..86b64220 100644
--- a/testdata/loopIssue.out
+++ b/testdata/loopIssue.out
@@ -69,7 +69,7 @@ inf :: Inf
69inf = primFix _ \a -> _rhs (Inf a) 69inf = primFix _ \a -> _rhs (Inf a)
70 70
71inf2 :: Inf 71inf2 :: Inf
72inf2 = _rhs inf 72inf2 = _rhs (Inf inf)
73 73
74main :: Bool 74main :: Bool
75main = _rhs True 75main = _rhs True
@@ -81,7 +81,7 @@ match'Inf :: forall (a :: Type -> Type) -> a Inf -> forall b -> a b -> a b
81match'Inf = \a b c d -> <<type case function>> 81match'Inf = \a b c d -> <<type case function>>
82 82
83primes :: [Bool] 83primes :: [Bool]
84primes = _rhs repeatT 84primes = _rhs (True : repeatT)
85 85
86repeat :: Bool -> [Bool] 86repeat :: Bool -> [Bool]
87repeat = primFix _ \a b -> _rhs (typeAnn b : a b) 87repeat = primFix _ \a b -> _rhs (typeAnn b : a b)