-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A source plugin for manipulating circuits in clash with a arrow notation -- -- A source plugin for manipulating circuits in clash with a arrow -- notation @package circuit-notation @version 0.1.0.0 module Circuit -- | Unsafe version of :>. Will fail if applied to empty vectors. -- This is used to workaround spurious incomplete pattern match warnings -- generated in newer GHC versions. pattern (:>!) :: a -> Vec n a -> Vec (n + 1) a infixr 5 :>! type family Fwd a type family Bwd a -- | A type to symbolise arguments going to results of a circuit. data a :-> b (:->) :: a -> b -> (:->) a b infixr 0 :-> infixr 0 :-> -- | The identity circuit. idC :: Circuit a a data DF (dom :: Domain) a data DFM2S a DFM2S :: Bool -> a -> DFM2S a newtype DFS2M DFS2M :: Bool -> DFS2M -- | Circuit type. newtype Circuit a b Circuit :: CircuitT a b -> Circuit a b [runCircuit] :: Circuit a b -> CircuitT a b type CircuitT a b = (Fwd a :-> Bwd b) -> (Bwd a :-> Fwd b) type TagCircuitT a b = (BusTag a (Fwd a) :-> BusTag b (Bwd b)) -> (BusTag a (Bwd a) :-> BusTag b (Fwd b)) newtype BusTag t b BusTag :: b -> BusTag t b [unBusTag] :: BusTag t b -> b mkTagCircuit :: TagCircuitT a b -> Circuit a b runTagCircuit :: Circuit a b -> TagCircuitT a b pattern TagCircuit :: TagCircuitT a b -> Circuit a b class TrivialBwd a unitBwd :: TrivialBwd a => a class BusTagBundle t a where { type BusTagUnbundled t a = res | res -> t a; } taggedBundle :: BusTagBundle t a => BusTagUnbundled t a -> BusTag t a taggedUnbundle :: BusTagBundle t a => BusTag t a -> BusTagUnbundled t a pattern BusTagBundle :: BusTagBundle t a => BusTagUnbundled t a -> BusTag t a instance (GHC.Classes.Eq a, GHC.Classes.Eq b) => GHC.Classes.Eq (a Circuit.:-> b) instance (GHC.Show.Show a, GHC.Show.Show b) => GHC.Show.Show (a Circuit.:-> b) instance Circuit.BusTagBundle () () instance Circuit.BusTagBundle (ta, tb) (a, b) instance Circuit.BusTagBundle (ta, tb, tc) (a, b, c) instance Circuit.BusTagBundle (ta, tb, tc, td) (a, b, c, d) instance Circuit.BusTagBundle (ta, tb, tc, td, te) (a, b, c, d, e) instance Circuit.BusTagBundle (ta, tb, tc, td, te, tf) (a, b, c, d, e, f) instance Circuit.BusTagBundle (ta, tb, tc, td, te, tf, tg) (a, b, c, d, e, f, g) instance Circuit.BusTagBundle (ta, tb, tc, td, te, tf, tg, th) (a, b, c, d, e, f, g, h) instance Circuit.BusTagBundle (ta, tb, tc, td, te, tf, tg, th, ti) (a, b, c, d, e, f, g, h, i) instance Circuit.BusTagBundle (ta, tb, tc, td, te, tf, tg, th, ti, tj) (a, b, c, d, e, f, g, h, i, j) instance Circuit.BusTagBundle (Clash.Sized.Vector.Vec n t) (Clash.Sized.Vector.Vec n a) instance Circuit.TrivialBwd () instance Circuit.TrivialBwd a => Circuit.TrivialBwd (Clash.Signal.Internal.Signal dom a) instance (Circuit.TrivialBwd a, GHC.TypeNats.KnownNat n) => Circuit.TrivialBwd (Clash.Sized.Vector.Vec n a) instance (Circuit.TrivialBwd a, Circuit.TrivialBwd b) => Circuit.TrivialBwd (a, b) instance (Circuit.TrivialBwd a, Circuit.TrivialBwd b, Circuit.TrivialBwd c) => Circuit.TrivialBwd (a, b, c) instance (Circuit.TrivialBwd a, Circuit.TrivialBwd b, Circuit.TrivialBwd c, Circuit.TrivialBwd d) => Circuit.TrivialBwd (a, b, c, d) instance (Circuit.TrivialBwd a, Circuit.TrivialBwd b, Circuit.TrivialBwd c, Circuit.TrivialBwd d, Circuit.TrivialBwd e) => Circuit.TrivialBwd (a, b, c, d, e) instance (Circuit.TrivialBwd a, Circuit.TrivialBwd b, Circuit.TrivialBwd c, Circuit.TrivialBwd d, Circuit.TrivialBwd e, Circuit.TrivialBwd f) => Circuit.TrivialBwd (a, b, c, d, e, f) instance (Circuit.TrivialBwd a, Circuit.TrivialBwd b, Circuit.TrivialBwd c, Circuit.TrivialBwd d, Circuit.TrivialBwd e, Circuit.TrivialBwd f, Circuit.TrivialBwd g) => Circuit.TrivialBwd (a, b, c, d, e, f, g) instance (Circuit.TrivialBwd a, Circuit.TrivialBwd b, Circuit.TrivialBwd c, Circuit.TrivialBwd d, Circuit.TrivialBwd e, Circuit.TrivialBwd f, Circuit.TrivialBwd g, Circuit.TrivialBwd h) => Circuit.TrivialBwd (a, b, c, d, e, f, g, h) instance (Circuit.TrivialBwd a, Circuit.TrivialBwd b, Circuit.TrivialBwd c, Circuit.TrivialBwd d, Circuit.TrivialBwd e, Circuit.TrivialBwd f, Circuit.TrivialBwd g, Circuit.TrivialBwd h, Circuit.TrivialBwd i) => Circuit.TrivialBwd (a, b, c, d, e, f, g, h, i) instance (Circuit.TrivialBwd a, Circuit.TrivialBwd b, Circuit.TrivialBwd c, Circuit.TrivialBwd d, Circuit.TrivialBwd e, Circuit.TrivialBwd f, Circuit.TrivialBwd g, Circuit.TrivialBwd h, Circuit.TrivialBwd i, Circuit.TrivialBwd j) => Circuit.TrivialBwd (a, b, c, d, e, f, g, h, i, j) instance Circuit.TrivialBwd a => Circuit.TrivialBwd (Circuit.BusTag t a) instance Data.Default.Class.Default Circuit.DFS2M instance Data.Default.Class.Default (Circuit.DFM2S a) module CircuitNotation -- | The plugin for circuit notation. plugin :: Plugin -- | Make a plugin with custom external names mkPlugin :: ExternalNames -> Plugin -- | Get a ghc name from a TH name that's known to be unique. thName :: Name -> RdrName -- | Collection of names external to circuit-notation. data ExternalNames ExternalNames :: RdrName -> RdrName -> RdrName -> RdrName -> RdrName -> RdrName -> (Direction -> RdrName) -> RdrName -> RdrName -> ExternalNames [circuitCon] :: ExternalNames -> RdrName [runCircuitName] :: ExternalNames -> RdrName [tagBundlePat] :: ExternalNames -> RdrName [tagName] :: ExternalNames -> RdrName [tagTName] :: ExternalNames -> RdrName [fwdBwdCon] :: ExternalNames -> RdrName [fwdAndBwdTypes] :: ExternalNames -> Direction -> RdrName [trivialBwd] :: ExternalNames -> RdrName [consPat] :: ExternalNames -> RdrName data Direction Fwd :: Direction Bwd :: Direction instance Control.Monad.State.Class.MonadState (CircuitNotation.CircuitState (GHC.Types.SrcLoc.GenLocated GHC.Parser.Annotation.SrcSpanAnnA (Language.Haskell.Syntax.Binds.HsBindLR GHC.Hs.Extension.GhcPs GHC.Hs.Extension.GhcPs)) (GHC.Types.SrcLoc.GenLocated GHC.Parser.Annotation.SrcSpanAnnA (Language.Haskell.Syntax.Expr.HsExpr GHC.Hs.Extension.GhcPs)) CircuitNotation.PortName) CircuitNotation.CircuitM instance Control.Monad.IO.Class.MonadIO CircuitNotation.CircuitM instance GHC.Base.Monad CircuitNotation.CircuitM instance GHC.Base.Applicative CircuitNotation.CircuitM instance GHC.Base.Functor CircuitNotation.CircuitM instance GHC.Show.Show CircuitNotation.Direction instance GHC.Driver.Session.HasDynFlags CircuitNotation.CircuitM instance GHC.Classes.Eq CircuitNotation.PortName instance Data.Traversable.Traversable CircuitNotation.PortDescription instance GHC.Base.Functor CircuitNotation.PortDescription instance Data.Foldable.Foldable CircuitNotation.PortDescription instance GHC.Base.Functor (CircuitNotation.Binding exp) instance Control.Lens.Plated.Plated (CircuitNotation.PortDescription a) instance GHC.Show.Show CircuitNotation.PortName