prob-fx-0.1.0.2: A library for modular probabilistic modelling
Safe HaskellNone
LanguageHaskell2010

Effects.ObsReader

Description

The effect for reading observable variables from a model environment.

Synopsis

Documentation

data ObsReader env a where Source #

The effect for reading observed values from a model environment env

Constructors

Ask

Given the observable variable x is assigned a list of type [a] in env, attempt to retrieve its head value.

Fields

ask :: forall env es x a. (Member (ObsReader env) es, Observable env x a) => ObsVar x -> Prog es (Maybe a) Source #

Wrapper function for calling Ask

handleRead Source #

Arguments

:: Env env

initial model environment

-> Prog (ObsReader env ': es) a 
-> Prog es a 

Handle the Ask requests of observable variables