Skip to content

Commit

Permalink
Maybe quick QuickCheck arbitrary instance.
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
  • Loading branch information
ezyang committed Mar 29, 2016
1 parent a05388e commit 36106ae
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,15 @@ instance Arbitrary Solver where
shrink TopDown = [Modular]

instance Arbitrary Component where
arbitrary = oneof [ return ComponentLib
arbitrary = oneof [ ComponentLib <$> arbitraryComponentName
, ComponentExe <$> arbitraryComponentName
, ComponentTest <$> arbitraryComponentName
, ComponentBench <$> arbitraryComponentName
, return ComponentSetup
]

shrink ComponentLib = []
shrink _ = [ComponentLib]
shrink (ComponentLib "") = []
shrink _ = [ComponentLib ""]

instance Arbitrary ExampleInstalled where
arbitrary = error "arbitrary not implemented: ExampleInstalled"
Expand Down

0 comments on commit 36106ae

Please sign in to comment.