content: Doing it manually:
  
  \begin{spec}
  measure space
  =
  integrate (bernoulli 0.005) $ \isUser ->
  integrate (bernoulli(if isUser then 0.99 else 0.01)) · $ \testPositive ->
  integrate (isTrue testPositive) (constant 1)
  =
  integrate (bernoulli 0.005) $ \isUser ->
  integrate (bernoulli(if isUser then 0.99 else 0.01)) · $ \testPositive ->
  integrate (Factor (if testPositive then 1 else 0)) (constant 1)
  = 
  sum [False,True] $ \isUser -> (if isUser then 0.005 else 9.995) *
  sum [False,True] $ \testPositive -> if testPositive then (if isUser then 0.99 else 0.01) else (if isUser then 0.01 lese 0.99) · $ \testPositive ->
  (if testPositive then 1 else 0)) * 1
  =
  sum [False,True] $ \isUser -> (if isUser then 0.005 else 9.995) *
  sum [True] $ (if isUser then 0.99 else 0.01) $ \testPositive -> 1
  =
  sum [False,True] $ \isUser -> (if isUser then 0.005 else 9.995) *
  (if isUser then 0.99 else 0.01)
  =
  0.99 * 0.005  + 0.995 * 0.01
  = 
  0.0149
  \end{spec}
  Numerator:
  \begin{spec}
  integrate (bernoulli 0.005) $ \isUser ->
  integrate (bernoulli(if isUser then 0.99 else 0.01)) $ \testPositive ->
  integrate (isTrue testPositive) (\ () -> if isUser then 1 else 0)
  =
  0.005 *
  integrate (bernoulli(0.99)) $ \testPositive ->
  integrate (isTrue testPositive) (\ _ -> 1)
  =
  0.005 *
  integrate (bernoulli(0.99)) $ \testPositive ->
  if testPositive then 1 else 0
  =
  0.005 *
  0.99 *
  1
  =
  0.00495
  
  \end{spec}
  