circuit-notation-0.1.0.0: A source plugin for manipulating circuits in clash with a arrow notation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Circuit

Synopsis

Documentation

pattern (:>!) :: a -> Vec n a -> Vec (n + 1) a infixr 5 Source #

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.

type family Fwd a Source #

Instances

Instances details
type Fwd () Source # 
Instance details

Defined in Circuit

type Fwd () = ()
type Fwd [a] Source # 
Instance details

Defined in Circuit

type Fwd [a] = [Fwd a]
type Fwd (DF dom a) Source # 
Instance details

Defined in Circuit

type Fwd (DF dom a) = Signal dom (DFM2S a)
type Fwd (Signal dom a) Source # 
Instance details

Defined in Circuit

type Fwd (Signal dom a) = Signal dom a
type Fwd (Vec n a) Source # 
Instance details

Defined in Circuit

type Fwd (Vec n a) = Vec n (Fwd a)
type Fwd (a, b) Source # 
Instance details

Defined in Circuit

type Fwd (a, b) = (Fwd a, Fwd b)
type Fwd (a, b, c) Source # 
Instance details

Defined in Circuit

type Fwd (a, b, c) = (Fwd a, Fwd b, Fwd c)

type family Bwd a Source #

Instances

Instances details
type Bwd () Source # 
Instance details

Defined in Circuit

type Bwd () = ()
type Bwd [a] Source # 
Instance details

Defined in Circuit

type Bwd [a] = [Bwd a]
type Bwd (DF dom a) Source # 
Instance details

Defined in Circuit

type Bwd (DF dom a) = Signal dom DFS2M
type Bwd (Signal dom a) Source # 
Instance details

Defined in Circuit

type Bwd (Signal dom a) = ()
type Bwd (Vec n a) Source # 
Instance details

Defined in Circuit

type Bwd (Vec n a) = Vec n (Bwd a)
type Bwd (a, b) Source # 
Instance details

Defined in Circuit

type Bwd (a, b) = (Bwd a, Bwd b)
type Bwd (a, b, c) Source # 
Instance details

Defined in Circuit

type Bwd (a, b, c) = (Bwd a, Bwd b, Bwd c)

data a :-> b infixr 0 Source #

A type to symbolise arguments going to results of a circuit.

Constructors

a :-> b infixr 0 

Instances

Instances details
(Show a, Show b) => Show (a :-> b) Source # 
Instance details

Defined in Circuit

Methods

showsPrec :: Int -> (a :-> b) -> ShowS #

show :: (a :-> b) -> String #

showList :: [a :-> b] -> ShowS #

(Eq a, Eq b) => Eq (a :-> b) Source # 
Instance details

Defined in Circuit

Methods

(==) :: (a :-> b) -> (a :-> b) -> Bool #

(/=) :: (a :-> b) -> (a :-> b) -> Bool #

idC :: Circuit a a Source #

The identity circuit.

data DF (dom :: Domain) a Source #

Instances

Instances details
type Bwd (DF dom a) Source # 
Instance details

Defined in Circuit

type Bwd (DF dom a) = Signal dom DFS2M
type Fwd (DF dom a) Source # 
Instance details

Defined in Circuit

type Fwd (DF dom a) = Signal dom (DFM2S a)

data DFM2S a Source #

Constructors

DFM2S Bool a 

Instances

Instances details
Default (DFM2S a) Source # 
Instance details

Defined in Circuit

Methods

def :: DFM2S a #

newtype DFS2M Source #

Constructors

DFS2M Bool 

Instances

Instances details
Default DFS2M Source # 
Instance details

Defined in Circuit

Methods

def :: DFS2M #

newtype Circuit a b Source #

Circuit type.

Constructors

Circuit 

Fields

type CircuitT a b = (Fwd a :-> Bwd b) -> Bwd a :-> Fwd b Source #

type TagCircuitT a b = (BusTag a (Fwd a) :-> BusTag b (Bwd b)) -> BusTag a (Bwd a) :-> BusTag b (Fwd b) Source #

newtype BusTag t b Source #

Constructors

BusTag 

Fields

Instances

Instances details
TrivialBwd a => TrivialBwd (BusTag t a) Source # 
Instance details

Defined in Circuit

Methods

unitBwd :: BusTag t a Source #

pattern TagCircuit :: TagCircuitT a b -> Circuit a b Source #

class TrivialBwd a where Source #

Methods

unitBwd :: a Source #

Instances

Instances details
TrivialBwd () Source # 
Instance details

Defined in Circuit

Methods

unitBwd :: () Source #

TrivialBwd a => TrivialBwd (BusTag t a) Source # 
Instance details

Defined in Circuit

Methods

unitBwd :: BusTag t a Source #

TrivialBwd a => TrivialBwd (Signal dom a) Source # 
Instance details

Defined in Circuit

Methods

unitBwd :: Signal dom a Source #

(TrivialBwd a, KnownNat n) => TrivialBwd (Vec n a) Source # 
Instance details

Defined in Circuit

Methods

