summaryrefslogtreecommitdiff
path: root/compiler/main/HeaderInfo.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-10-10 13:15:35 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-10-10 13:15:35 +0000
commit613c5f6d88a3dd7df56af1d0f3780b885a0d17cd (patch)
treed90d7c5213ff4f6a9c28504d24917c3af6b0c75b /compiler/main/HeaderInfo.hs
parent6cd3d0dc3021fb705fa7603f24afcb19b49f8b3b (diff)
downloadhaskell-613c5f6d88a3dd7df56af1d0f3780b885a0d17cd.tar.gz
fix #2636: throw missing module errors as SourceErrors, not ErrMsg
Diffstat (limited to 'compiler/main/HeaderInfo.hs')
-rw-r--r--compiler/main/HeaderInfo.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/main/HeaderInfo.hs b/compiler/main/HeaderInfo.hs
index 22f645efd5..daa66c7736 100644
--- a/compiler/main/HeaderInfo.hs
+++ b/compiler/main/HeaderInfo.hs
@@ -22,6 +22,7 @@ module HeaderInfo ( getImports
#include "HsVersions.h"
+import HscTypes
import Parser ( parseHeader )
import Lexer
import FastString
@@ -70,8 +71,8 @@ getImports dflags buf filename source_filename = do
in
return (source_imps, ordinary_imps, mod)
-parseError :: SrcSpan -> Message -> a
-parseError span err = throwErrMsg $ mkPlainErrMsg span err
+parseError :: SrcSpan -> Message -> IO a
+parseError span err = throwOneError $ mkPlainErrMsg span err
-- we aren't interested in package imports here, filter them out
isHomeImp :: ImportDecl name -> Bool