dragen-0.1.0.0: Automatic derivation of optimized QuickCheck random generators.

Safe HaskellNone
LanguageHaskell2010

Megadeth

Synopsis

Documentation

data ConView Source #

View Pattern for Types

Constructors

SimpleCon 

Fields

Instances
Show ConView Source # 
Instance details

Defined in Megadeth

headOf :: Type -> Name Source #

Look up the first type name in a type structure. This function is not complete, so it could fail and it will with an error message with the case that is missing

isPrim :: Info -> Bool Source #

Check whether a type is a Primitive Type. Something like Int, etc.

simpleConView :: Name -> Con -> ConView Source #

View Pattern for Constructors

getTy :: Type -> Type Source #

Get the first type in a type application. Maybe we should improve this one

findLeafTypes :: Type -> [Type] Source #

Find all simple Types that are part of another Type.

type StQ s a = StateT s Q a Source #

type Names = [Name] Source #

getDeps :: Name -> (Name -> Q Bool) -> StQ (Map Name Names) () Source #

prevDev :: Name -> (Name -> Q Bool) -> Q [Name] Source #

megaderivePrim Source #

Arguments

:: (Name -> Q [Dec])

Instance generator

-> (Name -> Q Bool)

Blacklist dependences before

-> (Name -> Q Bool)

Instance name

-> Name 
-> Q [Dec] 

megaderive :: (Name -> Q [Dec]) -> (Name -> Q Bool) -> Name -> Q [Dec] Source #