From cd1f61d6a545bbafcce85a0bf9513cdf0a291ffe Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Mon, 13 Feb 2012 10:44:37 +0900 Subject: [PATCH] GHC 7.0 hack. --- Info.hs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Info.hs b/Info.hs index b96f586..c6c39f8 100644 --- a/Info.hs +++ b/Info.hs @@ -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