clash-prelude-1.2.4: CAES Language for Synchronous Hardware - Prelude library

Clash.Prelude.Safe

Description

This is the Safe API only of Clash.Prelude

Clash is a functional hardware description language that borrows both its syntax and semantics from the functional programming language Haskell. The merits of using a functional language to describe hardware comes from the fact that combinational circuits can be directly modeled as mathematical functions and that functional languages lend themselves very well at describing and (de-)composing mathematical functions.

This package provides:

• Prelude library containing datatypes and functions for circuit design

To use the library:

For now, Clash.Prelude is also the best starting point for exploring the library. A preliminary version of a tutorial can be found in Clash.Tutorial. Some circuit examples can be found in Clash.Examples.

Synopsis

# Creating synchronous sequential circuits

Arguments

 :: (HiddenClockResetEnable dom, NFDataX s) => (s -> i -> (s, o)) Transfer function in mealy machine form: state -> input -> (newstate,output) -> s Initial state -> Signal dom i -> Signal dom o Synchronous sequential function with input and output matching that of the mealy machine

Create a synchronous function from a combinational function describing a mealy machine

macT
:: Int        -- Current state
-> (Int,Int)  -- Input
-> (Int,Int)  -- (Updated state, output)
macT s (x,y) = (s',s)
where
s' = x * y + s

mac :: HiddenClockResetEnable dom  => Signal dom (Int, Int) -> Signal dom Int
mac = mealy macT 0

>>> simulate @System mac [(0,0),(1,1),(2,2),(3,3),(4,4)]
[0,0,1,5,14...
...


Synchronous sequential functions can be composed just like their combinational counterpart:

dualMac
:: HiddenClockResetEnable dom
=> (Signal dom Int, Signal dom Int)
-> (Signal dom Int, Signal dom Int)
-> Signal dom Int
dualMac (a,b) (x,y) = s1 + s2
where
s1 = mealy mac 0 (bundle (a,x))
s2 = mealy mac 0 (bundle (b,y))


Arguments

 :: (HiddenClockResetEnable dom, NFDataX s, Bundle i, Bundle o) => (s -> i -> (s, o)) Transfer function in mealy machine form: state -> input -> (newstate,output) -> s Initial state -> Unbundled dom i -> Unbundled dom o Synchronous sequential function with input and output matching that of the mealy machine

A version of mealy that does automatic Bundleing

Given a function f of type:

f :: Int -> (Bool, Int) -> (Int, (Int, Bool))


When we want to make compositions of f in g using mealy, we have to write:

g a b c = (b1,b2,i2)
where
(i1,b1) = unbundle (mealy f 0 (bundle (a,b)))
(i2,b2) = unbundle (mealy f 3 (bundle (c,i1)))


Using mealyB however we can write:

g a b c = (b1,b2,i2)
where
(i1,b1) = mealyB f 0 (a,b)
(i2,b2) = mealyB f 3 (c,i1)


Arguments

 :: (HiddenClockResetEnable dom, NFDataX s, Bundle i, Bundle o) => (s -> i -> (s, o)) Transfer function in mealy machine form: state -> input -> (newstate,output) -> s Initial state -> Unbundled dom i -> Unbundled dom o Synchronous sequential function with input and output matching that of the mealy machine

Infix version of mealyB

Arguments

 :: (HiddenClockResetEnable dom, NFDataX s) => (s -> i -> s) Transfer function in moore machine form: state -> input -> newstate -> (s -> o) Output function in moore machine form: state -> output -> s Initial state -> Signal dom i -> Signal dom o Synchronous sequential function with input and output matching that of the moore machine

Create a synchronous function from a combinational function describing a moore machine

macT
:: Int        -- Current state
-> (Int,Int)  -- Input
-> Int        -- Updated state
macT s (x,y) = x * y + s

mac
:: HiddenClockResetEnable dom
=> Signal dom (Int, Int)
-> Signal dom Int
mac = moore mac id 0

>>> simulate @System mac [(0,0),(1,1),(2,2),(3,3),(4,4)]
[0,0,1,5,14,30,...
...


Synchronous sequential functions can be composed just like their combinational counterpart:

dualMac
:: HiddenClockResetEnable dom
=> (Signal dom Int, Signal dom Int)
-> (Signal dom Int, Signal dom Int)
-> Signal dom Int
dualMac (a,b) (x,y) = s1 + s2
where
s1 = moore mac id 0 (bundle (a,x))
s2 = moore mac id 0 (bundle (b,y))


Arguments

 :: (HiddenClockResetEnable dom, NFDataX s, Bundle i, Bundle o) => (s -> i -> s) Transfer function in moore machine form: state -> input -> newstate -> (s -> o) Output function in moore machine form: state -> output -> s Initial state -> Unbundled dom i -> Unbundled dom o Synchronous sequential function with input and output matching that of the moore machine

A version of moore that does automatic Bundleing

Given a functions t and o of types:

t :: Int -> (Bool, Int) -> Int
o :: Int -> (Int, Bool)


When we want to make compositions of t and o in g using moore, we have to write:

g a b c = (b1,b2,i2)
where
(i1,b1) = unbundle (moore t o 0 (bundle (a,b)))
(i2,b2) = unbundle (moore t o 3 (bundle (c,i1)))


Using mooreB however we can write:

g a b c = (b1,b2,i2)
where
(i1,b1) = mooreB t o 0 (a,b)
(i2,b2) = mooreB t o 3 (c,i1)


registerB :: (HiddenClockResetEnable dom, NFDataX a, Bundle a) => a -> Unbundled dom a -> Unbundled dom a infixr 3 Source #

Create a register function for product-type like signals (e.g. '(Signal a, Signal b)')

rP :: HiddenClockResetEnable dom
=> (Signal dom Int, Signal dom Int)
-> (Signal dom Int, Signal dom Int)
rP = registerB (8,8)
>>> simulateB @System rP [(1,1),(2,2),(3,3)] :: [(Int,Int)]
[(8,8),(1,1),(2,2),(3,3)...
...


# ROMs

Arguments

 :: (KnownNat n, Enum addr) => Vec n a ROM contentNB: must be a constant -> addr Read address rd -> a The value of the ROM at address rd

An asynchronous/combinational ROM with space for n elements

Arguments

 :: KnownNat n => Vec (2 ^ n) a ROM contentNB: must be a constant -> Unsigned n Read address rd -> a The value of the ROM at address rd

An asynchronous/combinational ROM with space for 2^n elements

Arguments

 :: forall dom n m a. (NFDataX a, KnownNat n, KnownNat m, HiddenClock dom, HiddenEnable dom) => Vec n a ROM contentNB: must be a constant -> Signal dom (Unsigned m) Read address rd -> Signal dom a The value of the ROM at address rd

A ROM with a synchronous read port, with space for n elements

• NB: Read value is delayed by 1 cycle
• NB: Initial output value is undefined

Arguments

 :: forall dom n a. (KnownNat n, NFDataX a, HiddenClock dom, HiddenEnable dom) => Vec (2 ^ n) a ROM contentNB: must be a constant -> Signal dom (Unsigned n) Read address rd -> Signal dom a The value of the ROM at address rd

A ROM with a synchronous read port, with space for 2^n elements

• NB: Read value is delayed by 1 cycle
• NB: Initial output value is undefined

# RAM primitives with a combinational read port

Arguments

 :: (Enum addr, HiddenClock dom, HiddenEnable dom, HasCallStack) => SNat n Size n of the RAM -> Signal dom addr Read address r -> Signal dom (Maybe (addr, a)) (write address w, value to write) -> Signal dom a Value of the RAM at address r

Create a RAM with space for n elements.

• NB: Initial content of the RAM is undefined

Arguments

 :: (KnownNat n, HiddenClock dom, HiddenEnable dom, HasCallStack) => Signal dom (Unsigned n) Read address r -> Signal dom (Maybe (Unsigned n, a)) (write address w, value to write) -> Signal dom a Value of the RAM at address r

Create a RAM with space for 2^n elements

• NB: Initial content of the RAM is undefined

# BlockRAM primitives

Arguments

 :: (HasCallStack, HiddenClock dom, HiddenEnable dom, NFDataX a, Enum addr) => Vec n a Initial content of the BRAM, also determines the size, n, of the BRAM.NB: MUST be a constant. -> Signal dom addr Read address r -> Signal dom (Maybe (addr, a)) (write address w, value to write) -> Signal dom a Value of the blockRAM at address r from the previous clock cycle

Create a blockRAM with space for n elements.

• NB: Read value is delayed by 1 cycle
• NB: Initial output value is undefined
bram40
:: HiddenClock dom
=> Signal dom (Unsigned 6)
-> Signal dom (Maybe (Unsigned 6, Bit))
-> Signal dom Bit
bram40 = blockRam (replicate d40 1)


• See Clash.Prelude.BlockRam for more information on how to use a Block RAM.
• Use the adapter readNew for obtaining write-before-read semantics like this: readNew (blockRam inits) rd wrM.

Arguments

 :: (HasCallStack, HiddenClock dom, HiddenEnable dom, NFDataX a, KnownNat n) => Vec (2 ^ n) a Initial content of the BRAM, also determines the size, 2^n, of the BRAM.NB: MUST be a constant. -> Signal dom (Unsigned n) Read address r -> Signal dom (Maybe (Unsigned n, a)) (write address w, value to write) -> Signal dom a Value of the blockRAM at address r from the previous clock cycle

Create a blockRAM with space for 2^n elements

• NB: Read value is delayed by 1 cycle
• NB: Initial output value is undefined
bram32
:: HiddenClock dom
=> Signal dom (Unsigned 5)
-> Signal dom (Maybe (Unsigned 5, Bit))
-> Signal dom Bit
bram32 = blockRamPow2 (replicate d32 1)


• See Clash.Prelude.BlockRam for more information on how to use a Block RAM.
• Use the adapter readNew for obtaining write-before-read semantics like this: readNew (blockRamPow2 inits) rd wrM.

Arguments

 :: (HiddenClockResetEnable dom, NFDataX a, Eq addr) => (Signal dom addr -> Signal dom (Maybe (addr, a)) -> Signal dom a) The ram component -> Signal dom addr Read address r -> Signal dom (Maybe (addr, a)) (Write address w, value to write) -> Signal dom a Value of the ram at address r from the previous clock cycle

>>> import Clash.Prelude
>>> :t readNew (blockRam (0 :> 1 :> Nil))
readNew (blockRam (0 :> 1 :> Nil))
:: ...
...
...
...
... =>
Signal dom addr -> Signal dom (Maybe (addr, a)) -> Signal dom a


# Utility functions

Arguments

 :: (HiddenClockResetEnable dom, NFDataX a, Bounded a, Eq a) => a Starting value -> Signal dom a -> Signal dom Bool

Give a pulse when the Signal goes from minBound to maxBound

Arguments

 :: (HiddenClockResetEnable dom, NFDataX a, Bounded a, Eq a) => a Starting value -> Signal dom a -> Signal dom Bool

Give a pulse when the Signal goes from maxBound to minBound

riseEvery :: HiddenClockResetEnable dom => SNat n -> Signal dom Bool Source #

Give a pulse every n clock cycles. This is a useful helper function when combined with functions like regEn or mux, in order to delay a register by a known amount.

To be precise: the given signal will be False for the next n-1 cycles, followed by a single True value:

>>> Prelude.last (sampleN @System 1025 (riseEvery d1024)) == True
True
>>> Prelude.or (sampleN @System 1024 (riseEvery d1024)) == False
True


For example, to update a counter once every 10 million cycles:

counter = regEn 0 (riseEvery (SNat :: SNat 10000000)) (counter + 1)


oscillate :: HiddenClockResetEnable dom => Bool -> SNat n -> Signal dom Bool Source #

Oscillate a Bool for a given number of cycles. This is a convenient function when combined with something like regEn, as it allows you to easily hold a register value for a given number of cycles. The input Bool determines what the initial value is.

To oscillate on an interval of 5 cycles:

>>> sampleN @System 11 (oscillate False d5)
[False,False,False,False,False,False,True,True,True,True,True]


To oscillate between True and False:

>>> sampleN @System 11 (oscillate False d1)
[False,False,True,False,True,False,True,False,True,False,True]


An alternative definition for the above could be:

>>> let osc' = register False (not <\$> osc')
>>> sampleN @System 200 (oscillate False d1) == sampleN @System 200 osc'
True


# Exported modules

## Generics type-classes

class Generic a #

Representable types of kind *. This class is derivable in GHC with the DeriveGeneric flag on.

A Generic instance must satisfy the following laws:

from . to ≡ id
to . from ≡ id


Minimal complete definition

#### Instances

Instances details

class Generic1 (f :: k -> Type) #

Representable types of kind * -> * (or kind k -> *, when PolyKinds is enabled). This class is derivable in GHC with the DeriveGeneric flag on.

A Generic1 instance must satisfy the following laws:

from1 . to1 ≡ id
to1 . from1 ≡ id


Minimal complete definition

#### Instances

Instances details
 Generic1 (V1 :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 V1 :: k -> Type # Methodsfrom1 :: forall (a :: k0). V1 a -> Rep1 V1 a #to1 :: forall (a :: k0). Rep1 V1 a -> V1 a # Generic1 (U1 :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 U1 :: k -> Type # Methodsfrom1 :: forall (a :: k0). U1 a -> Rep1 U1 a #to1 :: forall (a :: k0). Rep1 U1 a -> U1 a # Generic1 (Proxy :: k -> Type) Since: base-4.6.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 Proxy :: k -> Type # Methodsfrom1 :: forall (a :: k0). Proxy a -> Rep1 Proxy a #to1 :: forall (a :: k0). Rep1 Proxy a -> Proxy a # Generic1 (FromTextShow1 f :: k -> Type) Instance detailsDefined in TextShow.FromStringTextShow Associated Typestype Rep1 (FromTextShow1 f) :: k -> Type # Methodsfrom1 :: forall (a :: k0). FromTextShow1 f a -> Rep1 (FromTextShow1 f) a #to1 :: forall (a :: k0). Rep1 (FromTextShow1 f) a -> FromTextShow1 f a # Generic1 (FromStringShow1 f :: k -> Type) Instance detailsDefined in TextShow.FromStringTextShow Associated Typestype Rep1 (FromStringShow1 f) :: k -> Type # Methodsfrom1 :: forall (a :: k0). FromStringShow1 f a -> Rep1 (FromStringShow1 f) a #to1 :: forall (a :: k0). Rep1 (FromStringShow1 f) a -> FromStringShow1 f a # Generic1 (FromGeneric1 f :: k -> Type) Instance detailsDefined in TextShow.Generic Associated Typestype Rep1 (FromGeneric1 f) :: k -> Type # Methodsfrom1 :: forall (a :: k0). FromGeneric1 f a -> Rep1 (FromGeneric1 f) a #to1 :: forall (a :: k0). Rep1 (FromGeneric1 f) a -> FromGeneric1 f a # Generic1 (Alt f :: k -> Type) Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Associated Typestype Rep1 (Alt f) :: k -> Type # Methodsfrom1 :: forall (a :: k0). Alt f a -> Rep1 (Alt f) a #to1 :: forall (a :: k0). Rep1 (Alt f) a -> Alt f a # Generic1 (Ap f :: k -> Type) Since: base-4.12.0.0 Instance detailsDefined in Data.Monoid Associated Typestype Rep1 (Ap f) :: k -> Type # Methodsfrom1 :: forall (a :: k0). Ap f a -> Rep1 (Ap f) a #to1 :: forall (a :: k0). Rep1 (Ap f) a -> Ap f a # Generic1 (Const a :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Associated Typestype Rep1 (Const a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k0). Const a a0 -> Rep1 (Const a) a0 #to1 :: forall (a0 :: k0). Rep1 (Const a) a0 -> Const a a0 # Generic1 (URec (Ptr ()) :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (URec (Ptr ())) :: k -> Type # Methodsfrom1 :: forall (a :: k0). URec (Ptr ()) a -> Rep1 (URec (Ptr ())) a #to1 :: forall (a :: k0). Rep1 (URec (Ptr ())) a -> URec (Ptr ()) a # Generic1 (URec Char :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (URec Char) :: k -> Type # Methodsfrom1 :: forall (a :: k0). URec Char a -> Rep1 (URec Char) a #to1 :: forall (a :: k0). Rep1 (URec Char) a -> URec Char a # Generic1 (URec Double :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (URec Double) :: k -> Type # Methodsfrom1 :: forall (a :: k0). URec Double a -> Rep1 (URec Double) a #to1 :: forall (a :: k0). Rep1 (URec Double) a -> URec Double a # Generic1 (URec Float :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (URec Float) :: k -> Type # Methodsfrom1 :: forall (a :: k0). URec Float a -> Rep1 (URec Float) a #to1 :: forall (a :: k0). Rep1 (URec Float) a -> URec Float a # Generic1 (URec Int :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (URec Int) :: k -> Type # Methodsfrom1 :: forall (a :: k0). URec Int a -> Rep1 (URec Int) a #to1 :: forall (a :: k0). Rep1 (URec Int) a -> URec Int a # Generic1 (URec Word :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (URec Word) :: k -> Type # Methodsfrom1 :: forall (a :: k0). URec Word a -> Rep1 (URec Word) a #to1 :: forall (a :: k0). Rep1 (URec Word) a -> URec Word a # Generic1 (Rec1 f :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (Rec1 f) :: k -> Type # Methodsfrom1 :: forall (a :: k0). Rec1 f a -> Rep1 (Rec1 f) a #to1 :: forall (a :: k0). Rep1 (Rec1 f) a -> Rec1 f a # Generic1 (Sum f g :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Sum Associated Typestype Rep1 (Sum f g) :: k -> Type # Methodsfrom1 :: forall (a :: k0). Sum f g a -> Rep1 (Sum f g) a #to1 :: forall (a :: k0). Rep1 (Sum f g) a -> Sum f g a # Generic1 (Product f g :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Product Associated Typestype Rep1 (Product f g) :: k -> Type # Methodsfrom1 :: forall (a :: k0). Product f g a -> Rep1 (Product f g) a #to1 :: forall (a :: k0). Rep1 (Product f g) a -> Product f g a # Generic1 (K1 i c :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (K1 i c) :: k -> Type # Methodsfrom1 :: forall (a :: k0). K1 i c a -> Rep1 (K1 i c) a #to1 :: forall (a :: k0). Rep1 (K1 i c) a -> K1 i c a # Generic1 (f :+: g :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (f :+: g) :: k -> Type # Methodsfrom1 :: forall (a :: k0). (f :+: g) a -> Rep1 (f :+: g) a #to1 :: forall (a :: k0). Rep1 (f :+: g) a -> (f :+: g) a # Generic1 (f :*: g :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (f :*: g) :: k -> Type # Methodsfrom1 :: forall (a :: k0). (f :*: g) a -> Rep1 (f :*: g) a #to1 :: forall (a :: k0). Rep1 (f :*: g) a -> (f :*: g) a # Generic1 (WrappedBifunctor p a :: k1 -> Type) Instance detailsDefined in Data.Bifunctor.Wrapped Associated Typestype Rep1 (WrappedBifunctor p a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). WrappedBifunctor p a a0 -> Rep1 (WrappedBifunctor p a) a0 #to1 :: forall (a0 :: k). Rep1 (WrappedBifunctor p a) a0 -> WrappedBifunctor p a a0 # Generic1 (Joker g a :: k1 -> Type) Instance detailsDefined in Data.Bifunctor.Joker Associated Typestype Rep1 (Joker g a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). Joker g a a0 -> Rep1 (Joker g a) a0 #to1 :: forall (a0 :: k). Rep1 (Joker g a) a0 -> Joker g a a0 # Generic1 (Clown f a :: k1 -> Type) Instance detailsDefined in Data.Bifunctor.Clown Associated Typestype Rep1 (Clown f a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). Clown f a a0 -> Rep1 (Clown f a) a0 #to1 :: forall (a0 :: k). Rep1 (Clown f a) a0 -> Clown f a a0 # Generic1 (FromTextShow2 f a :: k1 -> Type) Instance detailsDefined in TextShow.FromStringTextShow Associated Typestype Rep1 (FromTextShow2 f a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). FromTextShow2 f a a0 -> Rep1 (FromTextShow2 f a) a0 #to1 :: forall (a0 :: k). Rep1 (FromTextShow2 f a) a0 -> FromTextShow2 f a a0 # Generic1 (FromStringShow2 f a :: k1 -> Type) Instance detailsDefined in TextShow.FromStringTextShow Associated Typestype Rep1 (FromStringShow2 f a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). FromStringShow2 f a a0 -> Rep1 (FromStringShow2 f a) a0 #to1 :: forall (a0 :: k). Rep1 (FromStringShow2 f a) a0 -> FromStringShow2 f a a0 # Functor f => Generic1 (Compose f g :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Compose Associated Typestype Rep1 (Compose f g) :: k -> Type # Methodsfrom1 :: forall (a :: k0). Compose f g a -> Rep1 (Compose f g) a #to1 :: forall (a :: k0). Rep1 (Compose f g) a -> Compose f g a # Generic1 (M1 i c f :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (M1 i c f) :: k -> Type # Methodsfrom1 :: forall (a :: k0). M1 i c f a -> Rep1 (M1 i c f) a #to1 :: forall (a :: k0). Rep1 (M1 i c f) a -> M1 i c f a # Functor f => Generic1 (f :.: g :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (f :.: g) :: k -> Type # Methodsfrom1 :: forall (a :: k0). (f :.: g) a -> Rep1 (f :.: g) a #to1 :: forall (a :: k0). Rep1 (f :.: g) a -> (f :.: g) a # Generic1 (Sum p q a :: k1 -> Type) Instance detailsDefined in Data.Bifunctor.Sum Associated Typestype Rep1 (Sum p q a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). Sum p q a a0 -> Rep1 (Sum p q a) a0 #to1 :: forall (a0 :: k). Rep1 (Sum p q a) a0 -> Sum p q a a0 # Generic1 (Product f g a :: k1 -> Type) Instance detailsDefined in Data.Bifunctor.Product Associated Typestype Rep1 (Product f g a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). Product f g a a0 -> Rep1 (Product f g a) a0 #to1 :: forall (a0 :: k). Rep1 (Product f g a) a0 -> Product f g a a0 # Functor f => Generic1 (Tannen f p a :: k2 -> Type) Instance detailsDefined in Data.Bifunctor.Tannen Associated Typestype Rep1 (Tannen f p a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). Tannen f p a a0 -> Rep1 (Tannen f p a) a0 #to1 :: forall (a0 :: k). Rep1 (Tannen f p a) a0 -> Tannen f p a a0 # Functor (p (f a)) => Generic1 (Biff p f g a :: k3 -> Type) Instance detailsDefined in Data.Bifunctor.Biff Associated Typestype Rep1 (Biff p f g a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). Biff p f g a a0 -> Rep1 (Biff p f g a) a0 #to1 :: forall (a0 :: k). Rep1 (Biff p f g a) a0 -> Biff p f g a a0 # Generic1 [] Since: base-4.6.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 [] :: k -> Type # Methodsfrom1 :: forall (a :: k). [a] -> Rep1 [] a #to1 :: forall (a :: k). Rep1 [] a -> [a] # Since: base-4.6.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 Maybe :: k -> Type # Methodsfrom1 :: forall (a :: k). Maybe a -> Rep1 Maybe a #to1 :: forall (a :: k). Rep1 Maybe a -> Maybe a # Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 Par1 :: k -> Type # Methodsfrom1 :: forall (a :: k). Par1 a -> Rep1 Par1 a #to1 :: forall (a :: k). Rep1 Par1 a -> Par1 a # Since: base-4.9.0.0 Instance detailsDefined in Data.Complex Associated Typestype Rep1 Complex :: k -> Type # Methodsfrom1 :: forall (a :: k). Complex a -> Rep1 Complex a #to1 :: forall (a :: k). Rep1 Complex a -> Complex a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Associated Typestype Rep1 Min :: k -> Type # Methodsfrom1 :: forall (a :: k). Min a -> Rep1 Min a #to1 :: forall (a :: k). Rep1 Min a -> Min a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Associated Typestype Rep1 Max :: k -> Type # Methodsfrom1 :: forall (a :: k). Max a -> Rep1 Max a #to1 :: forall (a :: k). Rep1 Max a -> Max a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Associated Typestype Rep1 First :: k -> Type # Methodsfrom1 :: forall (a :: k). First a -> Rep1 First a #to1 :: forall (a :: k). Rep1 First a -> First a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Associated Typestype Rep1 Last :: k -> Type # Methodsfrom1 :: forall (a :: k). Last a -> Rep1 Last a #to1 :: forall (a :: k). Rep1 Last a -> Last a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Associated Typestype Rep1 WrappedMonoid :: k -> Type # Methodsfrom1 :: forall (a :: k). WrappedMonoid a -> Rep1 WrappedMonoid a #to1 :: forall (a :: k). Rep1 WrappedMonoid a -> WrappedMonoid a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Associated Typestype Rep1 Option :: k -> Type # Methodsfrom1 :: forall (a :: k). Option a -> Rep1 Option a #to1 :: forall (a :: k). Rep1 Option a -> Option a # Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Associated Typestype Rep1 ZipList :: k -> Type # Methodsfrom1 :: forall (a :: k). ZipList a -> Rep1 ZipList a #to1 :: forall (a :: k). Rep1 ZipList a -> ZipList a # Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Associated Typestype Rep1 Identity :: k -> Type # Methodsfrom1 :: forall (a :: k). Identity a -> Rep1 Identity a #to1 :: forall (a :: k). Rep1 Identity a -> Identity a # Since: base-4.7.0.0 Instance detailsDefined in Data.Monoid Associated Typestype Rep1 First :: k -> Type # Methodsfrom1 :: forall (a :: k). First a -> Rep1 First a #to1 :: forall (a :: k). Rep1 First a -> First a # Since: base-4.7.0.0 Instance detailsDefined in Data.Monoid Associated Typestype Rep1 Last :: k -> Type # Methodsfrom1 :: forall (a :: k). Last a -> Rep1 Last a #to1 :: forall (a :: k). Rep1 Last a -> Last a # Since: base-4.7.0.0 Instance detailsDefined in Data.Semigroup.Internal Associated Typestype Rep1 Dual :: k -> Type # Methodsfrom1 :: forall (a :: k). Dual a -> Rep1 Dual a #to1 :: forall (a :: k). Rep1 Dual a -> Dual a # Since: base-4.7.0.0 Instance detailsDefined in Data.Semigroup.Internal Associated Typestype Rep1 Sum :: k -> Type # Methodsfrom1 :: forall (a :: k). Sum a -> Rep1 Sum a #to1 :: forall (a :: k). Rep1 Sum a -> Sum a # Since: base-4.7.0.0 Instance detailsDefined in Data.Semigroup.Internal Associated Typestype Rep1 Product :: k -> Type # Methodsfrom1 :: forall (a :: k). Product a -> Rep1 Product a #to1 :: forall (a :: k). Rep1 Product a -> Product a # Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 Down :: k -> Type # Methodsfrom1 :: forall (a :: k). Down a -> Rep1 Down a #to1 :: forall (a :: k). Rep1 Down a -> Down a # Since: base-4.6.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 NonEmpty :: k -> Type # Methodsfrom1 :: forall (a :: k). NonEmpty a -> Rep1 NonEmpty a #to1 :: forall (a :: k). Rep1 NonEmpty a -> NonEmpty a # Since: containers-0.5.8 Instance detailsDefined in Data.Tree Associated Typestype Rep1 Tree :: k -> Type # Methodsfrom1 :: forall (a :: k). Tree a -> Rep1 Tree a #to1 :: forall (a :: k). Rep1 Tree a -> Tree a # Since: containers-0.6.1 Instance detailsDefined in Data.Sequence.Internal Associated Typestype Rep1 FingerTree :: k -> Type # Methodsfrom1 :: forall (a :: k). FingerTree a -> Rep1 FingerTree a #to1 :: forall (a :: k). Rep1 FingerTree a -> FingerTree a # Since: containers-0.6.1 Instance detailsDefined in Data.Sequence.Internal Associated Typestype Rep1 Digit :: k -> Type # Methodsfrom1 :: forall (a :: k). Digit a -> Rep1 Digit a #to1 :: forall (a :: k). Rep1 Digit a -> Digit a # Since: containers-0.6.1 Instance detailsDefined in Data.Sequence.Internal Associated Typestype Rep1 Node :: k -> Type # Methodsfrom1 :: forall (a :: k). Node a -> Rep1 Node a #to1 :: forall (a :: k). Rep1 Node a -> Node a # Since: containers-0.6.1 Instance detailsDefined in Data.Sequence.Internal Associated Typestype Rep1 Elem :: k -> Type # Methodsfrom1 :: forall (a :: k). Elem a -> Rep1 Elem a #to1 :: forall (a :: k). Rep1 Elem a -> Elem a # Since: containers-0.5.8 Instance detailsDefined in Data.Sequence.Internal Associated Typestype Rep1 ViewL :: k -> Type # Methodsfrom1 :: forall (a :: k). ViewL a -> Rep1 ViewL a #to1 :: forall (a :: k). Rep1 ViewL a -> ViewL a # Since: containers-0.5.8 Instance detailsDefined in Data.Sequence.Internal Associated Typestype Rep1 ViewR :: k -> Type # Methodsfrom1 :: forall (a :: k). ViewR a -> Rep1 ViewR a #to1 :: forall (a :: k). Rep1 ViewR a -> ViewR a # Instance detailsDefined in TextShow.Generic Associated Typestype Rep1 FromGeneric :: k -> Type # Methodsfrom1 :: forall (a :: k). FromGeneric a -> Rep1 FromGeneric a #to1 :: forall (a :: k). Rep1 FromGeneric a -> FromGeneric a # Instance detailsDefined in TextShow.FromStringTextShow Associated Typestype Rep1 FromStringShow :: k -> Type # Methodsfrom1 :: forall (a :: k). FromStringShow a -> Rep1 FromStringShow a #to1 :: forall (a :: k). Rep1 FromStringShow a -> FromStringShow a # Instance detailsDefined in TextShow.FromStringTextShow Associated Typestype Rep1 FromTextShow :: k -> Type # Methodsfrom1 :: forall (a :: k). FromTextShow a -> Rep1 FromTextShow a #to1 :: forall (a :: k). Rep1 FromTextShow a -> FromTextShow a # Generic1 (Either a :: Type -> Type) Since: base-4.6.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (Either a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). Either a a0 -> Rep1 (Either a) a0 #to1 :: forall (a0 :: k). Rep1 (Either a) a0 -> Either a a0 # Generic1 ((,) a :: Type -> Type) Since: base-4.6.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 ((,) a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). (a, a0) -> Rep1 ((,) a) a0 #to1 :: forall (a0 :: k). Rep1 ((,) a) a0 -> (a, a0) # Generic1 (Arg a :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Associated Typestype Rep1 (Arg a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). Arg a a0 -> Rep1 (Arg a) a0 #to1 :: forall (a0 :: k). Rep1 (Arg a) a0 -> Arg a a0 # Generic1 (WrappedMonad m :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Associated Typestype Rep1 (WrappedMonad m) :: k -> Type # Methodsfrom1 :: forall (a :: k). WrappedMonad m a -> Rep1 (WrappedMonad m) a #to1 :: forall (a :: k). Rep1 (WrappedMonad m) a -> WrappedMonad m a # Functor f => Generic1 (Cofree f :: Type -> Type) Instance detailsDefined in Control.Comonad.Cofree Associated Typestype Rep1 (Cofree f) :: k -> Type # Methodsfrom1 :: forall (a :: k). Cofree f a -> Rep1 (Cofree f) a #to1 :: forall (a :: k). Rep1 (Cofree f) a -> Cofree f a # Functor f => Generic1 (Free f :: Type -> Type) Instance detailsDefined in Control.Monad.Free Associated Typestype Rep1 (Free f) :: k -> Type # Methodsfrom1 :: forall (a :: k). Free f a -> Rep1 (Free f) a #to1 :: forall (a :: k). Rep1 (Free f) a -> Free f a # Generic1 (ListF a :: Type -> Type) Instance detailsDefined in Data.Functor.Base Associated Typestype Rep1 (ListF a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). ListF a a0 -> Rep1 (ListF a) a0 #to1 :: forall (a0 :: k). Rep1 (ListF a) a0 -> ListF a a0 # Generic1 (NonEmptyF a :: Type -> Type) Instance detailsDefined in Data.Functor.Base Associated Typestype Rep1 (NonEmptyF a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). NonEmptyF a a0 -> Rep1 (NonEmptyF a) a0 #to1 :: forall (a0 :: k). Rep1 (NonEmptyF a) a0 -> NonEmptyF a a0 # Generic1 (TreeF a :: Type -> Type) Instance detailsDefined in Data.Functor.Base Associated Typestype Rep1 (TreeF a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). TreeF a a0 -> Rep1 (TreeF a) a0 #to1 :: forall (a0 :: k). Rep1 (TreeF a) a0 -> TreeF a a0 # Generic1 ((,,) a b :: Type -> Type) Since: base-4.6.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 ((,,) a b) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). (a, b, a0) -> Rep1 ((,,) a b) a0 #to1 :: forall (a0 :: k). Rep1 ((,,) a b) a0 -> (a, b, a0) # Generic1 (WrappedArrow a b :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Associated Typestype Rep1 (WrappedArrow a b) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). WrappedArrow a b a0 -> Rep1 (WrappedArrow a b) a0 #to1 :: forall (a0 :: k). Rep1 (WrappedArrow a b) a0 -> WrappedArrow a b a0 # Generic1 (Kleisli m a :: Type -> Type) Since: base-4.14.0.0 Instance detailsDefined in Control.Arrow Associated Typestype Rep1 (Kleisli m a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). Kleisli m a a0 -> Rep1 (Kleisli m a) a0 #to1 :: forall (a0 :: k). Rep1 (Kleisli m a) a0 -> Kleisli m a a0 # Generic1 (FreeF f a :: Type -> Type) Instance detailsDefined in Control.Monad.Trans.Free Associated Typestype Rep1 (FreeF f a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). FreeF f a a0 -> Rep1 (FreeF f a) a0 #to1 :: forall (a0 :: k). Rep1 (FreeF f a) a0 -> FreeF f a a0 # Generic1 (CofreeF f a :: Type -> Type) Instance detailsDefined in Control.Comonad.Trans.Cofree Associated Typestype Rep1 (CofreeF f a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). CofreeF f a a0 -> Rep1 (CofreeF f a) a0 #to1 :: forall (a0 :: k). Rep1 (CofreeF f a) a0 -> CofreeF f a a0 # Generic1 (Tagged s :: Type -> Type) Instance detailsDefined in Data.Tagged Associated Typestype Rep1 (Tagged s) :: k -> Type # Methodsfrom1 :: forall (a :: k). Tagged s a -> Rep1 (Tagged s) a #to1 :: forall (a :: k). Rep1 (Tagged s) a -> Tagged s a # Generic1 ((,,,) a b c :: Type -> Type) Since: base-4.6.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 ((,,,) a b c) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). (a, b, c, a0) -> Rep1 ((,,,) a b c) a0 #to1 :: forall (a0 :: k). Rep1 ((,,,) a b c) a0 -> (a, b, c, a0) # Generic1 ((,,,,) a b c d :: Type -> Type) Since: base-4.6.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 ((,,,,) a b c d) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). (a, b, c, d, a0) -> Rep1 ((,,,,) a b c d) a0 #to1 :: forall (a0 :: k). Rep1 ((,,,,) a b c d) a0 -> (a, b, c, d, a0) # Generic1 ((,,,,,) a b c d e :: Type -> Type) Since: base-4.6.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 ((,,,,,) a b c d e) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). (a, b, c, d, e, a0) -> Rep1 ((,,,,,) a b c d e) a0 #to1 :: forall (a0 :: k). Rep1 ((,,,,,) a b c d e) a0 -> (a, b, c, d, e, a0) # Generic1 ((,,,,,,) a b c d e f :: Type -> Type) Since: base-4.6.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 ((,,,,,,) a b c d e f) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). (a, b, c, d, e, f, a0) -> Rep1 ((,,,,,,) a b c d e f) a0 #to1 :: forall (a0 :: k). Rep1 ((,,,,,,) a b c d e f) a0 -> (a, b, c, d, e, f, a0) #

module Data.Bits

## Hidden arguments

It instead exports the identically named functions defined in terms of Vec at Clash.Sized.Vector.