Popularity
5.2
Declining
Activity
0.0
Stable
1
6
1
Monthly Downloads: 4
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Latest version: v0.1.0.0
hedgehog-gen alternatives and similar packages
Based on the "hedgehog" category.
Alternatively, view hedgehog-gen alternatives based on common mentions on social networks and blogs.
-
hedgehog-servant
Property based testing for Servant using Hedgehog -
hedgehog-fakedata
A compatibility library for `hedgehog` and `fakedata`
Access the most powerful time series database as a service
Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
Promo
www.influxdata.com
Do you think we are missing an alternative of hedgehog-gen or a related project?
README
hedgehog-gen
Customizable Gen for ADT using Generics
Tutorial
import Hedgehog
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
import Hedgehog.Gen.Generic
import Data.Function
data Gender = Male | Female | Other
deriving (Show, Eq, Generic)
data User = User
{ name :: Text
, age :: Word
, gender :: Gender
} deriving (Show, Eq, Generic)
userGen1 :: Hedgehog.Gen User
userGen1 = mkGen emptyGens
userGen2 :: Hedgehog.Gen User
userGen2 = mkGen $ emptyGens
& byField @User @"age" (Gen.word (Range.constant 1 120))
& byPos @User @1 (Gen.element ["foo", "bar", "baz"])