ghc-imported-from 0.2.1.0 → 0.2.1.1
raw patch · 3 files changed
+26/−5 lines, 3 filesdep +monad-journaldep ~ghc-mod
Dependencies added: monad-journal
Dependency ranges changed: ghc-mod
Files
- Language/Haskell/GhcImportedFrom.hs +15/−1
- changelog.md +4/−0
- ghc-imported-from.cabal +7/−4
Language/Haskell/GhcImportedFrom.hs view
@@ -96,6 +96,10 @@ import Language.Haskell.GhcMod.Monad ( runGmOutT ) import qualified Language.Haskell.GhcMod.Types as GhcModTypes +import Language.Haskell.GhcMod.Types (IOish(..))+import Language.Haskell.GhcMod.Monad.Types (GhcModLog(..), GmOut(..))+import Control.Monad.Trans.Journal (runJournalT)+ import Language.Haskell.GhcImportedFrom.UtilsFromGhcMod import Language.Haskell.GhcImportedFrom.Types @@ -114,6 +118,12 @@ tdflags = tracingDynFlags #endif +trace' :: Show x => String -> x -> b -> b+trace' m x = trace (m ++ ">>> " ++ show x)++trace'' :: Outputable x => String -> x -> b -> b+trace'' m x = trace (m ++ ">>> " ++ (showSDoc tdflags (ppr x)))+ type GHCOption = String getGhcOptionsViaCabalRepl :: IO (Maybe [String])@@ -783,6 +793,10 @@ return yyy''' +-- Copied from ghc-mod-5.5.0.0+findCradleNoLog :: forall m. (IOish m, GmOut m) => m Cradle+findCradleNoLog = fst <$> (runJournalT findCradle :: m (Cradle, GhcModLog))+ -- | Attempt to guess the Haddock url, either a local file path or url to @hackage.haskell.org@ -- for the symbol in the given file, module, at the specified line and column location. --@@ -794,7 +808,7 @@ guessHaddockUrl :: FilePath -> String -> Symbol -> Int -> Int -> GhcOptions -> GhcPkgOptions -> IO (Either String [String]) guessHaddockUrl _targetFile targetModule symbol lineNr colNr (GhcOptions ghcOpts0) ghcpkgOptions = do- cradle <- runGmOutT GhcModTypes.defaultOptions $ findCradle+ cradle <- runGmOutT GhcModTypes.defaultOptions $ findCradleNoLog let currentDir = cradleCurrentDir cradle workDir = cradleRootDir cradle setCurrentDirectory workDir
changelog.md view
@@ -1,3 +1,7 @@+2016-01-20 v0.2.1.1++* Builds against ghc-mod-5.5.0.0.+ 2016-01-20 v0.2.1.0 * Builds on GHC 7.10.3 with the latest version of ghc-mod
ghc-imported-from.cabal view
@@ -1,5 +1,5 @@ name: ghc-imported-from-version: 0.2.1.0+version: 0.2.1.1 synopsis: Find the Haddock documentation for a symbol. description: Given a Haskell module and symbol, determine the URL to the Haddock documentation for that symbol.@@ -30,7 +30,8 @@ , ghc , ghc-paths , ghc-syb-utils- , ghc-mod >= 5.4.0.0+ , ghc-mod == 5.5.0.0+ , monad-journal , filepath , safe , process@@ -65,7 +66,8 @@ , ghc , ghc-paths , ghc-syb-utils- , ghc-mod >= 5.4.0.0+ , ghc-mod == 5.5.0.0+ , monad-journal , ghc-imported-from , filepath , safe@@ -99,7 +101,8 @@ , ghc , ghc-paths , ghc-syb-utils- , ghc-mod >= 5.4.0.0+ , ghc-mod == 5.5.0.0+ , monad-journal , filepath , safe , process