GHC 7.0 hack.

This commit is contained in:
Kazu Yamamoto 2012-02-13 10:44:37 +09:00
parent 1d6246a778
commit cd1f61d6a5

11
Info.hs
View File

@ -70,9 +70,14 @@ annotOf opt fileName modstr lineNo colNo = inModuleContext opt fileName modstr e
return $ tolisp $ map (\(loc, e) -> ("(" ++ l loc ++ " " ++ show (pretty e) ++ ")")) ts'
l :: SrcSpan -> String
l (RealSrcSpan spn) = ("("++) . (++")") . unwords . map show $
[ srcSpanStartLine spn, srcSpanStartCol spn
, srcSpanEndLine spn, srcSpanEndCol spn ]
#if __GLASGOW_HASKELL__ >= 702
l (RealSrcSpan spn)
#else
l spn | isGoodSrcSpan spn
#endif
= ("("++) . (++")") . unwords . map show $
[ srcSpanStartLine spn, srcSpanStartCol spn
, srcSpanEndLine spn, srcSpanEndCol spn ]
l _ = "(0 0 0 0)"
cmp a b