QIO-1.0: The Quantum IO Monad is a library for defining quantum computations in Haskell

QIO.VecEq

Documentation

class VecEq v whereSource

Methods

vzero :: v x aSource

(<+>) :: (Eq a, Num x) => v x a -> v x a -> v x aSource

(<*>) :: Num x => x -> v x a -> v x aSource

(<@>) :: (Eq a, Num x) => a -> v x a -> xSource

fromList :: [(a, x)] -> v x aSource

toList :: v x a -> [(a, x)]Source

Instances

newtype VecEqL x a Source

Constructors

VecEqL 

Fields

unVecEqL :: [(a, x)]
 

Instances

VecEq VecEqL 
(Show x, Show a) => Show (VecEqL x a) 

vEqPlus :: (Eq a, Num x) => VecEqL x a -> VecEqL x a -> VecEqL x aSource

vEqTimes :: Num x => x -> VecEqL x a -> VecEqL x aSource

vEqAt :: (Eq a, Num x) => a -> VecEqL x a -> xSource

add :: (Eq a, Num x) => (a, x) -> VecEqL x a -> VecEqL x aSource

class EqMonad m whereSource

Methods

eqReturn :: Eq a => a -> m aSource

eqBind :: (Eq a, Eq b) => m a -> (a -> m b) -> m bSource

Instances

(VecEq v, Num x) => EqMonad (v x) 

data AsMonad m a whereSource

Constructors

Embed :: (EqMonad m, Eq a) => m a -> AsMonad m a 
Return :: EqMonad m => a -> AsMonad m a 
Bind :: EqMonad m => AsMonad m a -> (a -> AsMonad m b) -> AsMonad m b 

Instances

EqMonad m => Monad (AsMonad m) 

unEmbed :: Eq a => AsMonad m a -> m aSource