Hoogle Search

Within LTS Haskell 24.42 (ghc-9.10.3)

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

  1. type PackageDescriptionOverride = Maybe ByteString

    cabal-install-solver Distribution.Solver.Types.SourcePackage

    We sometimes need to override the .cabal file in the tarball with the newer one from the package index.

  2. PackageVar :: qpn -> Variable qpn

    cabal-install-solver Distribution.Solver.Types.Variable

    No documentation available.

  3. type Parser = Parsec ConversionError ByteString

    cassava-megaparsec Data.Csv.Parser.Megaparsec.Internals

    Parser type that uses “custom error component” ConversionError.

  4. type Precision = Int

    cdar-mBound Data.CDAR.Approx

    A type synonym. Used to denote number of bits after binary point.

  5. PosInf :: Extended a

    cdar-mBound Data.CDAR.Extended

    No documentation available.

  6. module Network.CGI.Protocol

    An implementation of the program side of the CGI protocol.

  7. module Clash.Annotations.Primitive

    Instruct the Clash compiler to look for primitive HDL templates provided inline or in a specified directory. For distribution of new packages with primitive HDL templates. Primitive guards can be added to warn on instantiating primitives.

  8. data Primitive

    clash-prelude Clash.Annotations.Primitive

    The Primitive constructor instructs the clash compiler to look for primitive HDL templates in the indicated directory. InlinePrimitive is equivalent but provides the HDL template inline. They are intended for the distribution of new packages with primitive HDL templates.

    Example of Primitive

    You have some existing IP written in one of HDLs supported by Clash, and you want to distribute some bindings so that the IP can be easily instantiated from Clash. You create a package which has a myfancyip.cabal file with the following stanza:
    data-files: path/to/MyFancyIP.primitives
    cpp-options: -DCABAL
    
    and a MyFancyIP.hs module with the simulation definition and primitive.
    module MyFancyIP where
    
    import Clash.Prelude
    
    myFancyIP :: ...
    myFancyIP = ...
    {-# NOINLINE myFancyIP #-}
    
    The NOINLINE pragma is needed so that GHC will never inline the definition. Now you need to add the following imports and ANN pragma:
    #ifdef CABAL
    import           Clash.Annotations.Primitive
    import           System.FilePath
    import qualified Paths_myfancyip
    import           System.IO.Unsafe
    
    {-# ANN module (Primitive [VHDL] (unsafePerformIO Paths_myfancyip.getDataDir </> "path" </> "to")) #-}
    #endif
    
    Add more files to the data-files stanza in your .cabal files and more ANN pragma's if you want to add more primitive templates for other HDLs

    Example of InlineYamlPrimitive

    The following example shows off an inline HDL primitive template. It uses the string-interpolate package for nicer multiline strings.
    {-# LANGUAGE QuasiQuotes #-}
    module InlinePrimitive where
    
    import           Clash.Annotations.Primitive
    import           Clash.Prelude
    import           Data.String.Interpolate      (__i)
    
    {-# ANN example (InlineYamlPrimitive [VHDL] [__i|
    BlackBox:
    kind: Declaration
    name: InlinePrimitive.example
    template: |-
    -- begin InlinePrimitive example:
    ~GENSYM[example][0] : block
    ~RESULT <= 1 + ~ARG[0];
    end block;
    -- end InlinePrimitive example
    |]) #-}
    {-# NOINLINE example #-}
    example :: Signal System (BitVector 2) -> Signal System (BitVector 2)
    example = fmap succ
    

  9. Primitive :: [HDL] -> FilePath -> Primitive

    clash-prelude Clash.Annotations.Primitive

    Description of a primitive for given HDLs in a file at FilePath

  10. data PrimitiveGuard a

    clash-prelude Clash.Annotations.Primitive

    Primitive guard to mark a value as either not translatable or as having a blackbox with an optional extra warning. Helps Clash generate better error messages. For use, see dontTranslate, hasBlackBox, warnNonSynthesizable and warnAlways.

Page 811 of many | Previous | Next