packages feed

haskell-tools-debug 0.7.0.0 → 0.8.0.0

raw patch · 2 files changed

+12/−9 lines, 2 filesdep ~haskell-tools-astdep ~haskell-tools-backend-ghcdep ~haskell-tools-debugPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: haskell-tools-ast, haskell-tools-backend-ghc, haskell-tools-debug, haskell-tools-prettyprint, haskell-tools-refactor

API changes (from Hackage documentation)

Files

Language/Haskell/Tools/Debug.hs view
@@ -26,7 +26,7 @@ import Language.Haskell.Tools.Refactor.Perform (performCommand, readCommand)
 import Language.Haskell.Tools.Refactor.RefactorBase
 import Language.Haskell.Tools.Refactor.Prepare
-import Language.Haskell.Tools.Refactor.RefactorBase (RefactorChange(..), IsBoot(..), SourceFileKey(..))
+import Language.Haskell.Tools.Refactor.RefactorBase (RefactorChange(..), SourceFileKey(..))
 import Language.Haskell.Tools.Transform
 
 -- | Should be only used for testing
@@ -36,7 +36,8 @@     initGhcFlags
     _ <- useFlags args
     useDirs [workingDir]
-    modSum <- loadModule workingDir moduleName
+    ms <- loadModule workingDir moduleName
+    let modSum = ms { ms_hspp_opts = (ms_hspp_opts ms) { hscTarget = HscAsm, ghcLink = LinkInMemory } }
     p <- parseModule modSum
     t <- typecheckModule p
 
@@ -45,6 +46,8 @@ 
     liftIO $ putStrLn "=========== tokens:"
     liftIO $ putStrLn $ show (fst annots)
+    liftIO $ putStrLn "=========== comments:"
+    liftIO $ putStrLn $ show (snd annots)
     liftIO $ putStrLn "=========== parsed source:"
     liftIO $ putStrLn $ show (pm_parsed_source p)
     liftIO $ putStrLn "=========== renamed source:"
@@ -75,7 +78,7 @@     liftIO $ putStrLn "=========== pretty printed:"
     let prettyPrinted = prettyPrint sourced
     liftIO $ putStrLn prettyPrinted
-    transformed <- performCommand (either error id $ readCommand command) ((SourceFileKey NormalHs moduleName), sourced) []
+    transformed <- performCommand (either error id $ readCommand command) ((SourceFileKey (moduleSourceFile moduleName) moduleName), sourced) []
     case transformed of
       Right changes -> do
         forM_ changes $ \case
haskell-tools-debug.cabal view
@@ -1,5 +1,5 @@ name:                haskell-tools-debug
-version:             0.7.0.0
+version:             0.8.0.0
 synopsis:            Debugging Tools for Haskell-tools
 description:         Debugging Tools for Haskell-tools
 homepage:            https://github.com/haskell-tools/haskell-tools
@@ -22,15 +22,15 @@                      , references                >= 0.3 && < 0.4
                      , ghc                       >= 8.0 && < 8.1
                      , ghc-paths                 >= 0.1 && < 0.2
-                     , haskell-tools-ast         >= 0.7 && < 0.8
-                     , haskell-tools-backend-ghc >= 0.7 && < 0.8
-                     , haskell-tools-refactor    >= 0.7 && < 0.8
-                     , haskell-tools-prettyprint >= 0.7 && < 0.8
+                     , haskell-tools-ast         >= 0.8 && < 0.9
+                     , haskell-tools-backend-ghc >= 0.8 && < 0.9
+                     , haskell-tools-refactor    >= 0.8 && < 0.9
+                     , haskell-tools-prettyprint >= 0.8 && < 0.9
   default-language:    Haskell2010
 
 executable ht-debug
   build-depends:       base                      >= 4.9 && < 5.0
-                     , haskell-tools-debug       >= 0.7 && < 0.8
+                     , haskell-tools-debug       >= 0.8 && < 0.9
   hs-source-dirs:      exe
   main-is:             Main.hs
   default-language:    Haskell2010