hakaru-0.1.4: A probabilistic programming embedded DSL

Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Hakaru.Symbolic

Documentation

data Real Source

Instances

type MPL Real = Rational 

data Dist a Source

class IntComp repr where Source

Methods

int :: Integer -> repr Integer Source

Instances

class BoolComp repr where Source

Methods

bool :: Bool -> repr Bool Source

Instances

class RealComp repr where Source

Methods

real :: Rational -> repr Real Source

exp :: repr Real -> repr Real -> repr Real Source

sqrt, sin, cos :: repr Real -> repr Real Source

Instances

class SymbComp repr where Source

Methods

add, mul, minus :: repr a -> repr a -> repr a Source

pow :: repr Real -> repr Integer -> repr Real Source

scale :: repr Integer -> repr Real -> repr Real Source

Instances

class MeasMonad repr where Source

Methods

bind :: repr (Measure a) -> (repr a -> repr (Measure b)) -> repr (Measure b) Source

ret :: repr a -> repr (Measure a) Source

Instances

class Distrib repr where Source

Methods

uniform, normal :: repr Real -> repr Real -> repr (Dist Real) Source

uniformD :: repr Integer -> repr Integer -> repr (Dist Integer) Source

Instances

class Conditioning repr where Source

Methods

conditioned, unconditioned :: repr (Dist a) -> repr (Measure a) Source

Instances

data Pos Source

Constructors

Front 
Back 

type family MPL a Source

Instances

type MPL Bool = Bool 
type MPL Integer = Integer 
type MPL Real = Rational 

pure :: Show (MPL a) => MPL a -> Maple a Source

liftA1 :: (String -> String) -> Maple a -> Maple a Source

liftA2 :: (String -> String -> String) -> Maple a -> Maple a -> Maple a Source

liftA2aba :: (String -> String -> String) -> Maple a -> Maple b -> Maple a Source

liftA2baa :: (String -> String -> String) -> Maple b -> Maple a -> Maple a Source

reify :: forall a. Read a => Pos -> VarCounter -> Maple a -> a Source