summaryrefslogtreecommitdiff
path: root/src/runtime/haskell
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/haskell')
-rw-r--r--src/runtime/haskell/PGF/Probabilistic.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/haskell/PGF/Probabilistic.hs b/src/runtime/haskell/PGF/Probabilistic.hs
index 1a75b60a6..ee44e73e1 100644
--- a/src/runtime/haskell/PGF/Probabilistic.hs
+++ b/src/runtime/haskell/PGF/Probabilistic.hs
@@ -80,7 +80,7 @@ setProbabilities probs pgf = pgf {
}}
where
mapUnionWith f map1 map2 =
- Map.mapWithKey (\k v -> f v (fromJust (Map.lookup k map2))) map1
+ Map.mapWithKey (\k v -> maybe v (f v) (Map.lookup k map2)) map1
-- | compute the probability of a given tree
probTree :: PGF -> Expr -> Double