Skip to content

Commit

Permalink
Remove the library component gen
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Jan 4, 2023
1 parent 7d40e11 commit ee4258e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
14 changes: 2 additions & 12 deletions oops.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,14 @@ common project-config
library
import: base, project-config,
mtl,
QuickCheck,
transformers,
exposed-modules: Control.Monad.Oops
Control.Monad.Oops.Classic
Data.Variant
hs-source-dirs: src
default-language: Haskell2010

library gen
import: base, project-config,
QuickCheck,
mtl,
transformers,
exposed-modules: Data.Variant.Gen
hs-source-dirs: gen
build-depends: oops
default-language: Haskell2010

test-suite doctest
import: base, project-config,
base-compat,
Expand Down Expand Up @@ -97,6 +88,5 @@ test-suite test
main-is: Spec.hs
hs-source-dirs: test
default-language: Haskell2010
build-depends: oops,
oops:gen
build-depends: oops
other-modules: Data.VariantSpec
4 changes: 4 additions & 0 deletions src/Data/Variant.hs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ import Data.Functor.Identity (Identity (..))
import Data.Kind (Constraint, Type)
import Data.Void (Void, absurd)
import GHC.TypeLits (ErrorMessage (..), TypeError)
import Test.QuickCheck.Arbitrary (Arbitrary (..))

-- | The type @VariantF f '[x, y, z]@ is /either/ @f x@, @f y@, or @f z@. The
-- We construct these with @Here@, @There . Here@, and @There . There . Here@
Expand Down Expand Up @@ -493,3 +494,6 @@ preposterous = \case
-- | ... and it also means we can convert back!
postposterous :: Void -> VariantF f '[]
postposterous = \case

instance (EithersF f xs nested, Arbitrary nested) => Arbitrary (VariantF f xs) where
arbitrary = fmap fromEithersF arbitrary
1 change: 0 additions & 1 deletion test/Data/VariantSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

module Data.VariantSpec (spec) where

import Data.Variant.Gen ()
import HaskellWorks.Hspec.Hedgehog (require)
import Hedgehog ((===), forAll, property)
import Test.Hspec (describe, it, Spec)
Expand Down

0 comments on commit ee4258e

Please sign in to comment.