unitBwd :: Vec n a Source #

(TrivialBwd a, TrivialBwd b) => TrivialBwd (a, b) Source # 
Instance details

Defined in Circuit

Methods

unitBwd :: (a, b) Source #

(TrivialBwd a, TrivialBwd b, TrivialBwd c) => TrivialBwd (a, b, c) Source # 
Instance details

Defined in Circuit

Methods

unitBwd :: (a, b, c) Source #

(TrivialBwd a, TrivialBwd b, TrivialBwd c, TrivialBwd d) => TrivialBwd (a, b, c, d) Source # 
Instance details

Defined in Circuit

Methods

unitBwd :: (a, b, c, d) Source #

(TrivialBwd a, TrivialBwd b, TrivialBwd c, TrivialBwd d, TrivialBwd e) => TrivialBwd (a, b, c, d, e) Source # 
Instance details

Defined in Circuit

Methods

unitBwd :: (a, b, c, d, e) Source #

(TrivialBwd a, TrivialBwd b, TrivialBwd c, TrivialBwd d, TrivialBwd e, TrivialBwd f) => TrivialBwd (a, b, c, d, e, f) Source # 
Instance details

Defined in Circuit

Methods

unitBwd :: (a, b, c, d, e, f) Source #

(TrivialBwd a, TrivialBwd b, TrivialBwd c, TrivialBwd d, TrivialBwd e, TrivialBwd f, TrivialBwd g) => TrivialBwd (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Circuit

Methods

unitBwd :: (a, b, c, d, e, f, g) Source #

(TrivialBwd a, TrivialBwd b, TrivialBwd c, TrivialBwd d, TrivialBwd e, TrivialBwd f, TrivialBwd g, TrivialBwd h) => TrivialBwd (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Circuit

Methods

unitBwd :: (a, b, c, d, e, f, g, h) Source #

(TrivialBwd a, TrivialBwd b, TrivialBwd c, TrivialBwd d, TrivialBwd e, TrivialBwd f, TrivialBwd g, TrivialBwd h, TrivialBwd i) => TrivialBwd (a, b, c, d, e, f, g, h, i) Source # 
Instance details

Defined in Circuit

Methods

unitBwd :: (a, b, c, d, e, f, g, h, i) Source #

(TrivialBwd a, TrivialBwd b, TrivialBwd c, TrivialBwd d, TrivialBwd e, TrivialBwd f, TrivialBwd g, TrivialBwd h, TrivialBwd i, TrivialBwd j) => TrivialBwd (a, b, c, d, e, f, g, h, i, j) Source # 
Instance details

Defined in Circuit

Methods

unitBwd :: (a, b, c, d, e, f, g, h, i, j) Source #

class BusTagBundle t a where Source #

Associated Types

type BusTagUnbundled t a = res | res -> t a Source #

Instances

Instances details
BusTagBundle () () Source # 
Instance details

Defined in Circuit

Associated Types

type BusTagUnbundled () () = (res :: Type) Source #

BusTagBundle (Vec n t) (Vec n a) Source # 
Instance details

Defined in Circuit

Associated Types

type BusTagUnbundled (Vec n t) (Vec n a) = (res :: Type) Source #

Methods

taggedBundle :: BusTagUnbundled (Vec n t) (Vec n a) -> BusTag (Vec n t) (Vec n a) Source #

taggedUnbundle :: BusTag (Vec n t) (Vec n a) -> BusTagUnbundled (Vec n t) (Vec n a) Source #

BusTagBundle (ta, tb) (a, b) Source # 
Instance details

Defined in Circuit

Associated Types

type BusTagUnbundled (ta, tb) (a, b) = (res :: Type) Source #

Methods

taggedBundle :: BusTagUnbundled (ta, tb) (a, b) -> BusTag (ta, tb) (a, b) Source #

taggedUnbundle :: BusTag (ta, tb) (a, b) -> BusTagUnbundled (ta, tb) (a, b) Source #

BusTagBundle (ta, tb, tc) (a, b, c) Source # 
Instance details

Defined in Circuit

Associated Types

type BusTagUnbundled (ta, tb, tc) (a, b, c) = (res :: Type) Source #

Methods

taggedBundle :: BusTagUnbundled (ta, tb, tc) (a, b, c) -> BusTag (ta, tb, tc) (a, b, c) Source #

taggedUnbundle :: BusTag (ta, tb, tc) (a, b, c) -> BusTagUnbundled (ta, tb, tc) (a, b, c) Source #

BusTagBundle (ta, tb, tc, td) (a, b, c, d) Source # 
Instance details

Defined in Circuit

Associated Types

type BusTagUnbundled (ta, tb, tc, td) (a, b, c, d) = (res :: Type) Source #

Methods

taggedBundle :: BusTagUnbundled (ta, tb, tc, td) (a, b, c, d) -> BusTag (ta, tb, tc, td) (a, b, c, d) Source #

taggedUnbundle :: BusTag (ta, tb, tc, td) (a, b, c, d) -> BusTagUnbundled (ta, tb, tc, td) (a, b, c, d) Source #

BusTagBundle (ta, tb, tc, td, te) (a, b, c, d, e) Source # 
Instance details

Defined in Circuit

Associated Types

type BusTagUnbundled (ta, tb, tc, td, te) (a, b, c, d, e) = (res :: Type) Source #

Methods

taggedBundle :: BusTagUnbundled (ta, tb, tc, td, te) (a, b, c, d, e) -> BusTag (ta, tb, tc, td, te) (a, b, c, d, e) Source #

taggedUnbundle :: BusTag (ta, tb, tc, td, te) (a, b, c, d, e) -> BusTagUnbundled (ta, tb, tc, td, te) (a, b, c, d, e) Source #

BusTagBundle (ta, tb, tc, td, te, tf) (a, b, c, d, e, f) Source # 
Instance details

Defined in Circuit

Associated Types

type BusTagUnbundled (ta, tb, tc, td, te, tf) (a, b, c, d, e, f) = (res :: Type) Source #

Methods

taggedBundle :: BusTagUnbundled (ta, tb, tc, td, te, tf) (a, b, c, d, e, f) -> BusTag (ta, tb, tc, td, te, tf) (a, b, c, d, e, f) Source #

taggedUnbundle :: BusTag (ta, tb, tc, td, te, tf) (a, b, c, d, e, f) -> BusTagUnbundled (ta, tb, tc, td, te, tf) (a, b, c, d, e, f) Source #

BusTagBundle (ta, tb, tc, td, te, tf, tg) (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Circuit

Associated Types

type BusTagUnbundled (ta, tb, tc, td, te, tf, tg) (a, b, c, d, e, f, g) = (res :: Type) Source #

Methods

taggedBundle :: BusTagUnbundled (ta, tb, tc, td, te, tf, tg) (a, b, c, d, e, f, g) -> BusTag (ta, tb, tc, td, te, tf, tg) (a, b, c, d, e, f, g) Source #

taggedUnbundle :: BusTag (ta, tb, tc, td, te, tf, tg) (a, b, c, d, e, f, g) -> BusTagUnbundled (ta, tb, tc, td, te, tf, tg) (a, b, c, d, e, f, g) Source #

BusTagBundle (ta, tb, tc, td, te, tf, tg, th) (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Circuit

Associated Types

type BusTagUnbundled (ta, tb, tc, td, te, tf, tg, th) (a, b, c, d, e, f, g, h) = (res :: Type) Source #

Methods

taggedBundle :: BusTagUnbundled (ta, tb, tc, td, te, tf, tg, th) (a, b, c, d, e, f, g, h) -> BusTag (ta, tb, tc, td, te, tf, tg, th) (a, b, c, d, e, f, g, h) Source #

taggedUnbundle :: BusTag (ta, tb, tc, td, te, tf, tg, th) (a, b, c, d, e, f, g, h) -> BusTagUnbundled (ta, tb, tc, td, te, tf, tg, th) (a, b, c, d, e, f, g, h) Source #

BusTagBundle (ta, tb, tc, td, te, tf, tg, th, ti) (a, b, c, d, e, f, g, h, i) Source # 
Instance details

Defined in Circuit

Associated Types

type BusTagUnbundled (ta, tb, tc, td, te, tf, tg, th, ti) (a, b, c, d, e, f, g, h, i) = (res :: Type) Source #

Methods

taggedBundle :: BusTagUnbundled (ta, tb, tc, td, te, tf, tg, th, ti) (a, b, c, d, e, f, g, h, i) -> BusTag (ta, tb, tc, td, te, tf, tg, th, ti) (a, b, c, d, e, f, g, h, i) Source #

taggedUnbundle :: BusTag (ta, tb, tc, td, te, tf, tg, th, ti) (a, b, c, d, e, f, g, h, i) -> BusTagUnbundled (ta, tb, tc, td, te, tf, tg, th, ti) (a, b, c, d, e, f, g, h, i) Source #

BusTagBundle (ta, tb, tc, td, te, tf, tg, th, ti, tj) (a, b, c, d, e, f, g, h, i, j) Source # 
Instance details

Defined in Circuit

Associated Types

type BusTagUnbundled (ta, tb, tc, td, te, tf, tg, th, ti, tj) (a, b, c, d, e, f, g, h, i, j) = (res :: Type) Source #

Methods

taggedBundle :: BusTagUnbundled (ta, tb, tc, td, te, tf, tg, th, ti, tj) (a, b, c, d, e, f, g, h, i, j) -> BusTag (ta, tb, tc, td, te, tf, tg, th, ti, tj) (a, b, c, d, e, f, g, h, i, j) Source #

taggedUnbundle :: BusTag (ta, tb, tc, td, te, tf, tg, th, ti, tj) (a, b, c, d, e, f, g, h, i, j) -> BusTagUnbundled (ta, tb, tc, td, te, tf, tg, th, ti, tj) (a, b, c, d, e, f, g, h, i, j) Source #