clash-prelude-0.99.1: CAES Language for Synchronous Hardware - 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
  • PolyKinds
  • KindSignatures
  • TypeOperators
  • ExplicitNamespaces

Clash.NamedTypes

Description

Add inline documentation to types:

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

which can subsequently be inspected in the interactive environment:

>>> :t fifo @System
fifo @System
  :: Clock System gated
     -> Reset System synchronous
     -> 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