Merge branch 'release'

This commit is contained in:
Daniel Gröber 2017-06-13 21:12:19 +02:00
commit d4a4b4b5d9
78 changed files with 783 additions and 457 deletions

325
ChangeLog Normal file
View File

@ -0,0 +1,325 @@
2017-05-26 v5.8.0.0
* Fix logic bug in fix for excessive use of `map-file`
* Bump HLint to 2.x
* Reorganize Cabal file to make maintanance easier
* Merge #872, Do not log warning when Stack project is preferred
* Merge #873, Fix build on case-insensitive filesystems
* Fix 'debug' command when ghc(-pkg) not on PATH
* Rework README
* Reorganize modules as preparation for splitting off ghc-mod-core
* Remove dependency on 'pretty' and use GHC's pretty printer instead
* Merge #854, Fix for "ghc-mod doc" when usind with stack
* Merge #858, Fix Gap.fromTyThing returning GHC internal
representation instead of the user readable representation of
types
* Fix #774, 'find*File' searching all the way up to /
* Fix #778, Check directory permissions before reading in
findFileInParentsP
* Merge #817, fix #779, bad "ghc-mod check" performance
2017-01-16 v5.7.0.0
* Bump cabal-helper to 0.7.3.0 to support Cabal-1.24.1.0
* Bump haskell-src-exts, optparse-applicative, pipes and extra
to be compatible with stackage.
2016-07-29 v5.6.0.0
* Bump cabal-helper to 0.7, adds support for Cabal-1.24
* Merge #737, `map-file` caching issues
* Merge #767, Add `browse` option to show symbol "parents"
* Merge #731, Type constraints
* Fix #69 (via #731), Missing type constraints
* Fix #438, Case splitting not working
* Fix #790, Don't try to use 'cabal' or 'stack' when it's not installed
* Add support for GHC 8.0
2016-01-19 v5.5.0.0
* Fix #660, cabal-helper errors when no global GHC is installed (Stack)
* Fix #665, Reinstate internally managed CWD (no more `ghc-mod root`
requirement for frontends)
* Merge #707, Support for spaces in file names when using
legacy-interactive
* Merge #694, #706, #703, Rewrite command line parser using
optparse-applicative. Thanks @lierdakil!
* Merge #693, Fix slowdown and bugs caused by excessive use of
`map-file`
* Fix #678, "No instance nor default method for class operation put"
* Fix #683, #684, a variety of caching related issues
* Fix #666, The issue of the beast >:3
* Merge #649, elisp: Add ghc-report-errors to inhibit *GHC Error*
logging
* Fix #621, Preserve Cabal flag selection across automatic
reconfiguration
2015-09-16 v5.4.0.0
* Add support for the Stack build tool
* Fix #554, `module not interpreted` errors when using the `type`
command
* Merge #484, support for file redirection
* Add support for file redirection to Emacs frontend so
all commands should work even with unsaved files now!
* Support inserting holes in type signatures
* Merge #543, Fix URL anchors being dropped in OS X
* Fix GHC session always being dropped in interactive mode (caused
super slowness)
* Expose all internal modules because API will get a major
redesign soon anyways
* ghc-mod(i) executable must now be run in project directory for
commands other than `root`
* Add --line-prefix option for multiplexing stdout/err onto one stream
2015-08-14 v5.3.0.0
* Re-license majority of code under the AGPL-3
* Add support for GHC 7.10 and Cabal 1.22
* Remove `cabalDependPackages', `cabalAllTargets'
* Merge #434, Fix finding sandbox config file and directory.
* Merge #431, Re-add output line separator global option for expand
command.
* Merge #470, Support for overriding the package-db stack
* Merge #486, Fix ineffective cache invalidation for `find`
2014-12-31 v5.2.1.2
* Merge #377, Fix `browse` erroneously thinking haskell2010 identifiers
are operators
* Fix incompatibility with monad-control >= 1.0.0
* Fix temporary directories not being removed properly
* Merge #405, #408, a race condition in the Emacs frontend
* Merge #403, Support unicode quotes in module regexp
2014-11-03 v5.2.1.1
* Fix `findCabalFiles` thinking `$HOME/.cabal` is a cabal file.
* Support `where` clauses, `let` bindings and `case` expressions
in case splitting, #400
2014-11-02 v5.2.1.0
* Fix `newTempDir` on Windows
* GhcModT's liftIO instance now converts GhcMOdError exceptions
into monadic failures
2014-10-30 v5.2.0.0
* Return type of `loadSymbolDb` is now in GhcModT
* Function `dumpSymbol` now takes the path of the target directory
* Fix #387, Pattern match failure in GhcPkg
* Fix #386, `ghc-mod version` should not check `cabal configure`
* Fix #391, Error on command `-g` when used before command despite
--help output saying this is valid
* Fix formatting of `ghc-version` constant in the elisp code. in
version 5.1.1.0 the string was "v5.1.1.0" instead of "5.1.1.0".
2014-10-04 v5.1.1.0
* Handle various consistency related issues: #222, #224, #326, #332
* Add `isOutdated` to Language.Haskell.GhcMod
2014-09-17 v5.1.0.2
* Fix building with haskell-src-exts < 1.16.0
2014-09-16 v5.1.0.1
* Fix building with haskell-src-exts-1.16.0
* Loosen monad-journal dependency
2014-09-12 v5.1.0.0
* GhcModError is now a recursive data type (`GMECabalConfigure`'s
type changed)
* GhcModT's MonadIO instance now converts IOError's to failures in
the ErrorT part of GhcModT on `liftIO`.
* Make `loadSymbolDb` polimorphic in the return types's monad.
* Add `hoistGhcModT` to Language.Haskell.GhcMod.Internal
* Fix `check` command for modules using `-XPatternSynonyms`
* Merge #364, Support cabal configuration flags
2014-08-29 v5.0.1.2
* Merge #345, Try fixing duplicate errors
* Merge #344, elisp: Use advice to check syntax on save-buffer
* Merge #341, support `browse -d` in ghc-modi
* Merge #352, elisp: Fix C-u accidentally getting turned into a
prefix command
2014-08-24 v5.0.1.1
* Fix CaseSplitting faliure when using "fancy types" (see #336)
* Print error information in "spec" test suite when using `extract`
2014-08-20 v5.0.1
* Fix missing file in "Data-Files"
2014-08-20 v5.0.0
* ghc-mod consumes much less memory than ghc-mod-4.1.
* @serras brought the results of Google Summer code
including case splitting and better type hole
* @DanielG provided the new monad based API
2014-05-16 v4.1.6
* Reverting "Trying to fix rare hang on Nix".
2014-05-16 v4.1.5
* Fixing the build on GHC 7.8.3.
2014-05-16 v4.1.4
* Trying to fix rare hang on Nix.
2014-05-16 v4.1.3
* Making -g-fxxx work.
2014-05-16 v4.1.2
* Setting Opt_WarnTypedHoles correctly.
2014-05-16 v4.1.1
* Making Emacs front-end more stable.
2014-04-30 v4.1.0
* ghc-modi now provides "type", "info", and "boot".
* ghc-mod now provides "find".
* Packages, which are specified in a cabal file but not installed,
are filtered out. (@DanielG)
* ghc-mod/ghc-modi treats "-l" properly.
* ghc-mod obsoletes "-p". Use "ghc-mod browse package:module".
* M-x ghc-debug has been implemented.
* "type" and "info" can work even if files contain type errors.
* "boot" as a new API.
2014-04-07 v4.0.2
* The ghc-display-error option (@notogawa)
* Fixing a file bug for Windows (@Kiripon)
* The -b option for ghc-modi (@yuga)
2014-04-03 v4.0.1
* Displaying a qualified name for one if two unqualified names
are conflict.
2014-04-01 v4.0.0
* Implementing interactive "ghc-modi" command.
"check", "find", and "lint" are available.
* Introducing a concept of project root directory.
Thanks to this, sandbox without cabal can be used.
"ghd-mod debug" displays the project root.
* Syntax error highlighting (C-xC-s) gets much faster
thanks to ghc-modi. "flymake" was thrown away and
syntax error highlighting is implemented from a scratch.
* Resolving the "import hell". You dont' have to type
"import Foo" anymore. Use M-t or C-cC-m.
* Inserting "module Foo" (M-t) can insert all paths
relative to the project root.
* M-C-d displays a html document even if it is in its sandbox.
* M-s now merges the same module lines in addition to sorting.
* A bug fix for hlint support. (@eagletmt)
2014-03-15 v3.1.7
* Defining ghc-debug for Elisp debugging.
* Catching up the latest hlint which does not provide --quite.
2014-02-07 v3.1.6
* Testing with multi GHC versions. (@eagletmt)
* Checking package ID. (@naota)
* Supporting GHC 7.8.1 RC1. (@bartavelle)
2014-01-14 v3.1.5
* Catching up to GHC 7.7. (@scottgw)
* Testing with multi GHC versions. (@eagletmt)
* Workaround for the coming new Haskell Platform.
* Supporting flymake of the coming Emacs 24.4.
2013-11-20 v3.1.4
* GHCi loading as fallback for browse. (@khorser)
* Supporting GHC 7.7. (@schell)
* Introducing the "-p" and "-q" option for browse. (@mvoidex)
2013-10-07 v3.1.3
* Fixing tests. (@eagletmt)
2013-09-21 v3.1.2
* Supporting sandbox for "list" and "browse". (@eagletmt)
2013-09-21 v3.1.1
* Making Cradle strict.
2013-09-21 v3.1.0
* API breaks backward compatibility.
* Supporting sandbox sharing.
2013-09-16 v3.0.2
* Fixing a bug of "dist/build/autogen/cabal_macros.h".
2013-09-16 v3.0.1
* Exporting more low level APIs.
* Adding "-ibuild/autogen"
* Adding "-optP". (Macros from a Cabal file
and "dist/build/autogen/cabal_macros.h")
2013-09-06 v3.0.0
* Supporting the sandbox of cabal 1.18.
* Obsoleting the support for cabal-dev.
2013-09-04 v2.1.2
* Supporting multiple target files. (@nh2)
2013-09-03 v2.1.1
* A bug fix for library dependency.
2013-09-03 v2.1.0
* Exporting Language.Haskell.GhcMod.Internal. (@alanz)
* Supporting GHC 7.7. (@co-dan)
2013-05-30 v2.0.3
* Using finalizePackageDescription to enable "if else" in a cabal
file.
2013-05-21 v2.0.2
* Document fixes.
2013-05-21 v2.0.1
* Document fixes.
2013-05-21 v2.0.0
* ghc-mod also provides a library (Language.Haskell.GhcMod)
2013-05-13 v1.12.5
* A bug fix for the case where a cabal file is broken.
2013-04-02 v1.12.4
* C-M-d on Emacs now can browse functions and types.
* Checking "QuasiQuotes" as well as "TemplateHaskell". (@eagletmt)
* "ghc-mod info" can display info of non-exported functions.
(@mvoidex)
2013-03-16 v1.12.3
* "ghc-mod info" and "ghc-mod type" also check Template Haskell.
(@eagletmt)
2013-03-13 v1.12.2
* New logic to set "-fno-code" using "depanal"
* Cleaning up the code relating to Doc/SDoc
2013-03-07 v1.12.1
* Fixing a bug to find a sandbox.
2013-03-05 v1.12.0
* "ghc-mod debug" to see which cabal file and sand box are used
* Fast "ghc-mod check" if Template Haskell is not used
* "ghc-mod brwose -d" displays more information (@eagletmt)
2013-03-01 v1.11.5
* New option "-d" for "ghc-mod browse" to show symbols with type
info (@moidex)
2013-02-15 v1.11.4
* Adding Hspec test suite
* Better way to show Extension (@eagletmt)
* Removing the library itself from Cabal dependencies
2012-12-11 v1.11.3
* Display a filname instead of "Dummy" if an error occur
2012-10-30 v1.11.2
* Extract dependencies from a Cabal file if exists and specify
them to "ghc-mod check" (@khibino)
2012-10-19 v1.11.1
* Supporting GHC 7.6.x (@cartazio, @dysinger, @ihameed)

View File

@ -69,24 +69,24 @@ module GhcMod (
, unloadMappedFile
) where
import GhcModExe.Boot
import GhcModExe.Browse
import GhcModExe.CaseSplit
import GhcModExe.Check
import GhcModExe.Debug
import GhcModExe.FillSig
import GhcModExe.Find
import GhcModExe.Flag
import GhcModExe.Info
import GhcModExe.Lang
import GhcModExe.Lint
import GhcModExe.Modules
import GhcModExe.PkgDoc
import GhcModExe.Test
import Language.Haskell.GhcMod.Cradle
import Language.Haskell.GhcMod.FileMapping
import Language.Haskell.GhcMod.Logging
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.Output
import Language.Haskell.GhcMod.Target
import Language.Haskell.GhcMod.Types
import GhcMod.Exe.Boot
import GhcMod.Exe.Browse
import GhcMod.Exe.CaseSplit
import GhcMod.Exe.Check
import GhcMod.Exe.Debug
import GhcMod.Exe.FillSig
import GhcMod.Exe.Find
import GhcMod.Exe.Flag
import GhcMod.Exe.Info
import GhcMod.Exe.Lang
import GhcMod.Exe.Lint
import GhcMod.Exe.Modules
import GhcMod.Exe.PkgDoc
import GhcMod.Exe.Test
import GhcMod.Cradle
import GhcMod.FileMapping
import GhcMod.Logging
import GhcMod.Monad
import GhcMod.Output
import GhcMod.Target
import GhcMod.Types

View File

@ -1,14 +1,14 @@
module GhcModExe.Boot where
module GhcMod.Exe.Boot where
import Control.Applicative
import Prelude
import GhcModExe.Browse
import GhcModExe.Flag
import GhcModExe.Lang
import GhcModExe.Modules
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.Types (defaultBrowseOpts)
import GhcMod.Exe.Browse
import GhcMod.Exe.Flag
import GhcMod.Exe.Lang
import GhcMod.Exe.Modules
import GhcMod.Monad
import GhcMod.Types (defaultBrowseOpts)
-- | Printing necessary information for front-end booting.
boot :: IOish m => GhcModT m String

View File

@ -1,5 +1,5 @@
{-# LANGUAGE CPP #-}
module GhcModExe.Browse (
module GhcMod.Exe.Browse (
browse,
BrowseOpts(..)
) where
@ -14,12 +14,12 @@ import FastString
import GHC
import HscTypes
import qualified GHC as G
import Language.Haskell.GhcMod.Convert
import Language.Haskell.GhcMod.Doc (showPage, styleUnqualified)
import Language.Haskell.GhcMod.Gap as Gap
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.Logging
import GhcMod.Convert
import GhcMod.Doc (showPage, styleUnqualified)
import GhcMod.Gap as Gap
import GhcMod.Types
import GhcMod.Monad
import GhcMod.Logging
import Name (getOccString)
import Outputable
import TyCon (isAlgTyCon)

View File

@ -1,6 +1,6 @@
{-# LANGUAGE CPP #-}
module GhcModExe.CaseSplit (
module GhcMod.Exe.CaseSplit (
splits
) where
@ -19,16 +19,16 @@ import qualified TyCon as Ty
import qualified Type as Ty
import Exception
import Language.Haskell.GhcMod.Convert
import Language.Haskell.GhcMod.DynFlags
import qualified Language.Haskell.GhcMod.Gap as Gap
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.SrcUtils
import Language.Haskell.GhcMod.Doc
import Language.Haskell.GhcMod.Logging
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Utils (withMappedFile)
import Language.Haskell.GhcMod.FileMapping (fileModSummaryWithMapping)
import GhcMod.Convert
import GhcMod.DynFlags
import qualified GhcMod.Gap as Gap
import GhcMod.Monad
import GhcMod.SrcUtils
import GhcMod.Doc
import GhcMod.Logging
import GhcMod.Types
import GhcMod.Utils (withMappedFile)
import GhcMod.FileMapping (fileModSummaryWithMapping)
import Control.DeepSeq
----------------------------------------------------------------

View File

@ -1,4 +1,4 @@
module GhcModExe.Check (
module GhcMod.Exe.Check (
checkSyntax
, check
, expandTemplate
@ -7,10 +7,10 @@ module GhcModExe.Check (
import Control.Applicative
import Prelude
import Language.Haskell.GhcMod.DynFlags
import qualified Language.Haskell.GhcMod.Gap as Gap
import Language.Haskell.GhcMod.Logger
import Language.Haskell.GhcMod.Monad
import GhcMod.DynFlags
import qualified GhcMod.Gap as Gap
import GhcMod.Logger
import GhcMod.Monad
----------------------------------------------------------------

View File

@ -1,4 +1,4 @@
module GhcModExe.Debug (debugInfo, rootInfo, componentInfo) where
module GhcMod.Exe.Debug (debugInfo, rootInfo, componentInfo) where
import Control.Arrow (first)
import Control.Applicative
@ -11,15 +11,15 @@ import Data.Version
import Data.List.Split
import System.Directory
import GhcModExe.Internal
import Language.Haskell.GhcMod.Cradle
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.Output
import Language.Haskell.GhcMod.Pretty
import Language.Haskell.GhcMod.Stack
import Language.Haskell.GhcMod.Target
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Utils
import GhcMod.Exe.Internal
import GhcMod.Cradle
import GhcMod.Monad
import GhcMod.Output
import GhcMod.Pretty
import GhcMod.Stack
import GhcMod.Target
import GhcMod.Types
import GhcMod.Utils
import Paths_ghc_mod (version)

View File

@ -1,7 +1,7 @@
{-# LANGUAGE CPP, MultiParamTypeClasses, FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances #-}
module GhcModExe.FillSig (
module GhcMod.Exe.FillSig (
sig
, refine
, auto
@ -30,16 +30,16 @@ import qualified HsPat as Ty
import qualified Language.Haskell.Exts as HE
import Djinn.GHC
import qualified Language.Haskell.GhcMod.Gap as Gap
import Language.Haskell.GhcMod.Convert
import Language.Haskell.GhcMod.DynFlags
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.SrcUtils
import Language.Haskell.GhcMod.Logging (gmLog)
import Language.Haskell.GhcMod.Pretty (showToDoc)
import Language.Haskell.GhcMod.Doc
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.FileMapping (fileModSummaryWithMapping)
import qualified GhcMod.Gap as Gap
import GhcMod.Convert
import GhcMod.DynFlags
import GhcMod.Monad
import GhcMod.SrcUtils
import GhcMod.Logging (gmLog)
import GhcMod.Pretty (showToDoc)
import GhcMod.Doc
import GhcMod.Types
import GhcMod.FileMapping (fileModSummaryWithMapping)
#if __GLASGOW_HASKELL__ >= 710
import GHC (unLoc)

View File

@ -1,6 +1,6 @@
{-# LANGUAGE CPP, BangPatterns, TupleSections, DeriveGeneric #-}
module GhcModExe.Find
module GhcMod.Exe.Find
( Symbol
, SymbolDb
, loadSymbolDb
@ -22,14 +22,14 @@ import OccName
import HscTypes
import Exception
import Language.Haskell.GhcMod.Convert
import Language.Haskell.GhcMod.Gap
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.Output
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Utils
import Language.Haskell.GhcMod.World
import Language.Haskell.GhcMod.LightGhc
import GhcMod.Convert
import GhcMod.Gap
import GhcMod.Monad
import GhcMod.Output
import GhcMod.Types
import GhcMod.Utils
import GhcMod.World
import GhcMod.LightGhc
import Control.Applicative
import Control.DeepSeq
@ -53,7 +53,7 @@ import Data.Map (Map)
import qualified Data.Map as M
import Data.Set (Set)
import qualified Data.Set as S
import Language.Haskell.GhcMod.PathsAndFiles
import GhcMod.PathsAndFiles
import System.Directory
import Prelude

9
GhcMod/Exe/Flag.hs Normal file
View File

@ -0,0 +1,9 @@
module GhcMod.Exe.Flag where
import qualified GhcMod.Gap as Gap
import GhcMod.Convert
import GhcMod.Monad
-- | Listing of GHC flags, same as @ghc@\'s @--show-options@ with @ghc >= 7.10@.
flags :: IOish m => GhcModT m String
flags = convert' Gap.ghcCmdOptions

View File

@ -1,4 +1,4 @@
module GhcModExe.Info (
module GhcMod.Exe.Info (
info
, types
) where
@ -11,17 +11,17 @@ import GHC (GhcMonad, SrcSpan)
import Prelude
import qualified GHC as G
import qualified Language.Haskell.GhcMod.Gap as Gap
import Language.Haskell.GhcMod.Convert
import Language.Haskell.GhcMod.Doc
import Language.Haskell.GhcMod.DynFlags
import Language.Haskell.GhcMod.Gap
import Language.Haskell.GhcMod.Logging
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.SrcUtils
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Utils (mkRevRedirMapFunc)
import Language.Haskell.GhcMod.FileMapping (fileModSummaryWithMapping)
import qualified GhcMod.Gap as Gap
import GhcMod.Convert
import GhcMod.Doc
import GhcMod.DynFlags
import GhcMod.Gap
import GhcMod.Logging
import GhcMod.Monad
import GhcMod.SrcUtils
import GhcMod.Types
import GhcMod.Utils (mkRevRedirMapFunc)
import GhcMod.FileMapping (fileModSummaryWithMapping)
----------------------------------------------------------------

View File

@ -1,6 +1,6 @@
-- | Low level access to the ghc-mod library.
module GhcModExe.Internal (
module GhcMod.Exe.Internal (
-- * Types
GHCOption
, IncludeDir
@ -51,22 +51,22 @@ module GhcModExe.Internal (
, GHandler(..)
, gcatches
-- * FileMapping
, module Language.Haskell.GhcMod.FileMapping
, module GhcMod.FileMapping
) where
import GHC.Paths (libdir)
import Language.Haskell.GhcMod.Target
import Language.Haskell.GhcMod.DynFlags
import Language.Haskell.GhcMod.Error
import Language.Haskell.GhcMod.Logger
import Language.Haskell.GhcMod.Logging
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Utils
import Language.Haskell.GhcMod.World
import Language.Haskell.GhcMod.CabalHelper
import Language.Haskell.GhcMod.FileMapping
import GhcMod.Target
import GhcMod.DynFlags
import GhcMod.Error
import GhcMod.Logger
import GhcMod.Logging
import GhcMod.Monad
import GhcMod.Types
import GhcMod.Utils
import GhcMod.World
import GhcMod.CabalHelper
import GhcMod.FileMapping
-- | Obtaining the directory for ghc system libraries.
ghcLibDir :: FilePath

View File

@ -1,8 +1,8 @@
module GhcModExe.Lang where
module GhcMod.Exe.Lang where
import DynFlags (supportedLanguagesAndExtensions)
import Language.Haskell.GhcMod.Convert
import Language.Haskell.GhcMod.Monad
import GhcMod.Convert
import GhcMod.Monad
-- | Listing language extensions.

View File

@ -1,14 +1,14 @@
module GhcModExe.Lint where
module GhcMod.Exe.Lint where
import Exception (ghandle)
import Control.Exception (SomeException(..))
import Language.Haskell.GhcMod.Logger (checkErrorPrefix)
import Language.Haskell.GhcMod.Convert
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad
import GhcMod.Logger (checkErrorPrefix)
import GhcMod.Convert
import GhcMod.Types
import GhcMod.Monad
import Language.Haskell.HLint3
import Language.Haskell.GhcMod.Utils (withMappedFile)
import GhcMod.Utils (withMappedFile)
import Language.Haskell.Exts.SrcLoc (SrcSpan(..))
-- | Checking syntax of a target file using hlint.

View File

@ -1,11 +1,11 @@
module GhcModExe.Modules (modules) where
module GhcMod.Exe.Modules (modules) where
import Control.Arrow
import Data.List
import Language.Haskell.GhcMod.Convert
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.Gap ( listVisibleModuleNames
import GhcMod.Convert
import GhcMod.Types
import GhcMod.Monad
import GhcMod.Gap ( listVisibleModuleNames
, lookupModulePackageInAllPackages
)

View File

@ -1,9 +1,9 @@
module GhcModExe.PkgDoc (pkgDoc) where
module GhcMod.Exe.PkgDoc (pkgDoc) where
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.GhcPkg
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.Output
import GhcMod.Types
import GhcMod.GhcPkg
import GhcMod.Monad
import GhcMod.Output
import Control.Applicative
import Prelude

View File

@ -1,4 +1,4 @@
module GhcModExe.Test where
module GhcMod.Exe.Test where
import Control.Applicative
import Data.List
@ -6,9 +6,9 @@ import System.FilePath
import System.Directory
import Prelude
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.DynFlags
import GhcMod.Types
import GhcMod.Monad
import GhcMod.DynFlags
import GHC
import GHC.Exception

View File

@ -1,9 +0,0 @@
module GhcModExe.Flag where
import qualified Language.Haskell.GhcMod.Gap as Gap
import Language.Haskell.GhcMod.Convert
import Language.Haskell.GhcMod.Monad
-- | Listing of GHC flags, same as @ghc@\'s @--show-options@ with @ghc >= 7.10@.
flags :: IOish m => GhcModT m String
flags = convert' Gap.ghcCmdOptions

View File

@ -1,7 +1,7 @@
import Criterion.Main
import Language.Haskell.GhcMod.Target
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.Types
import GhcMod.Target
import GhcMod.Monad
import GhcMod.Types
import Dir
import System.IO.Temp
import System.Process hiding (env)

View File

@ -15,7 +15,7 @@
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
{-# LANGUAGE CPP #-}
module Language.Haskell.GhcMod.CabalHelper
module GhcMod.CabalHelper
( getComponents
, getGhcMergedPkgOptions
, getCabalPackageDbStack
@ -34,15 +34,15 @@ import Data.Binary (Binary)
import Data.Traversable
import Distribution.Helper hiding (Programs(..))
import qualified Distribution.Helper as CH
import qualified Language.Haskell.GhcMod.Types as T
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad.Types
import Language.Haskell.GhcMod.Utils
import Language.Haskell.GhcMod.PathsAndFiles
import Language.Haskell.GhcMod.Logging
import Language.Haskell.GhcMod.Output
import Language.Haskell.GhcMod.CustomPackageDb
import Language.Haskell.GhcMod.Stack
import qualified GhcMod.Types as T
import GhcMod.Types
import GhcMod.Monad.Types
import GhcMod.Utils
import GhcMod.PathsAndFiles
import GhcMod.Logging
import GhcMod.Output
import GhcMod.CustomPackageDb
import GhcMod.Stack
import System.FilePath
import System.Process
import System.Exit

View File

@ -14,9 +14,9 @@
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
{-# LANGUAGE CPP, OverloadedStrings #-}
module Language.Haskell.GhcMod.Caching (
module Language.Haskell.GhcMod.Caching
, module Language.Haskell.GhcMod.Caching.Types
module GhcMod.Caching (
module GhcMod.Caching
, module GhcMod.Caching.Types
) where
import Control.Arrow (first)
@ -38,9 +38,9 @@ import Utils (TimedFile(..), timeMaybe, mightExist)
import Paths_ghc_mod (version)
import Prelude
import Language.Haskell.GhcMod.Monad.Types
import Language.Haskell.GhcMod.Caching.Types
import Language.Haskell.GhcMod.Logging
import GhcMod.Monad.Types
import GhcMod.Caching.Types
import GhcMod.Logging
-- | Cache a MonadIO action with proper invalidation.
cached :: forall m a d. (Gm m, MonadIO m, Binary a, Eq d, Binary d, Show d)

View File

@ -13,7 +13,7 @@
--
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
module Language.Haskell.GhcMod.Caching.Types where
module GhcMod.Caching.Types where
import Utils
import Data.Label

View File

@ -1,9 +1,9 @@
{-# LANGUAGE CPP, FlexibleInstances, FlexibleContexts #-}
module Language.Haskell.GhcMod.Convert (convert, convert', emptyResult, whenFound, whenFound') where
module GhcMod.Convert (convert, convert', emptyResult, whenFound, whenFound') where
import Language.Haskell.GhcMod.Monad.Types
import Language.Haskell.GhcMod.Types
import GhcMod.Monad.Types
import GhcMod.Types
import Control.Applicative
import Prelude

View File

@ -1,5 +1,5 @@
{-# LANGUAGE CPP #-}
module Language.Haskell.GhcMod.Cradle
module GhcMod.Cradle
( findCradle
, findCradle'
, findCradleNoLog
@ -10,13 +10,13 @@ module Language.Haskell.GhcMod.Cradle
, plainCradle
) where
import Language.Haskell.GhcMod.PathsAndFiles
import Language.Haskell.GhcMod.Monad.Types
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Utils
import Language.Haskell.GhcMod.Stack
import Language.Haskell.GhcMod.Logging
import Language.Haskell.GhcMod.Error
import GhcMod.PathsAndFiles
import GhcMod.Monad.Types
import GhcMod.Types
import GhcMod.Utils
import GhcMod.Stack
import GhcMod.Logging
import GhcMod.Error
import Safe
import Control.Applicative

View File

@ -13,16 +13,16 @@
--
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
module Language.Haskell.GhcMod.CustomPackageDb where
module GhcMod.CustomPackageDb where
import Control.Applicative
import Control.Monad
import Control.Category ((.))
import Data.Maybe
import Data.Traversable
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad.Types
import Language.Haskell.GhcMod.PathsAndFiles
import GhcMod.Types
import GhcMod.Monad.Types
import GhcMod.PathsAndFiles
import Prelude hiding ((.))
parseCustomPackageDb :: String -> [GhcPkgDb]

View File

@ -14,7 +14,7 @@
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
{-# LANGUAGE CPP, RankNTypes #-}
module Language.Haskell.GhcMod.DebugLogger where
module GhcMod.DebugLogger where
-- (c) The University of Glasgow 2005
--
@ -57,8 +57,8 @@ import Outputable (SDoc, PprStyle, runSDoc, initSDocContext, blankLine)
import qualified Outputable
import ErrUtils
import Language.Haskell.GhcMod.Error
import Language.Haskell.GhcMod.Gap
import GhcMod.Error
import GhcMod.Gap
import Prelude
debugLogAction :: (String -> IO ()) -> GmLogAction

View File

@ -1,7 +1,7 @@
module Language.Haskell.GhcMod.Doc where
module GhcMod.Doc where
import GHC
import Language.Haskell.GhcMod.Gap (withStyle, showDocWith)
import GhcMod.Gap (withStyle, showDocWith)
import Outputable
import Pretty (Mode(..))

View File

@ -1,16 +1,16 @@
{-# LANGUAGE TemplateHaskell #-}
module Language.Haskell.GhcMod.DynFlags where
module GhcMod.DynFlags where
import Control.Applicative
import Control.Monad
import GHC
import qualified GHC as G
import GHC.Paths (libdir)
import qualified Language.Haskell.GhcMod.Gap as Gap
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.DebugLogger
import Language.Haskell.GhcMod.DynFlagsTH
import qualified GhcMod.Gap as Gap
import GhcMod.Types
import GhcMod.DebugLogger
import GhcMod.DynFlagsTH
import System.IO.Unsafe (unsafePerformIO)
import Prelude

View File

@ -15,7 +15,7 @@
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
{-# LANGUAGE CPP, TemplateHaskell #-}
module Language.Haskell.GhcMod.DynFlagsTH where
module GhcMod.DynFlagsTH where
import Language.Haskell.TH
import Language.Haskell.TH.Syntax

View File

@ -15,7 +15,7 @@
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
{-# LANGUAGE ExistentialQuantification #-}
module Language.Haskell.GhcMod.Error (
module GhcMod.Error (
GhcModError(..)
, GmError
, gmeDoc
@ -47,8 +47,8 @@ import Pretty
import Config (cProjectVersion, cHostPlatformString)
import Paths_ghc_mod (version)
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Pretty
import GhcMod.Types
import GhcMod.Pretty
type GmError m = MonadError GhcModError m

View File

@ -1,4 +1,4 @@
module Language.Haskell.GhcMod.FileMapping
module GhcMod.FileMapping
( loadMappedFile
, loadMappedFileSource
, unloadMappedFile
@ -6,11 +6,11 @@ module Language.Haskell.GhcMod.FileMapping
, fileModSummaryWithMapping
) where
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad.Types
import Language.Haskell.GhcMod.Gap
import Language.Haskell.GhcMod.HomeModuleGraph
import Language.Haskell.GhcMod.Utils
import GhcMod.Types
import GhcMod.Monad.Types
import GhcMod.Gap
import GhcMod.HomeModuleGraph
import GhcMod.Utils
import System.IO
import System.FilePath

View File

@ -1,7 +1,7 @@
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, CPP, ScopedTypeVariables, RankNTypes #-}
module Language.Haskell.GhcMod.Gap (
Language.Haskell.GhcMod.Gap.ClsInst
module GhcMod.Gap (
GhcMod.Gap.ClsInst
, mkTarget
, withStyle
, GmLogAction
@ -44,7 +44,7 @@ module Language.Haskell.GhcMod.Gap (
, listVisibleModuleNames
, listVisibleModules
, lookupModulePackageInAllPackages
, Language.Haskell.GhcMod.Gap.isSynTyCon
, GhcMod.Gap.isSynTyCon
, parseModuleHeader
, mkErrStyle'
, everythingStagedWithContext
@ -139,7 +139,7 @@ import Packages
import Data.Generics (GenericQ, extQ, gmapQ)
import GHC.SYB.Utils (Stage(..))
import Language.Haskell.GhcMod.Types (Expression(..))
import GhcMod.Types (Expression(..))
import Prelude
----------------------------------------------------------------

View File

@ -1,5 +1,5 @@
{-# LANGUAGE BangPatterns, ScopedTypeVariables, TupleSections #-}
module Language.Haskell.GhcMod.GhcPkg (
module GhcMod.GhcPkg (
ghcPkgDbOpt
, ghcPkgDbStackOpts
, ghcDbStackOpts
@ -18,12 +18,12 @@ import System.Directory (doesDirectoryExist, getAppUserDataDirectory)
import System.FilePath ((</>))
import Prelude
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad.Types
import Language.Haskell.GhcMod.CabalHelper
import Language.Haskell.GhcMod.PathsAndFiles
import Language.Haskell.GhcMod.CustomPackageDb
import Language.Haskell.GhcMod.Stack
import GhcMod.Types
import GhcMod.Monad.Types
import GhcMod.CabalHelper
import GhcMod.PathsAndFiles
import GhcMod.CustomPackageDb
import GhcMod.Stack
ghcVersion :: Int
ghcVersion = read cProjectVersionInt

View File

@ -15,7 +15,7 @@
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
{-# LANGUAGE ScopedTypeVariables, RecordWildCards #-}
module Language.Haskell.GhcMod.HomeModuleGraph (
module GhcMod.HomeModuleGraph (
GmModuleGraph(..)
, ModulePath(..)
, mkFileMap
@ -58,12 +58,12 @@ import System.Directory
import System.IO
import Prelude
import Language.Haskell.GhcMod.Logging
import Language.Haskell.GhcMod.Logger
import Language.Haskell.GhcMod.Monad.Types
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Utils (withMappedFile)
import Language.Haskell.GhcMod.Gap (parseModuleHeader)
import GhcMod.Logging
import GhcMod.Logger
import GhcMod.Monad.Types
import GhcMod.Types
import GhcMod.Utils (withMappedFile)
import GhcMod.Gap (parseModuleHeader)
-- | Turn module graph into a graphviz dot file
--

View File

@ -1,4 +1,4 @@
module Language.Haskell.GhcMod.LightGhc where
module GhcMod.LightGhc where
import Control.Monad
import Control.Monad.Reader (runReaderT)
@ -12,10 +12,10 @@ import DynFlags
import HscMain
import HscTypes
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad.Types
import Language.Haskell.GhcMod.DynFlags
import qualified Language.Haskell.GhcMod.Gap as Gap
import GhcMod.Types
import GhcMod.Monad.Types
import GhcMod.DynFlags
import qualified GhcMod.Gap as Gap
-- We have to be more careful about tearing down 'HscEnv's since GHC 8 added an
-- out of process GHCI server which has to be shutdown.

View File

@ -1,6 +1,6 @@
{-# LANGUAGE CPP, RankNTypes #-}
module Language.Haskell.GhcMod.Logger (
module GhcMod.Logger (
withLogger
, withLogger'
, checkErrorPrefix
@ -27,14 +27,14 @@ import Bag
import SrcLoc
import FastString
import Language.Haskell.GhcMod.Convert
import Language.Haskell.GhcMod.Doc (showPage)
import Language.Haskell.GhcMod.DynFlags (withDynFlags)
import Language.Haskell.GhcMod.Monad.Types
import Language.Haskell.GhcMod.Error
import Language.Haskell.GhcMod.Pretty
import Language.Haskell.GhcMod.Utils (mkRevRedirMapFunc)
import qualified Language.Haskell.GhcMod.Gap as Gap
import GhcMod.Convert
import GhcMod.Doc (showPage)
import GhcMod.DynFlags (withDynFlags)
import GhcMod.Monad.Types
import GhcMod.Error
import GhcMod.Pretty
import GhcMod.Utils (mkRevRedirMapFunc)
import qualified GhcMod.Gap as Gap
import Prelude
type Builder = [String] -> [String]

View File

@ -16,9 +16,9 @@
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Language.Haskell.GhcMod.Logging (
module Language.Haskell.GhcMod.Logging
, module Language.Haskell.GhcMod.Pretty
module GhcMod.Logging (
module GhcMod.Logging
, module GhcMod.Pretty
, GmLogLevel(..)
, module Data.Monoid
, module Pretty
@ -37,10 +37,10 @@ import Prelude
import Pretty hiding (style, (<>))
import Language.Haskell.GhcMod.Monad.Types
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Pretty
import Language.Haskell.GhcMod.Output
import GhcMod.Monad.Types
import GhcMod.Types
import GhcMod.Pretty
import GhcMod.Output
gmSetLogLevel :: GmLog m => GmLogLevel -> m ()
gmSetLogLevel level =

View File

@ -15,7 +15,7 @@
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
{-# LANGUAGE CPP #-}
module Language.Haskell.GhcMod.Monad (
module GhcMod.Monad (
runGmOutT
, runGmOutT'
, runGhcModT
@ -27,16 +27,16 @@ module Language.Haskell.GhcMod.Monad (
, runGmPkgGhc
, withGhcModEnv
, withGhcModEnv'
, module Language.Haskell.GhcMod.Monad.Types
, module GhcMod.Monad.Types
) where
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad.Types
import Language.Haskell.GhcMod.Error
import Language.Haskell.GhcMod.Logging
import Language.Haskell.GhcMod.Cradle
import Language.Haskell.GhcMod.Target
import Language.Haskell.GhcMod.Output
import GhcMod.Types
import GhcMod.Monad.Types
import GhcMod.Error
import GhcMod.Logging
import GhcMod.Cradle
import GhcMod.Target
import GhcMod.Output
import Control.Arrow (first)
import Control.Applicative

View File

@ -17,10 +17,10 @@
{-# LANGUAGE GeneralizedNewtypeDeriving, StandaloneDeriving #-}
{-# LANGUAGE FlexibleInstances, UndecidableInstances #-}
module Language.Haskell.GhcMod.Monad.Env where
module GhcMod.Monad.Env where
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad.Newtypes
import GhcMod.Types
import GhcMod.Monad.Newtypes
import Control.Monad
import Control.Monad.Trans.Journal (JournalT)

View File

@ -17,10 +17,10 @@
{-# LANGUAGE GeneralizedNewtypeDeriving, StandaloneDeriving #-}
{-# LANGUAGE FlexibleInstances, UndecidableInstances #-}
module Language.Haskell.GhcMod.Monad.Log where
module GhcMod.Monad.Log where
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad.Newtypes
import GhcMod.Types
import GhcMod.Monad.Newtypes
import Control.Monad
import Control.Monad.Trans.Journal (JournalT)

View File

@ -18,11 +18,11 @@
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies, UndecidableInstances #-}
{-# LANGUAGE RankNTypes, FlexibleInstances #-}
module Language.Haskell.GhcMod.Monad.Newtypes where
module GhcMod.Monad.Newtypes where
#include "Compat.hs_h"
import Language.Haskell.GhcMod.Types
import GhcMod.Types
import GHC

View File

@ -18,12 +18,12 @@
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Language.Haskell.GhcMod.Monad.Orphans where
module GhcMod.Monad.Orphans where
#include "Compat.hs_h"
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad.Newtypes
import GhcMod.Types
import GhcMod.Monad.Newtypes
#if DIFFERENT_MONADIO
import qualified MonadUtils as GHC (MonadIO(..))

View File

@ -17,10 +17,10 @@
{-# LANGUAGE GeneralizedNewtypeDeriving, StandaloneDeriving #-}
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, UndecidableInstances #-}
module Language.Haskell.GhcMod.Monad.Out where
module GhcMod.Monad.Out where
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad.Newtypes
import GhcMod.Types
import GhcMod.Monad.Newtypes
import Control.Monad
import Control.Monad.State.Strict (StateT(..))

View File

@ -17,10 +17,10 @@
{-# LANGUAGE GeneralizedNewtypeDeriving, StandaloneDeriving #-}
{-# LANGUAGE FlexibleInstances, UndecidableInstances #-}
module Language.Haskell.GhcMod.Monad.State where
module GhcMod.Monad.State where
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad.Newtypes
import GhcMod.Types
import GhcMod.Monad.Newtypes
import Control.Monad
import Control.Monad.State.Strict (StateT(..))

View File

@ -20,7 +20,7 @@
{-# LANGUAGE StandaloneDeriving #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Language.Haskell.GhcMod.Monad.Types (
module GhcMod.Monad.Types (
-- * Monad Types
GhcModT
, GmOutT(..)
@ -64,14 +64,14 @@ module Language.Haskell.GhcMod.Monad.Types (
#include "Compat.hs_h"
import Language.Haskell.GhcMod.Types
import GhcMod.Types
import Language.Haskell.GhcMod.Monad.Env
import Language.Haskell.GhcMod.Monad.State
import Language.Haskell.GhcMod.Monad.Log
import Language.Haskell.GhcMod.Monad.Out
import Language.Haskell.GhcMod.Monad.Newtypes
import Language.Haskell.GhcMod.Monad.Orphans ()
import GhcMod.Monad.Env
import GhcMod.Monad.State
import GhcMod.Monad.Log
import GhcMod.Monad.Out
import GhcMod.Monad.Newtypes
import GhcMod.Monad.Orphans ()
import Safe

View File

@ -14,7 +14,7 @@
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
module Language.Haskell.GhcMod.Options.DocUtils (
module GhcMod.Options.DocUtils (
($$),
($$$),
(<=>),

View File

@ -15,7 +15,7 @@
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
{-# LANGUAGE OverloadedStrings, FlexibleInstances, GeneralizedNewtypeDeriving #-}
module Language.Haskell.GhcMod.Options.Help where
module GhcMod.Options.Help where
import Options.Applicative
import Options.Applicative.Help.Pretty (Doc)

View File

@ -16,20 +16,20 @@
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
module Language.Haskell.GhcMod.Options.Options (
module GhcMod.Options.Options (
globalArgSpec
, parseCmdLineOptions
) where
import Options.Applicative
import Options.Applicative.Types
import Language.Haskell.GhcMod.Types
import GhcMod.Types
import Control.Arrow
import Data.Char (toUpper, toLower)
import Data.List (intercalate)
import Language.Haskell.GhcMod.Read
import Language.Haskell.GhcMod.Options.DocUtils
import Language.Haskell.GhcMod.Options.Help
import GhcMod.Read
import GhcMod.Options.DocUtils
import GhcMod.Options.Help
import Data.Monoid
import Prelude

View File

@ -18,7 +18,7 @@
-- Copyright (c) The University of Glasgow 2004-2008
{-# LANGUAGE FlexibleInstances #-}
module Language.Haskell.GhcMod.Output (
module GhcMod.Output (
gmPutStr
, gmErrStr
, gmPutStrLn
@ -53,9 +53,9 @@ import Pipes
import Pipes.Lift
import Prelude
import Language.Haskell.GhcMod.Types hiding (LineSeparator, MonadIO(..))
import Language.Haskell.GhcMod.Monad.Types hiding (MonadIO(..))
import Language.Haskell.GhcMod.Gap ()
import GhcMod.Types hiding (LineSeparator, MonadIO(..))
import GhcMod.Monad.Types hiding (MonadIO(..))
import GhcMod.Gap ()
class ProcessOutput a where
hGetContents' :: Handle -> IO a

View File

@ -14,9 +14,9 @@
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
module Language.Haskell.GhcMod.PathsAndFiles (
module Language.Haskell.GhcMod.PathsAndFiles
, module Language.Haskell.GhcMod.Caching
module GhcMod.PathsAndFiles (
module GhcMod.PathsAndFiles
, module GhcMod.Caching
) where
import Config (cProjectVersion)
@ -34,9 +34,9 @@ import System.Directory
import System.FilePath
import System.Process
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Caching
import qualified Language.Haskell.GhcMod.Utils as U
import GhcMod.Types
import GhcMod.Caching
import qualified GhcMod.Utils as U
import Utils (mightExist)
import Prelude

View File

@ -14,7 +14,7 @@
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
module Language.Haskell.GhcMod.Pretty
module GhcMod.Pretty
( renderGm
, renderSDoc
, gmComponentNameDoc
@ -35,9 +35,9 @@ import Pretty
import GHC
import Outputable (SDoc, withPprStyleDoc)
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Doc
import Language.Haskell.GhcMod.Gap (renderGm)
import GhcMod.Types
import GhcMod.Doc
import GhcMod.Gap (renderGm)
renderSDoc :: GhcMonad m => SDoc -> m Doc
renderSDoc sdoc = do

View File

@ -1,4 +1,4 @@
module Language.Haskell.GhcMod.Read where
module GhcMod.Read where
import Text.Read (readPrec_to_S, readPrec, minPrec)
import qualified Text.ParserCombinators.ReadP as P

View File

@ -2,7 +2,7 @@
{-# LANGUAGE CPP, TupleSections, FlexibleInstances, Rank2Types #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Language.Haskell.GhcMod.SrcUtils where
module GhcMod.SrcUtils where
import Control.Applicative
import CoreUtils (exprType)
@ -17,9 +17,9 @@ import qualified Type as G
import GHC.SYB.Utils
import GhcMonad
import qualified Language.Haskell.Exts as HE
import Language.Haskell.GhcMod.Doc
import Language.Haskell.GhcMod.Gap
import qualified Language.Haskell.GhcMod.Gap as Gap
import GhcMod.Doc
import GhcMod.Gap
import qualified GhcMod.Gap as Gap
import OccName (OccName)
import Outputable (PprStyle)
import TcHsSyn (hsPatType)

View File

@ -14,7 +14,7 @@
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
module Language.Haskell.GhcMod.Stack where
module GhcMod.Stack where
import Safe
import Control.Applicative
@ -30,12 +30,12 @@ import System.FilePath
import System.Info.Extra
import Exception
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad.Types
import Language.Haskell.GhcMod.Output
import Language.Haskell.GhcMod.Logging
import Language.Haskell.GhcMod.Error
import qualified Language.Haskell.GhcMod.Utils as U
import GhcMod.Types
import GhcMod.Monad.Types
import GhcMod.Output
import GhcMod.Logging
import GhcMod.Error
import qualified GhcMod.Utils as U
import Prelude
patchStackPrograms :: (IOish m, GmOut m) => Cradle -> Programs -> m Programs

View File

@ -15,7 +15,7 @@
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
{-# LANGUAGE CPP, ViewPatterns, NamedFieldPuns, RankNTypes #-}
module Language.Haskell.GhcMod.Target where
module GhcMod.Target where
import Control.Arrow
import Control.Applicative
@ -30,20 +30,20 @@ import DynFlags
import HscTypes
import Pretty
import Language.Haskell.GhcMod.DynFlags
import Language.Haskell.GhcMod.Monad.Types
import Language.Haskell.GhcMod.CabalHelper
import Language.Haskell.GhcMod.HomeModuleGraph
import Language.Haskell.GhcMod.PathsAndFiles
import Language.Haskell.GhcMod.GhcPkg
import Language.Haskell.GhcMod.Error
import Language.Haskell.GhcMod.Logging
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Utils as U
import Language.Haskell.GhcMod.FileMapping
import Language.Haskell.GhcMod.LightGhc
import Language.Haskell.GhcMod.CustomPackageDb
import Language.Haskell.GhcMod.Output
import GhcMod.DynFlags
import GhcMod.Monad.Types
import GhcMod.CabalHelper
import GhcMod.HomeModuleGraph
import GhcMod.PathsAndFiles
import GhcMod.GhcPkg
import GhcMod.Error
import GhcMod.Logging
import GhcMod.Types
import GhcMod.Utils as U
import GhcMod.FileMapping
import GhcMod.LightGhc
import GhcMod.CustomPackageDb
import GhcMod.Output
import Safe
import Data.Maybe

View File

@ -2,8 +2,8 @@
StandaloneDeriving, DefaultSignatures, FlexibleInstances, TemplateHaskell,
GeneralizedNewtypeDeriving #-}
{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-deprecations #-}
module Language.Haskell.GhcMod.Types (
module Language.Haskell.GhcMod.Types
module GhcMod.Types (
module GhcMod.Types
, ModuleName
, mkModuleName
, moduleNameString
@ -40,7 +40,7 @@ import GHC.Generics
import Pretty (Doc)
import Prelude
import Language.Haskell.GhcMod.Caching.Types
import GhcMod.Caching.Types
-- | A constraint alias (-XConstraintKinds) to make functions dealing with
-- 'GhcModT' somewhat cleaner.

View File

@ -17,8 +17,8 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DoAndIfThenElse #-}
module Language.Haskell.GhcMod.Utils (
module Language.Haskell.GhcMod.Utils
module GhcMod.Utils (
module GhcMod.Utils
, module Utils
, readProcess
) where
@ -30,9 +30,9 @@ import Data.Maybe (fromMaybe)
import Data.Either (rights)
import Data.List (inits)
import Exception
import Language.Haskell.GhcMod.Error
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad.Types
import GhcMod.Error
import GhcMod.Types
import GhcMod.Monad.Types
import System.Directory
import System.Environment
import System.FilePath

View File

@ -1,10 +1,10 @@
module Language.Haskell.GhcMod.World where
module GhcMod.World where
import Language.Haskell.GhcMod.GhcPkg
import Language.Haskell.GhcMod.PathsAndFiles
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Monad.Types
import Language.Haskell.GhcMod.Utils
import GhcMod.GhcPkg
import GhcMod.PathsAndFiles
import GhcMod.Types
import GhcMod.Monad.Types
import GhcMod.Utils
import Control.Applicative
import Data.Maybe

View File

@ -28,7 +28,7 @@
(< emacs-minor-version minor)))
(error "ghc-mod requires at least Emacs %d.%d" major minor)))
(defconst ghc-version "5.6.0.0")
(defconst ghc-version "5.8.0.0")
(defgroup ghc-mod '() "ghc-mod customization")

View File

@ -1,5 +1,5 @@
Name: ghc-mod
Version: 5.6.0.0
Version: 5.8.0.0
Author: Kazu Yamamoto <kazu@iij.ad.jp>,
Daniel Gröber <dxld@darkboxed.org>,
Alejandro Serrano <trupill@gmail.com>,
@ -30,7 +30,7 @@ Data-Files: elisp/Makefile
elisp/*.el
Extra-Source-Files: ChangeLog
README.md
core/Language/Haskell/GhcMod/Monad/Compat.hs_h
core/GhcMod/Monad/Compat.hs_h
test/data/annotations/*.hs
test/data/broken-cabal/*.cabal
test/data/broken-sandbox/cabal.sandbox.config
@ -110,68 +110,67 @@ Library
HS-Source-Dirs: ., core, shared
Exposed-Modules:
GhcMod
GhcModExe.Boot
GhcModExe.Browse
GhcModExe.CaseSplit
GhcModExe.Check
GhcModExe.Debug
GhcModExe.FillSig
GhcModExe.Find
GhcModExe.Flag
GhcModExe.Info
GhcModExe.Internal
GhcModExe.Lang
GhcModExe.Lint
GhcModExe.Modules
GhcModExe.PkgDoc
GhcModExe.Test
Language.Haskell.GhcMod.CabalHelper
Language.Haskell.GhcMod.Caching
Language.Haskell.GhcMod.Caching.Types
Language.Haskell.GhcMod.Convert
Language.Haskell.GhcMod.Cradle
Language.Haskell.GhcMod.CustomPackageDb
Language.Haskell.GhcMod.DebugLogger
Language.Haskell.GhcMod.Doc
Language.Haskell.GhcMod.DynFlags
Language.Haskell.GhcMod.DynFlagsTH
Language.Haskell.GhcMod.Error
Language.Haskell.GhcMod.FileMapping
Language.Haskell.GhcMod.Gap
Language.Haskell.GhcMod.GhcPkg
Language.Haskell.GhcMod.HomeModuleGraph
Language.Haskell.GhcMod.LightGhc
Language.Haskell.GhcMod.Logger
Language.Haskell.GhcMod.Logging
Language.Haskell.GhcMod.Monad
Language.Haskell.GhcMod.Monad.Env
Language.Haskell.GhcMod.Monad.Log
Language.Haskell.GhcMod.Monad.Newtypes
Language.Haskell.GhcMod.Monad.Orphans
Language.Haskell.GhcMod.Monad.Out
Language.Haskell.GhcMod.Monad.State
Language.Haskell.GhcMod.Monad.Types
Language.Haskell.GhcMod.Options.DocUtils
Language.Haskell.GhcMod.Options.Help
Language.Haskell.GhcMod.Options.Options
Language.Haskell.GhcMod.Output
Language.Haskell.GhcMod.PathsAndFiles
Language.Haskell.GhcMod.Pretty
Language.Haskell.GhcMod.Read
Language.Haskell.GhcMod.SrcUtils
Language.Haskell.GhcMod.Stack
Language.Haskell.GhcMod.Target
Language.Haskell.GhcMod.Types
Language.Haskell.GhcMod.Utils
Language.Haskell.GhcMod.World
GhcMod.Exe.Boot
GhcMod.Exe.Browse
GhcMod.Exe.CaseSplit
GhcMod.Exe.Check
GhcMod.Exe.Debug
GhcMod.Exe.FillSig
GhcMod.Exe.Find
GhcMod.Exe.Flag
GhcMod.Exe.Info
GhcMod.Exe.Internal
GhcMod.Exe.Lang
GhcMod.Exe.Lint
GhcMod.Exe.Modules
GhcMod.Exe.PkgDoc
GhcMod.Exe.Test
GhcMod.CabalHelper
GhcMod.Caching
GhcMod.Caching.Types
GhcMod.Convert
GhcMod.Cradle
GhcMod.CustomPackageDb
GhcMod.DebugLogger
GhcMod.Doc
GhcMod.DynFlags
GhcMod.DynFlagsTH
GhcMod.Error
GhcMod.FileMapping
GhcMod.Gap
GhcMod.GhcPkg
GhcMod.HomeModuleGraph
GhcMod.LightGhc
GhcMod.Logger
GhcMod.Logging
GhcMod.Monad
GhcMod.Monad.Env
GhcMod.Monad.Log
GhcMod.Monad.Newtypes
GhcMod.Monad.Orphans
GhcMod.Monad.Out
GhcMod.Monad.State
GhcMod.Monad.Types
GhcMod.Options.DocUtils
GhcMod.Options.Help
GhcMod.Options.Options
GhcMod.Output
GhcMod.PathsAndFiles
GhcMod.Pretty
GhcMod.Read
GhcMod.SrcUtils
GhcMod.Stack
GhcMod.Target
GhcMod.Types
GhcMod.Utils
GhcMod.World
Other-Modules: Paths_ghc_mod
Utils
Data.Binary.Generic
System.Directory.ModTime
Build-Depends:
-- See Note [GHC Boot libraries]
base
, binary
binary
, bytestring
, containers
, deepseq
@ -184,6 +183,7 @@ Library
, time
, transformers
, base < 4.10 && >= 4.6.0.1
, djinn-ghc < 0.1 && >= 0.0.2.2
, extra < 1.6 && >= 1.4
, fclabels < 2.1 && >= 2.0
@ -193,7 +193,7 @@ Library
, hlint < 2.1 && >= 2.0.8
, monad-control < 1.1 && >= 1
, monad-journal < 0.8 && >= 0.4
, optparse-applicative == 0.13.0.*
, optparse-applicative < 0.14 && >= 0.13.0.0
, pipes < 4.4 && >= 4.1
, safe < 0.4 && >= 0.3.9
, semigroups < 0.19 && >= 0.10.0
@ -213,27 +213,27 @@ Library
Executable ghc-mod
Default-Language: Haskell2010
Main-Is: GHCModMain.hs
Main-Is: GhcModMain.hs
Other-Modules: Paths_ghc_mod
, GHCMod.Options
, GHCMod.Options.Commands
, GHCMod.Version
, GHCMod.Options.ShellParse
, GhcMod.Exe.Options
, GhcMod.Exe.Options.Commands
, GhcMod.Exe.Version
, GhcMod.Exe.Options.ShellParse
GHC-Options: -Wall -fno-warn-deprecations -threaded
Default-Extensions: ConstraintKinds, FlexibleContexts
HS-Source-Dirs: src, shared
X-Internal: True
Build-Depends:
-- See Note [GHC Boot libraries]
base
, directory
directory
, filepath
, mtl
, process
, base < 4.10 && >= 4.6.0.1
, fclabels < 2.1 && >= 2.0
, monad-control < 1.1 && >= 1
, optparse-applicative == 0.13.0.*
, optparse-applicative < 0.14 && >= 0.13.0.0
, semigroups < 0.19 && >= 0.10.0
, split < 0.3 && >= 0.2.2
@ -243,7 +243,7 @@ Executable ghc-mod
Executable ghc-modi
Default-Language: Haskell2010
Main-Is: GHCModi.hs
Main-Is: GhcModi.hs
Other-Modules: Paths_ghc_mod
Utils
System.Directory.ModTime
@ -254,8 +254,7 @@ Executable ghc-modi
HS-Source-Dirs: ., src, shared
Build-Depends:
-- See Note [GHC Boot libraries]
base
, binary
binary
, deepseq
, directory
, filepath
@ -263,6 +262,8 @@ Executable ghc-modi
, process
, time
, base < 4.10 && >= 4.6.0.1
, ghc-mod
@ -273,7 +274,7 @@ Test-Suite doctest
Ghc-Options: -Wall
Default-Extensions: ConstraintKinds, FlexibleContexts
Main-Is: doctests.hs
Build-Depends: base
Build-Depends: base < 4.10 && >= 4.6.0.1
, doctest < 0.12 && >= 0.9.3
@ -313,14 +314,14 @@ Test-Suite spec
Build-Depends:
-- See Note [GHC Boot libraries]
base
, containers
containers
, directory
, filepath
, mtl
, process
, transformers
, base < 4.10 && >= 4.6.0.1
, fclabels < 2.1 && >= 2.0
, hspec < 2.4 && >= 2.0.0
, monad-journal < 0.8 && >= 0.4
@ -329,7 +330,7 @@ Test-Suite spec
if impl(ghc < 7.8)
Build-Depends: convertible < 1.2 && >= 1.1.0.0
Build-Depends: convertible < 1.2 && >= 1.1.0.0
if impl(ghc >= 8.0)
Build-Depends: ghc-boot
@ -345,8 +346,8 @@ Test-Suite shelltest
Hs-Source-Dirs: shelltest
Type: exitcode-stdio-1.0
Build-Tools: shelltest
Build-Depends: base
, process < 1.5
Build-Depends: base < 4.10 && >= 4.6.0.1
, process < 1.5
-- , shelltestrunner >= 1.3.5
if !flag(shelltest)
Buildable: False
@ -362,10 +363,10 @@ Benchmark criterion
Main-Is: Bench.hs
Build-Depends:
-- See Note [GHC Boot libraries]
base
, directory
directory
, filepath
, base < 4.10 && >= 4.6.0.1
, criterion < 1.2 && >= 1.1.1.0
, temporary < 1.3 && >= 1.2.0.3

View File

@ -16,7 +16,7 @@
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
module GHCMod.Options (
module GhcMod.Exe.Options (
parseArgs,
parseArgsInteractive,
GhcModCommands(..)
@ -25,12 +25,12 @@ module GHCMod.Options (
import Options.Applicative
import Options.Applicative.Types
import GHCMod.Options.Commands
import GHCMod.Options.ShellParse
import GHCMod.Version
import Language.Haskell.GhcMod.Options.DocUtils
import Language.Haskell.GhcMod.Options.Options
import Language.Haskell.GhcMod.Types
import GhcMod.Exe.Options.Commands
import GhcMod.Exe.Options.ShellParse
import GhcMod.Exe.Version
import GhcMod.Options.DocUtils
import GhcMod.Options.Options
import GhcMod.Types
parseArgs :: IO (Options, GhcModCommands)
parseArgs =

View File

@ -16,16 +16,16 @@
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
module GHCMod.Options.Commands where
module GhcMod.Exe.Options.Commands where
import Data.Semigroup
import Options.Applicative
import Options.Applicative.Types
import Options.Applicative.Builder.Internal
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Read
import Language.Haskell.GhcMod.Options.DocUtils
import Language.Haskell.GhcMod.Options.Help
import GhcMod.Types
import GhcMod.Read
import GhcMod.Options.DocUtils
import GhcMod.Options.Help
type Symbol = String
type Expr = String

View File

@ -13,7 +13,7 @@
--
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
module GHCMod.Options.ShellParse (parseCmdLine) where
module GhcMod.Exe.Options.ShellParse (parseCmdLine) where
import Data.Char
import Data.List

View File

@ -14,7 +14,7 @@
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
module GHCMod.Version where
module GhcMod.Exe.Version where
import Paths_ghc_mod
import Data.Version (showVersion)

View File

@ -7,7 +7,7 @@ import Control.Monad
import Data.Typeable (Typeable)
import Data.List
import Data.List.Split
import Language.Haskell.GhcMod.Pretty
import GhcMod.Pretty
import System.FilePath ((</>))
import System.Directory (setCurrentDirectory, getAppUserDataDirectory,
removeDirectoryRecursive)
@ -15,12 +15,12 @@ import System.IO
import System.Exit
import Prelude
import GHCMod.Options
import GhcMod
import GhcModExe.Find
import GhcModExe.Internal hiding (MonadIO,liftIO)
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.Types
import GhcMod.Exe.Find
import GhcMod.Exe.Options
import GhcMod.Exe.Internal hiding (MonadIO,liftIO)
import GhcMod.Monad
import GhcMod.Types
import Exception

View File

@ -4,9 +4,9 @@ module CabalHelperSpec where
import Control.Arrow
import Control.Applicative
import Distribution.Helper
import Language.Haskell.GhcMod.CabalHelper
import Language.Haskell.GhcMod.PathsAndFiles
import Language.Haskell.GhcMod.Error
import GhcMod.CabalHelper
import GhcMod.PathsAndFiles
import GhcMod.Error
import Test.Hspec
import System.Directory
import System.FilePath

View File

@ -2,8 +2,8 @@ module CradleSpec where
import Control.Applicative
import Data.List (isSuffixOf)
import Language.Haskell.GhcMod.Cradle
import Language.Haskell.GhcMod.Types
import GhcMod.Cradle
import GhcMod.Types
import System.Directory (canonicalizePath)
import System.FilePath (pathSeparator)
import Test.Hspec

View File

@ -1,8 +1,8 @@
module CustomPackageDbSpec where
import Language.Haskell.GhcMod.CabalHelper
import Language.Haskell.GhcMod.CustomPackageDb
import Language.Haskell.GhcMod.Error
import GhcMod.CabalHelper
import GhcMod.CustomPackageDb
import GhcMod.Error
import System.Process
import Test.Hspec
import Prelude

View File

@ -1,7 +1,7 @@
module FileMappingSpec where
import Language.Haskell.GhcMod.FileMapping
import Language.Haskell.GhcMod.Utils (withMappedFile)
import GhcMod.FileMapping
import GhcMod.Utils (withMappedFile)
import Test.Hspec
import TestUtils
import qualified Data.Map as M

View File

@ -1,7 +1,7 @@
{-# LANGUAGE OverloadedStrings #-}
module FindSpec where
import GhcModExe.Find
import GhcMod.Exe.Find
import Test.Hspec
import TestUtils

View File

@ -1,8 +1,8 @@
module GhcPkgSpec where
import Language.Haskell.GhcMod.GhcPkg
import Language.Haskell.GhcMod.CabalHelper
import Language.Haskell.GhcMod.CustomPackageDb
import GhcMod.GhcPkg
import GhcMod.CabalHelper
import GhcMod.CustomPackageDb
import Test.Hspec
import System.Process (system)

View File

@ -18,8 +18,8 @@
module HomeModuleGraphSpec where
import Language.Haskell.GhcMod.HomeModuleGraph
import Language.Haskell.GhcMod.LightGhc
import GhcMod.HomeModuleGraph
import GhcMod.LightGhc
import TestUtils
import GHC

View File

@ -1,9 +1,9 @@
module PathsAndFilesSpec where
import Language.Haskell.GhcMod.PathsAndFiles
import Language.Haskell.GhcMod.Cradle
import qualified Language.Haskell.GhcMod.Utils as U
import GhcMod.PathsAndFiles
import GhcMod.Cradle
import qualified GhcMod.Utils as U
import Control.Monad.Trans.Maybe
import System.Directory

View File

@ -1,7 +1,7 @@
module ShellParseSpec where
import GHCMod.Options.ShellParse
import GhcMod.Exe.Options.ShellParse
import Test.Hspec

View File

@ -1,9 +1,9 @@
{-# LANGUAGE OverloadedStrings #-}
module TargetSpec where
import Language.Haskell.GhcMod.Target
import Language.Haskell.GhcMod.LightGhc
import Language.Haskell.GhcMod.Gap
import GhcMod.Target
import GhcMod.LightGhc
import GhcMod.Gap
import Test.Hspec
import TestUtils

View File

@ -10,14 +10,14 @@ module TestUtils (
, shouldReturnError
, isPkgDbAt
, isPkgConfDAt
, module Language.Haskell.GhcMod.Monad
, module Language.Haskell.GhcMod.Types
, module GhcMod.Monad
, module GhcMod.Types
) where
import Language.Haskell.GhcMod.Logging
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.Cradle
import Language.Haskell.GhcMod.Types
import GhcMod.Logging
import GhcMod.Monad
import GhcMod.Cradle
import GhcMod.Types
import Control.Arrow
import Control.Category