diff --git a/data/examples/declaration/value/function/do-out.hs b/data/examples/declaration/value/function/do-out.hs index 1275a19..22d468a 100644 --- a/data/examples/declaration/value/function/do-out.hs +++ b/data/examples/declaration/value/function/do-out.hs @@ -52,3 +52,9 @@ trickyLet = do foo let x = 5 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 diff --git a/data/examples/declaration/value/function/do.hs b/data/examples/declaration/value/function/do.hs index 31666ac..cadd360 100644 --- a/data/examples/declaration/value/function/do.hs +++ b/data/examples/declaration/value/function/do.hs @@ -51,3 +51,9 @@ trickyLet = do foo let x = 5 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 diff --git a/data/examples/declaration/value/function/let-single-line-out.hs b/data/examples/declaration/value/function/let-single-line-out.hs index 4af451e..9e4fd10 100644 --- a/data/examples/declaration/value/function/let-single-line-out.hs +++ b/data/examples/declaration/value/function/let-single-line-out.hs @@ -1,2 +1,3 @@ foo :: a -> a foo x = let x = x in x +foo x = let x = z where z = 2 in x diff --git a/data/examples/declaration/value/function/let-single-line.hs b/data/examples/declaration/value/function/let-single-line.hs index 4af451e..9e4fd10 100644 --- a/data/examples/declaration/value/function/let-single-line.hs +++ b/data/examples/declaration/value/function/let-single-line.hs @@ -1,2 +1,3 @@ foo :: a -> a foo x = let x = x in x +foo x = let x = z where z = 2 in x