Skip to content

Commit

Permalink
Haddock improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
lmbollen authored and DigitalBrains1 committed Oct 3, 2024
1 parent 4d65fb0 commit dfc0b07
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions clash-protocols-base/src/Protocols/Plugin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ A GHC source plugin providing a DSL for writing Circuit components. Credits to
@circuit-notation@ at <https://github.com/cchalmers/circuit-notation>.
-}
module Protocols.Plugin (
-- * Circuit types
Circuit (..),
Protocol (..),

-- * clash-prelude related types
CSignal,

-- * plugin functions
plugin,
circuit,
(-<),
Expand Down
1 change: 1 addition & 0 deletions clash-protocols-base/src/Protocols/Plugin/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Language.Haskell.TH
appTs :: Q Type -> [Q Type] -> Q Type
appTs = foldl appT

-- | Generate @Protocol@ instances for n-tuples
protocolTupleInstances :: Int -> Int -> Q [Dec]
protocolTupleInstances n m = mapM protocolTupleInstance [n .. m]

Expand Down
1 change: 1 addition & 0 deletions clash-protocols-base/src/Protocols/Plugin/Types.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{-# LANGUAGE RoleAnnotations #-}
{-# OPTIONS_HADDOCK hide #-}

{- |
These class definitions are needed to be able to write Template Haskell quotes
Expand Down
4 changes: 2 additions & 2 deletions clash-protocols/src/Protocols/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,9 @@ class (C.KnownNat (SimulateChannels a), Backpressure a, Simulate a) => Drivable
kind of simulation requires a lists for both the forward and the backward direction.
This class requires the definition of the types that the test supplies and returns. Its
functions are converters from these /simulation types/ to types on the 'Signal' level.
functions are converters from these /simulation types/ to types on the 'Clash.Signal.Signal' level.
The 'simulateCircuit' function can thus receive the necessary simulation types, convert
them to types on the 'Signal' level, pass those signals to the circuit, and convert the
them to types on the 'Clash.Signal.Signal' level, pass those signals to the circuit, and convert the
result of the circuit back to the simulation types giving the final result.
-}
class (C.KnownNat (SimulateChannels a), Protocol a) => Simulate a where
Expand Down

0 comments on commit dfc0b07

Please sign in to comment.