hakaru-0.3.0: A probabilistic programming language

Safe HaskellNone
LanguageHaskell2010

Language.Hakaru.Sample

Documentation

data EAssoc Source #

Constructors

EAssoc !(Variable a) !(Value a) 

newtype Env Source #

Constructors

Env (IntMap EAssoc) 

runEvaluate :: ABT Term abt => abt '[] a -> Value a Source #

evaluate :: ABT Term abt => abt '[] a -> Env -> Value a Source #

evaluateTerm :: ABT Term abt => Term abt a -> Env -> Value a Source #

evaluateSCon :: ABT Term abt => SCon args a -> SArgs abt args -> Env -> Value a Source #

evaluatePrimOp :: (ABT Term abt, typs ~ UnLCs args, args ~ LCs typs) => PrimOp typs a -> SArgs abt args -> Env -> Value a Source #

evaluateArrayOp :: (ABT Term abt, typs ~ UnLCs args, args ~ LCs typs) => ArrayOp typs a -> SArgs abt args -> Env -> Value a Source #

evaluateMeasureOp :: (ABT Term abt, typs ~ UnLCs args, args ~ LCs typs) => MeasureOp typs a -> SArgs abt args -> Env -> Value (HMeasure a) Source #

evaluateNaryOp :: ABT Term abt => NaryOp a -> Seq (abt '[] a) -> Env -> Value a Source #

evalOp :: NaryOp a -> Value a -> Value a -> Value a Source #

mapEvaluate :: ABT Term abt => Seq (abt '[] a) -> Env -> Seq (Value a) Source #

evaluateArray :: ABT Term abt => abt '[] HNat -> abt '[HNat] a -> Env -> Value (HArray a) Source #

evaluateDatum :: ABT Term abt => Datum (abt '[]) (HData' a) -> Env -> Value (HData' a) Source #

evaluateCase :: forall abt a b. ABT Term abt => abt '[] a -> [Branch a abt b] -> Env -> Value b Source #

evaluateSuperpose :: ABT Term abt => NonEmpty (abt '[] HProb, abt '[] (HMeasure a)) -> Env -> Value (HMeasure a) Source #