Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

GHC 7 support

  • Loading branch information...
commit 1eb5eb6f27602d99b1c30caa5ae3b53586d82392 1 parent 8c45e85
JP Moresmau authored
2  lib/Scion/Inspect/Find.hs
View
@@ -476,7 +476,7 @@ instance (Search id id) => Search id (DerivDecl id) where
instance (Search id id) => Search id (Sig id) where
search p s (TypeSig n t) = search p s n `mappend` search p s t
- -- search p s (IdSig i) = search p s i
+ search _ _ (IdSig i) = only (FoundId i)
search p s (FixSig n) = search p s n
search p s (InlineSig n _) = search p s n
search p s (SpecSig n t _) = search p s n `mappend` search p s t
11 lib/Scion/Types/Notes.hs
View
@@ -333,12 +333,19 @@ ghcSpanToLocation baseDir sp
| GHC.isGoodSrcSpan sp =
mkLocation (mkLocFile baseDir (GHC.unpackFS (GHC.srcSpanFile sp)))
(GHC.srcSpanStartLine sp)
- (GHC.srcSpanStartCol sp)
+ (ghcCol2ScionCol $ GHC.srcSpanStartCol sp)
(GHC.srcSpanEndLine sp)
- (GHC.srcSpanEndCol sp)
+ (ghcCol2ScionCol $ GHC.srcSpanEndCol sp)
| otherwise =
mkNoLoc (GHC.showSDoc (GHC.ppr sp))
+ghcCol2ScionCol :: Int -> Int
+#if __GLASGOW_HASKELL__ < 700
+ghcCol2ScionCol c=c -- GHC 6.x starts at 0 for columns
+#else
+ghcCol2ScionCol c=c-1 -- GHC 7 starts at 1 for columns
+#endif
+
-- | Construct a LocSource from a file name, converting the file name to an absolute path when necessary.
mkLocFile :: FilePath -> String -> LocSource
mkLocFile baseDir fileName =
6 scion.cabal
View
@@ -64,7 +64,7 @@ library
filepath == 1.2.*,
ghc >= 7,
syb,
- ghc-syb-utils >= 0.3,
+ ghc-syb-utils >= 0.2.1,
time == 1.2.*,
bytestring
else
@@ -161,7 +161,7 @@ executable scion-server
filepath == 1.2.*,
ghc >= 7,
syb,
- ghc-syb-utils >= 0.3,
+ ghc-syb-utils >= 0.2.1,
time == 1.2.*,
bytestring
else
@@ -270,7 +270,7 @@ executable scion-test
filepath == 1.2.*,
ghc >= 7,
syb,
- ghc-syb-utils >= 0.3,
+ ghc-syb-utils >= 0.2.1,
time == 1.2.*,
bytestring
else
Please sign in to comment.
Something went wrong with that request. Please try again.