CPP corrections.
This commit is contained in:
parent
aedc11f21c
commit
e5ee3da399
BIN
Language/Haskell/GhcMod/.ErrMsg.hs.swp
Normal file
BIN
Language/Haskell/GhcMod/.ErrMsg.hs.swp
Normal file
Binary file not shown.
@ -52,16 +52,22 @@ errBagToStrList dflag ls = map (ppErrMsg dflag ls) . reverse . bagToList
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
#if __GLASGOW_HASKELL__ >= 707
|
||||
ppErrMsg :: DynFlags -> LineSeparator -> ErrMsg -> String
|
||||
ppErrMsg dflag ls err = ppMsg spn SevError dflag ls msg ++ ext
|
||||
where
|
||||
#if __GLASGOW_HASKELL__ >= 707
|
||||
spn = errMsgSpan err
|
||||
#else
|
||||
spn = head (errMsgSpans err)
|
||||
#endif
|
||||
msg = errMsgShortDoc err
|
||||
ext = showMsg dflag ls (errMsgExtraInfo err)
|
||||
#else
|
||||
ppErrMsg :: DynFlags -> LineSeparator -> ErrMsg -> String
|
||||
ppErrMsg dflag ls err = ppMsg spn SevError dflag ls msg ++ ext
|
||||
where
|
||||
spn = head (errMsgSpans err)
|
||||
msg = errMsgShortDoc err
|
||||
ext = showMsg dflag ls (errMsgExtraInfo err)
|
||||
#endif
|
||||
|
||||
|
||||
ppMsg :: SrcSpan -> Severity-> DynFlags -> LineSeparator -> SDoc -> String
|
||||
ppMsg spn sev dflag ls@(LineSeparator lsep) msg = prefix ++ cts ++ lsep
|
||||
|
Loading…
Reference in New Issue
Block a user