hakaru-0.7.0: A probabilistic programming language
Safe HaskellNone
LanguageHaskell2010

Language.Hakaru.Syntax.Value

Documentation

data Value :: Hakaru -> * where Source #

Constructors

VNat :: !Natural -> Value 'HNat 
VInt :: !Integer -> Value 'HInt 
VProb :: !LogFloat -> Value 'HProb 
VReal :: !Double -> Value 'HReal 
VDatum :: !(Datum Value (HData' t)) -> Value (HData' t) 
VLam :: (Value a -> Value b) -> Value (a :-> b) 
VMeasure :: (Value 'HProb -> GenIO -> IO (Maybe (Value a, Value 'HProb))) -> Value ('HMeasure a) 
VArray :: !(Vector (Value a)) -> Value ('HArray a) 

Instances

Instances details
Coerce Value Source # 
Instance details

Defined in Language.Hakaru.Syntax.Value

Methods

coerceTo :: forall (a :: Hakaru) (b :: Hakaru). Coercion a b -> Value a -> Value b Source #

coerceFrom :: forall (a :: Hakaru) (b :: Hakaru). Coercion a b -> Value b -> Value a Source #

PrimCoerce Value Source # 
Instance details

Defined in Language.Hakaru.Syntax.Value

Methods

primCoerceTo :: forall (a :: Hakaru) (b :: Hakaru). PrimCoercion a b -> Value a -> Value b Source #

primCoerceFrom :: forall (a :: Hakaru) (b :: Hakaru). PrimCoercion a b -> Value b -> Value a Source #

Eq1 Value Source # 
Instance details

Defined in Language.Hakaru.Syntax.Value

Methods

eq1 :: forall (i :: k). Value i -> Value i -> Bool Source #

Show1 Value Source # 
Instance details

Defined in Language.Hakaru.Syntax.Value

Methods

showsPrec1 :: forall (i :: k). Int -> Value i -> ShowS Source #

show1 :: forall (i :: k). Value i -> String Source #

Eq (Value a) Source # 
Instance details

Defined in Language.Hakaru.Syntax.Value

Methods

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

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

Show (Value a) Source # 
Instance details

Defined in Language.Hakaru.Syntax.Value

Methods

showsPrec :: Int -> Value a -> ShowS #

show :: Value a -> String #

showList :: [Value a] -> ShowS #

lam2 :: Value (a :-> (b :-> c)) -> Value a -> Value b -> Value c Source #

data VReducer :: * -> Hakaru -> * where Source #

Constructors

VRed_Num :: STRef s (Value a) -> VReducer s a 
VRed_Unit :: VReducer s HUnit 
VRed_Pair :: Sing a -> Sing b -> VReducer s a -> VReducer s b -> VReducer s (HPair a b) 
VRed_Array :: Vector (VReducer s a) -> VReducer s ('HArray a)