packages feed

ghc-hie 0.0.0 → 0.0.1

raw patch · 4 files changed

+19/−21 lines, 4 filesdep ~ghc

Dependency ranges changed: ghc

Files

ghc-hie.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           ghc-hie-version:        0.0.0+version:        0.0.1 synopsis:       HIE-file parsing machinery that supports multiple versions of GHC category:       Development homepage:       https://github.com/sol/ghc-hie#readme@@ -44,7 +44,7 @@     , deepseq     , directory     , filepath-    , ghc ==9.10.1 || ==9.10.2 || ==9.12.1 || ==9.12.2+    , ghc ==9.8.4 || ==9.10.1 || ==9.10.2 || ==9.12.1 || ==9.12.2     , ghc-boot     , transformers   default-language: GHC2021@@ -80,7 +80,7 @@     , deepseq     , directory     , filepath-    , ghc ==9.10.1 || ==9.10.2 || ==9.12.1 || ==9.12.2+    , ghc ==9.8.4 || ==9.10.1 || ==9.10.2 || ==9.12.1 || ==9.12.2     , ghc-boot     , hspec ==2.*     , process
src/GHC/Iface/Ext/Binary/Utils.hs view
@@ -128,7 +128,6 @@ import GHC.Types.SrcLoc import GHC.Types.Unique import qualified GHC.Data.Strict as Strict-import GHC.Utils.Outputable( JoinPointHood(..) )  import Control.DeepSeq import Control.Monad            ( when, (<$!>), unless, forM_, void )@@ -1050,17 +1049,6 @@                            case h of                              0 -> do a <- get bh ; return (Left a)                              _ -> do b <- get bh ; return (Right b)--instance Binary JoinPointHood where-    put_ bh NotJoinPoint = putByte bh 0-    put_ bh (JoinPoint ar) = do-        putByte bh 1-        put_ bh ar-    get bh = do-        h <- getByte bh-        case h of-            0 -> return NotJoinPoint-            _ -> do { ar <- get bh; return (JoinPoint ar) }  {- Finally - a reasonable portable Integer instance.
src/GHC/Iface/Ext/Utils.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TupleSections #-}@@ -454,7 +455,7 @@  {- | Merge two sorted, disjoint lists of ASTs, combining when necessary. -In the absence of position-altering pragmas (ex: @# line "file.hs" 3@),+In the absence of position-altering pragmas (ex: @#line "file.hs" 3@), different nodes in an AST tree should either have disjoint spans (in which case you can say for sure which one comes first) or one span should be completely contained in the other (in which case the contained@@ -467,11 +468,11 @@ @ module Baz where -# line 3 "Baz.hs"+#\line 3 "Baz.hs" foozball :: Int foozball = 0 -# line 3 "Baz.hs"+#\line 3 "Baz.hs" bar, quuuuuux :: Int bar = 1 quuuuuux = 2@@ -536,11 +537,15 @@ locOnly _ = pure []  locOnlyE :: Monad m => EpaLocation -> ReaderT NodeOrigin m [HieAST a]+#if __GLASGOW_HASKELL__ <= 908+locOnlyE (EpaSpan s _) = locOnly $ RealSrcSpan s Strict.Nothing+#else locOnlyE (EpaSpan s) = locOnly s+#endif locOnlyE _ = pure [] -mkScope :: (HasLoc a) => a -> Scope-mkScope a = case getHasLoc a of+mkScope :: SrcSpan -> Scope+mkScope a = case a of               (RealSrcSpan sp _) -> LocalScope sp               _ -> NoScope @@ -559,7 +564,11 @@ makeNodeA   :: (Monad m, Data a)   => a                 -- ^ helps fill in 'nodeAnnotations' (with 'Data')+#if __GLASGOW_HASKELL__ <= 908+  -> SrcSpanAnn' ann         -- ^ return an empty list if this is unhelpful+#else   -> EpAnn ann         -- ^ return an empty list if this is unhelpful+#endif   -> ReaderT NodeOrigin m [HieAST b] makeNodeA x spn = makeNode x (locA spn) 
test/GHC/Iface/Ext/BinarySpec.hs view
@@ -60,7 +60,8 @@  supported :: [(String, Integer)] supported = [-    ("9.8.4", 9084)+    ("9.8.1", 9081)+  , ("9.8.4", 9084)   , ("9.10.1", 9101)   , ("9.10.2", 9102)   , ("9.12.1", 9121)