Skip to content
Snippets Groups Projects
Unverified Commit c1bea2d1 authored by MorrowM's avatar MorrowM Committed by GitHub
Browse files

Fix #1879 (#2644)

parent ce41b645
No related branches found
No related tags found
No related merge requests found
......@@ -43,8 +43,9 @@ deriveArbitrary = do
mempty
mempty
mempty
$ noLoc $
let' [valBind (fromString "terminal") $ list $ fmap genExpr terminal] $
$ noLoc $ case terminal of
[onlyCon] -> genExpr onlyCon -- See #1879
_ -> let' [valBind (fromString "terminal") $ list $ fmap genExpr terminal] $
appDollar (mkFunc "sized") $ lambda [bvar' (mkVarOcc "n")] $
case' (infixCall "<=" (mkVal "n") (int 1))
[ match [conP (fromString "True") []] $
......
......@@ -72,6 +72,7 @@ spec = do
describe "known" $ do
autoTest 25 13 "GoldenArbitrary"
autoTest 6 13 "GoldenArbitrarySingleConstructor"
autoTestNoWhitespace
6 10 "KnownBigSemigroup"
autoTest 4 10 "KnownThetaSemigroup"
......
data Gen a
data Obj = Obj Int Bool Char String
arbitrary :: Gen Obj
arbitrary
= (((Obj <$> arbitrary) <*> arbitrary) <*> arbitrary) <*> arbitrary
\ No newline at end of file
data Gen a
data Obj = Obj Int Bool Char String
arbitrary :: Gen Obj
arbitrary = _
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment