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.

  1. derivePackedMaybeAnnotation :: DataReprAnn -> Q [Dec]

    clash-prelude Clash.Annotations.BitRepresentation.Deriving

    Derive a compactly represented version of Maybe a.

  2. deriveAutoReg :: Name -> DecsQ

    clash-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).

  3. deriveAutoReg :: Name -> DecsQ

    clash-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).

  4. deriveAutoRegTuples :: [Int] -> DecsQ

    clash-prelude Clash.Class.AutoReg.Internal

    No documentation available.

  5. deriveBitPackTuples :: Name -> Name -> Name -> Name -> DecsQ

    clash-prelude Clash.Class.BitPack.Internal.TH

    Contruct all the tuple (starting at size 3) instances for BitPack.

  6. deriveAutoReg :: Name -> DecsQ

    clash-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).

  7. deriveConjurable :: Name -> DecsQ

    code-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.

  8. deriveConjurableCascading :: Name -> DecsQ

    code-conjure Conjure

    Derives a Conjurable instance for a given type Name cascading derivation of type arguments as well.

  9. deriveConjurableIfNeeded :: Name -> DecsQ

    code-conjure Conjure

    Same as deriveConjurable but does not warn when instance already exists (deriveConjurable is preferable).

  10. deriveConjurable :: Name -> DecsQ

    code-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.

Page 35 of many | Previous | Next