clash-prelude-1.8.1: Clash: a functional hardware description language - Prelude library
Copyright(C) 2017 Myrtle Software Ltd QBayLogic Google Inc.
LicenseBSD2 (see the file LICENSE)
MaintainerChristiaan Baaij <christiaan.baaij@gmail.com>
Safe HaskellSafe
LanguageHaskell2010
Extensions
  • ScopedTypeVariables
  • BangPatterns
  • ViewPatterns
  • PolyKinds
  • DataKinds
  • InstanceSigs
  • StandaloneDeriving
  • DeriveDataTypeable
  • DeriveFunctor
  • DeriveTraversable
  • DeriveFoldable
  • DeriveGeneric
  • DefaultSignatures
  • DeriveLift
  • DerivingStrategies
  • MagicHash
  • KindSignatures
  • PostfixOperators
  • TupleSections
  • TypeOperators
  • ExplicitNamespaces
  • ExplicitForAll
  • BinaryLiterals
  • TypeApplications

Clash.NamedTypes

Description

Add inline documentation to types:

fifo
  :: Clock dom
  -> Reset dom
  -> SNat addrSize
  -> "read request" ::: Signal dom Bool
  -> "write request" ::: Signal dom (Maybe (BitVector dataSize))
  -> ( "q"     ::: Signal dom (BitVector dataSize)
     , "full"  ::: Signal dom Bool
     , "empty" ::: Signal dom Bool
     )

which can subsequently be inspected in the interactive environment:

>>> import Clash.Explicit.Prelude
>>> :t fifo @System
fifo @System
  :: Clock System
     -> Reset System
     -> SNat addrSize
     -> ("read request" ::: Signal System Bool)
     -> ("write request" ::: Signal System (Maybe (BitVector dataSize)))
     -> ("q" ::: Signal System (BitVector dataSize),
         "full" ::: Signal System Bool, "empty" ::: Signal System Bool)
Synopsis
  • type (:::) (name :: k) a = a

Documentation

type (:::) (name :: k) a = a Source #

Annotate a type with a name