mirror of
https://github.com/google/ormolu.git
synced 2025-01-08 16:19:40 +03:00
Add tests for let/where interaction #177
This commit is contained in:
parent
fd4fa7f33e
commit
0baa898f30
@ -52,3 +52,9 @@ trickyLet = do
|
|||||||
foo
|
foo
|
||||||
let x = 5
|
let x = 5
|
||||||
in bar x
|
in bar x
|
||||||
|
|
||||||
|
-- single line let-where
|
||||||
|
samples n f = do
|
||||||
|
gen <- newQCGen
|
||||||
|
let rands g = g1 : rands g2 where (g1, g2) = split g
|
||||||
|
return $ rands gen
|
||||||
|
@ -51,3 +51,9 @@ trickyLet = do
|
|||||||
foo
|
foo
|
||||||
let x = 5
|
let x = 5
|
||||||
in bar x
|
in bar x
|
||||||
|
|
||||||
|
-- single line let-where
|
||||||
|
samples n f = do
|
||||||
|
gen <- newQCGen
|
||||||
|
let rands g = g1 : rands g2 where (g1, g2) = split g
|
||||||
|
return $ rands gen
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
foo :: a -> a
|
foo :: a -> a
|
||||||
foo x = let x = x in x
|
foo x = let x = x in x
|
||||||
|
foo x = let x = z where z = 2 in x
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
foo :: a -> a
|
foo :: a -> a
|
||||||
foo x = let x = x in x
|
foo x = let x = x in x
|
||||||
|
foo x = let x = z where z = 2 in x
|
||||||
|
Loading…
Reference in New Issue
Block a user