on master help sign in
Add tests for let/where interaction #177
commit0baa898f30514f00849057ffe2614d6dd36398d6 authorBasile Henry <bjm.henry@gmail.com> dateSat 13 Jul 2019, 17:52 (7 years ago) parentfd4fa7f
4 files changed+14
data/examples/declaration/value/function/do-out.hs+6 data/examples/declaration/value/function/do.hs+6 data/examples/declaration/value/function/let-single-line-out.hs+1 data/examples/declaration/value/function/let-single-line.hs+1
data/examples/declaration/value/function/do-out.hs+6
@@ -52,3 +52,9 @@ trickyLet = do
5252 foo
5353 let x = 5
5454 in bar x
55+
56+-- single line let-where
57+samples n f = do
58+ gen <- newQCGen
59+ let rands g = g1 : rands g2 where (g1, g2) = split g
60+ return $ rands gen
data/examples/declaration/value/function/do.hs+6
@@ -51,3 +51,9 @@ trickyLet = do
5151 foo
5252 let x = 5
5353 in bar x
54+
55+-- single line let-where
56+samples n f = do
57+ gen <- newQCGen
58+ let rands g = g1 : rands g2 where (g1, g2) = split g
59+ return $ rands gen
data/examples/declaration/value/function/let-single-line-out.hs+1
@@ -1,2 +1,3 @@
11foo :: a -> a
22foo x = let x = x in x
3+foo x = let x = z where z = 2 in x
data/examples/declaration/value/function/let-single-line.hs+1
@@ -1,2 +1,3 @@
11foo :: a -> a
22foo x = let x = x in x
3+foo x = let x = z where z = 2 in x