Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
derivePackedMaybeAnnotation :: DataReprAnn -> Q [Dec]clash-prelude Clash.Annotations.BitRepresentation.Deriving Derive a compactly represented version of Maybe a.
deriveAutoReg :: Name -> DecsQclash-prelude Clash.Class.AutoReg Automatically derives an AutoReg instance for a product type Usage:
data Pair a b = MkPair { getA :: a, getB :: b } deriving (Generic, NFDataX) data Tup3 a b c = MkTup3 { getAB :: Pair a b, getC :: c } deriving (Generic, NFDataX) deriveAutoReg ''Pair deriveAutoReg ''Tup3
NB: Because of the way template haskell works the order here matters, if you try to deriveAutoReg ''Tup3 before Pair it will complain about missing an instance AutoReg (Pair a b).deriveAutoReg :: Name -> DecsQclash-prelude Clash.Class.AutoReg.Internal Automatically derives an AutoReg instance for a product type Usage:
data Pair a b = MkPair { getA :: a, getB :: b } deriving (Generic, NFDataX) data Tup3 a b c = MkTup3 { getAB :: Pair a b, getC :: c } deriving (Generic, NFDataX) deriveAutoReg ''Pair deriveAutoReg ''Tup3
NB: Because of the way template haskell works the order here matters, if you try to deriveAutoReg ''Tup3 before Pair it will complain about missing an instance AutoReg (Pair a b).deriveAutoRegTuples :: [Int] -> DecsQclash-prelude Clash.Class.AutoReg.Internal No documentation available.
deriveBitPackTuples :: Name -> Name -> Name -> Name -> DecsQclash-prelude Clash.Class.BitPack.Internal.TH Contruct all the tuple (starting at size 3) instances for BitPack.
deriveAutoReg :: Name -> DecsQclash-prelude Clash.Prelude Automatically derives an AutoReg instance for a product type Usage:
data Pair a b = MkPair { getA :: a, getB :: b } deriving (Generic, NFDataX) data Tup3 a b c = MkTup3 { getAB :: Pair a b, getC :: c } deriving (Generic, NFDataX) deriveAutoReg ''Pair deriveAutoReg ''Tup3
NB: Because of the way template haskell works the order here matters, if you try to deriveAutoReg ''Tup3 before Pair it will complain about missing an instance AutoReg (Pair a b).deriveConjurable :: Name -> DecsQcode-conjure Conjure Derives an Conjurable instance for the given type Name. If not already present, this also derives Listable, Express and Name instances. If the Data.Express' type binding operators (-:, ->: or ->>:) are not in scope, this derives them as well. This function needs the TemplateHaskell extension. You can place the following at the top of the file:
{-# LANGUAGE TemplateHaskell #-} import Conjure import Test.LeanCheck
Then just call deriveConjurable after your data type declaration:data Peano = Z | S Peano deriving (Show, Eq) deriveConjurable ''Peano
deriveConjurable expects the argument type to be an instance of Show and Eq.deriveConjurableCascading :: Name -> DecsQcode-conjure Conjure Derives a Conjurable instance for a given type Name cascading derivation of type arguments as well.
deriveConjurableIfNeeded :: Name -> DecsQcode-conjure Conjure Same as deriveConjurable but does not warn when instance already exists (deriveConjurable is preferable).
deriveConjurable :: Name -> DecsQcode-conjure Conjure.Conjurable.Derive Derives an Conjurable instance for the given type Name. If not already present, this also derives Listable, Express and Name instances. If the Data.Express' type binding operators (-:, ->: or ->>:) are not in scope, this derives them as well. This function needs the TemplateHaskell extension. You can place the following at the top of the file:
{-# LANGUAGE TemplateHaskell #-} import Conjure import Test.LeanCheck
Then just call deriveConjurable after your data type declaration:data Peano = Z | S Peano deriving (Show, Eq) deriveConjurable ''Peano
deriveConjurable expects the argument type to be an instance of Show and Eq.