Copyright  (C) 20132016 University of Twente 

License  BSD2 (see the file LICENSE) 
Maintainer  Christiaan Baaij <christiaan.baaij@gmail.com> 
Safe Haskell  Unsafe 
Language  Haskell2010 
Extensions 

 data Clock = Clk Symbol Nat
 data SClock clk where
 data Signal' clk a = a : (Signal' clk a)
 register# :: SClock clk > a > Signal' clk a > Signal' clk a
 regEn# :: SClock clk > a > Signal' clk Bool > Signal' clk a > Signal' clk a
 mux :: Applicative f => f Bool > f a > f a > f a
 signal :: Applicative f => a > f a
 (.&&.) :: Applicative f => f Bool > f Bool > f Bool
 (..) :: Applicative f => f Bool > f Bool > f Bool
 not1 :: Functor f => f Bool > f Bool
 simulate :: (NFData a, NFData b) => (Signal' clk1 a > Signal' clk2 b) > [a] > [b]
 simulate_lazy :: (Signal' clk1 a > Signal' clk2 b) > [a] > [b]
 sample :: (Foldable f, NFData a) => f a > [a]
 sampleN :: (Foldable f, NFData a) => Int > f a > [a]
 fromList :: NFData a => [a] > Signal' clk a
 sample_lazy :: Foldable f => f a > [a]
 sampleN_lazy :: Foldable f => Int > f a > [a]
 fromList_lazy :: [a] > Signal' clk a
 testFor :: Foldable f => Int > f Bool > Property
 (.==.) :: (Eq a, Applicative f) => f a > f a > f Bool
 (./=.) :: (Eq a, Applicative f) => f a > f a > f Bool
 compare1 :: (Ord a, Applicative f) => f a > f a > f Ordering
 (.<.) :: (Ord a, Applicative f) => f a > f a > f Bool
 (.<=.) :: (Ord a, Applicative f) => f a > f a > f Bool
 (.>=.) :: (Ord a, Applicative f) => f a > f a > f Bool
 (.>.) :: (Ord a, Applicative f) => f a > f a > f Bool
 mapSignal# :: (a > b) > Signal' clk a > Signal' clk b
 signal# :: a > Signal' clk a
 appSignal# :: Signal' clk (a > b) > Signal' clk a > Signal' clk b
 foldr# :: (a > b > b) > b > Signal' clk a > b
 traverse# :: Applicative f => (a > f b) > Signal' clk a > f (Signal' clk b)
 fromEnum1 :: (Enum a, Functor f) => f a > f Int
 toRational1 :: (Real a, Functor f) => f a > f Rational
 toInteger1 :: (Integral a, Functor f) => f a > f Integer
 testBit1 :: (Bits a, Applicative f) => f a > f Int > f Bool
 popCount1 :: (Bits a, Functor f) => f a > f Int
 shift1 :: (Bits a, Applicative f) => f a > f Int > f a
 rotate1 :: (Bits a, Applicative f) => f a > f Int > f a
 setBit1 :: (Bits a, Applicative f) => f a > f Int > f a
 clearBit1 :: (Bits a, Applicative f) => f a > f Int > f a
 shiftL1 :: (Bits a, Applicative f) => f a > f Int > f a
 unsafeShiftL1 :: (Bits a, Applicative f) => f a > f Int > f a
 shiftR1 :: (Bits a, Applicative f) => f a > f Int > f a
 unsafeShiftR1 :: (Bits a, Applicative f) => f a > f Int > f a
 rotateL1 :: (Bits a, Applicative f) => f a > f Int > f a
 rotateR1 :: (Bits a, Applicative f) => f a > f Int > f a
 joinSignal# :: Signal' clk (Signal' clk a) > Signal' clk a
Datatypes
A synchronized signal with samples of type a
, explicitly synchronized to
a clock clk
NB: The constructor, (
, is not synthesisable.:
)
Functor (Signal' clk) Source #  
Applicative (Signal' clk) Source #  
Foldable (Signal' clk) Source #  NB: Not synthesisable NB: In "

Traversable (Signal' clk) Source #  
Fractional a => Fractional (Signal' clk a) Source #  
Num a => Num (Signal' clk a) Source #  
Show a => Show (Signal' clk a) Source #  
Lift a => Lift (Signal' clk a) Source #  
Arbitrary a => Arbitrary (Signal' clk a) Source #  
CoArbitrary a => CoArbitrary (Signal' clk a) Source #  
Default a => Default (Signal' clk a) Source #  
Basic circuits
mux :: Applicative f => f Bool > f a > f a > f a Source #
signal :: Applicative f => a > f a Source #
Boolean connectives
Simulation functions (not synthesisable)
lazy version
simulate_lazy :: (Signal' clk1 a > Signal' clk2 b) > [a] > [b] Source #
List <> Signal conversion (not synthesisable)
fromList :: NFData a => [a] > Signal' clk a Source #
Create a Signal
from a list
Every element in the list will correspond to a value of the signal for one clock cycle.
>>>
sampleN 2 (fromList [1,2,3,4,5])
[1,2]
NB: This function is not synthesisable
lazy versions
sample_lazy :: Foldable f => f a > [a] Source #
sampleN_lazy :: Foldable f => Int > f a > [a] Source #
fromList_lazy :: [a] > Signal' clk a Source #
Create a Signal
from a list
Every element in the list will correspond to a value of the signal for one clock cycle.
>>>
sampleN 2 (fromList [1,2,3,4,5])
[1,2]
NB: This function is not synthesisable
QuickCheck combinators
Type classes
Eq
like
Ord
like
Functor
mapSignal# :: (a > b) > Signal' clk a > Signal' clk b Source #
Applicative
Foldable
foldr# :: (a > b > b) > b > Signal' clk a > b Source #
NB: Not synthesisable
NB: In "
":foldr#
f z s
 The function
f
should be lazy in its second argument.  The
z
element will never be used.
Traversable
Enum
like
Rational
like
toRational1 :: (Real a, Functor f) => f a > f Rational Source #
Deprecated: toRational1
will be removed in clashprelude1.0, use "fmap toRational" instead.
The above type is a generalisation for:
toRational1 ::Real
a =>Signal
a >Signal
Rational
It is a version of toRational
that returns a Signal
of Rational
Integral
like
toInteger1 :: (Integral a, Functor f) => f a > f Integer Source #
Deprecated: toInteger1
will be removed in clashprelude1.0, use "fmap toInteger" instead.
The above type is a generalisation for:
toInteger1 ::Integral
a =>Signal
a >Signal
Integer
It is a version of toRational
that returns a Signal
of Integer
Bits
like
unsafeShiftL1 :: (Bits a, Applicative f) => f a > f Int > f a Source #
Deprecated: unsafeShiftL1
will be removed in clashprelude1.0, use "liftA2 unsafeShiftL" instead.
The above type is a generalisation for:
unsafeShiftL1 ::Bits
a =>Signal
a >Signal
Int
>Signal
a
It is a version of unsafeShiftL
that has a Signal
of Int
as indexing argument
unsafeShiftR1 :: (Bits a, Applicative f) => f a > f Int > f a Source #
Deprecated: unsafeShiftR1
will be removed in clashprelude1.0, use "liftA2 unsafeShiftR" instead.
The above type is a generalisation for:
unsafeShiftR1 ::Bits
a =>Signal
a >Signal
Int
>Signal
a
It is a version of unsafeShiftR
that has a Signal
of Int
as indexing argument