hakaru-0.3.0: A probabilistic programming language
Language.Hakaru.Runtime.Prelude
type family MinBoxVec (v1 :: * -> *) (v2 :: * -> *) :: * -> * Source #
Instances
type family MayBoxVec a :: * -> * Source #
lam :: (a -> b) -> a -> b Source #
app :: (a -> b) -> a -> b Source #
let_ :: a -> (a -> b) -> b Source #
ann_ :: a -> b -> b Source #
newtype Measure a Source #
Constructors
Fields
Methods
(>>=) :: Measure a -> (a -> Measure b) -> Measure b #
(>>) :: Measure a -> Measure b -> Measure b #
return :: a -> Measure a #
fail :: String -> Measure a #
fmap :: (a -> b) -> Measure a -> Measure b #
(<$) :: a -> Measure b -> Measure a #
pure :: a -> Measure a #
(<*>) :: Measure (a -> b) -> Measure a -> Measure b #
(*>) :: Measure a -> Measure b -> Measure b #
(<*) :: Measure a -> Measure b -> Measure a #
makeMeasure :: (GenIO -> IO a) -> Measure a Source #
uniform :: Double -> Double -> Measure Double Source #
normal :: Double -> Double -> Measure Double Source #
beta :: Double -> Double -> Measure Double Source #
gamma :: Double -> Double -> Measure Double Source #
categorical :: MayBoxVec Double Double -> Measure Int Source #
plate :: Vector (MayBoxVec a) a => Int -> (Int -> Measure a) -> Measure (MayBoxVec a a) Source #
pair :: a -> b -> (a, b) Source #
true :: Bool Source #
false :: Bool Source #
unit :: () Source #
data Pattern Source #
newtype Branch a b Source #
ptrue :: a -> Branch Bool a Source #
pfalse :: a -> Branch Bool a Source #
extractBool :: Bool -> a -> Bool -> Maybe a Source #
ppair :: Pattern -> Pattern -> (x -> y -> b) -> Branch (x, y) b Source #
case_ :: a -> [Branch a b] -> b Source #
branch :: (c -> Branch a b) -> c -> Branch a b Source #
dirac :: a -> Measure a Source #
pose :: Double -> Measure a -> Measure a Source #
superpose :: [(Double, Measure a)] -> Measure a Source #
reject :: Measure a Source #
nat_ :: Int -> Int Source #
int_ :: Int -> Int Source #
unsafeNat :: Int -> Int Source #
nat2prob :: Int -> Double Source #
fromInt :: Int -> Double Source #
nat2int :: Int -> Int Source #
nat2real :: Int -> Double Source #
fromProb :: Double -> Double Source #
unsafeProb :: Double -> Double Source #
real_ :: Rational -> Double Source #
prob_ :: NonNegativeRational -> Double Source #
infinity :: Double Source #
abs_ :: Num a => a -> a Source #
thRootOf :: Int -> Double -> Double Source #
array :: Vector (MayBoxVec a) a => Int -> (Int -> a) -> MayBoxVec a a Source #
(!) :: Vector (MayBoxVec a) a => MayBoxVec a a -> Int -> a Source #
size :: Vector (MayBoxVec a) a => MayBoxVec a a -> Int Source #
product :: Num a => Int -> Int -> (Int -> a) -> a Source #
summate :: Num a => Int -> Int -> (Int -> a) -> a Source #
run :: Show a => GenIO -> Measure a -> IO () Source #
iterateM_ :: Monad m => (a -> m a) -> a -> m b Source #
withPrint :: Show a => (a -> IO b) -> a -> IO b Source #