Permalink
Browse files

Fix "expected boxed value, got runtime error" (#137)

mikusp committed Feb 20, 2018
1 parent 1a25dea commit f7f144fe878399f4676d3f786bdcdc0fe08ae99e
Showing with 9 additions and 0 deletions.
  1. +9 −0 passes/src/Luna/Pass/Inference/ErrorPropagation.hs
@@ -38,6 +38,15 @@ propagateErrors expr = do
ASGFunction _ _ g -> do
propagateErrors =<< source g
updateErrors expr
+ Marked _ e -> do
+ propagateErrors =<< source e
+ updateErrors expr
+ Unify a b -> do
+ propagateErrors =<< source a
+ propagateErrors =<< source b
+ updateErrors expr
+ unifyErrors <- getLayer @Errors expr
+ (flip (modifyLayer_ @Errors)) (nub . (++ unifyErrors)) =<< source a
_ -> do
updateErrors expr

0 comments on commit f7f144f

Please sign in to comment.