clash-prelude-0.9999: CAES Language for Synchronous Hardware - Prelude library
Copyright(C) 2013-2016 University of Twente
2017 Google Inc.
2019 Myrtle Software Ltd
LicenseBSD2 (see the file LICENSE)
MaintainerChristiaan Baaij <christiaan.baaij@gmail.com>
Safe HaskellUnsafe
LanguageHaskell2010
Extensions
  • DataKinds
  • TypeOperators
  • ExplicitNamespaces

Clash.Explicit.Prelude

Description

This module defines the explicitly clocked counterparts of the functions defined in Clash.Prelude.

Synopsis

Creating synchronous sequential circuits

mealy Source #

Arguments

:: (KnownDomain dom, Undefined s) 
=> Clock dom

Clock to synchronize to

-> Reset dom 
-> Enable dom

Global enable

-> (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

import qualified Data.List as L

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

mac
  :: KnownDomain dom
  => Clock dom
  -> Reset dom
  -> Enable dom
  -> Signal dom (Int, Int)
  -> Signal dom Int
mac clk rst en = mealy clk rst en macT 0
>>> simulate (mac systemClockGen systemResetGen enableGen) [(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
  :: KnownDomain dom
  => Clock dom
  -> Reset dom
  -> Enable dom
  -> (Signal dom Int, Signal dom Int)
  -> (Signal dom Int, Signal dom Int)
  -> Signal dom Int
dualMac clk rst en (a,b) (x,y) = s1 + s2
  where
    s1 = mealy clk rst en mac 0 (bundle (a,x))
    s2 = mealy clk rst en mac 0 (bundle (b,y))

mealyB Source #

Arguments

:: (KnownDomain dom, Undefined s, Bundle i, Bundle o) 
=> Clock dom 
-> Reset dom 
-> Enable dom 
-> (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 clk rst en a b c = (b1,b2,i2)
  where
    (i1,b1) = unbundle (mealy clk rst en f 0 (bundle (a,b)))
    (i2,b2) = unbundle (mealy clk rst en f 3 (bundle (c,i1)))

Using mealyB however we can write:

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

moore Source #

Arguments

:: (KnownDomain dom, Undefined s) 
=> Clock dom

Clock to synchronize to

-> Reset dom 
-> Enable dom 
-> (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,Int)  -- Updated state
macT s (x,y) = x * y + s

mac
  :: KnownDomain dom
  => Clock dom
  -> Reset dom
  -> Enable dom
  -> Signal dom (Int, Int)
  -> Signal dom Int
mac clk rst en = moore clk rst en macT id 0
>>> simulate (mac systemClockGen systemResetGen enableGen) [(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
  :: KnownDomain dom
  => Clock dom
  -> Reset dom
  -> Enable dom
  -> (Signal dom Int, Signal dom Int)
  -> (Signal dom Int, Signal dom Int)
  -> Signal dom Int
dualMac clk rst en (a,b) (x,y) = s1 + s2
  where
    s1 = moore clk rst en mac id 0 (bundle (a,x))
    s2 = moore clk rst en mac id 0 (bundle (b,y))

mooreB Source #

Arguments

:: (KnownDomain dom, Undefined s, Bundle i, Bundle o) 
=> Clock dom 
-> Reset dom 
-> Enable dom 
-> (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 clk rst en a b c = (b1,b2,i2)
  where
    (i1,b1) = unbundle (moore clk rst en t o 0 (bundle (a,b)))
    (i2,b2) = unbundle (moore clk rst en t o 3 (bundle (c,i1)))

Using mooreB however we can write:

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

registerB :: (KnownDomain dom, Undefined a, Bundle a) => Clock dom -> Reset dom -> Enable dom -> a -> Unbundled dom a -> Unbundled dom a Source #

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

rP :: Clock dom -> Reset dom -> Enable dom
   -> (Signal dom Int, Signal dom Int)
   -> (Signal dom Int, Signal dom Int)
rP clk rst en = registerB clk rst en (8,8)
>>> simulateB (rP systemClockGen systemResetGen enableGen) [(1,1),(1,1),(2,2),(3,3)] :: [(Int,Int)]
[(8,8),(8,8),(1,1),(2,2),(3,3)...
...

Synchronizer circuits for safe clock domain crossings

dualFlipFlopSynchronizer Source #

Arguments

:: (Undefined a, KnownDomain dom1, KnownDomain dom2) 
=> Clock dom1

Clock to which the incoming data is synchronized

-> Clock dom2

Clock to which the outgoing data is synchronized

-> Reset dom2

Reset for registers on the outgoing domain

-> Enable dom2

Enable for registers on the outgoing domain

-> a

Initial value of the two synchronization registers

-> Signal dom1 a

Incoming data

-> Signal dom2 a

Outgoing, synchronized, data

Synchronizer based on two sequentially connected flip-flops.

  • NB: This synchronizer can be used for bit-synchronization.
  • NB: Although this synchronizer does reduce metastability, it does not guarantee the proper synchronization of a whole word. For example, given that the output is sampled twice as fast as the input is running, and we have two samples in the input stream that look like:

    [0111,1000]

    But the circuit driving the input stream has a longer propagation delay on msb compared to the lsbs. What can happen is an output stream that looks like this:

    [0111,0111,0000,1000]

    Where the level-change of the msb was not captured, but the level change of the lsbs were.

    If you want to have safe word-synchronization use asyncFIFOSynchronizer.

asyncFIFOSynchronizer Source #

Arguments

:: (KnownDomain wdom, KnownDomain rdom, 2 <= addrSize) 
=> SNat addrSize

Size of the internally used addresses, the FIFO contains 2^addrSize elements.

-> Clock wdom

Clock to which the write port is synchronized

-> Clock rdom

Clock to which the read port is synchronized

-> Reset wdom 
-> Reset rdom 
-> Enable wdom 
-> Enable rdom 
-> Signal rdom Bool

Read request

-> Signal wdom (Maybe a)

Element to insert

-> (Signal rdom a, Signal rdom Bool, Signal wdom Bool)

(Oldest element in the FIFO, empty flag, full flag)

Synchronizer implemented as a FIFO around an asynchronous RAM. Based on the design described in Clash.Tutorial, which is itself based on the design described in http://www.sunburst-design.com/papers/CummingsSNUG2002SJ_FIFO1.pdf.

NB: This synchronizer can be used for word-synchronization.

ROMs

asyncRom Source #

Arguments

:: (KnownNat n, Enum addr) 
=> Vec n a

ROM content

NB: 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

Additional helpful information:

asyncRomPow2 Source #

Arguments

:: KnownNat n 
=> Vec (2 ^ n) a

ROM content

NB: 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

Additional helpful information:

rom Source #

Arguments

:: (KnownDomain dom, KnownNat n, Undefined a, Enum addr) 
=> Clock dom

Clock to synchronize to

-> Enable dom

Global enable

-> Vec n a

ROM content

NB: must be a constant

-> Signal dom addr

Read address rd

-> Signal dom a

The value of the ROM at address rd from the previous clock cycle

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

Additional helpful information:

romPow2 Source #

Arguments

:: (KnownDomain dom, KnownNat n, Undefined a) 
=> Clock dom

Clock to synchronize to

-> Enable dom

Global enable

-> Vec (2 ^ n) a

ROM content

NB: 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

Additional helpful information:

ROMs initialized with a data file

asyncRomFile Source #

Arguments

:: (KnownNat m, Enum addr) 
=> SNat n

Size of the ROM

-> FilePath

File describing the content of the ROM

-> addr

Read address rd

-> BitVector m

The value of the ROM at address rd

An asynchronous/combinational ROM with space for n elements

  • NB: This function might not work for specific combinations of code-generation backends and hardware targets. Please check the support table below:

                   | VHDL     | Verilog  | SystemVerilog |
    ===============+==========+==========+===============+
    Altera/Quartus | Broken   | Works    | Works         |
    Xilinx/ISE     | Works    | Works    | Works         |
    ASIC           | Untested | Untested | Untested      |
    ===============+==========+==========+===============+
    

Additional helpful information:

  • See Clash.Prelude.ROM.File for more information on how to instantiate a ROM with the contents of a data file.
  • See Clash.Sized.Fixed for ideas on how to create your own data files.
  • When you notice that asyncRomFile is significantly slowing down your simulation, give it a monomorphic type signature. So instead of leaving the type to be inferred:

    myRomData = asyncRomFile d512 "memory.bin"
    

    or giving it a polymorphic type signature:

    myRomData :: Enum addr => addr -> BitVector 16
    myRomData = asyncRomFile d512 "memory.bin"
    

    you should give it a monomorphic type signature:

    myRomData :: Unsigned 9 -> BitVector 16
    myRomData = asyncRomFile d512 "memory.bin"
    

asyncRomFilePow2 Source #

Arguments

:: forall n m. (KnownNat m, KnownNat n) 
=> FilePath

File describing the content of the ROM

-> Unsigned n

Read address rd

-> BitVector m

The value of the ROM at address rd

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

  • NB: This function might not work for specific combinations of code-generation backends and hardware targets. Please check the support table below:

                   | VHDL     | Verilog  | SystemVerilog |
    ===============+==========+==========+===============+
    Altera/Quartus | Broken   | Works    | Works         |
    Xilinx/ISE     | Works    | Works    | Works         |
    ASIC           | Untested | Untested | Untested      |
    ===============+==========+==========+===============+
    

Additional helpful information:

  • See Clash.Prelude.ROM.File for more information on how to instantiate a ROM with the contents of a data file.
  • See Clash.Sized.Fixed for ideas on how to create your own data files.
  • When you notice that asyncRomFilePow2 is significantly slowing down your simulation, give it a monomorphic type signature. So instead of leaving the type to be inferred:

    myRomData = asyncRomFilePow2 "memory.bin"
    

    you should give it a monomorphic type signature:

    myRomData :: Unsigned 9 -> BitVector 16
    myRomData = asyncRomFilePow2 "memory.bin"
    

romFile Source #

Arguments

:: (KnownNat m, Enum addr, KnownDomain dom) 
=> Clock dom

Clock to synchronize to

-> Enable dom

Global enable

-> SNat n

Size of the ROM

-> FilePath

File describing the content of the ROM

-> Signal dom addr

Read address rd

-> Signal dom (BitVector m)

The value of the ROM at address rd from the previous clock cycle

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
  • NB: This function might not work for specific combinations of code-generation backends and hardware targets. Please check the support table below:

                   | VHDL     | Verilog  | SystemVerilog |
    ===============+==========+==========+===============+
    Altera/Quartus | Broken   | Works    | Works         |
    Xilinx/ISE     | Works    | Works    | Works         |
    ASIC           | Untested | Untested | Untested      |
    ===============+==========+==========+===============+
    

Additional helpful information:

romFilePow2 Source #

Arguments

:: forall dom n m. (KnownNat m, KnownNat n, KnownDomain dom) 
=> Clock dom

Clock to synchronize to

-> Enable dom

Global enable

-> FilePath

File describing the content of the ROM

-> Signal dom (Unsigned n)

Read address rd

-> Signal dom (BitVector m)

The value of the ROM at address rd from the previous clock cycle

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
  • NB: This function might not work for specific combinations of code-generation backends and hardware targets. Please check the support table below:

                   | VHDL     | Verilog  | SystemVerilog |
    ===============+==========+==========+===============+
    Altera/Quartus | Broken   | Works    | Works         |
    Xilinx/ISE     | Works    | Works    | Works         |
    ASIC           | Untested | Untested | Untested      |
    ===============+==========+==========+===============+
    

Additional helpful information:

RAM primitives with a combinational read port

asyncRam Source #

Arguments

:: (Enum addr, HasCallStack, KnownDomain wdom, KnownDomain rdom) 
=> Clock wdom

Clock to which to synchronize the write port of the RAM

-> Clock rdom

Clock to which the read address signal, r, is synchronized to

-> Enable wdom

Global enable

-> SNat n

Size n of the RAM

-> Signal rdom addr

Read address r

-> Signal wdom (Maybe (addr, a))

(write address w, value to write)

-> Signal rdom a

Value of the RAM at address r

Create a RAM with space for n elements

Additional helpful information:

asyncRamPow2 Source #

Arguments

:: forall wdom rdom n a. (KnownNat n, HasCallStack, KnownDomain wdom, KnownDomain rdom) 
=> Clock wdom

Clock to which to synchronize the write port of the RAM

-> Clock rdom

Clock to which the read address signal, r, is synchronized

-> Enable wdom

Global enable

-> Signal rdom (Unsigned n)

Read address r

-> Signal wdom (Maybe (Unsigned n, a))

(write address w, value to write)

-> Signal rdom a

Value of the RAM at address r

Create a RAM with space for 2^n elements

Additional helpful information:

BlockRAM primitives

blockRam Source #

Arguments

:: (KnownDomain dom, HasCallStack, Undefined a, Enum addr) 
=> Clock dom

Clock to synchronize to

-> Enable dom

Global enable

-> 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
  :: Clock  dom
  -> Enable  dom
  -> Signal dom (Unsigned 6)
  -> Signal dom (Maybe (Unsigned 6, Bit))
  -> Signal dom Bit
bram40 clk en = blockRam clk en (replicate d40 1)

Additional helpful information:

blockRamPow2 Source #

Arguments

:: (KnownDomain dom, HasCallStack, Undefined a, KnownNat n) 
=> Clock dom

Clock to synchronize to

-> Enable dom

Global enable

-> 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
  :: Clock dom
  -> Enable dom
  -> Signal dom (Unsigned 5)
  -> Signal dom (Maybe (Unsigned 5, Bit))
  -> Signal dom Bit
bram32 clk en = blockRamPow2 clk en (replicate d32 1)

Additional helpful information:

blockRamU Source #

Arguments

:: forall n dom a r addr. (KnownDomain dom, HasCallStack, Undefined a, Enum addr, 1 <= n) 
=> Clock dom

Clock to synchronize to

-> Reset dom

Reset line to listen to. Needs to be held at least n cycles in order for the BRAM to be reset to its initial state.

-> Enable dom

Global enable

-> ResetStrategy r

Whether to clear BRAM on asserted reset (ClearOnReset) or not (NoClearOnReset). Reset needs to be asserted at least n cycles to clear the BRAM.

-> SNat n

Number of elements in BRAM

-> (Index n -> a)

If applicable (see first argument), reset BRAM using this function.

-> 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

Version of blockram that has no default values set. May be cleared to a arbitrary state using a reset function.

blockRam1 Source #

Arguments

:: forall n dom a r addr. (KnownDomain dom, HasCallStack, Undefined a, Enum addr, 1 <= n) 
=> Clock dom

Clock to synchronize to

-> Reset dom

Reset line to listen to. Needs to be held at least n cycles in order for the BRAM to be reset to its initial state.

-> Enable dom

Global enable

-> ResetStrategy r

Whether to clear BRAM on asserted reset (ClearOnReset) or not (NoClearOnReset). Reset needs to be asserted at least n cycles to clear the BRAM.

-> SNat n

Number of elements in BRAM

-> a

Initial content of the BRAM (replicated n times)

-> 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

Version of blockram that is initialized with the same value on all memory positions.

BlockRAM primitives initialized with a data file

blockRamFile Source #

Arguments

:: (KnownDomain dom, KnownNat m, Enum addr, HasCallStack) 
=> Clock dom

Clock to synchronize to

-> Enable dom

Global enable

-> SNat n

Size of the blockRAM

-> FilePath

File describing the initial content of the blockRAM

-> Signal dom addr

Read address r

-> Signal dom (Maybe (addr, BitVector m))

(write address w, value to write)

-> Signal dom (BitVector m)

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
  • NB: This function might not work for specific combinations of code-generation backends and hardware targets. Please check the support table below:

                   | VHDL     | Verilog  | SystemVerilog |
    ===============+==========+==========+===============+
    Altera/Quartus | Broken   | Works    | Works         |
    Xilinx/ISE     | Works    | Works    | Works         |
    ASIC           | Untested | Untested | Untested      |
    ===============+==========+==========+===============+
    

Additional helpful information:

blockRamFilePow2 Source #

Arguments

:: forall dom n m. (KnownDomain dom, KnownNat m, KnownNat n, HasCallStack) 
=> Clock dom

Clock to synchronize to

-> Enable dom

Global enable

-> FilePath

File describing the initial content of the blockRAM

-> Signal dom (Unsigned n)

Read address r

-> Signal dom (Maybe (Unsigned n, BitVector m))

(write address w, value to write)

-> Signal dom (BitVector m)

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
  • NB: This function might not work for specific combinations of code-generation backends and hardware targets. Please check the support table below:

                   | VHDL     | Verilog  | SystemVerilog |
    ===============+==========+==========+===============+
    Altera/Quartus | Broken   | Works    | Works         |
    Xilinx/ISE     | Works    | Works    | Works         |
    ASIC           | Untested | Untested | Untested      |
    ===============+==========+==========+===============+
    

Additional helpful information:

BlockRAM read/write conflict resolution

readNew Source #

Arguments

:: (KnownDomain dom, Undefined a, Eq addr) 
=> Clock dom 
-> Reset dom 
-> Enable dom 
-> (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

Create read-after-write blockRAM from a read-before-write one

Utility functions

window Source #

Arguments

:: (KnownNat n, KnownDomain dom, Undefined a, Default a) 
=> Clock dom

Clock to the incoming signal is synchronized

-> Reset dom 
-> Enable dom 
-> Signal dom a

Signal to create a window over

-> Vec (n + 1) (Signal dom a)

Window of at least size 1

Give a window over a Signal

@ window4

windowD Source #

Arguments

:: (KnownNat n, Undefined a, Default a, KnownDomain dom) 
=> Clock dom

Clock to which the incoming signal is synchronized

-> Reset dom 
-> Enable dom 
-> Signal dom a

Signal to create a window over

-> Vec (n + 1) (Signal dom a)

Window of at least size 1

Give a delayed window over a Signal

windowD3
  :: KnownDomain dom
  -> Clock dom
  -> Enable dom
  -> Reset dom
  -> Signal dom Int
  -> Vec 3 (Signal dom Int)
windowD3 = windowD
>>> simulateB (windowD3 systemClockGen resetGen enableGen) [1::Int,1,2,3,4] :: [Vec 3 Int]
[<0,0,0>,<0,0,0>,<1,0,0>,<2,1,0>,<3,2,1>,<4,3,2>...
...

isRising Source #

Arguments

:: (KnownDomain dom, Undefined a, Bounded a, Eq a) 
=> Clock dom 
-> Reset dom 
-> Enable dom 
-> a

Starting value

-> Signal dom a 
-> Signal dom Bool 

Give a pulse when the Signal goes from minBound to maxBound

isFalling Source #

Arguments

:: (KnownDomain dom, Undefined a, Bounded a, Eq a) 
=> Clock dom 
-> Reset dom 
-> Enable dom 
-> a

Starting value

-> Signal dom a 
-> Signal dom Bool 

Give a pulse when the Signal goes from maxBound to minBound

Testbench functions

assert Source #

Arguments

:: (KnownDomain dom, Eq a, ShowX a) 
=> Clock dom 
-> Reset dom 
-> String

Additional message

-> Signal dom a

Checked value

-> Signal dom a

Expected value

-> Signal dom b

Return value

-> Signal dom b 

Compares the first two Signals for equality and logs a warning when they are not equal. The second Signal is considered the expected value. This function simply returns the third Signal unaltered as its result. This function is used by outputVerifier.

NB: This function can be used in synthesizable designs.

stimuliGenerator Source #

Arguments

:: forall l dom a. (KnownNat l, KnownDomain dom) 
=> Clock dom

Clock to which to synchronize the output signal

-> Reset dom 
-> Vec l a

Samples to generate

-> Signal dom a

Signal of given samples

Example:

testInput
  :: KnownDomain dom
  => Clock dom
  -> Reset dom
  -> Signal dom Int
testInput clk rst = stimuliGenerator clk rst $(listToVecTH [(1::Int),3..21])
>>> sampleN 14 (testInput systemClockGen resetGen)
[1,1,3,5,7,9,11,13,15,17,19,21,21,21]

outputVerifier' Source #

Arguments

:: forall l a dom. (KnownNat l, KnownDomain dom, DomainResetKind dom ~ 'Asynchronous, Eq a, ShowX a) 
=> Clock dom

Clock to which the testbench is synchronized to

-> Reset dom

Reset line of testbench

-> Vec l a

Samples to compare with

-> Signal dom a

Signal to verify

-> Signal dom Bool

Indicator that all samples are verified

Same as outputVerifier but used in cases where the testbench domain and the domain of the circuit under test are the same.

Tracing

Simple

traceSignal1 Source #

Arguments

:: (KnownNat (BitSize a), BitPack a, Undefined a, Typeable a) 
=> String

Name of signal in the VCD output

-> Signal dom a

Signal to trace

-> Signal dom a 

Trace a single signal. Will emit an error if a signal with the same name was previously registered.

NB associates the traced signal with a clock period of 1, which results in incorrect VCD files when working with circuits that have multiple clocks. Use traceSignal when working with circuits that have multiple clocks.

traceVecSignal1 Source #

Arguments

:: (KnownNat (BitSize a), KnownNat n, BitPack a, Undefined a, Typeable a) 
=> String

Name of signal in debugging output. Will be appended by _0, _1, ..., _n.

-> Signal dom (Vec (n + 1) a)

Signal to trace

-> Signal dom (Vec (n + 1) a) 

Trace a single vector signal: each element in the vector will show up as a different trace. If the trace name already exists, this function will emit an error.

NB associates the traced signal with a clock period of 1, which results in incorrect VCD files when working with circuits that have multiple clocks. Use traceSignal when working with circuits that have multiple clocks.

Tracing in a multi-clock environment

traceSignal Source #

Arguments

:: forall dom a. (KnownDomain dom, KnownNat (BitSize a), BitPack a, Undefined a, Typeable a) 
=> String

Name of signal in the VCD output

-> Signal dom a

Signal to trace

-> Signal dom a 

Trace a single signal. Will emit an error if a signal with the same name was previously registered.

NB Works correctly when creating VCD files from traced signal in multi-clock circuits. However traceSignal1 might be more convenient to use when the domain of your circuit is polymorphic.

traceVecSignal Source #

Arguments

:: forall dom a n. (KnownDomain dom, KnownNat (BitSize a), KnownNat n, BitPack a, Undefined a, Typeable a) 
=> String

Name of signal in debugging output. Will be appended by _0, _1, ..., _n.

-> Signal dom (Vec (n + 1) a)

Signal to trace

-> Signal dom (Vec (n + 1) a) 

Trace a single vector signal: each element in the vector will show up as a different trace. If the trace name already exists, this function will emit an error.

NB Works correctly when creating VCD files from traced signal in multi-clock circuits. However traceSignal1 might be more convinient to use when the domain of your circuit is polymorphic.

VCD dump functions

dumpVCD Source #

Arguments

:: Undefined a 
=> (Int, Int)

(offset, number of samples)

-> Signal dom a

(One of) the outputs of the circuit containing the traces

-> [String]

The names of the traces you definitely want to be dumped in the VCD file

-> IO (Either String Text) 

Produce a four-state VCD (Value Change Dump) according to IEEE 1364-{1995,2001}. This function fails if a trace name contains either non-printable or non-VCD characters.

Due to lazy evaluation, the created VCD files might not contain all the traces you were expecting. You therefore have to provide a list of names you definately want to be dumped in the VCD file.

For example:

vcd <- dumpVCD (0, 100) cntrOut ["main", "sub"]

Evaluates cntrOut long enough in order for to guarantee that the main, and sub traces end up in the generated VCD file.

Exported modules

Synchronous signals

DataFlow interface

Datatypes

Bit vectors

Arbitrary-width numbers

Fixed point numbers

Fixed size vectors

Perfect depth trees

Annotations

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 . toid
to . fromid

Minimal complete definition

from, to

Instances

Instances details
Generic Bool

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool :: Type -> Type #

Methods

from :: Bool -> Rep Bool x #

to :: Rep Bool x -> Bool #

Generic Ordering

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep Ordering :: Type -> Type #

Methods

from :: Ordering -> Rep Ordering x #

to :: Rep Ordering x -> Ordering #

Generic Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Exp :: Type -> Type #

Methods

from :: Exp -> Rep Exp x #

to :: Rep Exp x -> Exp #

Generic Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Match :: Type -> Type #

Methods

from :: Match -> Rep Match x #

to :: Rep Match x -> Match #

Generic Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Clause :: Type -> Type #

Methods

from :: Clause -> Rep Clause x #

to :: Rep Clause x -> Clause #

Generic Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Pat :: Type -> Type #

Methods

from :: Pat -> Rep Pat x #

to :: Rep Pat x -> Pat #

Generic Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Type :: Type -> Type #

Methods

from :: Type -> Rep Type x #

to :: Rep Type x -> Type #

Generic Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Dec :: Type -> Type #

Methods

from :: Dec -> Rep Dec x #

to :: Rep Dec x -> Dec #

Generic Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Name :: Type -> Type #

Methods

from :: Name -> Rep Name x #

to :: Rep Name x -> Name #

Generic FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FunDep :: Type -> Type #

Methods

from :: FunDep -> Rep FunDep x #

to :: Rep FunDep x -> FunDep #

Generic InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep InjectivityAnn :: Type -> Type #

Generic Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Overlap :: Type -> Type #

Methods

from :: Overlap -> Rep Overlap x #

to :: Rep Overlap x -> Overlap #

Generic ()

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep () :: Type -> Type #

Methods

from :: () -> Rep () x #

to :: Rep () x -> () #

Generic Version

Since: base-4.9.0.0

Instance details

Defined in Data.Version

Associated Types

type Rep Version :: Type -> Type #

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

Generic Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Associated Types

type Rep Void :: Type -> Type #

Methods

from :: Void -> Rep Void x #

to :: Rep Void x -> Void #

Generic ExitCode 
Instance details

Defined in GHC.IO.Exception

Associated Types

type Rep ExitCode :: Type -> Type #

Methods

from :: ExitCode -> Rep ExitCode x #

to :: Rep ExitCode x -> ExitCode #

Generic All

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep All :: Type -> Type #

Methods

from :: All -> Rep All x #

to :: Rep All x -> All #

Generic Any

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep Any :: Type -> Type #

Methods

from :: Any -> Rep Any x #

to :: Rep Any x -> Any #

Generic Fixity

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep Fixity :: Type -> Type #

Methods

from :: Fixity -> Rep Fixity x #

to :: Rep Fixity x -> Fixity #

Generic Associativity

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep Associativity :: Type -> Type #

Generic SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceUnpackedness :: Type -> Type #

Generic SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceStrictness :: Type -> Type #

Generic DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep DecidedStrictness :: Type -> Type #

Generic TyVarBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TyVarBndr :: Type -> Type #

Generic Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Associated Types

type Rep Extension :: Type -> Type #

Generic ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Associated Types

type Rep ForeignSrcLang :: Type -> Type #

Generic Half 
Instance details

Defined in Numeric.Half

Associated Types

type Rep Half :: Type -> Type #

Methods

from :: Half -> Rep Half x #

to :: Rep Half x -> Half #

Generic Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Con :: Type -> Type #

Methods

from :: Con -> Rep Con x #

to :: Rep Con x -> Con #

Generic Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Associated Types

type Rep Doc :: Type -> Type #

Methods

from :: Doc -> Rep Doc x #

to :: Rep Doc x -> Doc #

Generic TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep TextDetails :: Type -> Type #

Generic Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep Style :: Type -> Type #

Methods

from :: Style -> Rep Style x #

to :: Rep Style x -> Style #

Generic Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep Mode :: Type -> Type #

Methods

from :: Mode -> Rep Mode x #

to :: Rep Mode x -> Mode #

Generic ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep ModName :: Type -> Type #

Methods

from :: ModName -> Rep ModName x #

to :: Rep ModName x -> ModName #

Generic PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PkgName :: Type -> Type #

Methods

from :: PkgName -> Rep PkgName x #

to :: Rep PkgName x -> PkgName #

Generic Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Module :: Type -> Type #

Methods

from :: Module -> Rep Module x #

to :: Rep Module x -> Module #

Generic OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep OccName :: Type -> Type #

Methods

from :: OccName -> Rep OccName x #

to :: Rep OccName x -> OccName #

Generic NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep NameFlavour :: Type -> Type #

Generic NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep NameSpace :: Type -> Type #

Generic Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Loc :: Type -> Type #

Methods

from :: Loc -> Rep Loc x #

to :: Rep Loc x -> Loc #

Generic Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Info :: Type -> Type #

Methods

from :: Info -> Rep Info x #

to :: Rep Info x -> Info #

Generic ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep ModuleInfo :: Type -> Type #

Generic Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Fixity :: Type -> Type #

Methods

from :: Fixity -> Rep Fixity x #

to :: Rep Fixity x -> Fixity #

Generic FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FixityDirection :: Type -> Type #

Generic Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Lit :: Type -> Type #

Methods

from :: Lit -> Rep Lit x #

to :: Rep Lit x -> Lit #

Generic Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Body :: Type -> Type #

Methods

from :: Body -> Rep Body x #

to :: Rep Body x -> Body #

Generic Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Guard :: Type -> Type #

Methods

from :: Guard -> Rep Guard x #

to :: Rep Guard x -> Guard #

Generic Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Stmt :: Type -> Type #

Methods

from :: Stmt -> Rep Stmt x #

to :: Rep Stmt x -> Stmt #

Generic Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Range :: Type -> Type #

Methods

from :: Range -> Rep Range x #

to :: Rep Range x -> Range #

Generic DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DerivClause :: Type -> Type #

Generic DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DerivStrategy :: Type -> Type #

Generic TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TypeFamilyHead :: Type -> Type #

Generic TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TySynEqn :: Type -> Type #

Methods

from :: TySynEqn -> Rep TySynEqn x #

to :: Rep TySynEqn x -> TySynEqn #

Generic Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Foreign :: Type -> Type #

Methods

from :: Foreign -> Rep Foreign x #

to :: Rep Foreign x -> Foreign #

Generic Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Callconv :: Type -> Type #

Methods

from :: Callconv -> Rep Callconv x #

to :: Rep Callconv x -> Callconv #

Generic Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Safety :: Type -> Type #

Methods

from :: Safety -> Rep Safety x #

to :: Rep Safety x -> Safety #

Generic Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Pragma :: Type -> Type #

Methods

from :: Pragma -> Rep Pragma x #

to :: Rep Pragma x -> Pragma #

Generic Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Inline :: Type -> Type #

Methods

from :: Inline -> Rep Inline x #

to :: Rep Inline x -> Inline #

Generic RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep RuleMatch :: Type -> Type #

Generic Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Phases :: Type -> Type #

Methods

from :: Phases -> Rep Phases x #

to :: Rep Phases x -> Phases #

Generic RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep RuleBndr :: Type -> Type #

Methods

from :: RuleBndr -> Rep RuleBndr x #

to :: Rep RuleBndr x -> RuleBndr #

Generic AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep AnnTarget :: Type -> Type #

Generic SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep SourceUnpackedness :: Type -> Type #

Generic SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep SourceStrictness :: Type -> Type #

Generic DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DecidedStrictness :: Type -> Type #

Generic Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Bang :: Type -> Type #

Methods

from :: Bang -> Rep Bang x #

to :: Rep Bang x -> Bang #

Generic PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PatSynDir :: Type -> Type #

Generic PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PatSynArgs :: Type -> Type #

Generic FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FamilyResultSig :: Type -> Type #

Generic TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TyLit :: Type -> Type #

Methods

from :: TyLit -> Rep TyLit x #

to :: Rep TyLit x -> TyLit #

Generic Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Role :: Type -> Type #

Methods

from :: Role -> Rep Role x #

to :: Rep Role x -> Role #

Generic AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep AnnLookup :: Type -> Type #

Generic DatatypeInfo 
Instance details

Defined in Language.Haskell.TH.Datatype

Associated Types

type Rep DatatypeInfo :: Type -> Type #

Generic DatatypeVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Associated Types

type Rep DatatypeVariant :: Type -> Type #

Generic ConstructorInfo 
Instance details

Defined in Language.Haskell.TH.Datatype

Associated Types

type Rep ConstructorInfo :: Type -> Type #

Generic ConstructorVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Associated Types

type Rep ConstructorVariant :: Type -> Type #

Generic FieldStrictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Associated Types

type Rep FieldStrictness :: Type -> Type #

Generic Unpackedness 
Instance details

Defined in Language.Haskell.TH.Datatype

Associated Types

type Rep Unpackedness :: Type -> Type #

Generic Strictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Associated Types

type Rep Strictness :: Type -> Type #

Generic DTypeArg 
Instance details

Defined in Language.Haskell.TH.Desugar.Core

Associated Types

type Rep DTypeArg :: Type -> Type #

Methods

from :: DTypeArg -> Rep DTypeArg x #

to :: Rep DTypeArg x -> DTypeArg #

Generic DExp 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DExp :: Type -> Type #

Methods

from :: DExp -> Rep DExp x #

to :: Rep DExp x -> DExp #

Generic DPat 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DPat :: Type -> Type #

Methods

from :: DPat -> Rep DPat x #

to :: Rep DPat x -> DPat #

Generic DType 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DType :: Type -> Type #

Methods

from :: DType -> Rep DType x #

to :: Rep DType x -> DType #

Generic DTyVarBndr 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DTyVarBndr :: Type -> Type #

Generic DMatch 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DMatch :: Type -> Type #

Methods

from :: DMatch -> Rep DMatch x #

to :: Rep DMatch x -> DMatch #

Generic DClause 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DClause :: Type -> Type #

Methods

from :: DClause -> Rep DClause x #

to :: Rep DClause x -> DClause #

Generic DLetDec 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DLetDec :: Type -> Type #

Methods

from :: DLetDec -> Rep DLetDec x #

to :: Rep DLetDec x -> DLetDec #

Generic NewOrData 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep NewOrData :: Type -> Type #

Generic DDec 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DDec :: Type -> Type #

Methods

from :: DDec -> Rep DDec x #

to :: Rep DDec x -> DDec #

Generic DPatSynDir 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DPatSynDir :: Type -> Type #

Generic DTypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DTypeFamilyHead :: Type -> Type #

Generic DFamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DFamilyResultSig :: Type -> Type #

Generic DCon 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DCon :: Type -> Type #

Methods

from :: DCon -> Rep DCon x #

to :: Rep DCon x -> DCon #

Generic DConFields 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DConFields :: Type -> Type #

Generic DForeign 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DForeign :: Type -> Type #

Methods

from :: DForeign -> Rep DForeign x #

to :: Rep DForeign x -> DForeign #

Generic DPragma 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DPragma :: Type -> Type #

Methods

from :: DPragma -> Rep DPragma x #

to :: Rep DPragma x -> DPragma #

Generic DRuleBndr 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DRuleBndr :: Type -> Type #

Generic DTySynEqn 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DTySynEqn :: Type -> Type #

Generic DInfo 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DInfo :: Type -> Type #

Methods

from :: DInfo -> Rep DInfo x #

to :: Rep DInfo x -> DInfo #

Generic DDerivClause 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DDerivClause :: Type -> Type #

Generic DDerivStrategy 
Instance details

Defined in Language.Haskell.TH.Desugar.AST

Associated Types

type Rep DDerivStrategy :: Type -> Type #

Generic ConstrRepr Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation

Associated Types

type Rep ConstrRepr :: Type -> Type #

Generic DataReprAnn Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation

Associated Types

type Rep DataReprAnn :: Type -> Type #

Generic ConstrRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Associated Types

type Rep ConstrRepr' :: Type -> Type #

Generic DataRepr' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Associated Types

type Rep DataRepr' :: Type -> Type #

Generic Type' Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation.Internal

Associated Types

type Rep Type' :: Type -> Type #

Methods

from :: Type' -> Rep Type' x #

to :: Rep Type' x -> Type' #

Generic Primitive Source # 
Instance details

Defined in Clash.Annotations.Primitive

Associated Types

type Rep Primitive :: Type -> Type #

Generic HDL Source # 
Instance details

Defined in Clash.Annotations.Primitive

Associated Types

type Rep HDL :: Type -> Type #

Methods

from :: HDL -> Rep HDL x #

to :: Rep HDL x -> HDL #

Generic PortName Source # 
Instance details

Defined in Clash.Annotations.TopEntity

Associated Types

type Rep PortName :: Type -> Type #

Methods

from :: PortName -> Rep PortName x #

to :: Rep PortName x -> PortName #

Generic TopEntity Source # 
Instance details

Defined in Clash.Annotations.TopEntity

Associated Types

type Rep TopEntity :: Type -> Type #

Generic Bit Source # 
Instance details

Defined in Clash.Sized.Internal.BitVector

Associated Types

type Rep Bit :: Type -> Type #

Methods

from :: Bit -> Rep Bit x #

to :: Rep Bit x -> Bit #

Generic InitBehavior Source # 
Instance details

Defined in Clash.Signal.Internal

Associated Types

type Rep InitBehavior :: Type -> Type #

Generic ResetPolarity Source # 
Instance details

Defined in Clash.Signal.Internal

Associated Types

type Rep ResetPolarity :: Type -> Type #

Generic ResetKind Source # 
Instance details

Defined in Clash.Signal.Internal

Associated Types

type Rep ResetKind :: Type -> Type #

Generic ActiveEdge Source # 
Instance details

Defined in Clash.Signal.Internal

Associated Types

type Rep ActiveEdge :: Type -> Type #

Generic [a]

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep [a] :: Type -> Type #

Methods

from :: [a] -> Rep [a] x #

to :: Rep [a] x -> [a] #

Generic (Maybe a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (Maybe a) :: Type -> Type #

Methods

from :: Maybe a -> Rep (Maybe a) x #

to :: Rep (Maybe a) x -> Maybe a #

Generic (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (Par1 p) :: Type -> Type #

Methods

from :: Par1 p -> Rep (Par1 p) x #

to :: Rep (Par1 p) x -> Par1 p #

Generic (Complex a)

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Associated Types

type Rep (Complex a) :: Type -> Type #

Methods

from :: Complex a -> Rep (Complex a) x #

to :: Rep (Complex a) x -> Complex a #

Generic (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Min a) :: Type -> Type #

Methods

from :: Min a -> Rep (Min a) x #

to :: Rep (Min a) x -> Min a #

Generic (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Max a) :: Type -> Type #

Methods

from :: Max a -> Rep (Max a) x #

to :: Rep (Max a) x -> Max a #

Generic (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep (First a) :: Type -> Type #

Methods

from :: First a -> Rep (First a) x #

to :: Rep (First a) x -> First a #

Generic (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Last a) :: Type -> Type #

Methods

from :: Last a -> Rep (Last a) x #

to :: Rep (Last a) x -> Last a #

Generic (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep (WrappedMonoid m) :: Type -> Type #

Generic (Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Option a) :: Type -> Type #

Methods

from :: Option a -> Rep (Option a) x #

to :: Rep (Option a) x -> Option a #

Generic (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Associated Types

type Rep (ZipList a) :: Type -> Type #

Methods

from :: ZipList a -> Rep (ZipList a) x #

to :: Rep (ZipList a) x -> ZipList a #

Generic (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep (Identity a) :: Type -> Type #

Methods

from :: Identity a -> Rep (Identity a) x #

to :: Rep (Identity a) x -> Identity a #

Generic (First a)

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep (First a) :: Type -> Type #

Methods

from :: First a -> Rep (First a) x #

to :: Rep (First a) x -> First a #

Generic (Last a)

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep (Last a) :: Type -> Type #

Methods

from :: Last a -> Rep (Last a) x #

to :: Rep (Last a) x -> Last a #

Generic (Dual a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Dual a) :: Type -> Type #

Methods

from :: Dual a -> Rep (Dual a) x #

to :: Rep (Dual a) x -> Dual a #

Generic (Endo a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Endo a) :: Type -> Type #

Methods

from :: Endo a -> Rep (Endo a) x #

to :: Rep (Endo a) x -> Endo a #

Generic (Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Sum a) :: Type -> Type #

Methods

from :: Sum a -> Rep (Sum a) x #

to :: Rep (Sum a) x -> Sum a #

Generic (Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Product a) :: Type -> Type #

Methods

from :: Product a -> Rep (Product a) x #

to :: Rep (Product a) x -> Product a #

Generic (Down a)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (Down a) :: Type -> Type #

Methods

from :: Down a -> Rep (Down a) x #

to :: Rep (Down a) x -> Down a #

Generic (NonEmpty a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (NonEmpty a) :: Type -> Type #

Methods

from :: NonEmpty a -> Rep (NonEmpty a) x #

to :: Rep (NonEmpty a) x -> NonEmpty a #

Generic (Tree a)

Since: containers-0.5.8

Instance details

Defined in Data.Tree

Associated Types

type Rep (Tree a) :: Type -> Type #

Methods

from :: Tree a -> Rep (Tree a) x #

to :: Rep (Tree a) x -> Tree a #

Generic (FingerTree a)

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (FingerTree a) :: Type -> Type #

Methods

from :: FingerTree a -> Rep (FingerTree a) x #

to :: Rep (FingerTree a) x -> FingerTree a #

Generic (Digit a)

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Digit a) :: Type -> Type #

Methods

from :: Digit a -> Rep (Digit a) x #

to :: Rep (Digit a) x -> Digit a #

Generic (Node a)

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Node a) :: Type -> Type #

Methods

from :: Node a -> Rep (Node a) x #

to :: Rep (Node a) x -> Node a #

Generic (Elem a)

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Elem a) :: Type -> Type #

Methods

from :: Elem a -> Rep (Elem a) x #

to :: Rep (Elem a) x -> Elem a #

Generic (ViewL a)

Since: containers-0.5.8

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (ViewL a) :: Type -> Type #

Methods

from :: ViewL a -> Rep (ViewL a) x #

to :: Rep (ViewL a) x -> ViewL a #

Generic (ViewR a)

Since: containers-0.5.8

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (ViewR a) :: Type -> Type #

Methods

from :: ViewR a -> Rep (ViewR a) x #

to :: Rep (ViewR a) x -> ViewR a #

Generic (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep (Doc a) :: Type -> Type #

Methods

from :: Doc a -> Rep (Doc a) x #

to :: Rep (Doc a) x -> Doc a #

Generic (PrimitiveGuard a) Source # 
Instance details

Defined in Clash.Annotations.Primitive

Associated Types

type Rep (PrimitiveGuard a) :: Type -> Type #

Generic (BitVector n) Source # 
Instance details

Defined in Clash.Sized.Internal.BitVector

Associated Types

type Rep (BitVector n) :: Type -> Type #

Methods

from :: BitVector n -> Rep (BitVector n) x #

to :: Rep (BitVector n) x -> BitVector n #

Generic (Index n) Source # 
Instance details

Defined in Clash.Sized.Internal.Index

Associated Types

type Rep (Index n) :: Type -> Type #

Methods

from :: Index n -> Rep (Index n) x #

to :: Rep (Index n) x -> Index n #

Generic (Unsigned n) Source # 
Instance details

Defined in Clash.Sized.Internal.Unsigned

Associated Types

type Rep (Unsigned n) :: Type -> Type #

Methods

from :: Unsigned n -> Rep (Unsigned n) x #

to :: Rep (Unsigned n) x -> Unsigned n #

Generic (Signed n) Source # 
Instance details

Defined in Clash.Sized.Internal.Signed

Associated Types

type Rep (Signed n) :: Type -> Type #

Methods

from :: Signed n -> Rep (Signed n) x #

to :: Rep (Signed n) x -> Signed n #

Generic (Either a b)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (Either a b) :: Type -> Type #

Methods

from :: Either a b -> Rep (Either a b) x #

to :: Rep (Either a b) x -> Either a b #

Generic (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (V1 p) :: Type -> Type #

Methods

from :: V1 p -> Rep (V1 p) x #

to :: Rep (V1 p) x -> V1 p #

Generic (U1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (U1 p) :: Type -> Type #

Methods

from :: U1 p -> Rep (U1 p) x #

to :: Rep (U1 p) x -> U1 p #

Generic (a, b)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b) :: Type -> Type #

Methods

from :: (a, b) -> Rep (a, b) x #

to :: Rep (a, b) x -> (a, b) #

Generic (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Arg a b) :: Type -> Type #

Methods

from :: Arg a b -> Rep (Arg a b) x #

to :: Rep (Arg a b) x -> Arg a b #

Generic (WrappedMonad m a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedMonad m a) :: Type -> Type #

Methods

from :: WrappedMonad m a -> Rep (WrappedMonad m a) x #

to :: Rep (WrappedMonad m a) x -> WrappedMonad m a #

Generic (Proxy t)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (Proxy t) :: Type -> Type #

Methods

from :: Proxy t -> Rep (Proxy t) x #

to :: Rep (Proxy t) x -> Proxy t #

Generic (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Associated Types

type Rep (Cofree f a) :: Type -> Type #

Methods

from :: Cofree f a -> Rep (Cofree f a) x #

to :: Rep (Cofree f a) x -> Cofree f a #

Generic (Free f a) 
Instance details

Defined in Control.Monad.Free

Associated Types

type Rep (Free f a) :: Type -> Type #

Methods

from :: Free f a -> Rep (Free f a) x #

to :: Rep (Free f a) x -> Free f a #

KnownNat n => Generic (Vec n a) Source #

In many cases, this Generic instance only allows generic functions/instances over vectors of at least size 1, due to the n-1 in the Rep (Vec n a) definition.

We'll have to wait for things like https://ryanglscott.github.io/2018/02/11/how-to-derive-generic-for-some-gadts/ before we can work around this limitation

Instance details

Defined in Clash.Sized.Vector

Associated Types

type Rep (Vec n a) :: Type -> Type #

Methods

from :: Vec n a -> Rep (Vec n a) x #

to :: Rep (Vec n a) x -> Vec n a #

Generic (Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (Rec1 f p) :: Type -> Type #

Methods

from :: Rec1 f p -> Rep (Rec1 f p) x #

to :: Rep (Rec1 f p) x -> Rec1 f p #

Generic (URec (Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec (Ptr ()) p) :: Type -> Type #

Methods

from :: URec (Ptr ()) p -> Rep (URec (Ptr ()) p) x #

to :: Rep (URec (Ptr ()) p) x -> URec (Ptr ()) p #

Generic (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Char p) :: Type -> Type #

Methods

from :: URec Char p -> Rep (URec Char p) x #

to :: Rep (URec Char p) x -> URec Char p #

Generic (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Double p) :: Type -> Type #

Methods

from :: URec Double p -> Rep (URec Double p) x #

to :: Rep (URec Double p) x -> URec Double p #

Generic (URec Float p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Float p) :: Type -> Type #

Methods

from :: URec Float p -> Rep (URec Float p) x #

to :: Rep (URec Float p) x -> URec Float p #

Generic (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Int p) :: Type -> Type #

Methods

from :: URec Int p -> Rep (URec Int p) x #

to :: Rep (URec Int p) x -> URec Int p #

Generic (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Word p) :: Type -> Type #

Methods

from :: URec Word p -> Rep (URec Word p) x #

to :: Rep (URec Word p) x -> URec Word p #

Generic (a, b, c)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c) :: Type -> Type #

Methods

from :: (a, b, c) -> Rep (a, b, c) x #

to :: Rep (a, b, c) x -> (a, b, c) #

Generic (WrappedArrow a b c)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedArrow a b c) :: Type -> Type #

Methods

from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x #

to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c #

Generic (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Associated Types

type Rep (Const a b) :: Type -> Type #

Methods

from :: Const a b -> Rep (Const a b) x #

to :: Rep (Const a b) x -> Const a b #

Generic (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep (Ap f a) :: Type -> Type #

Methods

from :: Ap f a -> Rep (Ap f a) x #

to :: Rep (Ap f a) x -> Ap f a #

Generic (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Alt f a) :: Type -> Type #

Methods

from :: Alt f a -> Rep (Alt f a) x #

to :: Rep (Alt f a) x -> Alt f a #

Generic (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Associated Types

type Rep (Join p a) :: Type -> Type #

Methods

from :: Join p a -> Rep (Join p a) x #

to :: Rep (Join p a) x -> Join p a #

Generic (Fix p a) 
Instance details

Defined in Data.Bifunctor.Fix

Associated Types

type Rep (Fix p a) :: Type -> Type #

Methods

from :: Fix p a -> Rep (Fix p a) x #

to :: Rep (Fix p a) x -> Fix p a #

Generic (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Associated Types

type Rep (FreeF f a b) :: Type -> Type #

Methods

from :: FreeF f a b -> Rep (FreeF f a b) x #

to :: Rep (FreeF f a b) x -> FreeF f a b #

Generic (CofreeF f a b) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Associated Types

type Rep (CofreeF f a b) :: Type -> Type #

Methods

from :: CofreeF f a b -> Rep (CofreeF f a b) x #

to :: Rep (CofreeF f a b) x -> CofreeF f a b #

Generic (Tagged s b) 
Instance details

Defined in Data.Tagged

Associated Types

type Rep (Tagged s b) :: Type -> Type #

Methods

from :: Tagged s b -> Rep (Tagged s b) x #

to :: Rep (Tagged s b) x -> Tagged s b #

Generic (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (K1 i c p) :: Type -> Type #

Methods

from :: K1 i c p -> Rep (K1 i c p) x #

to :: Rep (K1 i c p) x -> K1 i c p #

Generic ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :+: g) p) :: Type -> Type #

Methods

from :: (f :+: g) p -> Rep ((f :+: g) p) x #

to :: Rep ((f :+: g) p) x -> (f :+: g) p #

Generic ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :*: g) p) :: Type -> Type #

Methods

from :: (f :*: g) p -> Rep ((f :*: g) p) x #

to :: Rep ((f :*: g) p) x -> (f :*: g) p #

Generic (a, b, c, d)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d) :: Type -> Type #

Methods

from :: (a, b, c, d) -> Rep (a, b, c, d) x #

to :: Rep (a, b, c, d) x -> (a, b, c, d) #

Generic (Product f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Associated Types

type Rep (Product f g a) :: Type -> Type #

Methods

from :: Product f g a -> Rep (Product f g a) x #

to :: Rep (Product f g a) x -> Product f g a #

Generic (Sum f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Associated Types

type Rep (Sum f g a) :: Type -> Type #

Methods

from :: Sum f g a -> Rep (Sum f g a) x #

to :: Rep (Sum f g a) x -> Sum f g a #

Generic (M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (M1 i c f p) :: Type -> Type #

Methods

from :: M1 i c f p -> Rep (M1 i c f p) x #

to :: Rep (M1 i c f p) x -> M1 i c f p #

Generic ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :.: g) p) :: Type -> Type #

Methods

from :: (f :.: g) p -> Rep ((f :.: g) p) x #

to :: Rep ((f :.: g) p) x -> (f :.: g) p #

Generic (a, b, c, d, e)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e) :: Type -> Type #

Methods

from :: (a, b, c, d, e) -> Rep (a, b, c, d, e) x #

to :: Rep (a, b, c, d, e) x -> (a, b, c, d, e) #

Generic (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep (Compose f g a) :: Type -> Type #

Methods

from :: Compose f g a -> Rep (Compose f g a) x #

to :: Rep (Compose f g a) x -> Compose f g a #

Generic (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Associated Types

type Rep (WrappedBifunctor p a b) :: Type -> Type #

Methods

from :: WrappedBifunctor p a b -> Rep (WrappedBifunctor p a b) x #

to :: Rep (WrappedBifunctor p a b) x -> WrappedBifunctor p a b #

Generic (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Associated Types

type Rep (Joker g a b) :: Type -> Type #

Methods

from :: Joker g a b -> Rep (Joker g a b) x #

to :: Rep (Joker g a b) x -> Joker g a b #

Generic (Flip p a b) 
Instance details

Defined in Data.Bifunctor.Flip

Associated Types

type Rep (Flip p a b) :: Type -> Type #

Methods

from :: Flip p a b -> Rep (Flip p a b) x #

to :: Rep (Flip p a b) x -> Flip p a b #

Generic (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Associated Types

type Rep (Clown f a b) :: Type -> Type #

Methods

from :: Clown f a b -> Rep (Clown f a b) x #

to :: Rep (Clown f a b) x -> Clown f a b #

Generic (a, b, c, d, e, f)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f) -> Rep (a, b, c, d, e, f) x #

to :: Rep (a, b, c, d, e, f) x -> (a, b, c, d, e, f) #

Generic (Sum p q a b) 
Instance details

Defined in Data.Bifunctor.Sum

Associated Types

type Rep (Sum p q a b) :: Type -> Type #

Methods

from :: Sum p q a b -> Rep (Sum p q a b) x #

to :: Rep (Sum p q a b) x -> Sum p q a b #

Generic (Product f g a b) 
Instance details

Defined in Data.Bifunctor.Product

Associated Types

type Rep (Product f g a b) :: Type -> Type #

Methods

from :: Product f g a b -> Rep (Product f g a b) x #

to :: Rep (Product f g a b) x -> Product f g a b #

Generic (a, b, c, d, e, f, g)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g) -> Rep (a, b, c, d, e, f, g) x #

to :: Rep (a, b, c, d, e, f, g) x -> (a, b, c, d, e, f, g) #

Generic (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Associated Types

type Rep (Tannen f p a b) :: Type -> Type #

Methods

from :: Tannen f p a b -> Rep (Tannen f p a b) x #

to :: Rep (Tannen f p a b) x -> Tannen f p a b #

Generic (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Clash.XException

Associated Types

type Rep (a, b, c, d, e, f, g, h) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h) -> Rep (a, b, c, d, e, f, g, h) x #

to :: Rep (a, b, c, d, e, f, g, h) x -> (a, b, c, d, e, f, g, h) #

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

Defined in Clash.XException

Associated Types

type Rep (a, b, c, d, e, f, g, h, i) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i) -> Rep (a, b, c, d, e, f, g, h, i) x #

to :: Rep (a, b, c, d, e, f, g, h, i) x -> (a, b, c, d, e, f, g, h, i) #

Generic (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Associated Types

type Rep (Biff p f g a b) :: Type -> Type #

Methods

from :: Biff p f g a b -> Rep (Biff p f g a b) x #

to :: Rep (Biff p f g a b) x -> Biff p f g a b #

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

Defined in Clash.XException

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j) -> Rep (a, b, c, d, e, f, g, h, i, j) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j) x -> (a, b, c, d, e, f, g, h, i, j) #

Generic (a, b, c, d, e, f, g, h, i, j, k) Source # 
Instance details

Defined in Clash.XException

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k) -> Rep (a, b, c, d, e, f, g, h, i, j, k) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k) x -> (a, b, c, d, e, f, g, h, i, j, k) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l) Source # 
Instance details

Defined in Clash.XException

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l) x -> (a, b, c, d, e, f, g, h, i, j, k, l) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # 
Instance details

Defined in Clash.XException

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # 
Instance details

Defined in Clash.XException

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # 
Instance details

Defined in Clash.XException

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

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 . to1id
to1 . from1id

Minimal complete definition

from1, to1

Instances

Instances details
Generic1 (V1 :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 V1 :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 U1 :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 Proxy :: k -> Type #

Methods

from1 :: forall (a :: k0). Proxy a -> Rep1 Proxy a #

to1 :: forall (a :: k0). Rep1 Proxy a -> Proxy a #

Generic1 (Alt f :: k -> Type)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 (Alt f) :: k -> Type #

Methods

from1 :: 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 details

Defined in Data.Monoid

Associated Types

type Rep1 (Ap f) :: k -> Type #

Methods

from1 :: 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 details

Defined in Data.Functor.Const

Associated Types

type Rep1 (Const a) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 (URec (Ptr ())) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Char) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Double) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Float) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Int) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Word) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 (Rec1 f) :: k -> Type #

Methods

from1 :: 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 details

Defined in Data.Functor.Sum

Associated Types

type Rep1 (Sum f g) :: k -> Type #

Methods

from1 :: 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 details

Defined in Data.Functor.Product

Associated Types

type Rep1 (Product f g) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 (K1 i c) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 (f :+: g) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 (f :*: g) :: k -> Type #

Methods

from1 :: 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 details

Defined in Data.Bifunctor.Wrapped

Associated Types

type Rep1 (WrappedBifunctor p a) :: k -> Type #

Methods

from1 :: 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 details

Defined in Data.Bifunctor.Joker

Associated Types

type Rep1 (Joker g a) :: k -> Type #

Methods

from1 :: 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 details

Defined in Data.Bifunctor.Clown

Associated Types

type Rep1 (Clown f a) :: k -> Type #

Methods

from1 :: 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 #

Functor f => Generic1 (Compose f g :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep1 (Compose f g) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 (M1 i c f) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 (f :.: g) :: k -> Type #

Methods

from1 :: 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 details

Defined in Data.Bifunctor.Sum

Associated Types

type Rep1 (Sum p q a) :: k -> Type #

Methods

from1 :: 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 details

Defined in Data.Bifunctor.Product

Associated Types

type Rep1 (Product f g a) :: k -> Type #

Methods

from1 :: 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 details

Defined in Data.Bifunctor.Tannen

Associated Types

type Rep1 (Tannen f p a) :: k -> Type #

Methods

from1 :: 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 details

Defined in Data.Bifunctor.Biff

Associated Types

type Rep1 (Biff p f g a) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 [] :: k -> Type #

Methods

from1 :: forall (a :: k). [a] -> Rep1 [] a #

to1 :: forall (a :: k). Rep1 [] a -> [a] #

Generic1 Maybe

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Maybe :: k -> Type #

Methods

from1 :: forall (a :: k). Maybe a -> Rep1 Maybe a #

to1 :: forall (a :: k). Rep1 Maybe a -> Maybe a #

Generic1 Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Par1 :: k -> Type #

Methods

from1 :: forall (a :: k). Par1 a -> Rep1 Par1 a #

to1 :: forall (a :: k). Rep1 Par1 a -> Par1 a #

Generic1 Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Associated Types

type Rep1 Complex :: k -> Type #

Methods

from1 :: forall (a :: k). Complex a -> Rep1 Complex a #

to1 :: forall (a :: k). Rep1 Complex a -> Complex a #

Generic1 Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 Min :: k -> Type #

Methods

from1 :: forall (a :: k). Min a -> Rep1 Min a #

to1 :: forall (a :: k). Rep1 Min a -> Min a #

Generic1 Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 Max :: k -> Type #

Methods

from1 :: forall (a :: k). Max a -> Rep1 Max a #

to1 :: forall (a :: k). Rep1 Max a -> Max a #

Generic1 First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 First :: k -> Type #

Methods

from1 :: forall (a :: k). First a -> Rep1 First a #

to1 :: forall (a :: k). Rep1 First a -> First a #

Generic1 Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 Last :: k -> Type #

Methods

from1 :: forall (a :: k). Last a -> Rep1 Last a #

to1 :: forall (a :: k). Rep1 Last a -> Last a #

Generic1 WrappedMonoid

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 WrappedMonoid :: k -> Type #

Methods

from1 :: forall (a :: k). WrappedMonoid a -> Rep1 WrappedMonoid a #

to1 :: forall (a :: k). Rep1 WrappedMonoid a -> WrappedMonoid a #

Generic1 Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 Option :: k -> Type #

Methods

from1 :: forall (a :: k). Option a -> Rep1 Option a #

to1 :: forall (a :: k). Rep1 Option a -> Option a #

Generic1 ZipList

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Associated Types

type Rep1 ZipList :: k -> Type #

Methods

from1 :: forall (a :: k). ZipList a -> Rep1 ZipList a #

to1 :: forall (a :: k). Rep1 ZipList a -> ZipList a #

Generic1 Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep1 Identity :: k -> Type #

Methods

from1 :: forall (a :: k). Identity a -> Rep1 Identity a #

to1 :: forall (a :: k). Rep1 Identity a -> Identity a #

Generic1 First

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep1 First :: k -> Type #

Methods

from1 :: forall (a :: k). First a -> Rep1 First a #

to1 :: forall (a :: k). Rep1 First a -> First a #

Generic1 Last

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep1 Last :: k -> Type #

Methods

from1 :: forall (a :: k). Last a -> Rep1 Last a #

to1 :: forall (a :: k). Rep1 Last a -> Last a #

Generic1 Dual

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Dual :: k -> Type #

Methods

from1 :: forall (a :: k). Dual a -> Rep1 Dual a #

to1 :: forall (a :: k). Rep1 Dual a -> Dual a #

Generic1 Sum

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Sum :: k -> Type #

Methods

from1 :: forall (a :: k). Sum a -> Rep1 Sum a #

to1 :: forall (a :: k). Rep1 Sum a -> Sum a #

Generic1 Product

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Product :: k -> Type #

Methods

from1 :: forall (a :: k). Product a -> Rep1 Product a #

to1 :: forall (a :: k). Rep1 Product a -> Product a #

Generic1 Down

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Down :: k -> Type #

Methods

from1 :: forall (a :: k). Down a -> Rep1 Down a #

to1 :: forall (a :: k). Rep1 Down a -> Down a #

Generic1 NonEmpty

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 NonEmpty :: k -> Type #

Methods

from1 :: forall (a :: k). NonEmpty a -> Rep1 NonEmpty a #

to1 :: forall (a :: k). Rep1 NonEmpty a -> NonEmpty a #

Generic1 Tree

Since: containers-0.5.8

Instance details

Defined in Data.Tree

Associated Types

type Rep1 Tree :: k -> Type #

Methods

from1 :: forall (a :: k). Tree a -> Rep1 Tree a #

to1 :: forall (a :: k). Rep1 Tree a -> Tree a #

Generic1 FingerTree

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep1 FingerTree :: k -> Type #

Methods

from1 :: forall (a :: k). FingerTree a -> Rep1 FingerTree a #

to1 :: forall (a :: k). Rep1 FingerTree a -> FingerTree a #

Generic1 Digit

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep1 Digit :: k -> Type #

Methods

from1 :: forall (a :: k). Digit a -> Rep1 Digit a #

to1 :: forall (a :: k). Rep1 Digit a -> Digit a #

Generic1 Node

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep1 Node :: k -> Type #

Methods

from1 :: forall (a :: k). Node a -> Rep1 Node a #

to1 :: forall (a :: k). Rep1 Node a -> Node a #

Generic1 Elem

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep1 Elem :: k -> Type #

Methods

from1 :: forall (a :: k). Elem a -> Rep1 Elem a #

to1 :: forall (a :: k). Rep1 Elem a -> Elem a #

Generic1 ViewL

Since: containers-0.5.8

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep1 ViewL :: k -> Type #

Methods

from1 :: forall (a :: k). ViewL a -> Rep1 ViewL a #

to1 :: forall (a :: k). Rep1 ViewL a -> ViewL a #

Generic1 ViewR

Since: containers-0.5.8

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep1 ViewR :: k -> Type #

Methods

from1 :: forall (a :: k). ViewR a -> Rep1 ViewR a #

to1 :: forall (a :: k). Rep1 ViewR a -> ViewR a #

Generic1 (Either a :: Type -> Type)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (Either a) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 ((,) a) :: k -> Type #

Methods

from1 :: 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 details

Defined in Data.Semigroup

Associated Types

type Rep1 (Arg a) :: k -> Type #

Methods

from1 :: 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 details

Defined in Control.Applicative

Associated Types

type Rep1 (WrappedMonad m) :: k -> Type #

Methods

from1 :: 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 details

Defined in Control.Comonad.Cofree

Associated Types

type Rep1 (Cofree f) :: k -> Type #

Methods

from1 :: 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 details

Defined in Control.Monad.Free

Associated Types

type Rep1 (Free f) :: k -> Type #

Methods

from1 :: forall (a :: k). Free f a -> Rep1 (Free f) a #

to1 :: forall (a :: k). Rep1 (Free f) a -> Free f a #

Generic1 ((,,) a b :: Type -> Type)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,) a b) :: k -> Type #

Methods

from1 :: 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 details

Defined in Control.Applicative

Associated Types

type Rep1 (WrappedArrow a b) :: k -> Type #

Methods

from1 :: 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 (FreeF f a :: Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Free

Associated Types

type Rep1 (FreeF f a) :: k -> Type #

Methods

from1 :: 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 details

Defined in Control.Comonad.Trans.Cofree

Associated Types

type Rep1 (CofreeF f a) :: k -> Type #

Methods

from1 :: 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 details

Defined in Data.Tagged

Associated Types

type Rep1 (Tagged s) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,) a b c) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,,) a b c d) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,,,) a b c d e) :: k -> Type #

Methods

from1 :: 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 details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,,,,) a b c d e f) :: k -> Type #

Methods

from1 :: 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) #

Type-level natural numbers

Type-level strings

Template Haskell

class Lift t where #

A Lift instance can have any of its values turned into a Template Haskell expression. This is needed when a value used within a Template Haskell quotation is bound outside the Oxford brackets ([| ... |]) but not at the top level. As an example:

add1 :: Int -> Q Exp
add1 x = [| x + 1 |]

Template Haskell has no way of knowing what value x will take on at splice-time, so it requires the type of x to be an instance of Lift.

A Lift instance must satisfy $(lift x) ≡ x for all x, where $(...) is a Template Haskell splice.

Lift instances can be derived automatically by use of the -XDeriveLift GHC language extension:

{-# LANGUAGE DeriveLift #-}
module Foo where

import Language.Haskell.TH.Syntax

data Bar a = Bar1 a (Bar a) | Bar2 String
  deriving Lift

Minimal complete definition

Nothing

Methods

lift :: t -> Q Exp #

Turn a value into a Template Haskell expression, suitable for use in a splice.

Instances

Instances details
Lift Bool 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Bool -> Q Exp #

Lift Char 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Char -> Q Exp #

Lift Double 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Double -> Q Exp #

Lift Float 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Float -> Q Exp #

Lift Int 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Int -> Q Exp #

Lift Int8 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Int8 -> Q Exp #

Lift Int16 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Int16 -> Q Exp #

Lift Int32 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Int32 -> Q Exp #

Lift Int64 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Int64 -> Q Exp #

Lift Integer 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Integer -> Q Exp #

Lift Natural 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Natural -> Q Exp #

Lift Word 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Word -> Q Exp #

Lift Word8 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Word8 -> Q Exp #

Lift Word16 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Word16 -> Q Exp #

Lift Word32 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Word32 -> Q Exp #

Lift Word64 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Word64 -> Q Exp #

Lift () 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: () -> Q Exp #

Lift Void

Since: template-haskell-2.15.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Void -> Q Exp #

Lift Half 
Instance details

Defined in Numeric.Half

Methods

lift :: Half -> Q Exp #

Lift ConstrRepr Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation

Methods

lift :: ConstrRepr -> Q Exp #

Lift DataReprAnn Source # 
Instance details

Defined in Clash.Annotations.BitRepresentation

Methods

lift :: DataReprAnn -> Q Exp #

Lift PortName Source # 
Instance details

Defined in Clash.Annotations.TopEntity

Methods

lift :: PortName -> Q Exp #

Lift TopEntity Source # 
Instance details

Defined in Clash.Annotations.TopEntity

Methods

lift :: TopEntity -> Q Exp #

Lift Bit Source # 
Instance details

Defined in Clash.Sized.Internal.BitVector

Methods

lift :: Bit -> Q Exp #

Lift a => Lift [a] 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: [a] -> Q Exp #

Lift a => Lift (Maybe a) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Maybe a -> Q Exp #

Integral a => Lift (Ratio a) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Ratio a -> Q Exp #

Lift a => Lift (NonEmpty a)

Since: template-haskell-2.15.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: NonEmpty a -> Q Exp #

KnownSymbol s => Lift (SSymbol s) Source # 
Instance details

Defined in Clash.Promoted.Symbol

Methods

lift :: SSymbol s -> Q Exp #

KnownNat n => Lift (BitVector n) Source # 
Instance details

Defined in Clash.Sized.Internal.BitVector

Methods

lift :: BitVector n -> Q Exp #

KnownNat n => Lift (Index n) Source # 
Instance details

Defined in Clash.Sized.Internal.Index

Methods

lift :: Index n -> Q Exp #

Lift (SNat n) Source # 
Instance details

Defined in Clash.Promoted.Nat

Methods

lift :: SNat n -> Q Exp #

KnownNat n => Lift (Unsigned n) Source # 
Instance details

Defined in Clash.Sized.Internal.Unsigned

Methods

lift :: Unsigned n -> Q Exp #

KnownNat n => Lift (Signed n) Source # 
Instance details

Defined in Clash.Sized.Internal.Signed

Methods

lift :: Signed n -> Q Exp #

(Lift a, Lift b) => Lift (Either a b) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Either a b -> Q Exp #

(Lift a, Lift b) => Lift (a, b) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: (a, b) -> Q Exp #

Lift a => Lift (Vec n a) Source # 
Instance details

Defined in Clash.Sized.Vector

Methods

lift :: Vec n a -> Q Exp #

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

Defined in Clash.Signal.Internal

Methods

lift :: Signal dom a -> Q Exp #

Lift a => Lift (RTree d a) Source # 
Instance details

Defined in Clash.Sized.RTree

Methods

lift :: RTree d a -> Q Exp #

(Lift a, Lift b, Lift c) => Lift (a, b, c) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: (a, b, c) -> Q Exp #

(Lift (rep (int + frac)), KnownNat frac, KnownNat int, Typeable rep) => Lift (Fixed rep int frac) Source # 
Instance details

Defined in Clash.Sized.Fixed

Methods

lift :: Fixed rep int frac -> Q Exp #

Lift a => Lift (DSignal dom delay a) Source # 
Instance details

Defined in Clash.Signal.Delayed.Internal

Methods

lift :: DSignal dom delay a -> Q Exp #

(Lift a, Lift b, Lift c, Lift d) => Lift (a, b, c, d) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: (a, b, c, d) -> Q Exp #

(Lift a, Lift b, Lift c, Lift d, Lift e) => Lift (a, b, c, d, e) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: (a, b, c, d, e) -> Q Exp #

(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f) => Lift (a, b, c, d, e, f) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: (a, b, c, d, e, f) -> Q Exp #

(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f, Lift g) => Lift (a, b, c, d, e, f, g) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: (a, b, c, d, e, f, g) -> Q Exp #

Type classes

Clash

Other

module Data.Bits

Exceptions

Named types

Magic

Haskell Prelude