hakaru-0.1.3: A probabilistic programming embedded DSL

Safe HaskellSafe-Inferred

Language.Hakaru.Symbolic

Documentation

data Dist a Source

class IntComp repr whereSource

Methods

int :: Integer -> repr IntegerSource

Instances

class BoolComp repr whereSource

Methods

bool :: Bool -> repr BoolSource

Instances

class RealComp repr whereSource

Methods

real :: Rational -> repr RealSource

exp :: repr Real -> repr Real -> repr RealSource

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

Instances

class SymbComp repr whereSource

Methods

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

pow :: repr Real -> repr Integer -> repr RealSource

scale :: repr Integer -> repr Real -> repr RealSource

Instances

class MeasMonad repr whereSource

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 whereSource

Methods

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

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

Instances

class Conditioning repr whereSource

Methods

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

Instances

data Pos Source

Constructors

Front 
Back 

type VarCounter = IntSource

type family MPL a Source

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

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

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

liftA1M :: (String -> String) -> Maple a -> Maple (Measure a)Source

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

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

mkPr :: String -> String -> StringSource

infixPr :: String -> String -> String -> StringSource

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

name :: String -> VarCounter -> StringSource

var :: String -> VarCounter -> Maple aSource

binder :: (String -> String -> Maybe String) -> (String -> String -> VarCounter -> Maybe String) -> String -> Maple a -> Maple a -> Maple (Dist a)Source

view :: Maple a -> StringSource

lift :: Maple Integer -> Maple RealSource

test :: StringSource

test4 :: StringSource

test3 :: StringSource

test2 :: StringSource