Hoogle Search

Within LTS Haskell 24.19 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

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

  2. deriveAutoRegTuples :: [Int] -> DecsQ

    clash-prelude Clash.Class.AutoReg.Internal

    No documentation available.

  3. deriveBitPackTuples :: Name -> Name -> Name -> Name -> DecsQ

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

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

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

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

  6. deriveConjurableCascading :: Name -> DecsQ

    code-conjure Conjure

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

  7. deriveConjurableIfNeeded :: Name -> DecsQ

    code-conjure Conjure

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

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

  9. deriveConjurableCascading :: Name -> DecsQ

    code-conjure Conjure.Conjurable.Derive

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

  10. deriveConjurableIfNeeded :: Name -> DecsQ

    code-conjure Conjure.Conjurable.Derive

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

Page 34 of many | Previous | Next