hakaru-0.6.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
Coerce Value Source # 
Instance details

Methods

coerceTo :: Coercion a b -> Value a -> Value b Source #

coerceFrom :: Coercion a b -> Value b -> Value a Source #

PrimCoerce Value Source # 
Instance details
Eq1 Value Source # 
Instance details

Methods

eq1 :: Value i -> Value i -> Bool Source #

Show1 Value Source # 
Instance details
Eq (Value a) Source # 
Instance details

Methods

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

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

Show (Value a) Source # 
Instance details

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)