diff options
author | Kosyrev Serge <_deepfire@feelingofgreen.ru> | 2018-09-09 23:01:11 +0300 |
---|---|---|
committer | Kosyrev Serge <_deepfire@feelingofgreen.ru> | 2018-09-15 21:07:34 +0300 |
commit | 09a7f88ffb1480cad73b92087cb703504699e154 (patch) | |
tree | 6241928afd37f1f5c36507836b1df2c830b9db8e /src | |
parent | 66fd575af0d286e6ea5d46d31db838058405af14 (diff) |
compiler: improve error reporting for processing of module imports
Diffstat (limited to 'src')
-rw-r--r-- | src/LambdaCube/Compiler.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/LambdaCube/Compiler.hs b/src/LambdaCube/Compiler.hs index c0fef7a0..6a65c811 100644 --- a/src/LambdaCube/Compiler.hs +++ b/src/LambdaCube/Compiler.hs | |||
@@ -157,9 +157,9 @@ loadModule ex imp mname_ = do | |||
157 | ms <- forM (moduleImports e) $ \(m, is) -> loadModule ex (Just fname) (Right $ sName m) <&> \r -> case r of | 157 | ms <- forM (moduleImports e) $ \(m, is) -> loadModule ex (Just fname) (Right $ sName m) <&> \r -> case r of |
158 | Left err -> Left $ pShow m <+> "is not found" | 158 | Left err -> Left $ pShow m <+> "is not found" |
159 | Right (fb, (src, dsge)) -> | 159 | Right (fb, (src, dsge)) -> |
160 | either (Left . const (pShow m <+> "couldn't be parsed")) | 160 | either (Left . (\errm-> pShow m <+> "couldn't be parsed:\n" <+> errm)) |
161 | (\(pm, x, e) -> either | 161 | (\(pm, x, e) -> either |
162 | (Left . const (pShow m <+> "couldn't be typechecked")) | 162 | (Left . (\errm-> pShow m <+> "couldn't be typechecked:\n" <+> errm)) |
163 | (\(ds, ge) -> Right (ds{-todo: filter-}, Map.filterWithKey (\k _ -> filterImports is k) ge)) | 163 | (\(ds, ge) -> Right (ds{-todo: filter-}, Map.filterWithKey (\k _ -> filterImports is k) ge)) |
164 | e) | 164 | e) |
165 | dsge | 165 | dsge |