diff options
author | Ian Lynagh <igloo@earth.li> | 2011-06-01 18:45:24 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-06-01 18:45:24 +0100 |
commit | b7d09fd6da2a806155baa317c9d42d28bcc52ca6 (patch) | |
tree | 9059ecef6c8a4bc3a7facfa8c8873b7b55419909 | |
parent | 59f644efe234a3f854a198e7f4df9ad5a5bd5b59 (diff) | |
download | haskell-real-src-loc-span.tar.gz |
More RealSrc*real-src-loc-span
-rw-r--r-- | compiler/typecheck/TcSplice.lhs | 18 | ||||
-rw-r--r-- | ghc/InteractiveUI.hs | 11 |
2 files changed, 22 insertions, 7 deletions
diff --git a/compiler/typecheck/TcSplice.lhs b/compiler/typecheck/TcSplice.lhs index 3cc2eb5570..6da5741037 100644 --- a/compiler/typecheck/TcSplice.lhs +++ b/compiler/typecheck/TcSplice.lhs @@ -897,13 +897,17 @@ instance TH.Quasi (IOEnv (Env TcGblEnv TcLclEnv)) where qReport False msg = addReport (text msg) empty qLocation = do { m <- getModule - ; l <- getSrcSpanM - ; return (TH.Loc { TH.loc_filename = unpackFS (srcSpanFile l) - , TH.loc_module = moduleNameString (moduleName m) - , TH.loc_package = packageIdString (modulePackageId m) - , TH.loc_start = (srcSpanStartLine l, srcSpanStartCol l) - , TH.loc_end = (srcSpanEndLine l, srcSpanEndCol l) }) } - + ; l <- getSrcSpanM + ; r <- case l of + UnhelpfulSpan _ -> pprPanic "qLocation: Unhelpful location" + (ppr l) + RealSrcSpan s -> return s + ; return (TH.Loc { TH.loc_filename = unpackFS (srcSpanFile r) + , TH.loc_module = moduleNameString (moduleName m) + , TH.loc_package = packageIdString (modulePackageId m) + , TH.loc_start = (srcSpanStartLine r, srcSpanStartCol r) + , TH.loc_end = (srcSpanEndLine r, srcSpanEndCol r) }) } + qReify v = reify v qClassInstances = lookupClassInstances diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs index 0f68607a92..4d9e8a983c 100644 --- a/ghc/InteractiveUI.hs +++ b/ghc/InteractiveUI.hs @@ -12,6 +12,15 @@ module InteractiveUI ( interactiveUI, ghciWelcomeMsg ) where +interactiveUI :: a +interactiveUI = error "XXX" + +ghciWelcomeMsg :: a +ghciWelcomeMsg = error "XXX" + +-- XXX +#if 0 + #include "HsVersions.h" import qualified GhciMonad @@ -2469,3 +2478,5 @@ setBreakFlag :: Bool -> GHC.BreakArray -> Int -> IO Bool setBreakFlag toggle array index | toggle = GHC.setBreakOn array index | otherwise = GHC.setBreakOff array index +#endif + |