Merge branch 'release-5.8.0.0' into release
This commit is contained in:
commit
a96d820753
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,6 +3,7 @@ elisp/*.elc
|
||||
*~
|
||||
/.cabal-sandbox/
|
||||
/.stack-work/
|
||||
/test/data/**/stack.yaml
|
||||
add-source-timestamps
|
||||
package.cache
|
||||
cabal.sandbox.config
|
||||
@ -19,4 +20,3 @@ cabal.sandbox.config
|
||||
cabal-dev
|
||||
/TAGS
|
||||
/tags
|
||||
/cabal.project.local
|
||||
|
@ -1,20 +1,22 @@
|
||||
stages:
|
||||
- build
|
||||
|
||||
before_script:
|
||||
- cabal update
|
||||
- mkdir -p ../ghc-mod.sdist
|
||||
- ls -l ..
|
||||
- touch ChangeLog
|
||||
- cabal sdist --output-directory=../ghc-mod.sdist
|
||||
- rm -f cabal.sandbox.config && cabal sandbox init
|
||||
- cp cabal.sandbox.config ../ghc-mod.sdist
|
||||
- cd ../ghc-mod.sdist
|
||||
.before_script_template: &common_before_script
|
||||
before_script:
|
||||
- ls -l ..
|
||||
- apt-get update && apt-get install alex happy
|
||||
- mkdir -p ../ghc-mod.sdist-$CI_PIPELINE_ID
|
||||
- touch ChangeLog
|
||||
- cabal update
|
||||
- cabal sdist --output-directory=../ghc-mod.sdist-$CI_PIPELINE_ID
|
||||
- cd ../ghc-mod.sdist-$CI_PIPELINE_ID
|
||||
|
||||
after_script:
|
||||
- rm -rf "$CI_PROJECT_DIR"/../ghc-mod.sdist
|
||||
- cd "$CI_PROJECT_DIR"
|
||||
- ghc-pkg list | tee packages.list
|
||||
- rm -rf "$CI_PROJECT_DIR"/../ghc-mod.sdist-$CI_PIPELINE_ID
|
||||
|
||||
.job_template: &common_script
|
||||
.script_template: &common_script
|
||||
script:
|
||||
- echo $PWD
|
||||
- ghc-pkg list
|
||||
@ -23,24 +25,50 @@ after_script:
|
||||
- cabal --version
|
||||
- cabal configure --enable-tests
|
||||
- cabal build -j2
|
||||
- ghc-pkg list
|
||||
- which cabal
|
||||
- cabal --version
|
||||
- ./dist/build/spec/spec
|
||||
- ./dist/build/doctest/doctest
|
||||
- cabal haddock
|
||||
|
||||
job-ghc801:
|
||||
image: haskell:8.0.1
|
||||
.artifacts_template: &common_artifacts
|
||||
artifacts:
|
||||
paths:
|
||||
- packages.list
|
||||
- ~/.cabal/logs
|
||||
when: always
|
||||
|
||||
job-ghc800:
|
||||
image: registry.gitlab.com/dxld/ghc-mod:ghc8.0.2-cabal-install1.24.0.2
|
||||
stage: build
|
||||
<<: *common_before_script
|
||||
<<: *common_script
|
||||
<<: *common_artifacts
|
||||
|
||||
job-ghc710:
|
||||
image: haskell:7.10.3
|
||||
image: registry.gitlab.com/dxld/ghc-mod:ghc7.10.3-cabal-install1.22.8.0
|
||||
stage: build
|
||||
<<: *common_before_script
|
||||
<<: *common_script
|
||||
<<: *common_artifacts
|
||||
|
||||
job-ghc708:
|
||||
image: haskell:7.8.4
|
||||
image: registry.gitlab.com/dxld/ghc-mod:ghc7.8.4-cabal-install1.18.1.0
|
||||
stage: build
|
||||
<<: *common_before_script
|
||||
<<: *common_script
|
||||
<<: *common_artifacts
|
||||
|
||||
|
||||
job-ghc706:
|
||||
image: registry.gitlab.com/dxld/ghc-mod:ghc7.6.3-cabal-install1.18.1.0
|
||||
stage: build
|
||||
before_script:
|
||||
- cabal update
|
||||
- cabal install alex
|
||||
- cabal install happy
|
||||
- cp ~/.cabal/bin/{alex,happy} /usr/local/bin
|
||||
- rm -rf ~/.cabal/{bin,lib,libexec,setup-exe-cache,share,store} ~/.ghc
|
||||
allow_failure: true
|
||||
<<: *common_script
|
||||
<<: *common_artifacts
|
93
.travis.yml
93
.travis.yml
@ -1,59 +1,68 @@
|
||||
language: haskell
|
||||
ghc:
|
||||
- 7.6
|
||||
- 7.8
|
||||
|
||||
language: c
|
||||
sudo: false
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- zlib1g-dev
|
||||
|
||||
cache:
|
||||
apt: true
|
||||
directories:
|
||||
- ~/.cabal
|
||||
- ~/.ghc
|
||||
- ~/.stack
|
||||
- $HOME/.stack
|
||||
- $HOME/.ghc-mod
|
||||
|
||||
before_cache:
|
||||
- rm -f $HOME/.cabal/logs $HOME/.cabal/packages/*/build-reports.log
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libfcgi-dev
|
||||
- libgmp-dev
|
||||
|
||||
before_install:
|
||||
- wget https://github.com/commercialhaskell/stack/releases/download/v0.1.3.1/stack-0.1.3.1-x86_64-linux.gz
|
||||
- mkdir stack-bin
|
||||
- gunzip stack-0.1.3.1-x86_64-linux.gz
|
||||
- mv stack-0.1.3.1-x86_64-linux stack-bin/stack
|
||||
- chmod +x stack-bin/stack
|
||||
- export PATH=$(pwd)/stack-bin:$PATH
|
||||
- unset CC
|
||||
- mkdir -p ~/.local/bin
|
||||
- export PATH=$HOME/.local/bin:$PATH
|
||||
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
|
||||
- stack --version
|
||||
|
||||
install:
|
||||
- export CABAL_VER="$(ghc-pkg describe ghc | sed -n '/^depends:/,/^[a-z]/p' | head -n-1 | sed '1{s/^depends://}' | grep " *Cabal" | tr -d "[:space:]" | sed 's/^Cabal-\([0-9.]*\)-.*/\1/g')"
|
||||
- echo $CABAL_VER
|
||||
- cabal update
|
||||
- cabal install happy
|
||||
- happy --version
|
||||
- git clone --depth=1 https://github.com/DanielG/cabal-helper.git
|
||||
- cabal install cabal-helper/ --constraint "Cabal == ${CABAL_VER}"
|
||||
- cabal install -j --only-dependencies --enable-tests
|
||||
# - git clone --depth=1 https://github.com/DanielG/cabal-helper.git
|
||||
- stack --no-terminal setup --resolver=ghc-$GHCVER
|
||||
- stack --no-terminal install cabal-install --resolver=$RES
|
||||
- travis_retry cabal update
|
||||
- stack --no-terminal install happy --resolver=$RES
|
||||
- |
|
||||
resf="ghc-$GHCVER.yaml"
|
||||
echo "resolver: ghc-$GHCVER" > "$resf"
|
||||
echo "packages: ['.']" >> "$resf"
|
||||
stack --no-terminal solver --update-config --stack-yaml="$resf" || exit 101
|
||||
sed -i 's/^resolver:/compiler:/;s/^extra-deps:/packages:/' "$resf"
|
||||
echo "resolver: { name: 'ghc-$GHCVER', location: './$resf' }" > stack.yaml
|
||||
echo "packages: ['.']" >> stack.yaml
|
||||
ir=$( stack path --snapshot-install-root )
|
||||
ls -d ${ir%/custom-ghc-*}/custom-ghc-* | grep -v "${ir%/*}" | while read i; do
|
||||
rm -rfv "$i"
|
||||
done
|
||||
|
||||
|
||||
script:
|
||||
- touch ChangeLog # Create ChangeLog if we're not on the release branch
|
||||
- cabal check
|
||||
- cabal sdist
|
||||
- export SRC_TGZ="$PWD/dist/$(cabal info . | awk '{print $2 ".tar.gz";exit}')"
|
||||
- rm -rf /tmp/test && mkdir -p /tmp/test
|
||||
- cd /tmp/test
|
||||
- tar -xf $SRC_TGZ && cd ghc-mod*/
|
||||
- if [ -n "$(ghc --version | awk '{ print $8 }' | sed -n '/^7.8/p')" ]; then export WERROR="--ghc-option=-Werror"; fi
|
||||
- cabal configure --enable-tests $WERROR
|
||||
- cabal build
|
||||
- export ghc_mod_datadir=$PWD
|
||||
- cabal test
|
||||
- |
|
||||
case "$TRAVIS_BRANCH" in
|
||||
"release"*)
|
||||
touch ChangeLog
|
||||
sdistdir="$TRAVIS_BUILD_DIR/../sdist-test"
|
||||
mkdir -p "$sdistdir"
|
||||
tar zvxf $(stack sdist 2>&1 | tail -n1 | sed 's/.* //') --strip-components=1 -C "$sdistdir"
|
||||
cp "ghc-$GHCVER.yaml" stack.yaml "$sdistdir"
|
||||
cd "$sdistdir"
|
||||
;;
|
||||
esac
|
||||
- stack --no-terminal build --test --no-run-tests
|
||||
- export DOCTEST_DIST_DIR="$(stack path --dist-dir)"
|
||||
- stack --no-terminal test
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- env: GHCVER=head
|
||||
matrix:
|
||||
include:
|
||||
- env: GHCVER=7.8.4 RES=lts-2.22
|
||||
compiler: ': #GHC 7.8.4'
|
||||
- env: GHCVER=7.10.3 RES=lts-6.9
|
||||
compiler: ': #GHC 7.10.3'
|
||||
- env: GHCVER=8.0.1 RES=nightly-2016-08-01
|
||||
compiler: ': #GHC 8.0.1'
|
||||
|
@ -1,6 +1,6 @@
|
||||
-- | The ghc-mod library.
|
||||
|
||||
module Language.Haskell.GhcMod (
|
||||
module GhcMod (
|
||||
-- * Cradle
|
||||
Cradle(..)
|
||||
, Project(..)
|
||||
@ -69,24 +69,24 @@ module Language.Haskell.GhcMod (
|
||||
, unloadMappedFile
|
||||
) where
|
||||
|
||||
import Language.Haskell.GhcMod.Boot
|
||||
import Language.Haskell.GhcMod.Browse
|
||||
import Language.Haskell.GhcMod.CaseSplit
|
||||
import Language.Haskell.GhcMod.Check
|
||||
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.Debug
|
||||
import Language.Haskell.GhcMod.FillSig
|
||||
import Language.Haskell.GhcMod.Find
|
||||
import Language.Haskell.GhcMod.Flag
|
||||
import Language.Haskell.GhcMod.Info
|
||||
import Language.Haskell.GhcMod.Lang
|
||||
import Language.Haskell.GhcMod.Lint
|
||||
import Language.Haskell.GhcMod.Logging
|
||||
import Language.Haskell.GhcMod.Modules
|
||||
import Language.Haskell.GhcMod.Monad
|
||||
import Language.Haskell.GhcMod.PkgDoc
|
||||
import Language.Haskell.GhcMod.Types
|
||||
import Language.Haskell.GhcMod.Target
|
||||
import Language.Haskell.GhcMod.Output
|
||||
import Language.Haskell.GhcMod.FileMapping
|
||||
import Language.Haskell.GhcMod.Test
|
||||
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
|
@ -1,12 +1,13 @@
|
||||
module Language.Haskell.GhcMod.Boot where
|
||||
module GhcModExe.Boot where
|
||||
|
||||
import Control.Applicative
|
||||
import Prelude
|
||||
import Language.Haskell.GhcMod.Browse
|
||||
import Language.Haskell.GhcMod.Flag
|
||||
import Language.Haskell.GhcMod.Lang
|
||||
|
||||
import GhcModExe.Browse
|
||||
import GhcModExe.Flag
|
||||
import GhcModExe.Lang
|
||||
import GhcModExe.Modules
|
||||
import Language.Haskell.GhcMod.Monad
|
||||
import Language.Haskell.GhcMod.Modules
|
||||
import Language.Haskell.GhcMod.Types (defaultBrowseOpts)
|
||||
|
||||
-- | Printing necessary information for front-end booting.
|
@ -1,5 +1,5 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
module Language.Haskell.GhcMod.Browse (
|
||||
module GhcModExe.Browse (
|
||||
browse,
|
||||
BrowseOpts(..)
|
||||
) where
|
||||
@ -46,7 +46,7 @@ browse opts pkgmdl = do
|
||||
goPkgModule `G.gcatch` (\(SomeException _) -> goHomeModule)
|
||||
|
||||
logException ex =
|
||||
gmLog GmException "browse" $ showDoc ex
|
||||
gmLog GmException "browse" $ showToDoc ex
|
||||
|
||||
goPkgModule = do
|
||||
runGmPkgGhc $
|
@ -1,6 +1,6 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module Language.Haskell.GhcMod.CaseSplit (
|
||||
module GhcModExe.CaseSplit (
|
||||
splits
|
||||
) where
|
||||
|
||||
@ -70,7 +70,7 @@ splits file lineNo colNo =
|
||||
where
|
||||
handler (SomeException ex) = do
|
||||
gmLog GmException "splits" $
|
||||
text "" $$ nest 4 (showDoc ex)
|
||||
text "" $$ nest 4 (showToDoc ex)
|
||||
emptyResult =<< outputOpts
|
||||
|
||||
----------------------------------------------------------------
|
@ -1,4 +1,4 @@
|
||||
module Language.Haskell.GhcMod.Check (
|
||||
module GhcModExe.Check (
|
||||
checkSyntax
|
||||
, check
|
||||
, expandTemplate
|
@ -1,4 +1,4 @@
|
||||
module Language.Haskell.GhcMod.Debug (debugInfo, rootInfo, componentInfo) where
|
||||
module GhcModExe.Debug (debugInfo, rootInfo, componentInfo) where
|
||||
|
||||
import Control.Arrow (first)
|
||||
import Control.Applicative
|
||||
@ -6,23 +6,25 @@ import Control.Monad
|
||||
import qualified Data.Map as Map
|
||||
import qualified Data.Set as Set
|
||||
import Data.Char
|
||||
import Data.Maybe
|
||||
import Data.Version
|
||||
import Data.List.Split
|
||||
import System.Directory
|
||||
import Text.PrettyPrint
|
||||
import Language.Haskell.GhcMod.Monad
|
||||
import Language.Haskell.GhcMod.Types
|
||||
import Language.Haskell.GhcMod.Internal
|
||||
import Language.Haskell.GhcMod.Target
|
||||
import Language.Haskell.GhcMod.Pretty
|
||||
import Language.Haskell.GhcMod.Utils
|
||||
|
||||
import GhcModExe.Internal
|
||||
import Language.Haskell.GhcMod.Cradle
|
||||
import Language.Haskell.GhcMod.Stack
|
||||
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 Paths_ghc_mod (version)
|
||||
|
||||
import Config (cProjectVersion)
|
||||
import Pretty
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
@ -32,10 +34,17 @@ debugInfo = do
|
||||
Options {..} <- options
|
||||
Cradle {..} <- cradle
|
||||
|
||||
[ghcPath, ghcPkgPath] <- liftIO $
|
||||
case cradleProject of
|
||||
StackProject se ->
|
||||
catMaybes <$> sequence [getStackGhcPath se, getStackGhcPkgPath se]
|
||||
_ ->
|
||||
return ["ghc", "ghc-pkg"]
|
||||
|
||||
cabal <-
|
||||
case cradleProject of
|
||||
CabalProject -> cabalDebug
|
||||
StackProject {} -> (++) <$> stackPaths <*> cabalDebug
|
||||
CabalProject -> cabalDebug ghcPkgPath
|
||||
StackProject {} -> (++) <$> stackPaths <*> cabalDebug ghcPkgPath
|
||||
_ -> return []
|
||||
|
||||
pkgOpts <- packageGhcOptions
|
||||
@ -43,7 +52,7 @@ debugInfo = do
|
||||
readProc <- gmReadProcess
|
||||
|
||||
ghcVersion <- liftIO $
|
||||
dropWhileEnd isSpace <$> readProc "ghc" ["--numeric-version"] ""
|
||||
dropWhileEnd isSpace <$> readProc ghcPath ["--numeric-version"] ""
|
||||
|
||||
return $ unlines $
|
||||
[ "Version: ghc-mod-" ++ showVersion version
|
||||
@ -51,7 +60,7 @@ debugInfo = do
|
||||
, "System GHC Version: " ++ ghcVersion
|
||||
, "Root directory: " ++ cradleRootDir
|
||||
, "Current directory: " ++ cradleCurrentDir
|
||||
, "GHC Package flags:\n" ++ render (nest 4 $
|
||||
, "GHC Package flags:\n" ++ renderGm (nest 4 $
|
||||
fsep $ map text pkgOpts)
|
||||
, "GHC System libraries: " ++ ghcLibDir
|
||||
] ++ cabal
|
||||
@ -66,8 +75,8 @@ stackPaths = do
|
||||
, "Stack ghc-pkg executable:" ++ show ghcPkg
|
||||
]
|
||||
|
||||
cabalDebug :: IOish m => GhcModT m [String]
|
||||
cabalDebug = do
|
||||
cabalDebug :: IOish m => FilePath -> GhcModT m [String]
|
||||
cabalDebug ghcPkgPath = do
|
||||
Cradle {..} <- cradle
|
||||
mcs <- cabalResolvedComponents
|
||||
let entrypoints = Map.map gmcEntrypoints mcs
|
||||
@ -84,22 +93,22 @@ cabalDebug = do
|
||||
dropWhileEnd isSpace <$> readProc "cabal" ["--numeric-version"] ""
|
||||
else return ""
|
||||
|
||||
packages <- liftIO $ readProc "ghc-pkg" ["list", "--simple-output"] ""
|
||||
packages <- liftIO $ readProc ghcPkgPath ["list", "--simple-output"] ""
|
||||
let cabalPackages = filter ((== ["Cabal"]) . take 1 . splitOn "-") $ splitWhen isSpace packages
|
||||
|
||||
return $
|
||||
[ "cabal-install Version: " ++ cabalInstVersion
|
||||
, "Cabal Library Versions:\n" ++ render (nest 4 $
|
||||
, "Cabal Library Versions:\n" ++ renderGm (nest 4 $
|
||||
fsep $ map text cabalPackages)
|
||||
, "Cabal file: " ++ show cradleCabalFile
|
||||
, "Project: " ++ show cradleProject
|
||||
, "Cabal entrypoints:\n" ++ render (nest 4 $
|
||||
, "Cabal entrypoints:\n" ++ renderGm (nest 4 $
|
||||
mapDoc gmComponentNameDoc smpDoc entrypoints)
|
||||
, "Cabal components:\n" ++ render (nest 4 $
|
||||
, "Cabal components:\n" ++ renderGm (nest 4 $
|
||||
mapDoc gmComponentNameDoc graphDoc graphs)
|
||||
, "GHC Cabal options:\n" ++ render (nest 4 $
|
||||
, "GHC Cabal options:\n" ++ renderGm (nest 4 $
|
||||
mapDoc gmComponentNameDoc (fsep . map text) opts)
|
||||
, "GHC search path options:\n" ++ render (nest 4 $
|
||||
, "GHC search path options:\n" ++ renderGm (nest 4 $
|
||||
mapDoc gmComponentNameDoc (fsep . map text) srcOpts)
|
||||
]
|
||||
|
||||
@ -117,11 +126,11 @@ componentInfo ts = do
|
||||
opts <- targetGhcOptions crdl sefnmn
|
||||
|
||||
return $ unlines $
|
||||
[ "Matching Components:\n" ++ render (nest 4 $
|
||||
[ "Matching Components:\n" ++ renderGm (nest 4 $
|
||||
alistDoc (either text mnDoc) (setDoc gmComponentNameDoc) mdlcs)
|
||||
, "Picked Component:\n" ++ render (nest 4 $
|
||||
, "Picked Component:\n" ++ renderGm (nest 4 $
|
||||
gmComponentNameDoc cn)
|
||||
, "GHC Cabal options:\n" ++ render (nest 4 $ fsep $ map text opts)
|
||||
, "GHC Cabal options:\n" ++ renderGm (nest 4 $ fsep $ map text opts)
|
||||
]
|
||||
where
|
||||
zipMap f l = l `zip` (f `map` l)
|
||||
@ -169,4 +178,5 @@ mapDoc kd ad m = vcat $
|
||||
rootInfo :: forall m. (IOish m, GmOut m, GmEnv m) => m String
|
||||
rootInfo = do
|
||||
crdl <- findCradleNoLog =<< (optPrograms <$> options)
|
||||
liftIO $ cleanupCradle crdl
|
||||
return $ cradleRootDir crdl ++ "\n"
|
@ -1,7 +1,7 @@
|
||||
{-# LANGUAGE CPP, MultiParamTypeClasses, FunctionalDependencies #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
|
||||
module Language.Haskell.GhcMod.FillSig (
|
||||
module GhcModExe.FillSig (
|
||||
sig
|
||||
, refine
|
||||
, auto
|
||||
@ -13,12 +13,12 @@ import Data.Functor
|
||||
import Data.List (find, nub, sortBy)
|
||||
import qualified Data.Map as M
|
||||
import Data.Maybe (catMaybes)
|
||||
import Text.PrettyPrint (($$), text, nest)
|
||||
import Prelude
|
||||
|
||||
import Exception (ghandle, SomeException(..))
|
||||
import GHC (GhcMonad, Id, ParsedModule(..), TypecheckedModule(..), DynFlags,
|
||||
SrcSpan, Type, GenLocated(L))
|
||||
import Pretty (($$), text, nest)
|
||||
import qualified GHC as G
|
||||
import qualified Name as G
|
||||
import Outputable (PprStyle)
|
||||
@ -27,11 +27,7 @@ import qualified HsBinds as Ty
|
||||
import qualified Class as Ty
|
||||
import qualified Var as Ty
|
||||
import qualified HsPat as Ty
|
||||
#if MIN_VERSION_haskell_src_exts(1,18,0)
|
||||
import qualified Language.Haskell.Exts as HE
|
||||
#else
|
||||
import qualified Language.Haskell.Exts.Annotated as HE
|
||||
#endif
|
||||
import Djinn.GHC
|
||||
|
||||
import qualified Language.Haskell.GhcMod.Gap as Gap
|
||||
@ -40,7 +36,7 @@ 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 (showDoc)
|
||||
import Language.Haskell.GhcMod.Pretty (showToDoc)
|
||||
import Language.Haskell.GhcMod.Doc
|
||||
import Language.Haskell.GhcMod.Types
|
||||
import Language.Haskell.GhcMod.FileMapping (fileModSummaryWithMapping)
|
||||
@ -195,11 +191,7 @@ getSignatureFromHE file lineNo colNo = do
|
||||
HE.TypeSig (HE.SrcSpanInfo s _) names ty ->
|
||||
return $ HESignature s names ty
|
||||
|
||||
#if MIN_VERSION_haskell_src_exts(1,18,0)
|
||||
HE.TypeFamDecl (HE.SrcSpanInfo s _) declHead _ _ ->
|
||||
#else
|
||||
HE.TypeFamDecl (HE.SrcSpanInfo s _) declHead _ ->
|
||||
#endif
|
||||
let (name, tys) = dHeadTyVars declHead in
|
||||
return $ HEFamSignature s Open name (map cleanTyVarBind tys)
|
||||
|
||||
@ -386,7 +378,7 @@ refine file lineNo colNo (Expression expr) =
|
||||
where
|
||||
handler (SomeException ex) = do
|
||||
gmLog GmException "refining" $
|
||||
text "" $$ nest 4 (showDoc ex)
|
||||
text "" $$ nest 4 (showToDoc ex)
|
||||
emptyResult =<< outputOpts
|
||||
|
||||
-- Look for the variable in the specified position
|
||||
@ -483,7 +475,7 @@ auto file lineNo colNo =
|
||||
where
|
||||
handler (SomeException ex) = do
|
||||
gmLog GmException "auto-refining" $
|
||||
text "" $$ nest 4 (showDoc ex)
|
||||
text "" $$ nest 4 (showToDoc ex)
|
||||
emptyResult =<< outputOpts
|
||||
|
||||
-- Functions we do not want in completions
|
@ -1,7 +1,6 @@
|
||||
{-# LANGUAGE CPP, BangPatterns, TupleSections, DeriveGeneric #-}
|
||||
|
||||
module Language.Haskell.GhcMod.Find
|
||||
#ifndef SPEC
|
||||
module GhcModExe.Find
|
||||
( Symbol
|
||||
, SymbolDb
|
||||
, loadSymbolDb
|
||||
@ -14,9 +13,7 @@ module Language.Haskell.GhcMod.Find
|
||||
, AsyncSymbolDb
|
||||
, newAsyncSymbolDb
|
||||
, getAsyncSymbolDb
|
||||
)
|
||||
#endif
|
||||
where
|
||||
) where
|
||||
|
||||
import qualified GHC as G
|
||||
import FastString
|
||||
@ -135,7 +132,7 @@ loadSymbolDb = do
|
||||
dumpSymbol :: IOish m => GhcModT m ()
|
||||
dumpSymbol = do
|
||||
ts <- liftIO getCurrentModTime
|
||||
st <- runGmPkgGhc $ (liftIO . getGlobalSymbolTable) =<< G.getSession
|
||||
st <- runGmPkgGhc $ getGlobalSymbolTable
|
||||
liftIO . LBS.putStr $ encode SymbolDb {
|
||||
sdTable = st
|
||||
, sdTimestamp = ts
|
||||
@ -148,19 +145,20 @@ isOlderThan tCache files =
|
||||
any (tCache <=) $ map tfTime files -- including equal just in case
|
||||
|
||||
-- | Browsing all functions in all system modules.
|
||||
getGlobalSymbolTable :: HscEnv -> IO (Map Symbol (Set ModuleNameBS))
|
||||
getGlobalSymbolTable hsc_env =
|
||||
foldM (extend hsc_env) M.empty $ listVisibleModules $ hsc_dflags hsc_env
|
||||
getGlobalSymbolTable :: (G.GhcMonad m, MonadIO m)
|
||||
=> m (Map Symbol (Set ModuleNameBS))
|
||||
getGlobalSymbolTable =
|
||||
foldM extend M.empty =<< (listVisibleModules <$> G.getSessionDynFlags)
|
||||
|
||||
extend :: HscEnv
|
||||
-> Map Symbol (Set ModuleNameBS)
|
||||
extend :: (G.GhcMonad m, MonadIO m)
|
||||
=> Map Symbol (Set ModuleNameBS)
|
||||
-> Module
|
||||
-> IO (Map Symbol (Set ModuleNameBS))
|
||||
extend hsc_env mm mdl = do
|
||||
eps <- readIORef $ hsc_EPS hsc_env
|
||||
modinfo <- unsafeInterleaveIO $ runLightGhc hsc_env $ do
|
||||
-> m (Map Symbol (Set ModuleNameBS))
|
||||
extend mm mdl = do
|
||||
hsc_env <- G.getSession
|
||||
eps <- liftIO $ readIORef $ hsc_EPS hsc_env
|
||||
modinfo <- liftIO $ unsafeInterleaveIO $ runLightGhc hsc_env $ do
|
||||
G.getModuleInfo mdl <* liftIO (writeIORef (hsc_EPS hsc_env) eps)
|
||||
|
||||
return $ M.unionWith S.union mm $ extractBindings modinfo mdl
|
||||
|
||||
extractBindings :: Maybe G.ModuleInfo
|
@ -1,4 +1,4 @@
|
||||
module Language.Haskell.GhcMod.Flag where
|
||||
module GhcModExe.Flag where
|
||||
|
||||
import qualified Language.Haskell.GhcMod.Gap as Gap
|
||||
import Language.Haskell.GhcMod.Convert
|
@ -1,4 +1,4 @@
|
||||
module Language.Haskell.GhcMod.Info (
|
||||
module GhcModExe.Info (
|
||||
info
|
||||
, types
|
||||
) where
|
||||
@ -10,8 +10,8 @@ import Exception (ghandle, SomeException(..))
|
||||
import GHC (GhcMonad, SrcSpan)
|
||||
import Prelude
|
||||
import qualified GHC as G
|
||||
import qualified Language.Haskell.GhcMod.Gap as Gap
|
||||
|
||||
import qualified Language.Haskell.GhcMod.Gap as Gap
|
||||
import Language.Haskell.GhcMod.Convert
|
||||
import Language.Haskell.GhcMod.Doc
|
||||
import Language.Haskell.GhcMod.DynFlags
|
||||
@ -37,7 +37,7 @@ info file expr =
|
||||
convert' =<< body
|
||||
where
|
||||
handler (SomeException ex) = do
|
||||
gmLog GmException "info" $ text "" $$ nest 4 (showDoc ex)
|
||||
gmLog GmException "info" $ text "" $$ nest 4 (showToDoc ex)
|
||||
convert' "Cannot show info"
|
||||
|
||||
body :: (GhcMonad m, GmState m, GmEnv m) => m String
|
||||
@ -69,7 +69,7 @@ types withConstraints file lineNo colNo =
|
||||
convert' $ map (toTup dflag st) $ sortBy (cmp `on` fst) srcSpanTypes
|
||||
where
|
||||
handler (SomeException ex) = do
|
||||
gmLog GmException "types" $ showDoc ex
|
||||
gmLog GmException "types" $ showToDoc ex
|
||||
return []
|
||||
|
||||
getSrcSpanType :: (GhcMonad m) => Bool -> G.ModSummary -> Int -> Int -> m [(SrcSpan, G.Type)]
|
@ -1,6 +1,6 @@
|
||||
-- | Low level access to the ghc-mod library.
|
||||
|
||||
module Language.Haskell.GhcMod.Internal (
|
||||
module GhcModExe.Internal (
|
||||
-- * Types
|
||||
GHCOption
|
||||
, IncludeDir
|
@ -1,4 +1,4 @@
|
||||
module Language.Haskell.GhcMod.Lang where
|
||||
module GhcModExe.Lang where
|
||||
|
||||
import DynFlags (supportedLanguagesAndExtensions)
|
||||
import Language.Haskell.GhcMod.Convert
|
@ -1,4 +1,4 @@
|
||||
module Language.Haskell.GhcMod.Lint where
|
||||
module GhcModExe.Lint where
|
||||
|
||||
import Exception (ghandle)
|
||||
import Control.Exception (SomeException(..))
|
||||
@ -9,8 +9,7 @@ import Language.Haskell.GhcMod.Monad
|
||||
import Language.Haskell.HLint3
|
||||
|
||||
import Language.Haskell.GhcMod.Utils (withMappedFile)
|
||||
import Language.Haskell.Exts.SrcLoc (SrcLoc(..))
|
||||
import System.IO
|
||||
import Language.Haskell.Exts.SrcLoc (SrcSpan(..))
|
||||
|
||||
-- | Checking syntax of a target file using hlint.
|
||||
-- Warnings and errors are returned.
|
||||
@ -20,15 +19,12 @@ lint :: IOish m
|
||||
-> GhcModT m String
|
||||
lint opt file = ghandle handler $
|
||||
withMappedFile file $ \tempfile -> do
|
||||
(flags, classify, hint) <- liftIO $ argsSettings $ optLintHlintOpts opt
|
||||
hSrc <- liftIO $ openFile tempfile ReadMode
|
||||
liftIO $ hSetEncoding hSrc (encoding flags)
|
||||
res <- liftIO $ parseModuleEx flags file =<< Just `fmap` hGetContents hSrc
|
||||
case res of
|
||||
Right m -> pack . map show $ filter ((/=Ignore) . ideaSeverity) $ applyHints classify hint [m]
|
||||
Left ParseError{parseErrorLocation=loc, parseErrorMessage=err} ->
|
||||
return $ showSrcLoc loc ++ ":Error:" ++ err ++ "\n"
|
||||
res <- liftIO $ hlint $ "--quiet" : tempfile : optLintHlintOpts opt
|
||||
pack . map (show . substFile file tempfile) $ res
|
||||
where
|
||||
pack = convert' . map init -- init drops the last \n.
|
||||
handler (SomeException e) = return $ checkErrorPrefix ++ show e ++ "\n"
|
||||
showSrcLoc (SrcLoc f l c) = concat [f, ":", show l, ":", show c]
|
||||
substFile orig temp idea
|
||||
| srcSpanFilename (ideaSpan idea) == temp
|
||||
= idea{ideaSpan=(ideaSpan idea){srcSpanFilename = orig}}
|
||||
substFile _ _ idea = idea
|
@ -1,4 +1,4 @@
|
||||
module Language.Haskell.GhcMod.Modules (modules) where
|
||||
module GhcModExe.Modules (modules) where
|
||||
|
||||
import Control.Arrow
|
||||
import Data.List
|
@ -1,4 +1,4 @@
|
||||
module Language.Haskell.GhcMod.PkgDoc (pkgDoc) where
|
||||
module GhcModExe.PkgDoc (pkgDoc) where
|
||||
|
||||
import Language.Haskell.GhcMod.Types
|
||||
import Language.Haskell.GhcMod.GhcPkg
|
@ -1,4 +1,4 @@
|
||||
module Language.Haskell.GhcMod.Test where
|
||||
module GhcModExe.Test where
|
||||
|
||||
import Control.Applicative
|
||||
import Data.List
|
@ -1,126 +0,0 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU Affero General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU Affero General Public License for more details.
|
||||
--
|
||||
-- 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, TemplateHaskell #-}
|
||||
module Language.Haskell.GhcMod.DynFlagsTH where
|
||||
|
||||
import Language.Haskell.TH.Syntax
|
||||
import Control.Applicative
|
||||
import Data.Maybe
|
||||
import Data.Generics.Aliases
|
||||
import Data.Generics.Schemes
|
||||
import DynFlags
|
||||
import Prelude
|
||||
|
||||
deriveEqDynFlags :: Q [Dec] -> Q [Dec]
|
||||
deriveEqDynFlags qds = do
|
||||
#if __GLASGOW_HASKELL__ <= 710
|
||||
~(TyConI (DataD [] _ [] [ctor] _ ))
|
||||
#else
|
||||
~(TyConI (DataD [] _ [] _ [ctor] _ ))
|
||||
#endif
|
||||
<- reify ''DynFlags
|
||||
let ~(RecC _ fs) = ctor
|
||||
|
||||
a <- newName "a"
|
||||
b <- newName "b"
|
||||
|
||||
e <- AppE (VarE 'and) . ListE <$> sequence (catMaybes $ map (eq a b) fs)
|
||||
|
||||
tysig@(SigD n _) :_ <- qds
|
||||
|
||||
return $ [tysig, FunD n [Clause [VarP a, VarP b] (NormalB e) []]]
|
||||
|
||||
where
|
||||
eq :: Name -> Name -> (Name, Strict, Type) -> Maybe (Q Exp)
|
||||
eq a b (fn@(Name (OccName fon) _), _, ft)
|
||||
| not (isUneqable || isIgnored) = Just expr
|
||||
| otherwise = Nothing
|
||||
where
|
||||
isUneqable = everything (||) (mkQ False hasUnEqable) ft
|
||||
|
||||
hasUnEqable ArrowT = True
|
||||
hasUnEqable (ConT (Name (OccName on) _))
|
||||
| any (==on) ignoredTypeNames = True
|
||||
| any (==on) ignoredTypeOccNames = True
|
||||
hasUnEqable _ = False
|
||||
|
||||
isIgnored = fon `elem` ignoredNames
|
||||
|
||||
ignoredNames = [ "pkgDatabase" -- 7.8
|
||||
#if __GLASGOW_HASKELL__ <= 706
|
||||
, "ways" -- 'Ways' is not exported :/
|
||||
#endif
|
||||
]
|
||||
ignoredTypeNames =
|
||||
[ "LogAction"
|
||||
, "PackageState"
|
||||
, "Hooks"
|
||||
, "FlushOut"
|
||||
, "FlushErr"
|
||||
, "Settings" -- I think these can't cange at runtime
|
||||
]
|
||||
ignoredTypeOccNames = [ "OnOff" ]
|
||||
|
||||
fa = AppE (VarE fn) (VarE a)
|
||||
fb = AppE (VarE fn) (VarE b)
|
||||
expr =
|
||||
case fon of
|
||||
"rtsOptsEnabled" -> do
|
||||
eqfn <- [| let eqfn RtsOptsNone RtsOptsNone = True
|
||||
eqfn RtsOptsSafeOnly RtsOptsSafeOnly = True
|
||||
eqfn RtsOptsAll RtsOptsAll = True
|
||||
eqfn _ _ = False
|
||||
in eqfn
|
||||
|]
|
||||
return $ AppE (AppE eqfn fa) fb
|
||||
|
||||
#if __GLASGOW_HASKELL__ >= 710 && __GLASGOW_HASKELL__ < 800
|
||||
"sigOf" -> do
|
||||
eqfn <- [| let eqfn NotSigOf NotSigOf = True
|
||||
eqfn (SigOf a') (SigOf b') = a' == b'
|
||||
eqfn (SigOfMap a') (SigOfMap b') = a' == b'
|
||||
eqfn _ _ = False
|
||||
in eqfn
|
||||
|]
|
||||
return $ AppE (AppE eqfn fa) fb
|
||||
#endif
|
||||
|
||||
#if __GLASGOW_HASKELL <= 706
|
||||
"profAuto" -> do
|
||||
eqfn <- [| let eqfn NoProfAuto NoProfAuto = True
|
||||
eqfn ProfAutoAll ProfAutoAll = True
|
||||
eqfn ProfAutoTop ProfAutoTop = True
|
||||
eqfn ProfAutoExports ProfAutoExports = True
|
||||
eqfn ProfAutoCalls ProfAutoCalls = True
|
||||
eqfn _ _ = False
|
||||
in eqfn
|
||||
|]
|
||||
return $ AppE (AppE eqfn fa) fb
|
||||
#endif
|
||||
|
||||
#if __GLASGOW_HASKELL__ >= 706
|
||||
"language" -> do
|
||||
eqfn <- [| let eqfn (Just Haskell98) (Just Haskell98) = True
|
||||
eqfn (Just Haskell2010) (Just Haskell2010) = True
|
||||
eqfn _ _ = False
|
||||
in eqfn
|
||||
|]
|
||||
return $ AppE (AppE eqfn fa) fb
|
||||
#endif
|
||||
|
||||
_ ->
|
||||
return $ InfixE (Just fa) (VarE '(==)) (Just fb)
|
@ -1,48 +0,0 @@
|
||||
module Language.Haskell.GhcMod.LightGhc where
|
||||
|
||||
import Control.Monad.Reader (runReaderT)
|
||||
import Data.IORef
|
||||
|
||||
import GHC
|
||||
import GHC.Paths (libdir)
|
||||
import StaticFlags
|
||||
import SysTools
|
||||
import DynFlags
|
||||
import HscMain
|
||||
import HscTypes
|
||||
|
||||
import Language.Haskell.GhcMod.Types
|
||||
import Language.Haskell.GhcMod.Monad.Types
|
||||
import Language.Haskell.GhcMod.DynFlags
|
||||
|
||||
withLightHscEnv :: forall m a. IOish m
|
||||
=> [GHCOption] -> (HscEnv -> m a) -> m a
|
||||
withLightHscEnv opts action = gbracket initEnv teardownEnv action
|
||||
where
|
||||
teardownEnv :: HscEnv -> m ()
|
||||
teardownEnv env = liftIO $ do
|
||||
let dflags = hsc_dflags env
|
||||
cleanTempFiles dflags
|
||||
cleanTempDirs dflags
|
||||
|
||||
initEnv :: m HscEnv
|
||||
initEnv = liftIO $ do
|
||||
initStaticOpts
|
||||
settings <- initSysTools (Just libdir)
|
||||
dflags <- initDynFlags (defaultDynFlags settings)
|
||||
env <- newHscEnv dflags
|
||||
dflags' <- runLightGhc env $ do
|
||||
-- HomeModuleGraph and probably all other clients get into all sorts of
|
||||
-- trouble if the package state isn't initialized here
|
||||
_ <- setSessionDynFlags =<< addCmdOpts opts =<< getSessionDynFlags
|
||||
getSessionDynFlags
|
||||
newHscEnv dflags'
|
||||
|
||||
runLightGhc :: HscEnv -> LightGhc a -> IO a
|
||||
runLightGhc env action = do
|
||||
renv <- newIORef env
|
||||
flip runReaderT renv $ unLightGhc action
|
||||
|
||||
runLightGhc' :: IORef HscEnv -> LightGhc a -> IO a
|
||||
runLightGhc' renv action = do
|
||||
flip runReaderT renv $ unLightGhc action
|
@ -1,30 +0,0 @@
|
||||
Copyright Ben Millwood 2012
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
|
||||
* Neither the name of Ben Millwood nor the names of other
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
|
@ -1,44 +0,0 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
-- | This module uses scope lookup techniques to either export
|
||||
-- 'lookupValueName' from @Language.Haskell.TH@, or define
|
||||
-- its own 'lookupValueName', which attempts to do the
|
||||
-- same job with just 'reify'. This will sometimes fail, but if it
|
||||
-- succeeds it will give the answer that the real function would have
|
||||
-- given.
|
||||
--
|
||||
-- The idea is that if you use lookupValueName from this module,
|
||||
-- your client code will automatically use the best available name
|
||||
-- lookup mechanism. This means that e.g. 'scopeLookup' can work
|
||||
-- very well on recent GHCs and less well but still somewhat
|
||||
-- usefully on older GHCs.
|
||||
module NotCPP.LookupValueName (
|
||||
lookupValueName
|
||||
) where
|
||||
|
||||
import Language.Haskell.TH
|
||||
|
||||
import NotCPP.Utils
|
||||
|
||||
bestValueGuess :: String -> Q (Maybe Name)
|
||||
bestValueGuess s = do
|
||||
mi <- maybeReify (mkName s)
|
||||
case mi of
|
||||
Nothing -> no
|
||||
Just i -> case i of
|
||||
#if __GLASGOW_HASKELL__ >= 800
|
||||
VarI n _ _ -> yes n
|
||||
DataConI n _ _ -> yes n
|
||||
#else
|
||||
VarI n _ _ _ -> yes n
|
||||
DataConI n _ _ _ -> yes n
|
||||
#endif
|
||||
_ -> err ["unexpected info:", show i]
|
||||
where
|
||||
no = return Nothing
|
||||
yes = return . Just
|
||||
err = fail . showString "NotCPP.bestValueGuess: " . unwords
|
||||
|
||||
$(recover [d| lookupValueName = bestValueGuess |] $ do
|
||||
VarI{} <- reify (mkName "lookupValueName")
|
||||
return [])
|
@ -1,114 +0,0 @@
|
||||
{-# LANGUAGE EmptyDataDecls, TemplateHaskell #-}
|
||||
-- |
|
||||
-- The orphan instance problem is well-known in Haskell. This module
|
||||
-- by no means purports to solve the problem, but provides a workaround
|
||||
-- that may be significantly less awful than the status quo in some
|
||||
-- cases.
|
||||
--
|
||||
-- Say I think that the 'Name' type should have an 'IsString' instance.
|
||||
-- But I don't control either the class or the type, so if I define the
|
||||
-- instance, and then the template-haskell package defines one, my code
|
||||
-- is going to break.
|
||||
--
|
||||
-- 'safeInstance' can help me to solve this problem:
|
||||
--
|
||||
-- > safeInstance ''IsString [t| Name |] [d|
|
||||
-- > fromString = mkName |]
|
||||
--
|
||||
-- This will declare an instance only if one doesn't already exist.
|
||||
-- Now anyone importing your module is guaranteed to get an instance
|
||||
-- one way or the other.
|
||||
--
|
||||
-- This module is still highly experimental. The example given above
|
||||
-- does work, but anything involving type variables or complex method
|
||||
-- bodies may be less fortunate. The names of the methods are mangled
|
||||
-- a bit, so using recursion to define them may not work. Define the
|
||||
-- method outside the code and then use a simple binding as above.
|
||||
--
|
||||
-- If you use this code (successfully or unsuccessfully!), go fetch
|
||||
-- the maintainer address from the cabal file and let me know!
|
||||
module NotCPP.OrphanEvasion (
|
||||
MultiParams,
|
||||
safeInstance,
|
||||
safeInstance',
|
||||
) where
|
||||
|
||||
import Control.Applicative
|
||||
|
||||
import Language.Haskell.TH
|
||||
import Language.Haskell.TH.Syntax
|
||||
|
||||
import NotCPP.ScopeLookup
|
||||
|
||||
-- | An empty type used only to signify a multiparameter typeclass in
|
||||
-- 'safeInstance'.
|
||||
data MultiParams a
|
||||
|
||||
-- | Given @(forall ts. Cxt => t)@, return @(Cxt, [t])@.
|
||||
-- Given @(forall ts. Cxt => 'MultiParams' (t1, t2, t3))@, return
|
||||
-- @(Cxt, [t1, t2, t3])@.
|
||||
--
|
||||
-- This is used in 'safeInstance' to allow types to be specified more
|
||||
-- easily with TH typequotes.
|
||||
fromTuple :: Type -> (Cxt, [Type])
|
||||
fromTuple ty = unTuple <$> case ty of
|
||||
ForallT _ cxt ty' -> (cxt, ty')
|
||||
_ -> ([], ty)
|
||||
where
|
||||
unTuple :: Type -> [Type]
|
||||
unTuple (AppT (ConT n) ta)
|
||||
| n == ''MultiParams = case unrollAppT ta of
|
||||
(TupleT{}, ts) -> ts
|
||||
_ -> [ty]
|
||||
unTuple t = [t]
|
||||
|
||||
-- | A helper function to unwind type application.
|
||||
-- Given @TyCon t1 t2 t3@, returns @(TyCon, [t1,t2,t3])@
|
||||
unrollAppT :: Type -> (Type, [Type])
|
||||
unrollAppT = go []
|
||||
where
|
||||
go acc (AppT tc ta) = go (ta : acc) tc
|
||||
go acc ty = (ty, reverse acc)
|
||||
|
||||
-- | Left inverse to unrollAppT, equal to @'foldl' 'AppT'@
|
||||
rollAppT :: Type -> [Type] -> Type
|
||||
rollAppT = foldl AppT
|
||||
|
||||
-- | @'safeInstance'' className cxt types methods@ produces an instance
|
||||
-- of the given class if and only if one doesn't already exist.
|
||||
--
|
||||
-- See 'safeInstance' for a simple way to construct the 'Cxt' and
|
||||
-- @['Type']@ parameters.
|
||||
safeInstance' :: Name -> Cxt -> [Type] -> Q [Dec] -> Q [Dec]
|
||||
safeInstance' cl cxt tys inst = do
|
||||
b <- $(scopeLookups ["isInstance", "isClassInstance"]) cl tys
|
||||
if b
|
||||
then return []
|
||||
else do
|
||||
ds <- map fixInst <$> inst
|
||||
return [InstanceD cxt (rollAppT (ConT cl) tys) ds]
|
||||
where
|
||||
fixInst (FunD n cls) = FunD (fixName n) cls
|
||||
fixInst (ValD (VarP n) rhs wh) = ValD (VarP (fixName n)) rhs wh
|
||||
fixInst d = d
|
||||
fixName (Name n _) = Name n NameS
|
||||
|
||||
-- | 'safeInstance' is a more convenient version of 'safeInstance''
|
||||
-- that takes the context and type from a @'Q' 'Type'@ with the intention
|
||||
-- that it be supplied using a type-quote.
|
||||
--
|
||||
-- To define an instance @Show a => Show (Wrapper a)@, you'd use:
|
||||
--
|
||||
-- > safeInstance ''Show [t| Show a => Wrapper a |]
|
||||
-- > [d| show _ = "stuff" |]
|
||||
--
|
||||
-- To define an instance of a multi-param type class, use the
|
||||
-- 'MultiParams' type constructor with a tuple:
|
||||
--
|
||||
-- > safeInstance ''MonadState
|
||||
-- > [t| MonadState s m => MultiParams (s, MaybeT m) |]
|
||||
-- > [d| put = ... |]
|
||||
safeInstance :: Name -> Q Type -> Q [Dec] -> Q [Dec]
|
||||
safeInstance n qty inst = do
|
||||
(cxt, tys) <- fromTuple <$> qty
|
||||
safeInstance' n cxt tys inst
|
@ -1,65 +0,0 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
-- |
|
||||
-- This module exports 'scopeLookup', which will find a variable or
|
||||
-- value constructor for you and present it for your use. E.g. at some
|
||||
-- point in the history of the acid-state package, 'openAcidState' was
|
||||
-- renamed 'openLocalState'; for compatibility with both, you could
|
||||
-- use:
|
||||
--
|
||||
-- > openState :: IO (AcidState st)
|
||||
-- > openState = case $(scopeLookup "openLocalState") of
|
||||
-- > Just open -> open defaultState
|
||||
-- > Nothing -> case $(scopeLookup "openAcidState") of
|
||||
-- > Just open -> open defaultState
|
||||
-- > Nothing -> error
|
||||
-- > "openState: runtime name resolution has its drawbacks :/"
|
||||
--
|
||||
-- Or, for this specific case, you can use 'scopeLookups':
|
||||
--
|
||||
-- > openState :: IO (AcidState st)
|
||||
-- > openState = open defaultState
|
||||
-- > where
|
||||
-- > open = $(scopeLookups ["openLocalState","openAcidState"])
|
||||
--
|
||||
-- Now if neither of the names are found then TH will throw a
|
||||
-- compile-time error.
|
||||
module NotCPP.ScopeLookup (
|
||||
scopeLookup,
|
||||
scopeLookups,
|
||||
scopeLookup',
|
||||
liftMaybe,
|
||||
recoverMaybe,
|
||||
maybeReify,
|
||||
infoToExp,
|
||||
) where
|
||||
|
||||
import Control.Applicative ((<$>))
|
||||
|
||||
import Language.Haskell.TH (Q, Exp, recover, reify)
|
||||
|
||||
import NotCPP.LookupValueName
|
||||
import NotCPP.Utils
|
||||
|
||||
-- | Produces a spliceable expression which expands to @'Just' val@ if
|
||||
-- the given string refers to a value @val@ in scope, or 'Nothing'
|
||||
-- otherwise.
|
||||
--
|
||||
-- @scopeLookup = 'fmap' 'liftMaybe' . 'scopeLookup''@
|
||||
scopeLookup :: String -> Q Exp
|
||||
scopeLookup = fmap liftMaybe . scopeLookup'
|
||||
|
||||
-- | Finds the first string in the list that names a value, and produces
|
||||
-- a spliceable expression of that value, or reports a compile error if
|
||||
-- it fails.
|
||||
scopeLookups :: [String] -> Q Exp
|
||||
scopeLookups xs = foldr
|
||||
(\s r -> maybe r return =<< scopeLookup' s)
|
||||
(fail ("scopeLookups: none found: " ++ show xs))
|
||||
xs
|
||||
|
||||
-- | Produces @'Just' x@ if the given string names the value @x@,
|
||||
-- or 'Nothing' otherwise.
|
||||
scopeLookup' :: String -> Q (Maybe Exp)
|
||||
scopeLookup' s = recover (return Nothing) $ do
|
||||
Just n <- lookupValueName s
|
||||
infoToExp <$> reify n
|
@ -1,35 +0,0 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
module NotCPP.Utils where
|
||||
|
||||
import Control.Applicative ((<$>))
|
||||
import Language.Haskell.TH
|
||||
|
||||
-- | Turns 'Nothing' into an expression representing 'Nothing', and
|
||||
-- @'Just' x@ into an expression representing 'Just' applied to the
|
||||
-- expression in @x@.
|
||||
liftMaybe :: Maybe Exp -> Exp
|
||||
liftMaybe = maybe (ConE 'Nothing) (AppE (ConE 'Just))
|
||||
|
||||
-- | A useful variant of 'reify' that returns 'Nothing' instead of
|
||||
-- halting compilation when an error occurs (e.g. because the given
|
||||
-- name was not in scope).
|
||||
maybeReify :: Name -> Q (Maybe Info)
|
||||
maybeReify = recoverMaybe . reify
|
||||
|
||||
-- | Turns a possibly-failing 'Q' action into one returning a 'Maybe'
|
||||
-- value.
|
||||
recoverMaybe :: Q a -> Q (Maybe a)
|
||||
recoverMaybe q = recover (return Nothing) (Just <$> q)
|
||||
|
||||
-- | Returns @'Just' ('VarE' n)@ if the info relates to a value called
|
||||
-- @n@, or 'Nothing' if it relates to a different sort of thing.
|
||||
infoToExp :: Info -> Maybe Exp
|
||||
#if __GLASGOW_HASKELL__ >= 800
|
||||
infoToExp (VarI n _ _) = Just (VarE n)
|
||||
infoToExp (DataConI n _ _) = Just (ConE n)
|
||||
#else
|
||||
infoToExp (VarI n _ _ _) = Just (VarE n)
|
||||
infoToExp (DataConI n _ _ _) = Just (ConE n)
|
||||
#endif
|
||||
infoToExp _ = Nothing
|
120
README.md
120
README.md
@ -1,71 +1,99 @@
|
||||
# Happy Haskell Programming
|
||||
[![Build Status](https://travis-ci.org/kazu-yamamoto/ghc-mod.svg?branch=master)](https://travis-ci.org/kazu-yamamoto/ghc-mod)
|
||||
# ghc-mod: Happy Haskell Hacking
|
||||
[![build status](https://gitlab.com/dxld/ghc-mod/badges/master/build.svg)](https://gitlab.com/dxld/ghc-mod/commits/master)
|
||||
|
||||
Please read: [http://www.mew.org/~kazu/proj/ghc-mod/](http://www.mew.org/~kazu/proj/ghc-mod/)
|
||||
ghc-mod provides editors/IDEs with support for Haskell compiler features, it
|
||||
supports both Cabal and Stack based projects and integrations exist for Emacs,
|
||||
Vim, Atom, IntelliJ and VSCode.
|
||||
|
||||
## Using the stable version
|
||||
- for [all Haskell developers (Using ghc-mod in your development environment)](#using-ghc-mod-in-your-development-environment)
|
||||
- for [people developing Haskell IDEs (Using ghc-mod as an IDE backend program)](#using-ghc-mod-as-an-ide-backend-program)
|
||||
- for [developing Haskell tooling (Using ghc-mod as a library)](#using-ghc-mod-as-a-library)
|
||||
|
||||
The Emacs front-end is available from
|
||||
[*stable* MELPA](https://stable.melpa.org/). This package should
|
||||
always be compatible with the latest version of ghc-mod from hackage.
|
||||
## Overview
|
||||
|
||||
To use stable *stable* MELPA add this to your `.emacs`:
|
||||
### Using ghc-mod in your Development Environment
|
||||
|
||||
```elisp
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "https://stable.melpa.org/packages/"))
|
||||
(package-initialize)
|
||||
```
|
||||
To use `ghc-mod` in your development environment of choice you need two things:
|
||||
|
||||
With this configuration you can install the Emacs front end from MELPA (the
|
||||
package is called `ghc` there, not `ghc-mod`) and install the
|
||||
`ghc-mod`/`ghc-modi` binaries from hackage by doing:
|
||||
- The `ghc-mod` program included in the package of the same name, see [Installing](https://github.com/DanielG/ghc-mod/wiki/Installing)
|
||||
- A ghc-mod frontend to integrate it into your development environment, see [Frontend](https://github.com/DanielG/ghc-mod/wiki/Frontend)
|
||||
|
||||
```shell
|
||||
% cabal update && cabal install ghc-mod
|
||||
```
|
||||
### Using ghc-mod as an IDE Backend Program
|
||||
|
||||
### Nix & NixOS
|
||||
We provide two modes of operation for frontends: interactive and single shot
|
||||
mode. The former is accessed by calling `$ ghc-mod legacy-interactive` this will
|
||||
sit and wait for you to type a command and exit when an empty line is
|
||||
entered. Interactive mode is pretty much always faster than single shot mode
|
||||
since it gives ghc-mod the ability to cache the compiler session between
|
||||
commands on the other hand it needs more memory because it keeps these things
|
||||
cached.
|
||||
|
||||
`ghc-mod` works fine for users of Nix who follow a recent version of the
|
||||
package database such as the `nixos-15.09` or `nixos-unstable` channel. Just
|
||||
include the package `ghc-mod` into your `ghcWithPackages` environment like any
|
||||
other library. The [Nixpkgs Haskell User's
|
||||
Guide](http://hydra.nixos.org/job/nixpkgs/trunk/manual/latest/download-by-type/doc/manual#users-guide-to-the-haskell-infrastructure)
|
||||
covers this subject in great detail.
|
||||
Single shot mode is pretty much only there for (backwards) compatibility with
|
||||
Vim since it only recently got the ability to talk to background processes
|
||||
without installing some external plugin. You can use single-shot mode by simply
|
||||
calling the sub-comamnds of the `ghc-mod` program. Since re-compiling large
|
||||
projects can be really, really slow you really shouldn't use this and use
|
||||
interactive mode instead.
|
||||
|
||||
## Using the development version
|
||||
As a rule of thumb all commands available in single shot mode are available in
|
||||
interactive mode, a list of the former can be obtained by running
|
||||
`$ ghc-mod --help`.
|
||||
|
||||
The easiest way to hack on ghc-mod is compile it, then add `dist/build/ghc-mod`
|
||||
and `dist/build/ghc-modi` to your `PATH` and add the `elisp/` directory to your
|
||||
Emacs `load-path`.
|
||||
If you're developing a new ghc-mod fronted we'd love to hear from you! Please
|
||||
open an issue or e-mail the maintainer. Also we invite you to add installation
|
||||
and configuration instructions to
|
||||
[Frontend](https://github.com/DanielG/ghc-mod/wiki/Frontend).
|
||||
|
||||
Make sure you're not using the MELPA version of `ghc.el` otherwise you might get
|
||||
all sorts of nasty conflicts.
|
||||
### Using ghc-mod as a Library
|
||||
|
||||
Internally ghc-mod uses the Glasgow Haskell Compilers's API to implement most of
|
||||
it's functionality.
|
||||
|
||||
## Custom ghc-mod cradle
|
||||
In order to provide a hassle free experience to users ghc-mod tries hard to
|
||||
automatically, and correctly, detect and if needed tweak the environment GHC
|
||||
needs. It also handles some of the more cumbersome parts of getting a working
|
||||
compiler session up and running.
|
||||
|
||||
To customize the package databases used by `ghc-mod`, put a file called `ghc-mod.package-db-stack` beside the `.cabal` file with the following syntax:
|
||||
This functionality can be very useful to all kinds of Haskell development tools
|
||||
therefore want to expose all the useful abstractions ghc-mod provides.
|
||||
|
||||
```
|
||||
temp directory root
|
||||
package db 1
|
||||
...
|
||||
package db n
|
||||
```
|
||||
Right now the ghc-mod API is pretty messy; a result of major internal rewrites
|
||||
and reorganization coupled with too little time for cleanups over the course of
|
||||
almost 100 releases! We would like to make a cut during v6.0 or so and
|
||||
completely re-do the API but we need more input from downstream tool writers to
|
||||
do that properly, see [Library API Redesign](Library-API-Redesign.md).
|
||||
|
||||
each package database line is either a *path* to a package database, or `global` or `user`.
|
||||
For example [The Haskell Refactorer (HaRe)](https://github.com/alanz/HaRe) uses
|
||||
the build environment abstraction ghc-mod provides so it can concentrate on it's
|
||||
core functionality instead of worrying about build environments and compiler
|
||||
session setup.
|
||||
|
||||
Recently the
|
||||
[`haskell-ide-engine`](https://github.com/haskell/haskell-ide-engine) project
|
||||
has sprung up and if you're planning to write any kind of tool that needs editor
|
||||
integration eventually you should definetly look into that. `haskell-ide-engine`
|
||||
uses `ghc-mod` at it's core so you'll want to be familliar with it either way.
|
||||
|
||||
API "documentation" is here:
|
||||
[Hackage docs](https://hackage.haskell.org/package/ghc-mod#modules).
|
||||
|
||||
## Reporting Bugs
|
||||
|
||||
Please report bugs on the GitHub issue tracker for ghc-mod:
|
||||
https://github.com/DanielG/ghc-mod/issues
|
||||
|
||||
Including general environment information like the operating system
|
||||
(distribution, version) you're using and the output of `$ ghc-mod debug` run in
|
||||
your project directory is probably a good idea.
|
||||
|
||||
## IRC
|
||||
|
||||
If you have any problems, suggestions, comments swing by
|
||||
[\#ghc-mod (web client)](https://kiwiirc.com/client/irc.freenode.org/ghc-mod) on
|
||||
Freenode. If you're reporting a bug please also create an issue
|
||||
[here](https://github.com/kazu-yamamoto/ghc-mod/issues) so we have a way to contact
|
||||
you if you don't have time to stay.
|
||||
[here (GitHub issue tracker)](https://github.com/DanielG/ghc-mod/issues) so we
|
||||
have a way to contact you if you don't have time to stay.
|
||||
|
||||
Do hang around for a while if no one answers and repeat your question if you
|
||||
still haven't gotten any answer after a day or so. You're most likely to get an
|
||||
answer during the day in GMT+1.
|
||||
still haven't gotten any answer after a day or so (the maintainer was probably
|
||||
asleep). You're most likely to get an answer during the day in GMT+1.
|
||||
|
179
Setup.hs
179
Setup.hs
@ -1,13 +1,19 @@
|
||||
#!/usr/bin/env runhaskell
|
||||
{-# LANGUAGE RecordWildCards #-}
|
||||
{-# LANGUAGE RecordWildCards, NamedFieldPuns #-}
|
||||
import Distribution.Simple
|
||||
import Distribution.Simple.Utils
|
||||
import Distribution.Simple.Setup
|
||||
import Distribution.Simple.Install
|
||||
import Distribution.Simple.Program
|
||||
import Distribution.Simple.Register
|
||||
import Distribution.Simple.InstallDirs as ID
|
||||
import Distribution.Simple.BuildPaths
|
||||
import qualified Distribution.Simple.InstallDirs as ID
|
||||
import Distribution.Simple.LocalBuildInfo
|
||||
import Distribution.PackageDescription
|
||||
|
||||
import qualified Data.Map as M
|
||||
import Data.Map (Map)
|
||||
|
||||
import Control.Arrow
|
||||
import Control.Applicative
|
||||
import Control.Monad
|
||||
@ -18,46 +24,23 @@ import Data.Monoid
|
||||
import System.Process
|
||||
import System.Exit
|
||||
import System.FilePath
|
||||
import Text.ParserCombinators.ReadP
|
||||
|
||||
import SetupCompat
|
||||
import System.Directory (renameFile)
|
||||
|
||||
main :: IO ()
|
||||
main = defaultMainWithHooks $ simpleUserHooks {
|
||||
confHook = \(gpd, hbi) cf ->
|
||||
xBuildDependsLike <$> (confHook simpleUserHooks) (gpd, hbi) cf
|
||||
|
||||
, instHook = inst
|
||||
, copyHook = copy
|
||||
|
||||
-- , postConf = sanityCheckCabalVersions
|
||||
instHook = inst,
|
||||
copyHook = copy,
|
||||
buildHook = \pd lbi hooks flags -> (buildHook simpleUserHooks) pd (patchLibexecdir lbi) hooks flags,
|
||||
hookedPrograms = [ simpleProgram "shelltest" ]
|
||||
}
|
||||
|
||||
xBuildDependsLike :: LocalBuildInfo -> LocalBuildInfo
|
||||
xBuildDependsLike lbi =
|
||||
let
|
||||
cc = componentsConfigs lbi
|
||||
pd = localPkgDescr lbi
|
||||
deps = dependsMap lbi
|
||||
in setComponentsConfigs lbi
|
||||
[ (cn, updateClbi deps comp clbi, cdeps)
|
||||
| (cn, clbi, cdeps) <- cc
|
||||
, let comp = getComponent pd cn
|
||||
]
|
||||
|
||||
where
|
||||
updateClbi deps comp clbi = setUnionDeps (otherDeps deps comp) clbi
|
||||
|
||||
dependsMap ::
|
||||
LocalBuildInfo -> [(ComponentName, Deps)]
|
||||
dependsMap lbi =
|
||||
second getDeps <$> allComponentsInBuildOrder lbi
|
||||
|
||||
otherDeps :: [(ComponentName, Deps)] -> Component -> Deps
|
||||
otherDeps deps comp = fromMaybe noDeps $
|
||||
flip lookup deps =<< read <$> lookup "x-build-depends-like" fields
|
||||
where
|
||||
fields = customFieldsBI (componentBuildInfo comp)
|
||||
patchLibexecdir :: LocalBuildInfo -> LocalBuildInfo
|
||||
patchLibexecdir lbi = let
|
||||
idirtpl = installDirTemplates lbi
|
||||
libexecdir' = toPathTemplate $ fromPathTemplate (libexecdir idirtpl) </> "$abi/$pkgid"
|
||||
lbi' = lbi { installDirTemplates = idirtpl { libexecdir = libexecdir' } }
|
||||
in
|
||||
lbi'
|
||||
|
||||
-- mostly copypasta from 'defaultInstallHook'
|
||||
inst ::
|
||||
@ -68,7 +51,7 @@ inst pd lbi _uf ifl = do
|
||||
copyDest = toFlag NoCopyDest,
|
||||
copyVerbosity = installVerbosity ifl
|
||||
}
|
||||
xInstallTarget pd lbi (\pd' lbi' -> install pd' lbi' copyFlags)
|
||||
xInstallTarget pd lbi copyFlags (\pd' lbi' -> install pd' lbi' copyFlags)
|
||||
let registerFlags = defaultRegisterFlags {
|
||||
regDistPref = installDistPref ifl,
|
||||
regInPlace = installInPlace ifl,
|
||||
@ -79,124 +62,46 @@ inst pd lbi _uf ifl = do
|
||||
|
||||
copy :: PackageDescription -> LocalBuildInfo -> UserHooks -> CopyFlags -> IO ()
|
||||
copy pd lbi _uh cf =
|
||||
xInstallTarget pd lbi (\pd' lbi' -> install pd' lbi' cf)
|
||||
xInstallTarget pd lbi cf (\pd' lbi' -> install pd' lbi' cf)
|
||||
|
||||
xInstallTarget :: PackageDescription
|
||||
-> LocalBuildInfo
|
||||
-> CopyFlags
|
||||
-> (PackageDescription -> LocalBuildInfo -> IO ())
|
||||
-> IO ()
|
||||
xInstallTarget pd lbi fn = do
|
||||
let (extended, regular) = partition (isJust . installTarget) (executables pd)
|
||||
xInstallTarget pd lbi cf fn = do
|
||||
let (extended, regular) = partition isInternal (executables pd)
|
||||
|
||||
let pd_regular = pd { executables = regular }
|
||||
|
||||
_ <- flip mapM extended $ \exe -> do
|
||||
putStrLn $ "extended " ++ show (exeName exe)
|
||||
let pd_extended = onlyExePackageDesc [exe] pd
|
||||
fn pd_extended lbi
|
||||
|
||||
let
|
||||
idirtpl = installDirTemplates lbi
|
||||
env = installDirsTemplateEnv idirtpl
|
||||
libexecdir' = fromPathTemplate (libexecdir idirtpl)
|
||||
let lbi' = patchLibexecdir lbi
|
||||
copydest = fromFlag (copyDest cf)
|
||||
verbosity = fromFlag (copyVerbosity cf)
|
||||
InstallDirs { bindir, libexecdir } = absoluteInstallDirs pd lbi' copydest
|
||||
progprefix = substPathTemplate (packageId pd) lbi (progPrefix lbi)
|
||||
progsuffix = substPathTemplate (packageId pd) lbi (progSuffix lbi)
|
||||
fixedExeBaseName = progprefix ++ exeName exe ++ progsuffix
|
||||
|
||||
pd_extended = onlyExePackageDesc [exe] pd
|
||||
install_target = fromJustNote "xInstallTarget" $ installTarget exe
|
||||
install_target' = ID.substPathTemplate env install_target
|
||||
-- $libexec isn't a real thing :/ so we have to simulate it
|
||||
install_target'' = substLibExec' libexecdir' install_target'
|
||||
fixedExeFileName = bindir </> fixedExeBaseName <.> exeExtension
|
||||
newExeFileName = libexecdir </> fixedExeBaseName <.> exeExtension
|
||||
|
||||
let lbi' = lbi {
|
||||
installDirTemplates =
|
||||
(installDirTemplates lbi) {
|
||||
bindir = install_target''
|
||||
}
|
||||
}
|
||||
fn pd_extended lbi'
|
||||
when (exeName exe == "ghc-mod-real") $ do
|
||||
createDirectoryIfMissingVerbose verbosity True libexecdir
|
||||
renameFile fixedExeFileName newExeFileName
|
||||
|
||||
fn pd_regular lbi
|
||||
|
||||
where
|
||||
installTarget :: Executable -> Maybe PathTemplate
|
||||
installTarget exe =
|
||||
toPathTemplate <$> lookup "x-install-target" (customFieldsBI $ buildInfo exe)
|
||||
|
||||
substLibExec libexecdir "$libexecdir" = libexecdir
|
||||
substLibExec _ comp = comp
|
||||
|
||||
substLibExec' dir =
|
||||
withPT $
|
||||
withSP $ map (substLibExec dir . dropTrailingPathSeparator)
|
||||
|
||||
|
||||
withPT f pt = toPathTemplate $ f (fromPathTemplate pt)
|
||||
withSP f p = joinPath $ f (splitPath p)
|
||||
isInternal :: Executable -> Bool
|
||||
isInternal exe =
|
||||
fromMaybe False $ (=="True") <$> lookup "x-internal" (customFieldsBI $ buildInfo exe)
|
||||
|
||||
onlyExePackageDesc :: [Executable] -> PackageDescription -> PackageDescription
|
||||
onlyExePackageDesc exes pd = emptyPackageDescription {
|
||||
package = package pd
|
||||
, executables = exes
|
||||
}
|
||||
|
||||
parseVer str =
|
||||
case filter ((=="") . snd) $ readP_to_S parseVersion str of
|
||||
[(ver, _)] -> ver
|
||||
_ -> error $ "No parse (Ver) :(\n" ++ str ++ "\n"
|
||||
|
||||
fromJustNote :: String -> Maybe a -> a
|
||||
fromJustNote _ (Just x) = x
|
||||
fromJustNote note Nothing = error $ "fromJustNote ("++note++"): "
|
||||
|
||||
-- sanityCheckCabalVersions args cf desc lbi = do
|
||||
-- (cabalInstallVer, cabalVer) <- getCabalExecVer
|
||||
|
||||
-- let
|
||||
-- ghcVer = compilerVersion (compiler lbi)
|
||||
-- -- ghc >= 7.10?
|
||||
-- minGhc710 = ghcVer `withinRange` orLaterVersion (parseVer "7.10")
|
||||
|
||||
-- when minGhc710 $ do
|
||||
-- let cabalHelperCabalVer = compCabalVer (CExeName "cabal-helper")
|
||||
|
||||
-- when (not $ cabalVer `sameMajorVersionAs` cabalHelperCabalVer) $
|
||||
-- failCabalVersionDifferent cabalVer cabalHelperCabalVer
|
||||
|
||||
-- -- carry on as usual
|
||||
-- (postConf simpleUserHooks) args cf desc lbi
|
||||
|
||||
-- where
|
||||
-- earlierVersionThan ver ver' =
|
||||
-- ver `withinRange` earlierVersion ver'
|
||||
-- sameMajorVersionAs ver ver' =
|
||||
-- ver `withinRange` withinVersion (Version (take 2 $ versionBranch ver') [])
|
||||
|
||||
-- compCabalVer comp = let
|
||||
-- clbi = getComponentLocalBuildInfo lbi comp
|
||||
|
||||
-- [cabalVer] =
|
||||
-- [ ver | (_, PackageIdentifier pkg ver) <- componentPackageDeps clbi
|
||||
-- , pkg == PackageName "Cabal" ]
|
||||
-- in cabalVer
|
||||
|
||||
-- getCabalExecVer = do
|
||||
-- ["cabal-install", "version", cabalInstallVer, "using", "version", cabalVer, "of", "the", "Cabal", "library"] <- words <$> readProcess "cabal" ["--version"] ""
|
||||
-- return (parseVer cabalInstallVer, parseVer cabalVer)
|
||||
|
||||
-- failCabalVersionDifferent cabalVer libCabalVer =
|
||||
-- putStrLn rerr >> exitFailure
|
||||
-- where
|
||||
-- replace :: String -> String -> String -> String
|
||||
-- replace _ _ [] = []
|
||||
-- replace n r h@(h':hs)
|
||||
-- | map snd (n `zip` h ) == n = r ++ replace n r (drop (length n) h)
|
||||
-- | otherwise = h':replace n r hs
|
||||
|
||||
-- rerr = replace "X.XX.X.X" (showVersion libCabalVer) $
|
||||
-- replace "Y.YY.Y.Y" (showVersion cabalVer) err
|
||||
-- err = "\
|
||||
-- \Error: Cabal seems to have decided ghc-mod should be built using Cabal\n\
|
||||
-- \X.XX.X.X while the `cabal' executable in your PATH was built with Cabal\n\
|
||||
-- \Y.YY.Y.Y. This will lead to conflicts when running ghc-mod in any project\n\
|
||||
-- \where you use this `cabal' executable. Please compile ghc-mod using the same\n\
|
||||
-- \Cabal version as your `cabal' executable or recompile cabal-install using\n\
|
||||
-- \this version of the Cabal library.\n\
|
||||
-- \\n\
|
||||
-- \See: https://github.com/kazu-yamamoto/ghc-mod/wiki/InconsistentCabalVersions\n"
|
||||
|
198
SetupCompat.hs
198
SetupCompat.hs
@ -1,198 +0,0 @@
|
||||
{-# LANGUAGE TemplateHaskell, RecordWildCards, StandaloneDeriving #-}
|
||||
module SetupCompat where
|
||||
|
||||
import Control.Arrow
|
||||
import Control.Monad.Trans.State
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
import Data.Functor
|
||||
import Data.Function
|
||||
import Distribution.Simple.LocalBuildInfo
|
||||
import Distribution.PackageDescription
|
||||
|
||||
import Distribution.Simple
|
||||
import Distribution.Simple.Setup
|
||||
import Distribution.Simple.Install
|
||||
|
||||
import qualified Data.Map as M
|
||||
import Data.Map (Map)
|
||||
|
||||
|
||||
import NotCPP.Declarations
|
||||
import Language.Haskell.TH
|
||||
|
||||
-- $(ifdefD "componentsConfigs" [d| deriving instance (Ord ComponentName) |] )
|
||||
|
||||
$(ifD [d|
|
||||
|
||||
showComponentName :: ComponentName -> String
|
||||
showComponentName CLibName = "library"
|
||||
showComponentName (CExeName name) = "executable '" ++ name ++ "'"
|
||||
showComponentName (CTestName name) = "test suite '" ++ name ++ "'"
|
||||
showComponentName (CBenchName name) = "benchmark '" ++ name ++ "'"
|
||||
|
||||
|])
|
||||
|
||||
$(ifelsedefD "componentsConfigs" [d|
|
||||
|
||||
setComponentsConfigs
|
||||
:: LocalBuildInfo
|
||||
-> [(ComponentName, ComponentLocalBuildInfo, [ComponentName])]
|
||||
-> LocalBuildInfo
|
||||
setComponentsConfigs lbi cs = $(recUpdE' (nE "lbi") (mkName "componentsConfigs") (VarE $ mkName "cs"))
|
||||
|
||||
|] [d|
|
||||
|
||||
setComponentsConfigs
|
||||
:: LocalBuildInfo
|
||||
-> [(ComponentName, ComponentLocalBuildInfo, a)]
|
||||
-> LocalBuildInfo
|
||||
setComponentsConfigs lbi cs = flip execState lbi $ mapM setClbis gcs
|
||||
where
|
||||
gcs = groupBy (sameKind `on` fst3) $ sortBy (compare `on` showComponentName . fst3) cs
|
||||
|
||||
fst3 (x,_,_) = x
|
||||
|
||||
sameKind CLibName CLibName = True
|
||||
sameKind CLibName _ = False
|
||||
sameKind (CExeName _) (CExeName _) = True
|
||||
sameKind (CExeName _) _ = False
|
||||
sameKind (CTestName _) (CTestName _) = True
|
||||
sameKind (CTestName _) _ = False
|
||||
sameKind (CBenchName _) (CBenchName _) = True
|
||||
sameKind (CBenchName _) _ = False
|
||||
|
||||
setClbis [(CLibName, clbi, _)] =
|
||||
get >>= \lbi ->
|
||||
put $ $(recUpdE' (nE "lbi") (mkName "libraryConfig") (AppE (ConE (mkName "Just")) (VarE (mkName "clbi"))))
|
||||
|
||||
setClbis cs@((CExeName _, _, _):_) =
|
||||
let cfg = (\((CExeName n), clbi, _) -> (n, clbi)) <$> cs in
|
||||
get >>= \lbi ->
|
||||
put $ $(recUpdE' (nE "lbi") (mkName "executableConfigs") (VarE $ mkName "cfg"))
|
||||
|
||||
setClbis cs@((CTestName _, _, _):_) =
|
||||
let cfg = (\((CTestName n), clbi, _) -> (n, clbi)) <$> cs in
|
||||
get >>= \lbi ->
|
||||
put $ $(recUpdE' (nE "lbi") (mkName "testSuiteConfigs") (VarE $ mkName "cfg"))
|
||||
|
||||
setClbis cs@((CBenchName _, _, _):_) =
|
||||
let cfg = (\((CBenchName n), clbi, _) -> (n, clbi)) <$> cs in
|
||||
get >>= \lbi ->
|
||||
put $ $(recUpdE' (nE "lbi") (mkName "benchmarkConfigs") (VarE $ mkName "cfg"))
|
||||
|
||||
|])
|
||||
|
||||
|
||||
$(ifD [d|
|
||||
|
||||
componentsConfigs ::
|
||||
LocalBuildInfo -> [(ComponentName, ComponentLocalBuildInfo, [ComponentName])]
|
||||
componentsConfigs LocalBuildInfo {..} =
|
||||
(maybe [] (\c -> [(CLibName, c, [])]) $(nE "libraryConfig"))
|
||||
++ ((\(n, clbi) -> (CExeName n, clbi, [])) <$> $(nE "executableConfigs"))
|
||||
++ ((\(n, clbi) -> (CTestName n, clbi, [])) <$> $(nE "testSuiteConfigs"))
|
||||
++ ((\(n, clbi) -> (CBenchName n, clbi, [])) <$> $(nE "benchmarkConfigs"))
|
||||
|
||||
getComponent :: PackageDescription -> ComponentName -> Component
|
||||
getComponent pkg cname =
|
||||
case lookupComponent pkg cname of
|
||||
Just cpnt -> cpnt
|
||||
Nothing -> missingComponent
|
||||
where
|
||||
missingComponent =
|
||||
error $ "internal error: the package description contains no "
|
||||
++ "component corresponding to " ++ show cname
|
||||
|
||||
lookupComponent :: PackageDescription -> ComponentName -> Maybe Component
|
||||
lookupComponent pkg CLibName =
|
||||
fmap CLib $ library pkg
|
||||
lookupComponent pkg (CExeName name) =
|
||||
fmap CExe $ find ((name ==) . exeName) (executables pkg)
|
||||
lookupComponent pkg (CTestName name) =
|
||||
fmap CTest $ find ((name ==) . testName) (testSuites pkg)
|
||||
lookupComponent pkg (CBenchName name) =
|
||||
fmap CBench $ find ((name ==) . benchmarkName) (benchmarks pkg)
|
||||
|
||||
-- We're lying here can't be bothered to order these
|
||||
allComponentsInBuildOrder :: LocalBuildInfo
|
||||
-> [(ComponentName, ComponentLocalBuildInfo)]
|
||||
allComponentsInBuildOrder lbi =
|
||||
[ (cname, clbi) | (cname, clbi, _) <- componentsConfigs lbi ]
|
||||
|
||||
getComponentLocalBuildInfo :: LocalBuildInfo -> ComponentName -> ComponentLocalBuildInfo
|
||||
getComponentLocalBuildInfo lbi cname =
|
||||
case [ clbi
|
||||
| (cname', clbi, _) <- componentsConfigs lbi
|
||||
, cname == cname' ] of
|
||||
[clbi] -> clbi
|
||||
_ -> missingComponent
|
||||
where
|
||||
missingComponent =
|
||||
error $ "internal error: there is no configuration data "
|
||||
++ "for component " ++ show cname
|
||||
|
||||
componentBuildInfo :: Component -> BuildInfo
|
||||
componentBuildInfo =
|
||||
foldComponent libBuildInfo buildInfo testBuildInfo benchmarkBuildInfo
|
||||
|
||||
|])
|
||||
|
||||
|
||||
$(ifelsedefD "componentPackageRenaming" [d|
|
||||
-- M.Map PackageName
|
||||
newtype Deps = Deps { unDeps :: ([(InstalledPackageId, PackageId)], Map PackageName $(cT "ModuleRenaming")) }
|
||||
-- $(return $ TySynD $(mkName "Deps") [] [t| |] )
|
||||
|
||||
noDeps = Deps ([], M.empty)
|
||||
|
||||
getDeps :: ComponentLocalBuildInfo -> Deps
|
||||
getDeps = componentPackageDeps &&& $(nE "componentPackageRenaming") >>> Deps
|
||||
|
||||
setUnionDeps :: Deps -> ComponentLocalBuildInfo -> ComponentLocalBuildInfo
|
||||
setUnionDeps (Deps (deps, rns)) clbi = let
|
||||
clbi' = setComponentPackageRenaming clbi rns
|
||||
cpdeps = componentPackageDeps clbi
|
||||
in
|
||||
clbi' {
|
||||
componentPackageDeps = cpdeps `union` deps
|
||||
}
|
||||
|
||||
setComponentPackageRenaming clbi cprn =
|
||||
-- [| clbi { componentPackageRenaming = componentPackageRenaming clbi `M.union` cprn } |]
|
||||
$(recUpdE'
|
||||
(nE "clbi")
|
||||
(mkName "componentPackageRenaming")
|
||||
(InfixE
|
||||
(Just
|
||||
(AppE
|
||||
(VarE
|
||||
(mkName "componentPackageRenaming"))
|
||||
(VarE (mkName "clbi"))
|
||||
))
|
||||
(VarE (mkName "M.union"))
|
||||
(Just (VarE (mkName "cprn")))
|
||||
)
|
||||
)
|
||||
|
||||
|] [d|
|
||||
|
||||
newtype Deps = Deps { unDeps :: [(InstalledPackageId, PackageId)] }
|
||||
|
||||
noDeps = Deps []
|
||||
|
||||
getDeps :: ComponentLocalBuildInfo -> Deps
|
||||
getDeps lbi = Deps $ componentPackageDeps lbi
|
||||
|
||||
setUnionDeps :: Deps -> ComponentLocalBuildInfo -> ComponentLocalBuildInfo
|
||||
setUnionDeps (Deps deps) clbi = let
|
||||
cpdeps = componentPackageDeps clbi
|
||||
in
|
||||
clbi {
|
||||
componentPackageDeps = cpdeps `union` deps
|
||||
}
|
||||
|
||||
|
||||
-- setComponentPackageRenaming clbi _cprn = clbi
|
||||
|
||||
|])
|
30
bench/Bench.hs
Normal file
30
bench/Bench.hs
Normal file
@ -0,0 +1,30 @@
|
||||
import Criterion.Main
|
||||
import Language.Haskell.GhcMod.Target
|
||||
import Language.Haskell.GhcMod.Monad
|
||||
import Language.Haskell.GhcMod.Types
|
||||
import Dir
|
||||
import System.IO.Temp
|
||||
import System.Process hiding (env)
|
||||
import Control.Monad
|
||||
|
||||
main = defaultMain [
|
||||
env setup $ \dir -> bgroup "simple-cabal" [
|
||||
bench "nop" $ whnfIO (simpleCabalNop dir 1)
|
||||
, bench "nop10" $ whnfIO (simpleCabalNop dir 10)
|
||||
]
|
||||
]
|
||||
|
||||
setup = do
|
||||
tdir <- createTempDirectory "/tmp" "ghc-mod-bench"
|
||||
system $ "cp -rv \"bench/data/simple-cabal/\" \""++ tdir ++"\""
|
||||
|
||||
simpleCabalNop tdir 1 -- warmup dist/
|
||||
|
||||
return tdir
|
||||
|
||||
simpleCabalNop :: FilePath -> Int -> IO ()
|
||||
simpleCabalNop dir n = withDirectory_ (dir </> "simple-cabal") $ do
|
||||
_ <- runGhcModT defaultOptions $
|
||||
forM_ [1..n] $ \_ -> do
|
||||
runGmlT [Left "Main.hs"] (return ())
|
||||
return ()
|
4
bench/data/simple-cabal/Main.hs
Normal file
4
bench/data/simple-cabal/Main.hs
Normal file
@ -0,0 +1,4 @@
|
||||
module Main where
|
||||
|
||||
main :: IO ()
|
||||
main = putStrLn "Hello, Haskell!"
|
2
bench/data/simple-cabal/Setup.hs
Normal file
2
bench/data/simple-cabal/Setup.hs
Normal file
@ -0,0 +1,2 @@
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
13
bench/data/simple-cabal/simple-cabal.cabal
Normal file
13
bench/data/simple-cabal/simple-cabal.cabal
Normal file
@ -0,0 +1,13 @@
|
||||
name: simple-cabal
|
||||
version: 0.1.0.0
|
||||
license: BSD3
|
||||
license-file: LICENSE
|
||||
author: Daniel Gröber
|
||||
maintainer: dxld@darkboxed.org
|
||||
build-type: Simple
|
||||
cabal-version: >=1.10
|
||||
|
||||
executable simple-cabal
|
||||
main-is: Main.hs
|
||||
build-depends: base
|
||||
default-language: Haskell2010
|
@ -1,3 +0,0 @@
|
||||
-- do not build sub-packages when using features from
|
||||
-- http://blog.ezyang.com/2016/05/announcing-cabal-new-build-nix-style-local-builds/
|
||||
packages: .
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
@ -16,15 +16,13 @@
|
||||
|
||||
{-# LANGUAGE CPP #-}
|
||||
module Language.Haskell.GhcMod.CabalHelper
|
||||
#ifndef SPEC
|
||||
( getComponents
|
||||
, getGhcMergedPkgOptions
|
||||
, getCabalPackageDbStack
|
||||
, prepareCabalHelper
|
||||
, withAutogen
|
||||
)
|
||||
#endif
|
||||
where
|
||||
, withCabal
|
||||
) where
|
||||
|
||||
import Control.Applicative
|
||||
import Control.Monad
|
||||
@ -208,7 +206,7 @@ withCabal action = do
|
||||
-- "--flag PACKAGE:[-]FLAG Override flags set in stack.yaml
|
||||
-- (applies to local packages and extra-deps)"
|
||||
|
||||
stackReconfigure crdl (optPrograms opts)
|
||||
stackReconfigure (optStackBuildDeps opts) crdl (optPrograms opts)
|
||||
_ ->
|
||||
error $ "withCabal: unsupported project type: " ++ show proj
|
||||
|
||||
@ -234,12 +232,13 @@ withCabal action = do
|
||||
flagOpt = ["--flags", unwords $ map toFlag flgs]
|
||||
|
||||
liftIO $ void $ readProc (T.cabalProgram progs) ("configure":progOpts) ""
|
||||
stackReconfigure crdl progs = do
|
||||
stackReconfigure deps crdl progs = do
|
||||
withDirectory_ (cradleRootDir crdl) $ do
|
||||
supported <- haveStackSupport
|
||||
if supported
|
||||
then do
|
||||
spawn [T.stackProgram progs, "build", "--only-dependencies", "."]
|
||||
when deps $
|
||||
spawn [T.stackProgram progs, "build", "--only-dependencies", "."]
|
||||
spawn [T.stackProgram progs, "build", "--only-configure", "."]
|
||||
else
|
||||
gmLog GmWarning "" $ strDoc $ "Stack project configuration is out of date, please reconfigure manually using 'stack build' as your stack version is too old (need at least 0.1.4.0)"
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
@ -1,15 +1,14 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
module Language.Haskell.GhcMod.Cradle
|
||||
#ifndef SPEC
|
||||
(
|
||||
findCradle
|
||||
( findCradle
|
||||
, findCradle'
|
||||
, findCradleNoLog
|
||||
, findSpecCradle
|
||||
, cleanupCradle
|
||||
)
|
||||
#endif
|
||||
where
|
||||
|
||||
-- * for @spec@
|
||||
, plainCradle
|
||||
) where
|
||||
|
||||
import Language.Haskell.GhcMod.PathsAndFiles
|
||||
import Language.Haskell.GhcMod.Monad.Types
|
||||
@ -101,7 +100,7 @@ cabalCradle cabalProg wdir = do
|
||||
stackCradle ::
|
||||
(IOish m, GmLog m, GmOut m) => FilePath -> FilePath -> MaybeT m Cradle
|
||||
stackCradle stackProg wdir = do
|
||||
#if !MIN_VERSION_ghc(7,8,0)
|
||||
#if __GLASGOW_HASKELL__ < 708
|
||||
-- GHC < 7.8 is not supported by stack
|
||||
mzero
|
||||
#endif
|
||||
@ -126,7 +125,7 @@ stackCradle stackProg wdir = do
|
||||
mzero
|
||||
|
||||
(True, True) -> do
|
||||
gmLog GmWarning "" $ text "STACK_EXE set, preferring Stack project"
|
||||
gmLog GmInfo "" $ text "STACK_EXE set, preferring Stack project"
|
||||
|
||||
(True, False) | setupCfgExists -> do
|
||||
gmLog GmWarning "" $ text "'dist/setup-config' exists, ignoring Stack project"
|
||||
@ -134,7 +133,7 @@ stackCradle stackProg wdir = do
|
||||
|
||||
(True, False) -> return ()
|
||||
|
||||
senv <- MaybeT $ getStackEnv cabalDir
|
||||
senv <- MaybeT $ getStackEnv cabalDir stackProg
|
||||
|
||||
gmLog GmInfo "" $ text "Using Stack project at" <+>: text cabalDir
|
||||
return Cradle {
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
144
core/Language/Haskell/GhcMod/DynFlagsTH.hs
Normal file
144
core/Language/Haskell/GhcMod/DynFlagsTH.hs
Normal file
@ -0,0 +1,144 @@
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU Affero General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU Affero General Public License for more details.
|
||||
--
|
||||
-- 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, TemplateHaskell #-}
|
||||
module Language.Haskell.GhcMod.DynFlagsTH where
|
||||
|
||||
import Language.Haskell.TH
|
||||
import Language.Haskell.TH.Syntax
|
||||
import Control.Applicative
|
||||
import Data.Maybe
|
||||
import Data.Generics.Aliases
|
||||
import Data.Generics.Schemes
|
||||
import DynFlags
|
||||
import Prelude
|
||||
|
||||
deriveEqDynFlags :: Q [Dec] -> Q [Dec]
|
||||
deriveEqDynFlags qds = do
|
||||
#if __GLASGOW_HASKELL__ <= 710
|
||||
~(TyConI (DataD [] _ [] [ctor] _ ))
|
||||
#else
|
||||
~(TyConI (DataD [] _ [] _ [ctor] _ ))
|
||||
#endif
|
||||
<- reify ''DynFlags
|
||||
let ~(RecC _ fs) = ctor
|
||||
|
||||
a <- newName "a"
|
||||
b <- newName "b"
|
||||
|
||||
e <- AppE (VarE 'and) . ListE <$> sequence (catMaybes $ map (eq a b) fs)
|
||||
|
||||
tysig@(SigD n _) :_ <- qds
|
||||
|
||||
return $ [tysig, FunD n [Clause [VarP a, VarP b] (NormalB e) []]]
|
||||
|
||||
where
|
||||
eq :: Name -> Name -> (Name, Strict, Type) -> Maybe (Q Exp)
|
||||
eq a b (fun@(Name (OccName fon) _), _, ft)
|
||||
| not (isUneqable || isIgnored) = Just expr
|
||||
| otherwise = Nothing
|
||||
where
|
||||
isUneqable = everything (||) (mkQ False hasUnEqable) ft
|
||||
|
||||
hasUnEqable (AppT (ConT (Name (OccName on) _)) _)
|
||||
| any (==on) ignoredConstructorNames = True
|
||||
hasUnEqable (ConT (Name (OccName on) _))
|
||||
| any (==on) ignoredTypeNames = True
|
||||
| any (==on) ignoredTypeOccNames = True
|
||||
hasUnEqable _ = False
|
||||
|
||||
isIgnored = fon `elem` ignoredNames
|
||||
|
||||
ignoredConstructorNames = [ "IORef" ]
|
||||
|
||||
ignoredNames = [ "pkgDatabase" -- 7.8
|
||||
#if __GLASGOW_HASKELL__ <= 706
|
||||
, "ways" -- 'Ways' is not exported :/
|
||||
#endif
|
||||
]
|
||||
ignoredTypeNames =
|
||||
[ "LogAction"
|
||||
, "PackageState"
|
||||
, "Hooks"
|
||||
, "FlushOut"
|
||||
, "FlushErr"
|
||||
, "Settings" -- I think these can't cange at runtime
|
||||
]
|
||||
ignoredTypeOccNames = [ "OnOff" ]
|
||||
|
||||
fa = AppE (VarE fun) (VarE a)
|
||||
fb = AppE (VarE fun) (VarE b)
|
||||
expr =
|
||||
case fon of
|
||||
"rtsOptsEnabled" -> do
|
||||
let eqfn = [| let fn RtsOptsNone RtsOptsNone = True
|
||||
fn RtsOptsSafeOnly RtsOptsSafeOnly = True
|
||||
fn RtsOptsAll RtsOptsAll = True
|
||||
fn _ _ = False
|
||||
in fn
|
||||
|]
|
||||
[e| $(eqfn) $(return fa) $(return fb) |]
|
||||
|
||||
"extraPkgConfs" -> do
|
||||
let eqfn = [| let fn a' b' = and (zipWith eqpr (a' []) (b' []))
|
||||
&& length (a' []) == length (b' [])
|
||||
eqpr GlobalPkgConf GlobalPkgConf = True
|
||||
eqpr UserPkgConf UserPkgConf = True
|
||||
eqpr (PkgConfFile pa) (PkgConfFile pb) = pa == pb
|
||||
eqpr _ _ = False
|
||||
in fn
|
||||
|]
|
||||
[e| $(eqfn) $(return fa) $(return fb) |]
|
||||
|
||||
#if __GLASGOW_HASKELL__ >= 710 && __GLASGOW_HASKELL__ < 800
|
||||
"sigOf" -> do
|
||||
let eqfn = [| let fn NotSigOf NotSigOf = True
|
||||
fn (SigOf a') (SigOf b') = a' == b'
|
||||
fn (SigOfMap a') (SigOfMap b') = a' == b'
|
||||
fn _ _ = False
|
||||
in fn
|
||||
|]
|
||||
[e| $(eqfn) $(return fa) $(return fb) |]
|
||||
#endif
|
||||
|
||||
#if __GLASGOW_HASKELL <= 706
|
||||
"profAuto" -> do
|
||||
let eqfn = [| let fn NoProfAuto NoProfAuto = True
|
||||
fn ProfAutoAll ProfAutoAll = True
|
||||
fn ProfAutoTop ProfAutoTop = True
|
||||
fn ProfAutoExports ProfAutoExports = True
|
||||
fn ProfAutoCalls ProfAutoCalls = True
|
||||
fn _ _ = False
|
||||
in fn
|
||||
|]
|
||||
[e| $(eqfn) $(return fa) $(return fb) |]
|
||||
#endif
|
||||
|
||||
#if __GLASGOW_HASKELL__ >= 706
|
||||
"language" -> do
|
||||
let eqfn = [| let fn (Just Haskell98) (Just Haskell98) = True
|
||||
fn (Just Haskell2010) (Just Haskell2010) = True
|
||||
fn Nothing Nothing = True
|
||||
fn _ _ = False
|
||||
in fn
|
||||
|]
|
||||
[e| $(eqfn) $(return fa) $(return fb) |]
|
||||
#endif
|
||||
|
||||
_ ->
|
||||
[e| $(return fa) == $(return fb) |]
|
||||
|
||||
-- expr' = [e| trace (if $(expr) == True then "" else show ($(litE $ StringL fon), $(expr))) $(expr) |]
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
@ -39,11 +39,11 @@ import qualified Data.Set as Set
|
||||
import Data.List
|
||||
import Data.Version
|
||||
import System.Process (showCommandForUser)
|
||||
import Text.PrettyPrint
|
||||
import Text.Printf
|
||||
|
||||
import Exception
|
||||
import Panic
|
||||
import Pretty
|
||||
import Config (cProjectVersion, cHostPlatformString)
|
||||
import Paths_ghc_mod (version)
|
||||
|
@ -31,6 +31,7 @@ module Language.Haskell.GhcMod.Gap (
|
||||
, occNameForUser
|
||||
, deSugar
|
||||
, showDocWith
|
||||
, renderGm
|
||||
, GapThing(..)
|
||||
, fromTyThing
|
||||
, fileModSummary
|
||||
@ -47,6 +48,7 @@ module Language.Haskell.GhcMod.Gap (
|
||||
, parseModuleHeader
|
||||
, mkErrStyle'
|
||||
, everythingStagedWithContext
|
||||
, withCleanupSession
|
||||
) where
|
||||
|
||||
import Control.Applicative hiding (empty)
|
||||
@ -56,7 +58,7 @@ import Data.List (intersperse)
|
||||
import Data.Maybe (catMaybes)
|
||||
import Data.Time.Clock (UTCTime)
|
||||
import Data.Traversable hiding (mapM)
|
||||
import DataCon (dataConRepType)
|
||||
import DataCon (dataConUserType)
|
||||
import Desugar (deSugarExpr)
|
||||
import DynFlags
|
||||
import ErrUtils
|
||||
@ -72,6 +74,10 @@ import StringBuffer
|
||||
import TcType
|
||||
import Var (varType)
|
||||
import System.Directory
|
||||
import SysTools
|
||||
#if __GLASGOW_HASKELL__ >= 800
|
||||
import GHCi (stopIServ)
|
||||
#endif
|
||||
|
||||
import qualified Name
|
||||
import qualified InstEnv
|
||||
@ -90,7 +96,19 @@ import PatSyn
|
||||
import TcRnTypes
|
||||
#endif
|
||||
|
||||
#if __GLASGOW_HASKELL__ >= 706
|
||||
-- GHC 7.8 doesn't define this macro, nor does GHC 7.10.0
|
||||
-- It IS defined from 7.10.1 and up though.
|
||||
-- So we can only test for 7.10.1.0 and up with it.
|
||||
#if __GLASGOW_HASKELL__ < 710
|
||||
#ifndef MIN_VERSION_GLASGOW_HASKELL
|
||||
#define MIN_VERSION_GLASGOW_HASKELL(a,b,c,d) FALSE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if MIN_VERSION_GLASGOW_HASKELL(8,0,1,20161117)
|
||||
import GHC hiding (ClsInst, withCleanupSession)
|
||||
import qualified GHC (withCleanupSession)
|
||||
#elif __GLASGOW_HASKELL__ >= 706
|
||||
import GHC hiding (ClsInst)
|
||||
#else
|
||||
import GHC hiding (Instance)
|
||||
@ -183,6 +201,23 @@ showDocWith dflags mode = Pretty.showDoc mode (pprCols dflags)
|
||||
showDocWith _ = Pretty.showDocWith
|
||||
#endif
|
||||
|
||||
renderGm :: Pretty.Doc -> String
|
||||
#if __GLASGOW_HASKELL__ >= 800
|
||||
renderGm = Pretty.fullRender Pretty.PageMode 80 1.2 string_txt ""
|
||||
#else
|
||||
renderGm = Pretty.fullRender Pretty.PageMode 80 1.2 string_txt ""
|
||||
#endif
|
||||
where
|
||||
string_txt :: Pretty.TextDetails -> String -> String
|
||||
string_txt (Pretty.Chr c) s = c:s
|
||||
string_txt (Pretty.Str s1) s2 = s1 ++ s2
|
||||
string_txt (Pretty.PStr s1) s2 = unpackFS s1 ++ s2
|
||||
string_txt (Pretty.LStr s1 _) s2 = unpackLitString s1 ++ s2
|
||||
#if __GLASGOW_HASKELL__ >= 708
|
||||
string_txt (Pretty.ZStr s1) s2 = zString s1 ++ s2
|
||||
#endif
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
----------------------------------------------------------------
|
||||
|
||||
@ -498,14 +533,14 @@ data GapThing = GtA Type
|
||||
fromTyThing :: TyThing -> GapThing
|
||||
fromTyThing (AnId i) = GtA $ varType i
|
||||
#if __GLASGOW_HASKELL__ >= 708
|
||||
fromTyThing (AConLike (RealDataCon d)) = GtA $ dataConRepType d
|
||||
fromTyThing (AConLike (RealDataCon d)) = GtA $ dataConUserType d
|
||||
#if __GLASGOW_HASKELL__ >= 800
|
||||
fromTyThing (AConLike (PatSynCon p)) = GtPatSyn p
|
||||
#else
|
||||
fromTyThing (AConLike (PatSynCon p)) = GtA $ patSynType p
|
||||
#endif
|
||||
#else
|
||||
fromTyThing (ADataCon d) = GtA $ dataConRepType d
|
||||
fromTyThing (ADataCon d) = GtA $ dataConUserType d
|
||||
#endif
|
||||
fromTyThing (ATyCon t) = GtT t
|
||||
fromTyThing _ = GtN
|
||||
@ -665,3 +700,24 @@ everythingStagedWithContext stage s0 f z q x
|
||||
#endif
|
||||
fixity = const (stage<Renamer) :: GHC.Fixity -> Bool
|
||||
(r, s') = q x s0
|
||||
|
||||
withCleanupSession :: GhcMonad m => m a -> m a
|
||||
#if __GLASGOW_HASKELL__ >= 800
|
||||
#if MIN_VERSION_GLASGOW_HASKELL(8,0,1,20161117)
|
||||
withCleanupSession = GHC.withCleanupSession
|
||||
#else
|
||||
withCleanupSession ghc = ghc `gfinally` cleanup
|
||||
where
|
||||
cleanup = do
|
||||
hsc_env <- getSession
|
||||
let dflags = hsc_dflags hsc_env
|
||||
liftIO $ do
|
||||
cleanTempFiles dflags
|
||||
cleanTempDirs dflags
|
||||
stopIServ hsc_env
|
||||
#endif
|
||||
#else
|
||||
withCleanupSession action = do
|
||||
df <- getSessionDynFlags
|
||||
GHC.defaultCleanupHandler df action
|
||||
#endif
|
@ -86,7 +86,7 @@ getPackageDbStack = do
|
||||
CabalProject ->
|
||||
getCabalPackageDbStack
|
||||
(StackProject StackEnv {..}) ->
|
||||
return $ map PackageDb [seSnapshotPkgDb, seLocalPkgDb]
|
||||
return $ [GlobalDb, PackageDb seSnapshotPkgDb, PackageDb seLocalPkgDb]
|
||||
return $ fromMaybe stack mCusPkgStack
|
||||
|
||||
getPackageCachePaths :: IOish m => FilePath -> GhcModT m [FilePath]
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
@ -39,6 +39,7 @@ import Exception
|
||||
import Finder
|
||||
import GHC
|
||||
import HscTypes
|
||||
import Pretty
|
||||
|
||||
import Control.Arrow ((&&&))
|
||||
import Control.Applicative
|
||||
@ -223,7 +224,7 @@ updateHomeModuleGraph' env smp0 = do
|
||||
Left errs -> do
|
||||
-- TODO: Remember these and present them as proper errors if this is
|
||||
-- the file the user is looking at.
|
||||
gmLog GmWarning ("preprocess " ++ show fn) $ Monoid.mempty $+$ (vcat $ map text errs)
|
||||
gmLog GmWarning ("preprocess " ++ show fn) $ Pretty.empty $+$ (vcat $ map text errs)
|
||||
return Nothing
|
||||
|
||||
|
60
core/Language/Haskell/GhcMod/LightGhc.hs
Normal file
60
core/Language/Haskell/GhcMod/LightGhc.hs
Normal file
@ -0,0 +1,60 @@
|
||||
module Language.Haskell.GhcMod.LightGhc where
|
||||
|
||||
import Control.Monad
|
||||
import Control.Monad.Reader (runReaderT)
|
||||
import Data.IORef
|
||||
|
||||
import GHC
|
||||
import GHC.Paths (libdir)
|
||||
import StaticFlags
|
||||
import SysTools
|
||||
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
|
||||
|
||||
-- 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.
|
||||
newLightEnv :: IOish m => (DynFlags -> LightGhc DynFlags) -> m HscEnv
|
||||
newLightEnv mdf = do
|
||||
df <- liftIO $ do
|
||||
initStaticOpts
|
||||
settings <- initSysTools (Just libdir)
|
||||
initDynFlags $ defaultDynFlags settings
|
||||
|
||||
hsc_env <- liftIO $ newHscEnv df
|
||||
df' <- runLightGhc hsc_env $ mdf df
|
||||
return $ hsc_env {
|
||||
hsc_dflags = df',
|
||||
hsc_IC = (hsc_IC hsc_env) { ic_dflags = df' }
|
||||
}
|
||||
|
||||
teardownLightEnv :: MonadIO m => HscEnv -> m ()
|
||||
teardownLightEnv env = runLightGhc env $ do
|
||||
Gap.withCleanupSession $ return ()
|
||||
|
||||
withLightHscEnv'
|
||||
:: IOish m => (DynFlags -> LightGhc DynFlags) -> (HscEnv -> m a) -> m a
|
||||
withLightHscEnv' mdf action = gbracket (newLightEnv mdf) teardownLightEnv action
|
||||
|
||||
withLightHscEnv :: IOish m => [GHCOption] -> (HscEnv -> m a) -> m a
|
||||
withLightHscEnv opts = withLightHscEnv' (f <=< liftIO . newHscEnv)
|
||||
where
|
||||
f env = runLightGhc env $ do
|
||||
-- HomeModuleGraph and probably all other clients get into all sorts of
|
||||
-- trouble if the package state isn't initialized here
|
||||
_ <- setSessionDynFlags =<< addCmdOpts opts =<< getSessionDynFlags
|
||||
getSessionDynFlags
|
||||
|
||||
runLightGhc :: MonadIO m => HscEnv -> LightGhc a -> m a
|
||||
runLightGhc env action = liftIO $ do
|
||||
renv <- newIORef env
|
||||
flip runReaderT renv $ unLightGhc action
|
||||
|
||||
runLightGhc' :: MonadIO m => IORef HscEnv -> LightGhc a -> m a
|
||||
runLightGhc' renv action = liftIO $ do
|
||||
flip runReaderT renv $ unLightGhc action
|
@ -17,7 +17,6 @@ import Data.Function
|
||||
import Control.Monad.Reader (Reader, ask, runReader)
|
||||
import Data.IORef (IORef, newIORef, readIORef, writeIORef, modifyIORef)
|
||||
import System.FilePath (normalise)
|
||||
import Text.PrettyPrint
|
||||
|
||||
import ErrUtils
|
||||
import GHC
|
||||
@ -33,6 +32,7 @@ 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 Prelude
|
||||
@ -99,7 +99,7 @@ withLogger' env action = do
|
||||
let setLogger df = Gap.setLogAction df $ appendLogRef rfm df logref
|
||||
handlers = [
|
||||
GHandler $ \ex -> return $ Left $ runReader (sourceError ex) gpe,
|
||||
GHandler $ \ex -> return $ Left [render $ ghcExceptionDoc ex]
|
||||
GHandler $ \ex -> return $ Left [renderGm $ ghcExceptionDoc ex]
|
||||
]
|
||||
gpe = GmPprEnv {
|
||||
gpeDynFlags = hsc_dflags env
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
@ -20,8 +20,8 @@ module Language.Haskell.GhcMod.Logging (
|
||||
module Language.Haskell.GhcMod.Logging
|
||||
, module Language.Haskell.GhcMod.Pretty
|
||||
, GmLogLevel(..)
|
||||
, module Text.PrettyPrint
|
||||
, module Data.Monoid
|
||||
, module Pretty
|
||||
) where
|
||||
|
||||
import Control.Applicative hiding (empty)
|
||||
@ -33,9 +33,10 @@ import Data.Monoid
|
||||
import Data.Maybe
|
||||
import System.IO
|
||||
import System.FilePath
|
||||
import Text.PrettyPrint hiding (style, (<>))
|
||||
import Prelude
|
||||
|
||||
import Pretty hiding (style, (<>))
|
||||
|
||||
import Language.Haskell.GhcMod.Monad.Types
|
||||
import Language.Haskell.GhcMod.Types
|
||||
import Language.Haskell.GhcMod.Pretty
|
||||
@ -77,7 +78,7 @@ gmLog level loc' doc = do
|
||||
let loc | loc' == "" = empty
|
||||
| otherwise = text loc' <+>: empty
|
||||
msgDoc = sep [loc, doc]
|
||||
msg = dropWhileEnd isSpace $ gmRenderDoc $ gmLogLevelDoc level <+>: msgDoc
|
||||
msg = dropWhileEnd isSpace $ renderGm $ gmLogLevelDoc level <+>: msgDoc
|
||||
|
||||
when (level <= level') $ gmErrStrLn msg
|
||||
gmLogQuiet level loc' doc
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015,2016 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015,2016 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015,2016 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
@ -48,12 +48,12 @@ type GhcModT m = GmT (GmOutT m)
|
||||
newtype GmOutT m a = GmOutT {
|
||||
unGmOutT :: ReaderT GhcModOut m a
|
||||
} deriving ( Functor
|
||||
, Applicative
|
||||
, Alternative
|
||||
, Monad
|
||||
, MonadPlus
|
||||
, MonadTrans
|
||||
)
|
||||
, Applicative
|
||||
, Alternative
|
||||
, Monad
|
||||
, MonadPlus
|
||||
, MonadTrans
|
||||
)
|
||||
|
||||
newtype GmT m a = GmT {
|
||||
unGmT :: StateT GhcModState
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015,2016 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015,2016 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015,2016 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Nikolay Yakimov <root@livid.pp.ru>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Nikolay Yakimov <root@livid.pp.ru>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Nikolay Yakimov <root@livid.pp.ru>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
@ -146,6 +146,10 @@ globalArgSpec = Options
|
||||
<=> value "UTF-8"
|
||||
<=> showDefault
|
||||
<=> help "I/O encoding"
|
||||
<*> switch
|
||||
$$ long "stack-build-deps"
|
||||
<=> showDefault
|
||||
<=> help "Build dependencies if needed when using stack"
|
||||
where
|
||||
fileMappingSpec =
|
||||
getFileMapping . splitOn '=' <$> strOption
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
@ -24,6 +24,7 @@ import Control.Arrow (second)
|
||||
import Control.Applicative
|
||||
import Control.Exception as E
|
||||
import Control.Monad
|
||||
import Control.Monad.Trans.Maybe
|
||||
import Data.List
|
||||
import Data.Char
|
||||
import Data.Maybe
|
||||
@ -45,45 +46,41 @@ type DirPath = FilePath
|
||||
-- | Guaranteed to be the name of a file only (no slashes).
|
||||
type FileName = String
|
||||
|
||||
newtype UnString = UnString { unString :: String }
|
||||
|
||||
instance Show UnString where
|
||||
show = unString
|
||||
|
||||
instance Read UnString where
|
||||
readsPrec _ = \str -> [(UnString str, "")]
|
||||
|
||||
-- | @findCabalFiles dir@. Searches for a @.cabal@ files in @dir@'s parent
|
||||
-- directories. The first parent directory containing more than one cabal file
|
||||
-- is assumed to be the project directory. If only one cabal file exists in this
|
||||
-- directory it is returned otherwise @findCabalFiles@ throws 'GMENoCabalFile'
|
||||
-- or 'GMETooManyCabalFiles'
|
||||
findCabalFile :: FilePath -> IO (Maybe FilePath)
|
||||
findCabalFile dir = do
|
||||
-- List of directories and all cabal file candidates
|
||||
dcs <- findFileInParentsP isCabalFile dir :: IO ([(DirPath, [FileName])])
|
||||
let css = uncurry appendDir `map` dcs :: [[FilePath]]
|
||||
case find (not . null) css of
|
||||
Nothing -> return Nothing
|
||||
Just cfs@(_:_:_) -> throw $ GMETooManyCabalFiles cfs
|
||||
Just (a:_) -> return (Just a)
|
||||
Just [] -> error "findCabalFile"
|
||||
where
|
||||
appendDir :: DirPath -> [FileName] -> [FilePath]
|
||||
appendDir d fs = (d </>) `map` fs
|
||||
findCabalFile dir = findFileInParentsP isCabalFile pick dir
|
||||
where
|
||||
pick [] = Nothing
|
||||
pick [cf] = Just cf
|
||||
pick cfs = throw $ GMETooManyCabalFiles cfs
|
||||
|
||||
findStackConfigFile :: FilePath -> IO (Maybe FilePath)
|
||||
findStackConfigFile dir = do
|
||||
fs <- map (second listToMaybe) <$> findFileInParentsP (=="stack.yaml") dir
|
||||
case find (isJust . snd) fs of
|
||||
Nothing -> return Nothing
|
||||
Just (d, Just a) -> return $ Just $ d </> a
|
||||
Just (_, Nothing) -> error "findStackConfigFile"
|
||||
findStackConfigFile dir =
|
||||
findFileInParentsP (=="stack.yaml") pick dir
|
||||
where
|
||||
pick [] = Nothing
|
||||
pick (sf:_) = Just sf
|
||||
|
||||
findCabalSandboxDir :: FilePath -> IO (Maybe FilePath)
|
||||
findCabalSandboxDir dir =
|
||||
fmap takeDirectory <$> findFileInParentsP isSandboxConfig pick dir
|
||||
where
|
||||
isSandboxConfig = (==sandboxConfigFileName)
|
||||
pick [] = Nothing
|
||||
pick (sc:_) = Just sc
|
||||
|
||||
findCustomPackageDbFile :: FilePath -> IO (Maybe FilePath)
|
||||
findCustomPackageDbFile dir =
|
||||
mightExist $ dir </> "ghc-mod.package-db-stack"
|
||||
|
||||
-- | Get path to sandbox config file
|
||||
getSandboxDb :: Cradle -> IO (Maybe GhcPkgDb)
|
||||
getSandboxDb crdl = do
|
||||
mConf <-traverse readFile =<< mightExist (sandboxConfigFile crdl)
|
||||
mConf <- traverse readFile =<< mightExist (sandboxConfigFile crdl)
|
||||
bp <- buildPlatform readProcess
|
||||
return $ PackageDb . fixPkgDbVer bp <$> (extractSandboxDbDir =<< mConf)
|
||||
|
||||
@ -129,32 +126,35 @@ takeExtension' p =
|
||||
then "" -- just ".cabal" is not a valid cabal file
|
||||
else takeExtension p
|
||||
|
||||
-- | @findFileInParentsP p dir@ Look for files satisfying @p@ in @dir@ and all
|
||||
-- | @findFileInParentsP p r dir@ Look for files satisfying @p@ in @dir@ and all
|
||||
-- it's parent directories. Files found to satisfy @p@ in a given directory are
|
||||
-- passed to @r@ and if this yields a 'Just' value the search finishes early
|
||||
-- without examinig any more directories and this value is returned.
|
||||
findFileInParentsP :: (FilePath -> Bool)
|
||||
-> ([FilePath] -> Maybe a)
|
||||
-> FilePath
|
||||
-> IO (Maybe a)
|
||||
findFileInParentsP p r dir = runMaybeT $
|
||||
join $ msum <$> map (MaybeT . fmap r) <$> liftIO (findFilesInParentsP p dir)
|
||||
|
||||
-- | @findFilesInParentsP p dir@ Look for files satisfying @p@ in @dir@ and all
|
||||
-- it's parent directories.
|
||||
findFileInParentsP :: (FilePath -> Bool) -> FilePath
|
||||
-> IO [(DirPath, [FileName])]
|
||||
findFileInParentsP p dir' = U.makeAbsolute' dir' >>= \dir ->
|
||||
getFilesP p `zipMapM` parents dir
|
||||
findFilesInParentsP :: (FilePath -> Bool) -> FilePath
|
||||
-> IO [IO [FilePath]]
|
||||
findFilesInParentsP p dir' = U.makeAbsolute' dir' >>= \dir -> return $
|
||||
map (\d -> (map (d </>)) <$> getFilesP p d) $ parents dir
|
||||
|
||||
-- | @getFilesP p dir@. Find all __files__ satisfying @p@ in @.cabal@ in @dir@.
|
||||
getFilesP :: (FilePath -> Bool) -> DirPath -> IO [FileName]
|
||||
getFilesP p dir = filterM p' =<< getDirectoryContents dir
|
||||
getFilesP p dir = filterM p' =<< getDirectoryContentsSafe
|
||||
where
|
||||
p' fn = do
|
||||
(p fn && ) <$> doesFileExist (dir </> fn)
|
||||
|
||||
findCabalSandboxDir :: FilePath -> IO (Maybe FilePath)
|
||||
findCabalSandboxDir dir = do
|
||||
dss <- findFileInParentsP isSandboxConfig dir
|
||||
return $ case find (not . null . snd) $ dss of
|
||||
Just (sbDir, _:_) -> Just sbDir
|
||||
_ -> Nothing
|
||||
|
||||
where
|
||||
isSandboxConfig = (==sandboxConfigFileName)
|
||||
|
||||
zipMapM :: Monad m => (a -> m c) -> [a] -> m [(a,c)]
|
||||
zipMapM f as = mapM (\a -> liftM ((,) a) $ f a) as
|
||||
getDirectoryContentsSafe = do
|
||||
rdable <- readable <$> getPermissions dir
|
||||
if rdable
|
||||
then getDirectoryContents dir
|
||||
else return []
|
||||
|
||||
-- | @parents dir@. Returns all parent directories of @dir@ including @dir@.
|
||||
--
|
||||
@ -240,11 +240,3 @@ mergedPkgOptsCacheFile dist =
|
||||
pkgDbStackCacheFile :: FilePath -> FilePath
|
||||
pkgDbStackCacheFile dist =
|
||||
setupConfigPath dist <.> "ghc-mod.package-db-stack"
|
||||
|
||||
-- | @findCustomPackageDbFile dir@. Searches for a @ghc-mod.package-db-stack@ file in @dir@.
|
||||
-- If it exists in the given directory it is returned otherwise @findCradleFile@
|
||||
-- returns @Nothing@
|
||||
findCustomPackageDbFile :: FilePath -> IO (Maybe FilePath)
|
||||
findCustomPackageDbFile directory = do
|
||||
let path = directory </> "ghc-mod.package-db-stack"
|
||||
mightExist path
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
@ -14,21 +14,36 @@
|
||||
-- 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 where
|
||||
module Language.Haskell.GhcMod.Pretty
|
||||
( renderGm
|
||||
, renderSDoc
|
||||
, gmComponentNameDoc
|
||||
, gmLogLevelDoc
|
||||
, (<+>:)
|
||||
, fnDoc
|
||||
, showToDoc
|
||||
, warnDoc
|
||||
, strLnDoc
|
||||
, strDoc
|
||||
) where
|
||||
|
||||
import Control.Arrow hiding ((<+>))
|
||||
import Data.Char
|
||||
import Data.List
|
||||
import Distribution.Helper
|
||||
import Text.PrettyPrint
|
||||
import Pretty
|
||||
import GHC
|
||||
import Outputable (SDoc, withPprStyleDoc)
|
||||
|
||||
import Language.Haskell.GhcMod.Types
|
||||
import Language.Haskell.GhcMod.Doc
|
||||
import Language.Haskell.GhcMod.Gap (renderGm)
|
||||
|
||||
docStyle :: Style
|
||||
docStyle = style { ribbonsPerLine = 1.2 }
|
||||
|
||||
gmRenderDoc :: Doc -> String
|
||||
gmRenderDoc = renderStyle docStyle
|
||||
renderSDoc :: GhcMonad m => SDoc -> m Doc
|
||||
renderSDoc sdoc = do
|
||||
df <- getSessionDynFlags
|
||||
ppsty <- getStyle
|
||||
return $ withPprStyleDoc df ppsty sdoc
|
||||
|
||||
gmComponentNameDoc :: ChComponentName -> Doc
|
||||
gmComponentNameDoc ChSetupHsName = text $ "Setup.hs"
|
||||
@ -55,8 +70,8 @@ a <+>: b = (a <> colon) <+> b
|
||||
fnDoc :: FilePath -> Doc
|
||||
fnDoc = doubleQuotes . text
|
||||
|
||||
showDoc :: Show a => a -> Doc
|
||||
showDoc = strLnDoc . show
|
||||
showToDoc :: Show a => a -> Doc
|
||||
showToDoc = strLnDoc . show
|
||||
|
||||
warnDoc :: Doc -> Doc
|
||||
warnDoc d = text "Warning" <+>: d
|
@ -16,11 +16,7 @@ import qualified Var as G
|
||||
import qualified Type as G
|
||||
import GHC.SYB.Utils
|
||||
import GhcMonad
|
||||
#if MIN_VERSION_haskell_src_exts(1,18,0)
|
||||
import qualified Language.Haskell.Exts as HE
|
||||
#else
|
||||
import qualified Language.Haskell.Exts.Annotated as HE
|
||||
#endif
|
||||
import Language.Haskell.GhcMod.Doc
|
||||
import Language.Haskell.GhcMod.Gap
|
||||
import qualified Language.Haskell.GhcMod.Gap as Gap
|
||||
@ -179,11 +175,7 @@ fourIntsHE loc = ( HE.srcSpanStartLine loc, HE.srcSpanStartColumn loc
|
||||
typeSigInRangeHE :: Int -> Int -> HE.Decl HE.SrcSpanInfo -> Bool
|
||||
typeSigInRangeHE lineNo colNo (HE.TypeSig (HE.SrcSpanInfo s _) _ _) =
|
||||
HE.srcSpanStart s <= (lineNo, colNo) && HE.srcSpanEnd s >= (lineNo, colNo)
|
||||
#if MIN_VERSION_haskell_src_exts(1,18,0)
|
||||
typeSigInRangeHE lineNo colNo (HE.TypeFamDecl (HE.SrcSpanInfo s _) _ _ _) =
|
||||
#else
|
||||
typeSigInRangeHE lineNo colNo (HE.TypeFamDecl (HE.SrcSpanInfo s _) _ _) =
|
||||
#endif
|
||||
HE.srcSpanStart s <= (lineNo, colNo) && HE.srcSpanEnd s >= (lineNo, colNo)
|
||||
typeSigInRangeHE lineNo colNo (HE.DataFamDecl (HE.SrcSpanInfo s _) _ _ _) =
|
||||
HE.srcSpanStart s <= (lineNo, colNo) && HE.srcSpanEnd s >= (lineNo, colNo)
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
@ -48,9 +48,10 @@ patchStackPrograms Cradle { cradleProject = (StackProject senv) } progs = do
|
||||
}
|
||||
patchStackPrograms _crdl progs = return progs
|
||||
|
||||
getStackEnv :: (IOish m, GmOut m, GmLog m) => FilePath -> m (Maybe StackEnv)
|
||||
getStackEnv projdir = U.withDirectory_ projdir $ runMaybeT $ do
|
||||
env <- map (liToTup . splitOn ": ") . lines <$> readStack ["path"]
|
||||
getStackEnv :: (IOish m, GmOut m, GmLog m)
|
||||
=> FilePath -> FilePath -> m (Maybe StackEnv)
|
||||
getStackEnv projdir stackProg = U.withDirectory_ projdir $ runMaybeT $ do
|
||||
env <- map (liToTup . splitOn ": ") . lines <$> readStack stackProg ["path"]
|
||||
let look k = fromJustNote "getStackEnv" $ lookup k env
|
||||
return StackEnv {
|
||||
seDistDir = look "dist-dir"
|
||||
@ -82,9 +83,10 @@ findExecutablesInDirectories' path binary =
|
||||
|
||||
exeExtension' = if isWindows then "exe" else ""
|
||||
|
||||
readStack :: (IOish m, GmOut m, GmLog m) => [String] -> MaybeT m String
|
||||
readStack args = do
|
||||
stack <- MaybeT $ liftIO $ findExecutable "stack"
|
||||
readStack :: (IOish m, GmOut m, GmLog m)
|
||||
=> FilePath -> [String] -> MaybeT m String
|
||||
readStack exe args = do
|
||||
stack <- MaybeT $ liftIO $ findExecutable exe
|
||||
readProc <- lift gmReadProcess
|
||||
flip gcatch handler $ do
|
||||
liftIO $ evaluate =<< readProc stack args ""
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
@ -27,6 +27,8 @@ import GHC.LanguageExtensions
|
||||
import GHC.Paths (libdir)
|
||||
import SysTools
|
||||
import DynFlags
|
||||
import HscTypes
|
||||
import Pretty
|
||||
|
||||
import Language.Haskell.GhcMod.DynFlags
|
||||
import Language.Haskell.GhcMod.Monad.Types
|
||||
@ -69,39 +71,44 @@ runGmPkgGhc action = do
|
||||
withLightHscEnv pkgOpts $ \env -> liftIO $ runLightGhc env action
|
||||
|
||||
initSession :: IOish m
|
||||
=> [GHCOption] -> (forall gm. GhcMonad gm => DynFlags -> gm DynFlags) -> GhcModT m ()
|
||||
=> [GHCOption]
|
||||
-> (forall gm. GhcMonad gm => DynFlags -> gm DynFlags)
|
||||
-> GhcModT m ()
|
||||
initSession opts mdf = do
|
||||
s <- gmsGet
|
||||
case gmGhcSession s of
|
||||
Nothing -> do
|
||||
gmLog GmDebug "initSession" $ text "Session not initialized, creating new one"
|
||||
putNewSession s
|
||||
Just GmGhcSession {..} -> do
|
||||
gmLog GmDebug "initSession" $ text "Flags changed, creating new session"
|
||||
Just (GmGhcSession hsc_env_ref) -> do
|
||||
crdl <- cradle
|
||||
changed <- liftIO $ runLightGhc' gmgsSession $ do
|
||||
df <- getSessionDynFlags
|
||||
ndf <- initDF crdl
|
||||
return $ ndf `eqDynFlags` df
|
||||
|
||||
df <- liftIO $ hsc_dflags <$> readIORef hsc_env_ref
|
||||
changed <-
|
||||
withLightHscEnv' (initDF crdl) $ \hsc_env ->
|
||||
return $ not $ hsc_dflags hsc_env `eqDynFlags` df
|
||||
|
||||
if changed
|
||||
then putNewSession s
|
||||
else return ()
|
||||
then do
|
||||
gmLog GmDebug "initSession" $ text "Flags changed, creating new session"
|
||||
teardownSession hsc_env_ref
|
||||
putNewSession s
|
||||
else
|
||||
gmLog GmDebug "initSession" $ text "Session already initialized"
|
||||
where
|
||||
initDF Cradle { cradleTempDir } = do
|
||||
let setDf df = setTmpDir cradleTempDir <$> (mdf =<< addCmdOpts opts df)
|
||||
_ <- setSessionDynFlags =<< setDf =<< getSessionDynFlags
|
||||
getSessionDynFlags
|
||||
initDF Cradle { cradleTempDir } df =
|
||||
setTmpDir cradleTempDir <$> (mdf =<< addCmdOpts opts df)
|
||||
|
||||
teardownSession hsc_env_ref = do
|
||||
hsc_env <- liftIO $ readIORef hsc_env_ref
|
||||
teardownLightEnv hsc_env
|
||||
|
||||
putNewSession :: IOish m => GhcModState -> GhcModT m ()
|
||||
putNewSession s = do
|
||||
rghc <- (liftIO . newIORef =<< newSession)
|
||||
gmsPut s { gmGhcSession = Just $ GmGhcSession opts rghc }
|
||||
|
||||
newSession = do
|
||||
crdl <- cradle
|
||||
liftIO $ runGhc (Just libdir) $ do
|
||||
_ <- initDF crdl
|
||||
getSession
|
||||
nhsc_env_ref <- liftIO . newIORef =<< newLightEnv (initDF crdl)
|
||||
runLightGhc' nhsc_env_ref $ setSessionDynFlags =<< getSessionDynFlags
|
||||
gmsPut s { gmGhcSession = Just $ GmGhcSession nhsc_env_ref }
|
||||
|
||||
|
||||
-- | Drop the currently active GHC session, the next that requires a GHC session
|
||||
@ -110,7 +117,7 @@ dropSession :: IOish m => GhcModT m ()
|
||||
dropSession = do
|
||||
s <- gmsGet
|
||||
case gmGhcSession s of
|
||||
Just (GmGhcSession _opts ref) -> do
|
||||
Just (GmGhcSession ref) -> do
|
||||
-- TODO: This is still not enough, there seem to still be references to
|
||||
-- GHC's state around afterwards.
|
||||
liftIO $ writeIORef ref (error "HscEnv: session was dropped")
|
||||
@ -387,7 +394,7 @@ resolveModule env srcDirs (Left fn') = do
|
||||
case emn of
|
||||
Left errs -> do
|
||||
gmLog GmWarning ("resolveModule " ++ show fn) $
|
||||
Monoid.mempty $+$ (vcat $ map text errs)
|
||||
Pretty.empty $+$ (vcat $ map text errs)
|
||||
return Nothing -- TODO: should expose these errors otherwise
|
||||
-- modules with preprocessor/parse errors are
|
||||
-- going to be missing
|
||||
@ -456,7 +463,6 @@ loadTargets opts targetStrs = do
|
||||
let interp = needsHscInterpreted mg
|
||||
target <- hscTarget <$> getSessionDynFlags
|
||||
when (interp && target /= HscInterpreted) $ do
|
||||
resetTargets targets
|
||||
_ <- setSessionDynFlags . setHscInterpreted =<< getSessionDynFlags
|
||||
gmLog GmInfo "loadTargets" $ text "Target needs interpeter, switching to LinkInMemory/HscInterpreted. Perfectly normal if anything is using TemplateHaskell, QuasiQuotes or PatternSynonyms."
|
||||
|
||||
@ -482,11 +488,6 @@ loadTargets opts targetStrs = do
|
||||
return $ Target tid taoc src
|
||||
relativize tgt = return tgt
|
||||
|
||||
resetTargets targets' = do
|
||||
setTargets []
|
||||
void $ load LoadAllTargets
|
||||
setTargets targets'
|
||||
|
||||
showTargetId (Target (TargetModule s) _ _) = moduleNameString s
|
||||
showTargetId (Target (TargetFile s _) _ _) = s
|
||||
|
@ -37,7 +37,7 @@ import qualified MonadUtils as GHC (MonadIO(..))
|
||||
import GHC (ModuleName, moduleNameString, mkModuleName)
|
||||
import HscTypes (HscEnv)
|
||||
import GHC.Generics
|
||||
import Text.PrettyPrint (Doc)
|
||||
import Pretty (Doc)
|
||||
import Prelude
|
||||
|
||||
import Language.Haskell.GhcMod.Caching.Types
|
||||
@ -106,6 +106,7 @@ data Options = Options {
|
||||
, optGhcUserOptions :: [GHCOption]
|
||||
, optFileMappings :: [(FilePath, Maybe FilePath)]
|
||||
, optEncoding :: String
|
||||
, optStackBuildDeps :: Bool
|
||||
} deriving (Show)
|
||||
|
||||
-- | A default 'Options'.
|
||||
@ -126,6 +127,7 @@ defaultOptions = Options {
|
||||
, optGhcUserOptions = []
|
||||
, optFileMappings = []
|
||||
, optEncoding = "UTF-8"
|
||||
, optStackBuildDeps = False
|
||||
}
|
||||
|
||||
----------------------------------------------------------------
|
||||
@ -188,7 +190,6 @@ instance Monoid GhcModLog where
|
||||
GhcModLog (ml' `mplus` ml) (vd `mappend` vd') (ls `mappend` ls')
|
||||
|
||||
data GmGhcSession = GmGhcSession {
|
||||
gmgsOptions :: ![GHCOption],
|
||||
gmgsSession :: !(IORef HscEnv)
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
-- ghc-mod: Making Haskell development *more* fun
|
||||
-- ghc-mod: Happy Haskell Hacking
|
||||
-- Copyright (C) 2015 Daniel Gröber <dxld ÄT darkboxed DOT org>
|
||||
--
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
@ -40,7 +40,7 @@ import System.IO.Temp (createTempDirectory)
|
||||
import System.Process (readProcess)
|
||||
import Text.Printf
|
||||
|
||||
import Paths_ghc_mod (getLibexecDir)
|
||||
import Paths_ghc_mod (getLibexecDir, getBinDir)
|
||||
import Utils
|
||||
import Prelude
|
||||
|
||||
@ -79,73 +79,18 @@ whenM mb ma = mb >>= flip when ma
|
||||
-- | Returns the path to the currently running ghc-mod executable. With ghc<7.6
|
||||
-- this is a guess but >=7.6 uses 'getExecutablePath'.
|
||||
ghcModExecutable :: IO FilePath
|
||||
#ifndef SPEC
|
||||
ghcModExecutable = do
|
||||
dir <- takeDirectory <$> getExecutablePath'
|
||||
return $ (if dir == "." then "" else dir) </> "ghc-mod"
|
||||
#else
|
||||
ghcModExecutable = fmap (</> "dist/build/ghc-mod/ghc-mod") getCurrentDirectory
|
||||
#endif
|
||||
|
||||
findLibexecExe :: String -> IO FilePath
|
||||
findLibexecExe "cabal-helper-wrapper" = do
|
||||
libexecdir <- getLibexecDir
|
||||
let exeName = "cabal-helper-wrapper"
|
||||
exe = libexecdir </> exeName
|
||||
|
||||
exists <- doesFileExist exe
|
||||
|
||||
if exists
|
||||
then return exe
|
||||
else do
|
||||
mdir <- tryFindGhcModTreeDataDir
|
||||
case mdir of
|
||||
Nothing ->
|
||||
error $ libexecNotExitsError exeName libexecdir
|
||||
Just dir ->
|
||||
return $ dir </> "dist" </> "build" </> exeName </> exeName
|
||||
findLibexecExe exe = error $ "findLibexecExe: Unknown executable: " ++ exe
|
||||
|
||||
libexecNotExitsError :: String -> FilePath -> String
|
||||
libexecNotExitsError exe dir = printf
|
||||
( "Could not find $libexecdir/%s\n"
|
||||
++"\n"
|
||||
++"If you are a developer set the environment variable `ghc_mod_libexecdir'\n"
|
||||
++"to override $libexecdir[1] the following will work in the ghc-mod tree:\n"
|
||||
++"\n"
|
||||
++" $ export ghc_mod_libexecdir=$PWD/dist/build/%s\n"
|
||||
++"\n"
|
||||
++"[1]: %s\n"
|
||||
++"\n"
|
||||
++"If you don't know what I'm talking about something went wrong with your\n"
|
||||
++"installation. Please report this problem here:\n"
|
||||
++"\n"
|
||||
++" https://github.com/kazu-yamamoto/ghc-mod/issues") exe exe dir
|
||||
|
||||
tryFindGhcModTreeLibexecDir :: IO (Maybe FilePath)
|
||||
tryFindGhcModTreeLibexecDir = do
|
||||
exe <- getExecutablePath'
|
||||
dir <- case takeFileName exe of
|
||||
"ghc" -> getCurrentDirectory -- we're probably in ghci; try CWD
|
||||
_ -> return $ (!!4) $ iterate takeDirectory exe
|
||||
exists <- doesFileExist $ dir </> "ghc-mod.cabal"
|
||||
return $ if exists
|
||||
then Just dir
|
||||
else Nothing
|
||||
|
||||
tryFindGhcModTreeDataDir :: IO (Maybe FilePath)
|
||||
tryFindGhcModTreeDataDir = do
|
||||
dir <- (!!4) . iterate takeDirectory <$> getExecutablePath'
|
||||
exists <- doesFileExist $ dir </> "ghc-mod.cabal"
|
||||
return $ if exists
|
||||
then Just dir
|
||||
else Nothing
|
||||
|
||||
readLibExecProcess' :: (MonadIO m, ExceptionMonad m)
|
||||
=> String -> [String] -> m String
|
||||
readLibExecProcess' cmd args = do
|
||||
exe <- liftIO $ findLibexecExe cmd
|
||||
liftIO $ readProcess exe args ""
|
||||
exe <- getExecutablePath'
|
||||
stack <- lookupEnv "STACK_EXE"
|
||||
case takeBaseName exe of
|
||||
"spec" | Just _ <- stack ->
|
||||
(</> "ghc-mod") <$> getBinDir
|
||||
"spec" ->
|
||||
(</> "dist/build/ghc-mod/ghc-mod") <$> getCurrentDirectory
|
||||
"ghc-mod" ->
|
||||
return exe
|
||||
_ ->
|
||||
return $ takeDirectory exe </> "ghc-mod"
|
||||
|
||||
getExecutablePath' :: IO FilePath
|
||||
#if __GLASGOW_HASKELL__ >= 706
|
@ -211,7 +211,7 @@
|
||||
default-directory))) ;; ghc-mod root
|
||||
(with-temp-buffer
|
||||
(let ((default-directory cdir))
|
||||
(apply 'ghc-call-process target nil t nil
|
||||
(apply 'ghc-call-process target nil '(t nil) nil
|
||||
(append (ghc-make-ghc-options) cmds))
|
||||
(buffer-substring (point-min) (1- (point-max)))))))))
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
(let ((pro (ghc-get-process cpro name buf root))
|
||||
(map-cmd (format "map-file %s\n" file)))
|
||||
; (unmap-cmd (format "unmap-file %s\n" file)))
|
||||
(when (buffer-modified-p (current-buffer))
|
||||
(when (buffer-modified-p cbuf)
|
||||
(setq ghc-process-file-mapping t)
|
||||
(setq ghc-process-async-after-callback nil)
|
||||
(erase-buffer)
|
||||
|
@ -28,7 +28,7 @@
|
||||
(< emacs-minor-version minor)))
|
||||
(error "ghc-mod requires at least Emacs %d.%d" major minor)))
|
||||
|
||||
(defconst ghc-version "5.7.0.0")
|
||||
(defconst ghc-version "5.8.0.0")
|
||||
|
||||
(defgroup ghc-mod '() "ghc-mod customization")
|
||||
|
||||
|
303
ghc-mod.cabal
303
ghc-mod.cabal
@ -1,5 +1,5 @@
|
||||
Name: ghc-mod
|
||||
Version: 5.7.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>,
|
||||
@ -8,8 +8,8 @@ Maintainer: Daniel Gröber <dxld@darkboxed.org>
|
||||
License: AGPL-3
|
||||
License-File: LICENSE
|
||||
License-Files: COPYING.BSD3 COPYING.AGPL3
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell Programming
|
||||
Homepage: https://github.com/DanielG/ghc-mod
|
||||
Synopsis: Happy Haskell Hacking
|
||||
Description:
|
||||
ghc-mod is a backend program to enrich Haskell programming in editors. It
|
||||
strives to offer most of the features one has come to expect from modern IDEs
|
||||
@ -22,44 +22,30 @@ Description:
|
||||
significantly extend ghc-mod you should submit these changes upstream instead
|
||||
of implementing them on top of the library.
|
||||
|
||||
For more information, please see its home page.
|
||||
|
||||
Category: GHC, Development
|
||||
Cabal-Version: >= 1.14
|
||||
Cabal-Version: >= 1.18
|
||||
Build-Type: Custom
|
||||
Tested-With: GHC == 7.6.3
|
||||
GHC == 7.8.4
|
||||
, GHC == 7.10.3
|
||||
, GHC == 8.0.1
|
||||
, GHC == 8.0.2
|
||||
Data-Files: elisp/Makefile
|
||||
elisp/*.el
|
||||
Data-Files: LICENSE COPYING.BSD3 COPYING.AGPL3
|
||||
Extra-Source-Files: ChangeLog
|
||||
cabal.project
|
||||
SetupCompat.hs
|
||||
NotCPP/*.hs
|
||||
NotCPP/COPYING
|
||||
Language/Haskell/GhcMod/Monad/Compat.hs_h
|
||||
README.md
|
||||
core/Language/Haskell/GhcMod/Monad/Compat.hs_h
|
||||
test/data/annotations/*.hs
|
||||
test/data/broken-cabal/*.cabal
|
||||
test/data/broken-cabal/cabal.sandbox.config.in
|
||||
test/data/broken-sandbox/cabal.sandbox.config
|
||||
test/data/broken-sandbox/dummy.cabal
|
||||
test/data/cabal-flags/cabal-flags.cabal
|
||||
test/data/cabal-project/*.cabal
|
||||
test/data/cabal-project/*.hs
|
||||
test/data/cabal-project/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
|
||||
test/data/cabal-project/cabal.sandbox.config.in
|
||||
test/data/cabal-project/subdir1/subdir2/dummy
|
||||
test/data/case-split/*.hs
|
||||
test/data/check-packageid/cabal.sandbox.config.in
|
||||
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/check-test-subdir/*.cabal
|
||||
test/data/check-test-subdir/src/Check/Test/*.hs
|
||||
test/data/check-test-subdir/test/*.hs
|
||||
test/data/check-test-subdir/test/Bar/*.hs
|
||||
test/data/duplicate-pkgver/cabal.sandbox.config.in
|
||||
test/data/duplicate-pkgver/duplicate-pkgver.cabal
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
|
||||
@ -94,60 +80,69 @@ Extra-Source-Files: ChangeLog
|
||||
test/data/file-mapping/preprocessor/*.hs
|
||||
test/data/file-mapping/lhs/*.lhs
|
||||
test/data/nice-qualification/*.hs
|
||||
test/data/stack-project/stack.yaml
|
||||
test/data/stack-project/stack.yaml.in
|
||||
test/data/stack-project/new-template.cabal
|
||||
test/data/stack-project/*.hs
|
||||
test/data/stack-project/app/*.hs
|
||||
test/data/stack-project/src/*.hs
|
||||
test/data/stack-project/test/*.hs
|
||||
bench/data/simple-cabal/simple-cabal.cabal
|
||||
bench/data/simple-cabal/*.hs
|
||||
|
||||
|
||||
Custom-Setup
|
||||
Setup-Depends: base
|
||||
, Cabal < 1.25
|
||||
, Cabal >= 1.18 && < 1.25
|
||||
, containers
|
||||
, filepath
|
||||
, directory
|
||||
, process
|
||||
, template-haskell
|
||||
, transformers
|
||||
|
||||
|
||||
Library
|
||||
Default-Language: Haskell2010
|
||||
GHC-Options: -Wall -fno-warn-deprecations
|
||||
Default-Extensions: ScopedTypeVariables, RecordWildCards, NamedFieldPuns,
|
||||
ConstraintKinds, FlexibleContexts,
|
||||
DataKinds, KindSignatures, TypeOperators, ViewPatterns
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
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.CaseSplit
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Convert
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
Language.Haskell.GhcMod.CustomPackageDb
|
||||
Language.Haskell.GhcMod.Debug
|
||||
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.FillSig
|
||||
Language.Haskell.GhcMod.Find
|
||||
Language.Haskell.GhcMod.Flag
|
||||
Language.Haskell.GhcMod.Gap
|
||||
Language.Haskell.GhcMod.GhcPkg
|
||||
Language.Haskell.GhcMod.HomeModuleGraph
|
||||
Language.Haskell.GhcMod.Info
|
||||
Language.Haskell.GhcMod.Lang
|
||||
Language.Haskell.GhcMod.Lint
|
||||
Language.Haskell.GhcMod.LightGhc
|
||||
Language.Haskell.GhcMod.Logger
|
||||
Language.Haskell.GhcMod.Logging
|
||||
Language.Haskell.GhcMod.Modules
|
||||
Language.Haskell.GhcMod.Monad
|
||||
Language.Haskell.GhcMod.Monad.Env
|
||||
Language.Haskell.GhcMod.Monad.Log
|
||||
@ -156,69 +151,69 @@ Library
|
||||
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.PkgDoc
|
||||
Language.Haskell.GhcMod.Pretty
|
||||
Language.Haskell.GhcMod.Read
|
||||
Language.Haskell.GhcMod.SrcUtils
|
||||
Language.Haskell.GhcMod.Stack
|
||||
Language.Haskell.GhcMod.Target
|
||||
Language.Haskell.GhcMod.Test
|
||||
Language.Haskell.GhcMod.Types
|
||||
Language.Haskell.GhcMod.Utils
|
||||
Language.Haskell.GhcMod.World
|
||||
|
||||
Language.Haskell.GhcMod.Options.Options
|
||||
Language.Haskell.GhcMod.Options.DocUtils
|
||||
Language.Haskell.GhcMod.Options.Help
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Utils
|
||||
Data.Binary.Generic
|
||||
System.Directory.ModTime
|
||||
Build-Depends: base < 5 && >= 4.0
|
||||
, bytestring < 0.11
|
||||
, binary < 0.9 && >= 0.5.1.0
|
||||
, containers < 0.6
|
||||
, cabal-helper < 0.8 && >= 0.7.3.0
|
||||
, deepseq < 1.5
|
||||
, directory < 1.4
|
||||
, filepath < 1.5
|
||||
, ghc < 8.2 && >= 7.6
|
||||
, ghc-paths < 0.2 && >= 0.1.0.9
|
||||
, ghc-syb-utils < 0.3 && >= 0.2.3
|
||||
, hlint < 1.10 && >= 1.9.27
|
||||
, monad-journal < 0.8 && >= 0.4
|
||||
, old-time < 1.2
|
||||
, pretty < 1.2
|
||||
, process < 1.5
|
||||
, syb < 0.7 && >= 0.5.1
|
||||
, temporary < 1.3 && >= 1.2.0.3
|
||||
, transformers < 0.6
|
||||
, time < 1.7
|
||||
, transformers < 0.6
|
||||
, transformers-base < 0.5 && >= 0.4.4
|
||||
, mtl < 2.3 && >= 2.0
|
||||
, monad-control < 1.1 && >= 1
|
||||
, split < 0.3 && >= 0.2.2
|
||||
, haskell-src-exts < 1.19 && >= 1.16.0.1
|
||||
, text < 1.3 && >= 1.2.1.3
|
||||
, djinn-ghc < 0.1 && >= 0.0.2.2
|
||||
, fclabels == 2.0.*
|
||||
, extra < 1.6 && >= 1.4.0
|
||||
, pipes < 4.4 && >= 4.1.0
|
||||
, safe < 0.4 && >= 0.3.9
|
||||
, optparse-applicative >=0.11.0 && <0.14.0
|
||||
Build-Depends:
|
||||
-- See Note [GHC Boot libraries]
|
||||
base
|
||||
, binary
|
||||
, bytestring
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, mtl
|
||||
, old-time
|
||||
, process
|
||||
, template-haskell
|
||||
, syb
|
||||
if impl(ghc < 7.8)
|
||||
Build-Depends: convertible < 1.2 && >= 1.1.0.0
|
||||
, time
|
||||
, transformers
|
||||
|
||||
, djinn-ghc < 0.1 && >= 0.0.2.2
|
||||
, extra < 1.6 && >= 1.4
|
||||
, fclabels < 2.1 && >= 2.0
|
||||
, ghc-paths < 0.2 && >= 0.1.0.9
|
||||
, ghc-syb-utils < 0.3 && >= 0.2.3
|
||||
, haskell-src-exts < 1.20 && >= 1.18
|
||||
, hlint < 2.1 && >= 2.0.8
|
||||
, monad-control < 1.1 && >= 1
|
||||
, monad-journal < 0.8 && >= 0.4
|
||||
, optparse-applicative == 0.13.0.*
|
||||
, pipes < 4.4 && >= 4.1
|
||||
, safe < 0.4 && >= 0.3.9
|
||||
, semigroups < 0.19 && >= 0.10.0
|
||||
, split < 0.3 && >= 0.2.2
|
||||
, syb < 0.7 && >= 0.5.1
|
||||
, temporary < 1.3 && >= 1.2.0.3
|
||||
, text < 1.3 && >= 1.2.1.3
|
||||
, transformers-base < 0.5 && >= 0.4.4
|
||||
|
||||
, cabal-helper < 0.8 && >= 0.7.3.0
|
||||
, ghc < 8.2 && >= 7.6
|
||||
|
||||
if impl(ghc >= 8.0)
|
||||
Build-Depends: ghc-boot
|
||||
if impl(ghc < 7.8)
|
||||
Build-Depends: convertible < 1.2 && >= 1.1.0.0
|
||||
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Main-Is: GHCModMain.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
, GHCMod.Options
|
||||
, GHCMod.Options.Commands
|
||||
@ -226,41 +221,51 @@ Executable ghc-mod
|
||||
, GHCMod.Options.ShellParse
|
||||
GHC-Options: -Wall -fno-warn-deprecations -threaded
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base < 5 && >= 4.0
|
||||
, directory < 1.4
|
||||
, filepath < 1.5
|
||||
, pretty < 1.2
|
||||
, process < 1.5
|
||||
, split < 0.3 && >= 0.2.2
|
||||
, mtl < 2.3 && >= 2.0
|
||||
, ghc < 8.2 && >= 7.6
|
||||
, monad-control < 1.1 && >= 1
|
||||
, fclabels ==2.0.*
|
||||
, optparse-applicative >=0.11.0 && <0.14.0
|
||||
, semigroups < 0.19 && >= 0.10.0
|
||||
HS-Source-Dirs: src, shared
|
||||
X-Internal: True
|
||||
Build-Depends:
|
||||
-- See Note [GHC Boot libraries]
|
||||
base
|
||||
, directory
|
||||
, filepath
|
||||
, mtl
|
||||
, process
|
||||
|
||||
, fclabels < 2.1 && >= 2.0
|
||||
, monad-control < 1.1 && >= 1
|
||||
, optparse-applicative == 0.13.0.*
|
||||
, semigroups < 0.19 && >= 0.10.0
|
||||
, split < 0.3 && >= 0.2.2
|
||||
|
||||
, ghc < 8.2 && >= 7.6
|
||||
, ghc-mod
|
||||
|
||||
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Utils
|
||||
System.Directory.ModTime
|
||||
GHC-Options: -Wall -threaded -fno-warn-deprecations
|
||||
if os(windows)
|
||||
Cpp-Options: -DWINDOWS
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src, .
|
||||
Build-Depends: base < 5 && >= 4.0
|
||||
, binary < 0.9 && >= 0.5.1.0
|
||||
, deepseq < 1.5
|
||||
, directory < 1.4
|
||||
, filepath < 1.5
|
||||
, process < 1.5
|
||||
, old-time < 1.2
|
||||
, time < 1.7
|
||||
HS-Source-Dirs: ., src, shared
|
||||
Build-Depends:
|
||||
-- See Note [GHC Boot libraries]
|
||||
base
|
||||
, binary
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, old-time
|
||||
, process
|
||||
, time
|
||||
|
||||
, ghc-mod
|
||||
|
||||
|
||||
Test-Suite doctest
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
@ -269,7 +274,8 @@ Test-Suite doctest
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: doctests.hs
|
||||
Build-Depends: base
|
||||
, doctest < 0.12 && >= 0.9.3
|
||||
, doctest < 0.12 && >= 0.9.3
|
||||
|
||||
|
||||
Test-Suite spec
|
||||
Default-Language: Haskell2010
|
||||
@ -277,31 +283,106 @@ Test-Suite spec
|
||||
ConstraintKinds, FlexibleContexts,
|
||||
DataKinds, KindSignatures, TypeOperators, ViewPatterns
|
||||
Main-Is: Main.hs
|
||||
Hs-Source-Dirs: test, ., src
|
||||
Hs-Source-Dirs: test, src
|
||||
Ghc-Options: -Wall -fno-warn-deprecations -threaded
|
||||
CPP-Options: -DSPEC=1
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Dir
|
||||
Spec
|
||||
TestUtils
|
||||
|
||||
-- $ ls test/*Spec.hs | sed 's_^.*/\(.*\)\.hs$_\1_' | sort
|
||||
BrowseSpec
|
||||
CustomPackageDbSpec
|
||||
CabalHelperSpec
|
||||
CaseSplitSpec
|
||||
CheckSpec
|
||||
CradleSpec
|
||||
CustomPackageDbSpec
|
||||
FileMappingSpec
|
||||
FindSpec
|
||||
FlagSpec
|
||||
GhcPkgSpec
|
||||
HomeModuleGraphSpec
|
||||
InfoSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
MonadSpec
|
||||
PathsAndFilesSpec
|
||||
HomeModuleGraphSpec
|
||||
FileMappingSpec
|
||||
ShellParseSpec
|
||||
TargetSpec
|
||||
|
||||
Build-Depends:
|
||||
-- See Note [GHC Boot libraries]
|
||||
base
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, mtl
|
||||
, process
|
||||
, transformers
|
||||
|
||||
, fclabels < 2.1 && >= 2.0
|
||||
, hspec < 2.4 && >= 2.0.0
|
||||
, monad-journal < 0.8 && >= 0.4
|
||||
, split < 0.3 && >= 0.2.2
|
||||
, temporary < 1.3 && >= 1.2.0.3
|
||||
|
||||
|
||||
if impl(ghc < 7.8)
|
||||
Build-Depends: convertible < 1.2 && >= 1.1.0.0
|
||||
if impl(ghc >= 8.0)
|
||||
Build-Depends: ghc-boot
|
||||
|
||||
Build-Depends:
|
||||
cabal-helper < 0.8 && >= 0.7.1.0
|
||||
, ghc < 8.2 && >= 7.6
|
||||
, ghc-mod
|
||||
|
||||
|
||||
Test-Suite shelltest
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: ShellTest.hs
|
||||
Hs-Source-Dirs: shelltest
|
||||
Type: exitcode-stdio-1.0
|
||||
Build-Tools: shelltest
|
||||
Build-Depends: base
|
||||
, process < 1.5
|
||||
-- , shelltestrunner >= 1.3.5
|
||||
if !flag(shelltest)
|
||||
Buildable: False
|
||||
|
||||
|
||||
Benchmark criterion
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
Default-Extensions: ScopedTypeVariables, RecordWildCards, NamedFieldPuns,
|
||||
ConstraintKinds, FlexibleContexts,
|
||||
DataKinds, KindSignatures, TypeOperators, ViewPatterns
|
||||
HS-Source-Dirs: bench, test
|
||||
Main-Is: Bench.hs
|
||||
Build-Depends:
|
||||
-- See Note [GHC Boot libraries]
|
||||
base
|
||||
, directory
|
||||
, filepath
|
||||
|
||||
, criterion < 1.2 && >= 1.1.1.0
|
||||
, temporary < 1.3 && >= 1.2.0.3
|
||||
|
||||
, ghc-mod
|
||||
|
||||
|
||||
Flag shelltest
|
||||
Description: Enable/disable shelltest test-suite
|
||||
Default: False
|
||||
Manual: True
|
||||
|
||||
Build-Depends: hspec < 2.4 && >= 2.0.0
|
||||
X-Build-Depends-Like: CLibName
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: https://github.com/kazu-yamamoto/ghc-mod.git
|
||||
Location: https://github.com/DanielG/ghc-mod.git
|
||||
|
||||
-- Note [GHC Boot libraries]
|
||||
--
|
||||
-- We don't give bounds to GHC boot libraries as our dependency on 'ghc' already
|
||||
-- constrains these packages to the version that shipped with GHC.
|
||||
|
@ -1,215 +0,0 @@
|
||||
Name: ghc-mod
|
||||
Version: 5.0.0
|
||||
Author: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
Daniel Gröber <dxld@darkboxed.org>
|
||||
Alejandro Serrano <trupill@gmail.com>
|
||||
Maintainer: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
License: BSD3
|
||||
License-File: LICENSE
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell Programming
|
||||
Description: The ghc-mod command is a backend command to enrich
|
||||
Haskell programming on editors including
|
||||
Emacs, Vim, and Sublime.
|
||||
The ghc-mod command is based on ghc-mod library
|
||||
which is a wrapper of GHC API.
|
||||
This package includes the ghc-mod command,
|
||||
the ghc-mod library, and Emacs front-end
|
||||
(for historical reasons).
|
||||
For more information, please see its home page.
|
||||
|
||||
Category: Development
|
||||
Cabal-Version: >= 1.10
|
||||
Build-Type: Simple
|
||||
Data-Dir: elisp
|
||||
Data-Files: Makefile ghc.el ghc-func.el ghc-doc.el ghc-comp.el
|
||||
ghc-check.el ghc-process.el ghc-command.el ghc-info.el
|
||||
ghc-ins-mod.el ghc-indent.el ghc-pkg.el
|
||||
Extra-Source-Files: ChangeLog
|
||||
test/data/*.cabal
|
||||
test/data/*.hs
|
||||
test/data/cabal.sandbox.config.in
|
||||
test/data/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
|
||||
test/data/broken-cabal/*.cabal
|
||||
test/data/broken-sandbox/*.cabal
|
||||
test/data/broken-sandbox/cabal.sandbox.config
|
||||
test/data/check-test-subdir/*.cabal
|
||||
test/data/check-test-subdir/src/Check/Test/*.hs
|
||||
test/data/check-test-subdir/test/*.hs
|
||||
test/data/check-test-subdir/test/Bar/*.hs
|
||||
test/data/check-packageid/cabal.sandbox.config.in
|
||||
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/duplicate-pkgver/cabal.sandbox.config.in
|
||||
test/data/duplicate-pkgver/duplicate-pkgver.cabal
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/ghc-mod-check/*.cabal
|
||||
test/data/ghc-mod-check/*.hs
|
||||
test/data/ghc-mod-check/Data/*.hs
|
||||
test/data/subdir1/subdir2/dummy
|
||||
test/data/.cabal-sandbox/packages/00-index.tar
|
||||
|
||||
Library
|
||||
Default-Language: Haskell2010
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Other-Modules: Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
Language.Haskell.GhcMod.Cabal16
|
||||
Language.Haskell.GhcMod.Cabal18
|
||||
Language.Haskell.GhcMod.CabalApi
|
||||
Language.Haskell.GhcMod.CabalConfig
|
||||
Language.Haskell.GhcMod.CaseSplit
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Convert
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
Language.Haskell.GhcMod.Debug
|
||||
Language.Haskell.GhcMod.Doc
|
||||
Language.Haskell.GhcMod.DynFlags
|
||||
Language.Haskell.GhcMod.FillSig
|
||||
Language.Haskell.GhcMod.Find
|
||||
Language.Haskell.GhcMod.Flag
|
||||
Language.Haskell.GhcMod.GHCApi
|
||||
Language.Haskell.GhcMod.GHCChoice
|
||||
Language.Haskell.GhcMod.Gap
|
||||
Language.Haskell.GhcMod.GhcPkg
|
||||
Language.Haskell.GhcMod.Info
|
||||
Language.Haskell.GhcMod.Lang
|
||||
Language.Haskell.GhcMod.Lint
|
||||
Language.Haskell.GhcMod.List
|
||||
Language.Haskell.GhcMod.Logger
|
||||
Language.Haskell.GhcMod.Monad
|
||||
Language.Haskell.GhcMod.PkgDoc
|
||||
Language.Haskell.GhcMod.Read
|
||||
Language.Haskell.GhcMod.SrcUtils
|
||||
Language.Haskell.GhcMod.Target
|
||||
Language.Haskell.GhcMod.Types
|
||||
Language.Haskell.GhcMod.Utils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.8.61
|
||||
, io-choice
|
||||
, monad-journal >= 0.2.2.0
|
||||
, old-time
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, directory
|
||||
, filepath
|
||||
, mtl >= 2.0
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Utils
|
||||
GHC-Options: -Wall -threaded
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, split
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Test-Suite doctest
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
HS-Source-Dirs: test
|
||||
Ghc-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: doctests.hs
|
||||
Build-Depends: base
|
||||
, doctest >= 0.9.3
|
||||
|
||||
Test-Suite spec
|
||||
Default-Language: Haskell2010
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: Main.hs
|
||||
Hs-Source-Dirs: test, .
|
||||
Ghc-Options: -Wall
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: Dir
|
||||
Spec
|
||||
BrowseSpec
|
||||
CabalApiSpec
|
||||
CheckSpec
|
||||
FlagSpec
|
||||
InfoSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
MonadSpec
|
||||
GhcPkgSpec
|
||||
TestUtils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.7.1
|
||||
, io-choice
|
||||
, monad-journal >= 0.2.2.0
|
||||
, old-time
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, hspec >= 1.8.2
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc < 7.6)
|
||||
Build-Depends: executable-path
|
||||
CPP-Options: -DSPEC=1
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: git://github.com/kazu-yamamoto/ghc-mod.git
|
@ -1,219 +0,0 @@
|
||||
Name: ghc-mod
|
||||
Version: 5.0.1.1
|
||||
Author: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
Daniel Gröber <dxld@darkboxed.org>
|
||||
Alejandro Serrano <trupill@gmail.com>
|
||||
Maintainer: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
License: BSD3
|
||||
License-File: LICENSE
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell Programming
|
||||
Description: The ghc-mod command is a backend command to enrich
|
||||
Haskell programming on editors including
|
||||
Emacs, Vim, and Sublime.
|
||||
The ghc-mod command is based on ghc-mod library
|
||||
which is a wrapper of GHC API.
|
||||
This package includes the ghc-mod command,
|
||||
the ghc-mod library, and Emacs front-end
|
||||
(for historical reasons).
|
||||
For more information, please see its home page.
|
||||
|
||||
Category: Development
|
||||
Cabal-Version: >= 1.10
|
||||
Build-Type: Simple
|
||||
Data-Dir: elisp
|
||||
Data-Files: Makefile ghc.el ghc-func.el ghc-doc.el ghc-comp.el
|
||||
ghc-check.el ghc-process.el ghc-command.el ghc-info.el
|
||||
ghc-ins-mod.el ghc-indent.el ghc-pkg.el ghc-rewrite.el
|
||||
Extra-Source-Files: ChangeLog
|
||||
test/data/*.cabal
|
||||
test/data/*.hs
|
||||
test/data/cabal.sandbox.config.in
|
||||
test/data/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
|
||||
test/data/broken-cabal/*.cabal
|
||||
test/data/broken-cabal/cabal.sandbox.config.in
|
||||
test/data/broken-sandbox/*.cabal
|
||||
test/data/broken-sandbox/cabal.sandbox.config
|
||||
test/data/check-test-subdir/*.cabal
|
||||
test/data/check-test-subdir/src/Check/Test/*.hs
|
||||
test/data/check-test-subdir/test/*.hs
|
||||
test/data/check-test-subdir/test/Bar/*.hs
|
||||
test/data/check-packageid/cabal.sandbox.config.in
|
||||
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/duplicate-pkgver/cabal.sandbox.config.in
|
||||
test/data/duplicate-pkgver/duplicate-pkgver.cabal
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/ghc-mod-check/*.cabal
|
||||
test/data/ghc-mod-check/*.hs
|
||||
test/data/ghc-mod-check/Data/*.hs
|
||||
test/data/subdir1/subdir2/dummy
|
||||
test/data/.cabal-sandbox/packages/00-index.tar
|
||||
|
||||
Library
|
||||
Default-Language: Haskell2010
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Other-Modules: Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
Language.Haskell.GhcMod.Cabal16
|
||||
Language.Haskell.GhcMod.Cabal18
|
||||
Language.Haskell.GhcMod.CabalApi
|
||||
Language.Haskell.GhcMod.CabalConfig
|
||||
Language.Haskell.GhcMod.CaseSplit
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Convert
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
Language.Haskell.GhcMod.Debug
|
||||
Language.Haskell.GhcMod.Doc
|
||||
Language.Haskell.GhcMod.DynFlags
|
||||
Language.Haskell.GhcMod.FillSig
|
||||
Language.Haskell.GhcMod.Find
|
||||
Language.Haskell.GhcMod.Flag
|
||||
Language.Haskell.GhcMod.GHCApi
|
||||
Language.Haskell.GhcMod.GHCChoice
|
||||
Language.Haskell.GhcMod.Gap
|
||||
Language.Haskell.GhcMod.GhcPkg
|
||||
Language.Haskell.GhcMod.Info
|
||||
Language.Haskell.GhcMod.Lang
|
||||
Language.Haskell.GhcMod.Lint
|
||||
Language.Haskell.GhcMod.List
|
||||
Language.Haskell.GhcMod.Logger
|
||||
Language.Haskell.GhcMod.Monad
|
||||
Language.Haskell.GhcMod.PkgDoc
|
||||
Language.Haskell.GhcMod.Read
|
||||
Language.Haskell.GhcMod.SrcUtils
|
||||
Language.Haskell.GhcMod.Target
|
||||
Language.Haskell.GhcMod.Types
|
||||
Language.Haskell.GhcMod.Utils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.8.61
|
||||
, io-choice
|
||||
, monad-journal >= 0.2.2.0
|
||||
, old-time
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc <= 7.4.2)
|
||||
-- Only used to constrain random to a version that still works with GHC 7.4
|
||||
Build-Depends: random <= 1.0.1.1
|
||||
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, directory
|
||||
, filepath
|
||||
, mtl >= 2.0
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Utils
|
||||
GHC-Options: -Wall -threaded
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, split
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Test-Suite doctest
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
HS-Source-Dirs: test
|
||||
Ghc-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: doctests.hs
|
||||
Build-Depends: base
|
||||
, doctest >= 0.9.3
|
||||
|
||||
Test-Suite spec
|
||||
Default-Language: Haskell2010
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: Main.hs
|
||||
Hs-Source-Dirs: test, .
|
||||
Ghc-Options: -Wall
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: Dir
|
||||
Spec
|
||||
BrowseSpec
|
||||
CabalApiSpec
|
||||
CheckSpec
|
||||
FlagSpec
|
||||
InfoSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
MonadSpec
|
||||
GhcPkgSpec
|
||||
TestUtils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.7.1
|
||||
, io-choice
|
||||
, monad-journal >= 0.2.2.0
|
||||
, old-time
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, hspec >= 1.8.2
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc < 7.6)
|
||||
Build-Depends: executable-path
|
||||
CPP-Options: -DSPEC=1
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: git://github.com/kazu-yamamoto/ghc-mod.git
|
@ -1,219 +0,0 @@
|
||||
Name: ghc-mod
|
||||
Version: 5.0.1.2
|
||||
Author: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
Daniel Gröber <dxld@darkboxed.org>
|
||||
Alejandro Serrano <trupill@gmail.com>
|
||||
Maintainer: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
License: BSD3
|
||||
License-File: LICENSE
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell Programming
|
||||
Description: The ghc-mod command is a backend command to enrich
|
||||
Haskell programming on editors including
|
||||
Emacs, Vim, and Sublime.
|
||||
The ghc-mod command is based on ghc-mod library
|
||||
which is a wrapper of GHC API.
|
||||
This package includes the ghc-mod command,
|
||||
the ghc-mod library, and Emacs front-end
|
||||
(for historical reasons).
|
||||
For more information, please see its home page.
|
||||
|
||||
Category: Development
|
||||
Cabal-Version: >= 1.10
|
||||
Build-Type: Simple
|
||||
Data-Dir: elisp
|
||||
Data-Files: Makefile ghc.el ghc-func.el ghc-doc.el ghc-comp.el
|
||||
ghc-check.el ghc-process.el ghc-command.el ghc-info.el
|
||||
ghc-ins-mod.el ghc-indent.el ghc-pkg.el ghc-rewrite.el
|
||||
Extra-Source-Files: ChangeLog
|
||||
test/data/*.cabal
|
||||
test/data/*.hs
|
||||
test/data/cabal.sandbox.config.in
|
||||
test/data/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
|
||||
test/data/broken-cabal/*.cabal
|
||||
test/data/broken-cabal/cabal.sandbox.config.in
|
||||
test/data/broken-sandbox/*.cabal
|
||||
test/data/broken-sandbox/cabal.sandbox.config
|
||||
test/data/check-test-subdir/*.cabal
|
||||
test/data/check-test-subdir/src/Check/Test/*.hs
|
||||
test/data/check-test-subdir/test/*.hs
|
||||
test/data/check-test-subdir/test/Bar/*.hs
|
||||
test/data/check-packageid/cabal.sandbox.config.in
|
||||
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/duplicate-pkgver/cabal.sandbox.config.in
|
||||
test/data/duplicate-pkgver/duplicate-pkgver.cabal
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/ghc-mod-check/*.cabal
|
||||
test/data/ghc-mod-check/*.hs
|
||||
test/data/ghc-mod-check/Data/*.hs
|
||||
test/data/subdir1/subdir2/dummy
|
||||
test/data/.cabal-sandbox/packages/00-index.tar
|
||||
|
||||
Library
|
||||
Default-Language: Haskell2010
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Other-Modules: Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
Language.Haskell.GhcMod.Cabal16
|
||||
Language.Haskell.GhcMod.Cabal18
|
||||
Language.Haskell.GhcMod.CabalApi
|
||||
Language.Haskell.GhcMod.CabalConfig
|
||||
Language.Haskell.GhcMod.CaseSplit
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Convert
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
Language.Haskell.GhcMod.Debug
|
||||
Language.Haskell.GhcMod.Doc
|
||||
Language.Haskell.GhcMod.DynFlags
|
||||
Language.Haskell.GhcMod.FillSig
|
||||
Language.Haskell.GhcMod.Find
|
||||
Language.Haskell.GhcMod.Flag
|
||||
Language.Haskell.GhcMod.GHCApi
|
||||
Language.Haskell.GhcMod.GHCChoice
|
||||
Language.Haskell.GhcMod.Gap
|
||||
Language.Haskell.GhcMod.GhcPkg
|
||||
Language.Haskell.GhcMod.Info
|
||||
Language.Haskell.GhcMod.Lang
|
||||
Language.Haskell.GhcMod.Lint
|
||||
Language.Haskell.GhcMod.List
|
||||
Language.Haskell.GhcMod.Logger
|
||||
Language.Haskell.GhcMod.Monad
|
||||
Language.Haskell.GhcMod.PkgDoc
|
||||
Language.Haskell.GhcMod.Read
|
||||
Language.Haskell.GhcMod.SrcUtils
|
||||
Language.Haskell.GhcMod.Target
|
||||
Language.Haskell.GhcMod.Types
|
||||
Language.Haskell.GhcMod.Utils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.8.61
|
||||
, io-choice
|
||||
, monad-journal >= 0.2.2.0
|
||||
, old-time
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc <= 7.4.2)
|
||||
-- Only used to constrain random to a version that still works with GHC 7.4
|
||||
Build-Depends: random <= 1.0.1.1
|
||||
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, directory
|
||||
, filepath
|
||||
, mtl >= 2.0
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Utils
|
||||
GHC-Options: -Wall -threaded
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, split
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Test-Suite doctest
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
HS-Source-Dirs: test
|
||||
Ghc-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: doctests.hs
|
||||
Build-Depends: base
|
||||
, doctest >= 0.9.3
|
||||
|
||||
Test-Suite spec
|
||||
Default-Language: Haskell2010
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: Main.hs
|
||||
Hs-Source-Dirs: test, .
|
||||
Ghc-Options: -Wall
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: Dir
|
||||
Spec
|
||||
BrowseSpec
|
||||
CabalApiSpec
|
||||
CheckSpec
|
||||
FlagSpec
|
||||
InfoSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
MonadSpec
|
||||
GhcPkgSpec
|
||||
TestUtils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.7.1
|
||||
, io-choice
|
||||
, monad-journal >= 0.2.2.0
|
||||
, old-time
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, hspec >= 1.8.2
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc < 7.6)
|
||||
Build-Depends: executable-path
|
||||
CPP-Options: -DSPEC=1
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: git://github.com/kazu-yamamoto/ghc-mod.git
|
@ -1,215 +0,0 @@
|
||||
Name: ghc-mod
|
||||
Version: 5.0.1
|
||||
Author: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
Daniel Gröber <dxld@darkboxed.org>
|
||||
Alejandro Serrano <trupill@gmail.com>
|
||||
Maintainer: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
License: BSD3
|
||||
License-File: LICENSE
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell Programming
|
||||
Description: The ghc-mod command is a backend command to enrich
|
||||
Haskell programming on editors including
|
||||
Emacs, Vim, and Sublime.
|
||||
The ghc-mod command is based on ghc-mod library
|
||||
which is a wrapper of GHC API.
|
||||
This package includes the ghc-mod command,
|
||||
the ghc-mod library, and Emacs front-end
|
||||
(for historical reasons).
|
||||
For more information, please see its home page.
|
||||
|
||||
Category: Development
|
||||
Cabal-Version: >= 1.10
|
||||
Build-Type: Simple
|
||||
Data-Dir: elisp
|
||||
Data-Files: Makefile ghc.el ghc-func.el ghc-doc.el ghc-comp.el
|
||||
ghc-check.el ghc-process.el ghc-command.el ghc-info.el
|
||||
ghc-ins-mod.el ghc-indent.el ghc-pkg.el ghc-rewrite.el
|
||||
Extra-Source-Files: ChangeLog
|
||||
test/data/*.cabal
|
||||
test/data/*.hs
|
||||
test/data/cabal.sandbox.config.in
|
||||
test/data/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
|
||||
test/data/broken-cabal/*.cabal
|
||||
test/data/broken-sandbox/*.cabal
|
||||
test/data/broken-sandbox/cabal.sandbox.config
|
||||
test/data/check-test-subdir/*.cabal
|
||||
test/data/check-test-subdir/src/Check/Test/*.hs
|
||||
test/data/check-test-subdir/test/*.hs
|
||||
test/data/check-test-subdir/test/Bar/*.hs
|
||||
test/data/check-packageid/cabal.sandbox.config.in
|
||||
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/duplicate-pkgver/cabal.sandbox.config.in
|
||||
test/data/duplicate-pkgver/duplicate-pkgver.cabal
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/ghc-mod-check/*.cabal
|
||||
test/data/ghc-mod-check/*.hs
|
||||
test/data/ghc-mod-check/Data/*.hs
|
||||
test/data/subdir1/subdir2/dummy
|
||||
test/data/.cabal-sandbox/packages/00-index.tar
|
||||
|
||||
Library
|
||||
Default-Language: Haskell2010
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Other-Modules: Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
Language.Haskell.GhcMod.Cabal16
|
||||
Language.Haskell.GhcMod.Cabal18
|
||||
Language.Haskell.GhcMod.CabalApi
|
||||
Language.Haskell.GhcMod.CabalConfig
|
||||
Language.Haskell.GhcMod.CaseSplit
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Convert
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
Language.Haskell.GhcMod.Debug
|
||||
Language.Haskell.GhcMod.Doc
|
||||
Language.Haskell.GhcMod.DynFlags
|
||||
Language.Haskell.GhcMod.FillSig
|
||||
Language.Haskell.GhcMod.Find
|
||||
Language.Haskell.GhcMod.Flag
|
||||
Language.Haskell.GhcMod.GHCApi
|
||||
Language.Haskell.GhcMod.GHCChoice
|
||||
Language.Haskell.GhcMod.Gap
|
||||
Language.Haskell.GhcMod.GhcPkg
|
||||
Language.Haskell.GhcMod.Info
|
||||
Language.Haskell.GhcMod.Lang
|
||||
Language.Haskell.GhcMod.Lint
|
||||
Language.Haskell.GhcMod.List
|
||||
Language.Haskell.GhcMod.Logger
|
||||
Language.Haskell.GhcMod.Monad
|
||||
Language.Haskell.GhcMod.PkgDoc
|
||||
Language.Haskell.GhcMod.Read
|
||||
Language.Haskell.GhcMod.SrcUtils
|
||||
Language.Haskell.GhcMod.Target
|
||||
Language.Haskell.GhcMod.Types
|
||||
Language.Haskell.GhcMod.Utils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.8.61
|
||||
, io-choice
|
||||
, monad-journal >= 0.2.2.0
|
||||
, old-time
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, directory
|
||||
, filepath
|
||||
, mtl >= 2.0
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Utils
|
||||
GHC-Options: -Wall -threaded
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, split
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Test-Suite doctest
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
HS-Source-Dirs: test
|
||||
Ghc-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: doctests.hs
|
||||
Build-Depends: base
|
||||
, doctest >= 0.9.3
|
||||
|
||||
Test-Suite spec
|
||||
Default-Language: Haskell2010
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: Main.hs
|
||||
Hs-Source-Dirs: test, .
|
||||
Ghc-Options: -Wall
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: Dir
|
||||
Spec
|
||||
BrowseSpec
|
||||
CabalApiSpec
|
||||
CheckSpec
|
||||
FlagSpec
|
||||
InfoSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
MonadSpec
|
||||
GhcPkgSpec
|
||||
TestUtils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.7.1
|
||||
, io-choice
|
||||
, monad-journal >= 0.2.2.0
|
||||
, old-time
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, hspec >= 1.8.2
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc < 7.6)
|
||||
Build-Depends: executable-path
|
||||
CPP-Options: -DSPEC=1
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: git://github.com/kazu-yamamoto/ghc-mod.git
|
@ -1,225 +0,0 @@
|
||||
Name: ghc-mod
|
||||
Version: 5.1.0.0
|
||||
Author: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
Daniel Gröber <dxld@darkboxed.org>
|
||||
Alejandro Serrano <trupill@gmail.com>
|
||||
Maintainer: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
License: BSD3
|
||||
License-File: LICENSE
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell Programming
|
||||
Description: The ghc-mod command is a backend command to enrich
|
||||
Haskell programming on editors including
|
||||
Emacs, Vim, and Sublime.
|
||||
The ghc-mod command is based on ghc-mod library
|
||||
which is a wrapper of GHC API.
|
||||
This package includes the ghc-mod command,
|
||||
the ghc-mod library, and Emacs front-end
|
||||
(for historical reasons).
|
||||
For more information, please see its home page.
|
||||
|
||||
Category: Development
|
||||
Cabal-Version: >= 1.10
|
||||
Build-Type: Simple
|
||||
Data-Dir: elisp
|
||||
Data-Files: Makefile ghc.el ghc-func.el ghc-doc.el ghc-comp.el
|
||||
ghc-check.el ghc-process.el ghc-command.el ghc-info.el
|
||||
ghc-ins-mod.el ghc-indent.el ghc-pkg.el ghc-rewrite.el
|
||||
Extra-Source-Files: ChangeLog
|
||||
test/data/*.cabal
|
||||
test/data/*.hs
|
||||
test/data/cabal.sandbox.config.in
|
||||
test/data/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
|
||||
test/data/broken-cabal/*.cabal
|
||||
test/data/broken-cabal/cabal.sandbox.config.in
|
||||
test/data/broken-sandbox/*.cabal
|
||||
test/data/broken-sandbox/cabal.sandbox.config
|
||||
test/data/cabal-flags/*.cabal
|
||||
test/data/check-test-subdir/*.cabal
|
||||
test/data/check-test-subdir/src/Check/Test/*.hs
|
||||
test/data/check-test-subdir/test/*.hs
|
||||
test/data/check-test-subdir/test/Bar/*.hs
|
||||
test/data/check-packageid/cabal.sandbox.config.in
|
||||
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/duplicate-pkgver/cabal.sandbox.config.in
|
||||
test/data/duplicate-pkgver/duplicate-pkgver.cabal
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/pattern-synonyms/*.cabal
|
||||
test/data/pattern-synonyms/*.hs
|
||||
test/data/ghc-mod-check/*.cabal
|
||||
test/data/ghc-mod-check/*.hs
|
||||
test/data/ghc-mod-check/Data/*.hs
|
||||
test/data/subdir1/subdir2/dummy
|
||||
test/data/.cabal-sandbox/packages/00-index.tar
|
||||
|
||||
Library
|
||||
Default-Language: Haskell2010
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Other-Modules: Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
Language.Haskell.GhcMod.Cabal16
|
||||
Language.Haskell.GhcMod.Cabal18
|
||||
Language.Haskell.GhcMod.Cabal21
|
||||
Language.Haskell.GhcMod.CabalApi
|
||||
Language.Haskell.GhcMod.CabalConfig
|
||||
Language.Haskell.GhcMod.CaseSplit
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Convert
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
Language.Haskell.GhcMod.Debug
|
||||
Language.Haskell.GhcMod.Doc
|
||||
Language.Haskell.GhcMod.DynFlags
|
||||
Language.Haskell.GhcMod.Error
|
||||
Language.Haskell.GhcMod.FillSig
|
||||
Language.Haskell.GhcMod.Find
|
||||
Language.Haskell.GhcMod.Flag
|
||||
Language.Haskell.GhcMod.GHCApi
|
||||
Language.Haskell.GhcMod.GHCChoice
|
||||
Language.Haskell.GhcMod.Gap
|
||||
Language.Haskell.GhcMod.GhcPkg
|
||||
Language.Haskell.GhcMod.Info
|
||||
Language.Haskell.GhcMod.Lang
|
||||
Language.Haskell.GhcMod.Lint
|
||||
Language.Haskell.GhcMod.Logger
|
||||
Language.Haskell.GhcMod.Monad
|
||||
Language.Haskell.GhcMod.Modules
|
||||
Language.Haskell.GhcMod.PkgDoc
|
||||
Language.Haskell.GhcMod.Read
|
||||
Language.Haskell.GhcMod.SrcUtils
|
||||
Language.Haskell.GhcMod.Target
|
||||
Language.Haskell.GhcMod.Types
|
||||
Language.Haskell.GhcMod.Utils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.8.61
|
||||
, io-choice
|
||||
, monad-journal >= 0.2.2.0 && < 0.2.3.2
|
||||
, old-time
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc <= 7.4.2)
|
||||
-- Only used to constrain random to a version that still works with GHC 7.4
|
||||
Build-Depends: random <= 1.0.1.1
|
||||
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, directory
|
||||
, filepath
|
||||
, mtl >= 2.0
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Utils
|
||||
GHC-Options: -Wall -threaded
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, async
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, split
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Test-Suite doctest
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
HS-Source-Dirs: test
|
||||
Ghc-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: doctests.hs
|
||||
Build-Depends: base
|
||||
, doctest >= 0.9.3
|
||||
|
||||
Test-Suite spec
|
||||
Default-Language: Haskell2010
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: Main.hs
|
||||
Hs-Source-Dirs: test, .
|
||||
Ghc-Options: -Wall
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: Dir
|
||||
Spec
|
||||
BrowseSpec
|
||||
CabalApiSpec
|
||||
CheckSpec
|
||||
FlagSpec
|
||||
InfoSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
MonadSpec
|
||||
GhcPkgSpec
|
||||
TestUtils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.7.1
|
||||
, io-choice
|
||||
, monad-journal >= 0.2.2.0 && < 0.2.3.2
|
||||
, old-time
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, hspec >= 1.8.2
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc < 7.6)
|
||||
Build-Depends: executable-path
|
||||
CPP-Options: -DSPEC=1
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: git://github.com/kazu-yamamoto/ghc-mod.git
|
@ -1,225 +0,0 @@
|
||||
Name: ghc-mod
|
||||
Version: 5.1.0.1
|
||||
Author: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
Daniel Gröber <dxld@darkboxed.org>
|
||||
Alejandro Serrano <trupill@gmail.com>
|
||||
Maintainer: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
License: BSD3
|
||||
License-File: LICENSE
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell Programming
|
||||
Description: The ghc-mod command is a backend command to enrich
|
||||
Haskell programming on editors including
|
||||
Emacs, Vim, and Sublime.
|
||||
The ghc-mod command is based on ghc-mod library
|
||||
which is a wrapper of GHC API.
|
||||
This package includes the ghc-mod command,
|
||||
the ghc-mod library, and Emacs front-end
|
||||
(for historical reasons).
|
||||
For more information, please see its home page.
|
||||
|
||||
Category: Development
|
||||
Cabal-Version: >= 1.10
|
||||
Build-Type: Simple
|
||||
Data-Dir: elisp
|
||||
Data-Files: Makefile ghc.el ghc-func.el ghc-doc.el ghc-comp.el
|
||||
ghc-check.el ghc-process.el ghc-command.el ghc-info.el
|
||||
ghc-ins-mod.el ghc-indent.el ghc-pkg.el ghc-rewrite.el
|
||||
Extra-Source-Files: ChangeLog
|
||||
test/data/*.cabal
|
||||
test/data/*.hs
|
||||
test/data/cabal.sandbox.config.in
|
||||
test/data/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
|
||||
test/data/broken-cabal/*.cabal
|
||||
test/data/broken-cabal/cabal.sandbox.config.in
|
||||
test/data/broken-sandbox/*.cabal
|
||||
test/data/broken-sandbox/cabal.sandbox.config
|
||||
test/data/cabal-flags/*.cabal
|
||||
test/data/check-test-subdir/*.cabal
|
||||
test/data/check-test-subdir/src/Check/Test/*.hs
|
||||
test/data/check-test-subdir/test/*.hs
|
||||
test/data/check-test-subdir/test/Bar/*.hs
|
||||
test/data/check-packageid/cabal.sandbox.config.in
|
||||
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/duplicate-pkgver/cabal.sandbox.config.in
|
||||
test/data/duplicate-pkgver/duplicate-pkgver.cabal
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/pattern-synonyms/*.cabal
|
||||
test/data/pattern-synonyms/*.hs
|
||||
test/data/ghc-mod-check/*.cabal
|
||||
test/data/ghc-mod-check/*.hs
|
||||
test/data/ghc-mod-check/Data/*.hs
|
||||
test/data/subdir1/subdir2/dummy
|
||||
test/data/.cabal-sandbox/packages/00-index.tar
|
||||
|
||||
Library
|
||||
Default-Language: Haskell2010
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Other-Modules: Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
Language.Haskell.GhcMod.Cabal16
|
||||
Language.Haskell.GhcMod.Cabal18
|
||||
Language.Haskell.GhcMod.Cabal21
|
||||
Language.Haskell.GhcMod.CabalApi
|
||||
Language.Haskell.GhcMod.CabalConfig
|
||||
Language.Haskell.GhcMod.CaseSplit
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Convert
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
Language.Haskell.GhcMod.Debug
|
||||
Language.Haskell.GhcMod.Doc
|
||||
Language.Haskell.GhcMod.DynFlags
|
||||
Language.Haskell.GhcMod.Error
|
||||
Language.Haskell.GhcMod.FillSig
|
||||
Language.Haskell.GhcMod.Find
|
||||
Language.Haskell.GhcMod.Flag
|
||||
Language.Haskell.GhcMod.GHCApi
|
||||
Language.Haskell.GhcMod.GHCChoice
|
||||
Language.Haskell.GhcMod.Gap
|
||||
Language.Haskell.GhcMod.GhcPkg
|
||||
Language.Haskell.GhcMod.Info
|
||||
Language.Haskell.GhcMod.Lang
|
||||
Language.Haskell.GhcMod.Lint
|
||||
Language.Haskell.GhcMod.Logger
|
||||
Language.Haskell.GhcMod.Monad
|
||||
Language.Haskell.GhcMod.Modules
|
||||
Language.Haskell.GhcMod.PkgDoc
|
||||
Language.Haskell.GhcMod.Read
|
||||
Language.Haskell.GhcMod.SrcUtils
|
||||
Language.Haskell.GhcMod.Target
|
||||
Language.Haskell.GhcMod.Types
|
||||
Language.Haskell.GhcMod.Utils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.8.61
|
||||
, io-choice
|
||||
, monad-journal >= 0.4
|
||||
, old-time
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc <= 7.4.2)
|
||||
-- Only used to constrain random to a version that still works with GHC 7.4
|
||||
Build-Depends: random <= 1.0.1.1
|
||||
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, directory
|
||||
, filepath
|
||||
, mtl >= 2.0
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Utils
|
||||
GHC-Options: -Wall -threaded
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, async
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, split
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Test-Suite doctest
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
HS-Source-Dirs: test
|
||||
Ghc-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: doctests.hs
|
||||
Build-Depends: base
|
||||
, doctest >= 0.9.3
|
||||
|
||||
Test-Suite spec
|
||||
Default-Language: Haskell2010
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: Main.hs
|
||||
Hs-Source-Dirs: test, .
|
||||
Ghc-Options: -Wall
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: Dir
|
||||
Spec
|
||||
BrowseSpec
|
||||
CabalApiSpec
|
||||
CheckSpec
|
||||
FlagSpec
|
||||
InfoSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
MonadSpec
|
||||
GhcPkgSpec
|
||||
TestUtils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.7.1
|
||||
, io-choice
|
||||
, monad-journal >= 0.4
|
||||
, old-time
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, hspec >= 1.8.2
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc < 7.6)
|
||||
Build-Depends: executable-path
|
||||
CPP-Options: -DSPEC=1
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: git://github.com/kazu-yamamoto/ghc-mod.git
|
@ -1,225 +0,0 @@
|
||||
Name: ghc-mod
|
||||
Version: 5.1.0.2
|
||||
Author: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
Daniel Gröber <dxld@darkboxed.org>
|
||||
Alejandro Serrano <trupill@gmail.com>
|
||||
Maintainer: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
License: BSD3
|
||||
License-File: LICENSE
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell Programming
|
||||
Description: The ghc-mod command is a backend command to enrich
|
||||
Haskell programming on editors including
|
||||
Emacs, Vim, and Sublime.
|
||||
The ghc-mod command is based on ghc-mod library
|
||||
which is a wrapper of GHC API.
|
||||
This package includes the ghc-mod command,
|
||||
the ghc-mod library, and Emacs front-end
|
||||
(for historical reasons).
|
||||
For more information, please see its home page.
|
||||
|
||||
Category: Development
|
||||
Cabal-Version: >= 1.10
|
||||
Build-Type: Simple
|
||||
Data-Dir: elisp
|
||||
Data-Files: Makefile ghc.el ghc-func.el ghc-doc.el ghc-comp.el
|
||||
ghc-check.el ghc-process.el ghc-command.el ghc-info.el
|
||||
ghc-ins-mod.el ghc-indent.el ghc-pkg.el ghc-rewrite.el
|
||||
Extra-Source-Files: ChangeLog
|
||||
test/data/*.cabal
|
||||
test/data/*.hs
|
||||
test/data/cabal.sandbox.config.in
|
||||
test/data/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
|
||||
test/data/broken-cabal/*.cabal
|
||||
test/data/broken-cabal/cabal.sandbox.config.in
|
||||
test/data/broken-sandbox/*.cabal
|
||||
test/data/broken-sandbox/cabal.sandbox.config
|
||||
test/data/cabal-flags/*.cabal
|
||||
test/data/check-test-subdir/*.cabal
|
||||
test/data/check-test-subdir/src/Check/Test/*.hs
|
||||
test/data/check-test-subdir/test/*.hs
|
||||
test/data/check-test-subdir/test/Bar/*.hs
|
||||
test/data/check-packageid/cabal.sandbox.config.in
|
||||
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/duplicate-pkgver/cabal.sandbox.config.in
|
||||
test/data/duplicate-pkgver/duplicate-pkgver.cabal
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/pattern-synonyms/*.cabal
|
||||
test/data/pattern-synonyms/*.hs
|
||||
test/data/ghc-mod-check/*.cabal
|
||||
test/data/ghc-mod-check/*.hs
|
||||
test/data/ghc-mod-check/Data/*.hs
|
||||
test/data/subdir1/subdir2/dummy
|
||||
test/data/.cabal-sandbox/packages/00-index.tar
|
||||
|
||||
Library
|
||||
Default-Language: Haskell2010
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Other-Modules: Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
Language.Haskell.GhcMod.Cabal16
|
||||
Language.Haskell.GhcMod.Cabal18
|
||||
Language.Haskell.GhcMod.Cabal21
|
||||
Language.Haskell.GhcMod.CabalApi
|
||||
Language.Haskell.GhcMod.CabalConfig
|
||||
Language.Haskell.GhcMod.CaseSplit
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Convert
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
Language.Haskell.GhcMod.Debug
|
||||
Language.Haskell.GhcMod.Doc
|
||||
Language.Haskell.GhcMod.DynFlags
|
||||
Language.Haskell.GhcMod.Error
|
||||
Language.Haskell.GhcMod.FillSig
|
||||
Language.Haskell.GhcMod.Find
|
||||
Language.Haskell.GhcMod.Flag
|
||||
Language.Haskell.GhcMod.GHCApi
|
||||
Language.Haskell.GhcMod.GHCChoice
|
||||
Language.Haskell.GhcMod.Gap
|
||||
Language.Haskell.GhcMod.GhcPkg
|
||||
Language.Haskell.GhcMod.Info
|
||||
Language.Haskell.GhcMod.Lang
|
||||
Language.Haskell.GhcMod.Lint
|
||||
Language.Haskell.GhcMod.Logger
|
||||
Language.Haskell.GhcMod.Monad
|
||||
Language.Haskell.GhcMod.Modules
|
||||
Language.Haskell.GhcMod.PkgDoc
|
||||
Language.Haskell.GhcMod.Read
|
||||
Language.Haskell.GhcMod.SrcUtils
|
||||
Language.Haskell.GhcMod.Target
|
||||
Language.Haskell.GhcMod.Types
|
||||
Language.Haskell.GhcMod.Utils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.8.61
|
||||
, io-choice
|
||||
, monad-journal >= 0.4
|
||||
, old-time
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc <= 7.4.2)
|
||||
-- Only used to constrain random to a version that still works with GHC 7.4
|
||||
Build-Depends: random <= 1.0.1.1
|
||||
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, directory
|
||||
, filepath
|
||||
, mtl >= 2.0
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Utils
|
||||
GHC-Options: -Wall -threaded
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, async
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, split
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Test-Suite doctest
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
HS-Source-Dirs: test
|
||||
Ghc-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: doctests.hs
|
||||
Build-Depends: base
|
||||
, doctest >= 0.9.3
|
||||
|
||||
Test-Suite spec
|
||||
Default-Language: Haskell2010
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: Main.hs
|
||||
Hs-Source-Dirs: test, .
|
||||
Ghc-Options: -Wall
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: Dir
|
||||
Spec
|
||||
BrowseSpec
|
||||
CabalApiSpec
|
||||
CheckSpec
|
||||
FlagSpec
|
||||
InfoSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
MonadSpec
|
||||
GhcPkgSpec
|
||||
TestUtils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.7.1
|
||||
, io-choice
|
||||
, monad-journal >= 0.4
|
||||
, old-time
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, hspec >= 1.8.2
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc < 7.6)
|
||||
Build-Depends: executable-path
|
||||
CPP-Options: -DSPEC=1
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: git://github.com/kazu-yamamoto/ghc-mod.git
|
@ -1,236 +0,0 @@
|
||||
Name: ghc-mod
|
||||
Version: 5.1.1.0
|
||||
Author: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
Daniel Gröber <dxld@darkboxed.org>
|
||||
Alejandro Serrano <trupill@gmail.com>
|
||||
Maintainer: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
License: BSD3
|
||||
License-File: LICENSE
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell Programming
|
||||
Description: The ghc-mod command is a backend command to enrich
|
||||
Haskell programming on editors including
|
||||
Emacs, Vim, and Sublime.
|
||||
The ghc-mod command is based on ghc-mod library
|
||||
which is a wrapper of GHC API.
|
||||
This package includes the ghc-mod command,
|
||||
the ghc-mod library, and Emacs front-end
|
||||
(for historical reasons).
|
||||
For more information, please see its home page.
|
||||
|
||||
Category: Development
|
||||
Cabal-Version: >= 1.10
|
||||
Build-Type: Simple
|
||||
Data-Dir: elisp
|
||||
Data-Files: Makefile ghc.el ghc-func.el ghc-doc.el ghc-comp.el
|
||||
ghc-check.el ghc-process.el ghc-command.el ghc-info.el
|
||||
ghc-ins-mod.el ghc-indent.el ghc-pkg.el ghc-rewrite.el
|
||||
Extra-Source-Files: ChangeLog
|
||||
test/data/*.cabal
|
||||
test/data/*.hs
|
||||
test/data/cabal.sandbox.config.in
|
||||
test/data/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
|
||||
test/data/broken-cabal/*.cabal
|
||||
test/data/broken-cabal/cabal.sandbox.config.in
|
||||
test/data/broken-sandbox/*.cabal
|
||||
test/data/broken-sandbox/cabal.sandbox.config
|
||||
test/data/cabal-flags/*.cabal
|
||||
test/data/check-test-subdir/*.cabal
|
||||
test/data/check-test-subdir/src/Check/Test/*.hs
|
||||
test/data/check-test-subdir/test/*.hs
|
||||
test/data/check-test-subdir/test/Bar/*.hs
|
||||
test/data/check-packageid/cabal.sandbox.config.in
|
||||
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/duplicate-pkgver/cabal.sandbox.config.in
|
||||
test/data/duplicate-pkgver/duplicate-pkgver.cabal
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/pattern-synonyms/*.cabal
|
||||
test/data/pattern-synonyms/*.hs
|
||||
test/data/ghc-mod-check/*.cabal
|
||||
test/data/ghc-mod-check/*.hs
|
||||
test/data/ghc-mod-check/Data/*.hs
|
||||
test/data/subdir1/subdir2/dummy
|
||||
test/data/.cabal-sandbox/packages/00-index.tar
|
||||
|
||||
Library
|
||||
Default-Language: Haskell2010
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Other-Modules: Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
Language.Haskell.GhcMod.Cabal16
|
||||
Language.Haskell.GhcMod.Cabal18
|
||||
Language.Haskell.GhcMod.Cabal21
|
||||
Language.Haskell.GhcMod.CabalApi
|
||||
Language.Haskell.GhcMod.CabalConfig
|
||||
Language.Haskell.GhcMod.CaseSplit
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Convert
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
Language.Haskell.GhcMod.Debug
|
||||
Language.Haskell.GhcMod.Doc
|
||||
Language.Haskell.GhcMod.DynFlags
|
||||
Language.Haskell.GhcMod.Error
|
||||
Language.Haskell.GhcMod.FillSig
|
||||
Language.Haskell.GhcMod.Find
|
||||
Language.Haskell.GhcMod.Flag
|
||||
Language.Haskell.GhcMod.GHCApi
|
||||
Language.Haskell.GhcMod.GHCChoice
|
||||
Language.Haskell.GhcMod.Gap
|
||||
Language.Haskell.GhcMod.GhcPkg
|
||||
Language.Haskell.GhcMod.Info
|
||||
Language.Haskell.GhcMod.Lang
|
||||
Language.Haskell.GhcMod.Lint
|
||||
Language.Haskell.GhcMod.Logger
|
||||
Language.Haskell.GhcMod.Modules
|
||||
Language.Haskell.GhcMod.Monad
|
||||
Language.Haskell.GhcMod.PkgDoc
|
||||
Language.Haskell.GhcMod.Read
|
||||
Language.Haskell.GhcMod.SrcUtils
|
||||
Language.Haskell.GhcMod.Target
|
||||
Language.Haskell.GhcMod.Types
|
||||
Language.Haskell.GhcMod.Utils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.8.61
|
||||
, io-choice
|
||||
, monad-journal >= 0.4
|
||||
, old-time
|
||||
, pretty
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc <= 7.4.2)
|
||||
-- Only used to constrain random to a version that still works with GHC 7.4
|
||||
Build-Depends: random <= 1.0.1.1
|
||||
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, data-default
|
||||
, directory
|
||||
, filepath
|
||||
, pretty
|
||||
, process
|
||||
, mtl >= 2.0
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Misc
|
||||
Utils
|
||||
GHC-Options: -Wall -threaded
|
||||
if os(windows)
|
||||
Cpp-Options: -DWINDOWS
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, async
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, old-time
|
||||
, process
|
||||
, split
|
||||
, time
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Test-Suite doctest
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
HS-Source-Dirs: test
|
||||
Ghc-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: doctests.hs
|
||||
Build-Depends: base
|
||||
, doctest >= 0.9.3
|
||||
|
||||
Test-Suite spec
|
||||
Default-Language: Haskell2010
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: Main.hs
|
||||
Hs-Source-Dirs: test, .
|
||||
Ghc-Options: -Wall
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: Dir
|
||||
Spec
|
||||
BrowseSpec
|
||||
CabalApiSpec
|
||||
CheckSpec
|
||||
FlagSpec
|
||||
InfoSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
MonadSpec
|
||||
GhcPkgSpec
|
||||
TestUtils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.7.1
|
||||
, io-choice
|
||||
, monad-journal >= 0.4
|
||||
, old-time
|
||||
, pretty
|
||||
, process
|
||||
, syb
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, hspec >= 1.8.2
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc < 7.6)
|
||||
Build-Depends: executable-path
|
||||
CPP-Options: -DSPEC=1
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: git://github.com/kazu-yamamoto/ghc-mod.git
|
@ -1,238 +0,0 @@
|
||||
Name: ghc-mod
|
||||
Version: 5.2.0.0
|
||||
Author: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
Daniel Gröber <dxld@darkboxed.org>
|
||||
Alejandro Serrano <trupill@gmail.com>
|
||||
Maintainer: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
License: BSD3
|
||||
License-File: LICENSE
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell Programming
|
||||
Description: The ghc-mod command is a backend command to enrich
|
||||
Haskell programming on editors including
|
||||
Emacs, Vim, and Sublime.
|
||||
The ghc-mod command is based on ghc-mod library
|
||||
which is a wrapper of GHC API.
|
||||
This package includes the ghc-mod command,
|
||||
the ghc-mod library, and Emacs front-end
|
||||
(for historical reasons).
|
||||
For more information, please see its home page.
|
||||
|
||||
Category: Development
|
||||
Cabal-Version: >= 1.10
|
||||
Build-Type: Simple
|
||||
Data-Dir: elisp
|
||||
Data-Files: Makefile ghc.el ghc-func.el ghc-doc.el ghc-comp.el
|
||||
ghc-check.el ghc-process.el ghc-command.el ghc-info.el
|
||||
ghc-ins-mod.el ghc-indent.el ghc-pkg.el ghc-rewrite.el
|
||||
Extra-Source-Files: ChangeLog
|
||||
test/data/*.cabal
|
||||
test/data/*.hs
|
||||
test/data/cabal.sandbox.config.in
|
||||
test/data/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
|
||||
test/data/broken-cabal/*.cabal
|
||||
test/data/broken-cabal/cabal.sandbox.config.in
|
||||
test/data/broken-sandbox/*.cabal
|
||||
test/data/broken-sandbox/cabal.sandbox.config
|
||||
test/data/cabal-flags/*.cabal
|
||||
test/data/check-test-subdir/*.cabal
|
||||
test/data/check-test-subdir/src/Check/Test/*.hs
|
||||
test/data/check-test-subdir/test/*.hs
|
||||
test/data/check-test-subdir/test/Bar/*.hs
|
||||
test/data/check-packageid/cabal.sandbox.config.in
|
||||
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/duplicate-pkgver/cabal.sandbox.config.in
|
||||
test/data/duplicate-pkgver/duplicate-pkgver.cabal
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/pattern-synonyms/*.cabal
|
||||
test/data/pattern-synonyms/*.hs
|
||||
test/data/ghc-mod-check/*.cabal
|
||||
test/data/ghc-mod-check/*.hs
|
||||
test/data/ghc-mod-check/Data/*.hs
|
||||
test/data/subdir1/subdir2/dummy
|
||||
test/data/.cabal-sandbox/packages/00-index.tar
|
||||
|
||||
Library
|
||||
Default-Language: Haskell2010
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Other-Modules: Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
Language.Haskell.GhcMod.Cabal16
|
||||
Language.Haskell.GhcMod.Cabal18
|
||||
Language.Haskell.GhcMod.Cabal21
|
||||
Language.Haskell.GhcMod.CabalApi
|
||||
Language.Haskell.GhcMod.CabalConfig
|
||||
Language.Haskell.GhcMod.CaseSplit
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Convert
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
Language.Haskell.GhcMod.Debug
|
||||
Language.Haskell.GhcMod.Doc
|
||||
Language.Haskell.GhcMod.DynFlags
|
||||
Language.Haskell.GhcMod.Error
|
||||
Language.Haskell.GhcMod.FillSig
|
||||
Language.Haskell.GhcMod.Find
|
||||
Language.Haskell.GhcMod.Flag
|
||||
Language.Haskell.GhcMod.GHCApi
|
||||
Language.Haskell.GhcMod.GHCChoice
|
||||
Language.Haskell.GhcMod.Gap
|
||||
Language.Haskell.GhcMod.GhcPkg
|
||||
Language.Haskell.GhcMod.Info
|
||||
Language.Haskell.GhcMod.Lang
|
||||
Language.Haskell.GhcMod.Lint
|
||||
Language.Haskell.GhcMod.Logger
|
||||
Language.Haskell.GhcMod.Modules
|
||||
Language.Haskell.GhcMod.Monad
|
||||
Language.Haskell.GhcMod.PkgDoc
|
||||
Language.Haskell.GhcMod.Read
|
||||
Language.Haskell.GhcMod.SrcUtils
|
||||
Language.Haskell.GhcMod.Target
|
||||
Language.Haskell.GhcMod.Types
|
||||
Language.Haskell.GhcMod.Utils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.8.61
|
||||
, io-choice
|
||||
, monad-journal >= 0.4
|
||||
, old-time
|
||||
, pretty
|
||||
, process
|
||||
, syb
|
||||
, temporary
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc <= 7.4.2)
|
||||
-- Only used to constrain random to a version that still works with GHC 7.4
|
||||
Build-Depends: random <= 1.0.1.1
|
||||
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, data-default
|
||||
, directory
|
||||
, filepath
|
||||
, pretty
|
||||
, process
|
||||
, mtl >= 2.0
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Misc
|
||||
Utils
|
||||
GHC-Options: -Wall -threaded
|
||||
if os(windows)
|
||||
Cpp-Options: -DWINDOWS
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, async
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, old-time
|
||||
, process
|
||||
, split
|
||||
, time
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Test-Suite doctest
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
HS-Source-Dirs: test
|
||||
Ghc-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: doctests.hs
|
||||
Build-Depends: base
|
||||
, doctest >= 0.9.3
|
||||
|
||||
Test-Suite spec
|
||||
Default-Language: Haskell2010
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: Main.hs
|
||||
Hs-Source-Dirs: test, .
|
||||
Ghc-Options: -Wall
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: Dir
|
||||
Spec
|
||||
BrowseSpec
|
||||
CabalApiSpec
|
||||
CheckSpec
|
||||
FlagSpec
|
||||
InfoSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
MonadSpec
|
||||
GhcPkgSpec
|
||||
TestUtils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.7.1
|
||||
, io-choice
|
||||
, monad-journal >= 0.4
|
||||
, old-time
|
||||
, pretty
|
||||
, process
|
||||
, syb
|
||||
, temporary
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, hspec >= 1.8.2
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc < 7.6)
|
||||
Build-Depends: executable-path
|
||||
CPP-Options: -DSPEC=1
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: git://github.com/kazu-yamamoto/ghc-mod.git
|
@ -1,242 +0,0 @@
|
||||
Name: ghc-mod
|
||||
Version: 5.2.1.0
|
||||
Author: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
Daniel Gröber <dxld@darkboxed.org>
|
||||
Alejandro Serrano <trupill@gmail.com>
|
||||
Maintainer: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
License: BSD3
|
||||
License-File: LICENSE
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell Programming
|
||||
Description: The ghc-mod command is a backend command to enrich
|
||||
Haskell programming on editors including
|
||||
Emacs, Vim, and Sublime.
|
||||
The ghc-mod command is based on ghc-mod library
|
||||
which is a wrapper of GHC API.
|
||||
This package includes the ghc-mod command,
|
||||
the ghc-mod library, and Emacs front-end
|
||||
(for historical reasons).
|
||||
For more information, please see its home page.
|
||||
|
||||
Category: Development
|
||||
Cabal-Version: >= 1.10
|
||||
Build-Type: Simple
|
||||
Data-Dir: elisp
|
||||
Data-Files: Makefile ghc.el ghc-func.el ghc-doc.el ghc-comp.el
|
||||
ghc-check.el ghc-process.el ghc-command.el ghc-info.el
|
||||
ghc-ins-mod.el ghc-indent.el ghc-pkg.el ghc-rewrite.el
|
||||
Extra-Source-Files: ChangeLog
|
||||
test/data/*.cabal
|
||||
test/data/*.hs
|
||||
test/data/cabal.sandbox.config.in
|
||||
test/data/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
|
||||
test/data/broken-cabal/*.cabal
|
||||
test/data/broken-cabal/cabal.sandbox.config.in
|
||||
test/data/broken-sandbox/*.cabal
|
||||
test/data/broken-sandbox/cabal.sandbox.config
|
||||
test/data/cabal-flags/*.cabal
|
||||
test/data/check-test-subdir/*.cabal
|
||||
test/data/check-test-subdir/src/Check/Test/*.hs
|
||||
test/data/check-test-subdir/test/*.hs
|
||||
test/data/check-test-subdir/test/Bar/*.hs
|
||||
test/data/check-packageid/cabal.sandbox.config.in
|
||||
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/duplicate-pkgver/cabal.sandbox.config.in
|
||||
test/data/duplicate-pkgver/duplicate-pkgver.cabal
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/pattern-synonyms/*.cabal
|
||||
test/data/pattern-synonyms/*.hs
|
||||
test/data/ghc-mod-check/*.cabal
|
||||
test/data/ghc-mod-check/*.hs
|
||||
test/data/ghc-mod-check/Data/*.hs
|
||||
test/data/subdir1/subdir2/dummy
|
||||
test/data/.cabal-sandbox/packages/00-index.tar
|
||||
|
||||
Library
|
||||
Default-Language: Haskell2010
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Other-Modules: Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
Language.Haskell.GhcMod.Cabal16
|
||||
Language.Haskell.GhcMod.Cabal18
|
||||
Language.Haskell.GhcMod.Cabal21
|
||||
Language.Haskell.GhcMod.CabalApi
|
||||
Language.Haskell.GhcMod.CabalConfig
|
||||
Language.Haskell.GhcMod.CaseSplit
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Convert
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
Language.Haskell.GhcMod.Debug
|
||||
Language.Haskell.GhcMod.Doc
|
||||
Language.Haskell.GhcMod.DynFlags
|
||||
Language.Haskell.GhcMod.Error
|
||||
Language.Haskell.GhcMod.FillSig
|
||||
Language.Haskell.GhcMod.Find
|
||||
Language.Haskell.GhcMod.Flag
|
||||
Language.Haskell.GhcMod.GHCApi
|
||||
Language.Haskell.GhcMod.GHCChoice
|
||||
Language.Haskell.GhcMod.Gap
|
||||
Language.Haskell.GhcMod.GhcPkg
|
||||
Language.Haskell.GhcMod.Info
|
||||
Language.Haskell.GhcMod.Lang
|
||||
Language.Haskell.GhcMod.Lint
|
||||
Language.Haskell.GhcMod.Logger
|
||||
Language.Haskell.GhcMod.Modules
|
||||
Language.Haskell.GhcMod.Monad
|
||||
Language.Haskell.GhcMod.PathsAndFiles
|
||||
Language.Haskell.GhcMod.PkgDoc
|
||||
Language.Haskell.GhcMod.Read
|
||||
Language.Haskell.GhcMod.SrcUtils
|
||||
Language.Haskell.GhcMod.Target
|
||||
Language.Haskell.GhcMod.Types
|
||||
Language.Haskell.GhcMod.Utils
|
||||
Language.Haskell.GhcMod.World
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.8.61
|
||||
, io-choice
|
||||
, monad-journal >= 0.4
|
||||
, old-time
|
||||
, pretty
|
||||
, process
|
||||
, syb
|
||||
, temporary
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc <= 7.4.2)
|
||||
-- Only used to constrain random to a version that still works with GHC 7.4
|
||||
Build-Depends: random <= 1.0.1.1
|
||||
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, async
|
||||
, data-default
|
||||
, directory
|
||||
, filepath
|
||||
, pretty
|
||||
, process
|
||||
, split
|
||||
, mtl >= 2.0
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Misc
|
||||
Utils
|
||||
GHC-Options: -Wall -threaded
|
||||
if os(windows)
|
||||
Cpp-Options: -DWINDOWS
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, async
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, old-time
|
||||
, process
|
||||
, split
|
||||
, time
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Test-Suite doctest
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
HS-Source-Dirs: test
|
||||
Ghc-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: doctests.hs
|
||||
Build-Depends: base
|
||||
, doctest >= 0.9.3
|
||||
|
||||
Test-Suite spec
|
||||
Default-Language: Haskell2010
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: Main.hs
|
||||
Hs-Source-Dirs: test, .
|
||||
Ghc-Options: -Wall
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: BrowseSpec
|
||||
CabalApiSpec
|
||||
CheckSpec
|
||||
Dir
|
||||
FlagSpec
|
||||
InfoSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
MonadSpec
|
||||
PathsAndFilesSpec
|
||||
Spec
|
||||
TestUtils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.7.1
|
||||
, io-choice
|
||||
, monad-journal >= 0.4
|
||||
, old-time
|
||||
, pretty
|
||||
, process
|
||||
, syb
|
||||
, temporary
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, hspec >= 1.8.2
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc < 7.6)
|
||||
Build-Depends: executable-path
|
||||
CPP-Options: -DSPEC=1
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: git://github.com/kazu-yamamoto/ghc-mod.git
|
@ -1,243 +0,0 @@
|
||||
Name: ghc-mod
|
||||
Version: 5.2.1.1
|
||||
Author: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
Daniel Gröber <dxld@darkboxed.org>
|
||||
Alejandro Serrano <trupill@gmail.com>
|
||||
Maintainer: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
License: BSD3
|
||||
License-File: LICENSE
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell Programming
|
||||
Description: The ghc-mod command is a backend command to enrich
|
||||
Haskell programming on editors including
|
||||
Emacs, Vim, and Sublime.
|
||||
The ghc-mod command is based on ghc-mod library
|
||||
which is a wrapper of GHC API.
|
||||
This package includes the ghc-mod command,
|
||||
the ghc-mod library, and Emacs front-end
|
||||
(for historical reasons).
|
||||
For more information, please see its home page.
|
||||
|
||||
Category: Development
|
||||
Cabal-Version: >= 1.10
|
||||
Build-Type: Simple
|
||||
Data-Dir: elisp
|
||||
Data-Files: Makefile ghc.el ghc-func.el ghc-doc.el ghc-comp.el
|
||||
ghc-check.el ghc-process.el ghc-command.el ghc-info.el
|
||||
ghc-ins-mod.el ghc-indent.el ghc-pkg.el ghc-rewrite.el
|
||||
Extra-Source-Files: ChangeLog
|
||||
test/data/*.cabal
|
||||
test/data/*.hs
|
||||
test/data/cabal.sandbox.config.in
|
||||
test/data/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
|
||||
test/data/broken-cabal/*.cabal
|
||||
test/data/broken-cabal/cabal.sandbox.config.in
|
||||
test/data/broken-sandbox/*.cabal
|
||||
test/data/broken-sandbox/cabal.sandbox.config
|
||||
test/data/case-split/*.hs
|
||||
test/data/cabal-flags/*.cabal
|
||||
test/data/check-test-subdir/*.cabal
|
||||
test/data/check-test-subdir/src/Check/Test/*.hs
|
||||
test/data/check-test-subdir/test/*.hs
|
||||
test/data/check-test-subdir/test/Bar/*.hs
|
||||
test/data/check-packageid/cabal.sandbox.config.in
|
||||
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/duplicate-pkgver/cabal.sandbox.config.in
|
||||
test/data/duplicate-pkgver/duplicate-pkgver.cabal
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/pattern-synonyms/*.cabal
|
||||
test/data/pattern-synonyms/*.hs
|
||||
test/data/ghc-mod-check/*.cabal
|
||||
test/data/ghc-mod-check/*.hs
|
||||
test/data/ghc-mod-check/Data/*.hs
|
||||
test/data/subdir1/subdir2/dummy
|
||||
test/data/.cabal-sandbox/packages/00-index.tar
|
||||
|
||||
Library
|
||||
Default-Language: Haskell2010
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Other-Modules: Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
Language.Haskell.GhcMod.Cabal16
|
||||
Language.Haskell.GhcMod.Cabal18
|
||||
Language.Haskell.GhcMod.Cabal21
|
||||
Language.Haskell.GhcMod.CabalApi
|
||||
Language.Haskell.GhcMod.CabalConfig
|
||||
Language.Haskell.GhcMod.CaseSplit
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Convert
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
Language.Haskell.GhcMod.Debug
|
||||
Language.Haskell.GhcMod.Doc
|
||||
Language.Haskell.GhcMod.DynFlags
|
||||
Language.Haskell.GhcMod.Error
|
||||
Language.Haskell.GhcMod.FillSig
|
||||
Language.Haskell.GhcMod.Find
|
||||
Language.Haskell.GhcMod.Flag
|
||||
Language.Haskell.GhcMod.GHCApi
|
||||
Language.Haskell.GhcMod.GHCChoice
|
||||
Language.Haskell.GhcMod.Gap
|
||||
Language.Haskell.GhcMod.GhcPkg
|
||||
Language.Haskell.GhcMod.Info
|
||||
Language.Haskell.GhcMod.Lang
|
||||
Language.Haskell.GhcMod.Lint
|
||||
Language.Haskell.GhcMod.Logger
|
||||
Language.Haskell.GhcMod.Modules
|
||||
Language.Haskell.GhcMod.Monad
|
||||
Language.Haskell.GhcMod.PathsAndFiles
|
||||
Language.Haskell.GhcMod.PkgDoc
|
||||
Language.Haskell.GhcMod.Read
|
||||
Language.Haskell.GhcMod.SrcUtils
|
||||
Language.Haskell.GhcMod.Target
|
||||
Language.Haskell.GhcMod.Types
|
||||
Language.Haskell.GhcMod.Utils
|
||||
Language.Haskell.GhcMod.World
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.8.61
|
||||
, io-choice
|
||||
, monad-journal >= 0.4
|
||||
, old-time
|
||||
, pretty
|
||||
, process
|
||||
, syb
|
||||
, temporary
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc <= 7.4.2)
|
||||
-- Only used to constrain random to a version that still works with GHC 7.4
|
||||
Build-Depends: random <= 1.0.1.1
|
||||
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, async
|
||||
, data-default
|
||||
, directory
|
||||
, filepath
|
||||
, pretty
|
||||
, process
|
||||
, split
|
||||
, mtl >= 2.0
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Misc
|
||||
Utils
|
||||
GHC-Options: -Wall -threaded
|
||||
if os(windows)
|
||||
Cpp-Options: -DWINDOWS
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, async
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, old-time
|
||||
, process
|
||||
, split
|
||||
, time
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Test-Suite doctest
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
HS-Source-Dirs: test
|
||||
Ghc-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: doctests.hs
|
||||
Build-Depends: base
|
||||
, doctest >= 0.9.3
|
||||
|
||||
Test-Suite spec
|
||||
Default-Language: Haskell2010
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: Main.hs
|
||||
Hs-Source-Dirs: test, .
|
||||
Ghc-Options: -Wall
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: BrowseSpec
|
||||
CabalApiSpec
|
||||
CheckSpec
|
||||
Dir
|
||||
FlagSpec
|
||||
InfoSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
MonadSpec
|
||||
PathsAndFilesSpec
|
||||
Spec
|
||||
TestUtils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.7.1
|
||||
, io-choice
|
||||
, monad-journal >= 0.4
|
||||
, old-time
|
||||
, pretty
|
||||
, process
|
||||
, syb
|
||||
, temporary
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, hspec >= 1.8.2
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc < 7.6)
|
||||
Build-Depends: executable-path
|
||||
CPP-Options: -DSPEC=1
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: git://github.com/kazu-yamamoto/ghc-mod.git
|
@ -1,243 +0,0 @@
|
||||
Name: ghc-mod
|
||||
Version: 5.2.1.2
|
||||
Author: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
Daniel Gröber <dxld@darkboxed.org>
|
||||
Alejandro Serrano <trupill@gmail.com>
|
||||
Maintainer: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
License: BSD3
|
||||
License-File: LICENSE
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell Programming
|
||||
Description: The ghc-mod command is a backend command to enrich
|
||||
Haskell programming on editors including
|
||||
Emacs, Vim, and Sublime.
|
||||
The ghc-mod command is based on ghc-mod library
|
||||
which is a wrapper of GHC API.
|
||||
This package includes the ghc-mod command,
|
||||
the ghc-mod library, and Emacs front-end
|
||||
(for historical reasons).
|
||||
For more information, please see its home page.
|
||||
|
||||
Category: Development
|
||||
Cabal-Version: >= 1.10
|
||||
Build-Type: Simple
|
||||
Data-Dir: elisp
|
||||
Data-Files: Makefile ghc.el ghc-func.el ghc-doc.el ghc-comp.el
|
||||
ghc-check.el ghc-process.el ghc-command.el ghc-info.el
|
||||
ghc-ins-mod.el ghc-indent.el ghc-pkg.el ghc-rewrite.el
|
||||
Extra-Source-Files: ChangeLog
|
||||
test/data/*.cabal
|
||||
test/data/*.hs
|
||||
test/data/cabal.sandbox.config.in
|
||||
test/data/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
|
||||
test/data/broken-cabal/*.cabal
|
||||
test/data/broken-cabal/cabal.sandbox.config.in
|
||||
test/data/broken-sandbox/*.cabal
|
||||
test/data/broken-sandbox/cabal.sandbox.config
|
||||
test/data/case-split/*.hs
|
||||
test/data/cabal-flags/*.cabal
|
||||
test/data/check-test-subdir/*.cabal
|
||||
test/data/check-test-subdir/src/Check/Test/*.hs
|
||||
test/data/check-test-subdir/test/*.hs
|
||||
test/data/check-test-subdir/test/Bar/*.hs
|
||||
test/data/check-packageid/cabal.sandbox.config.in
|
||||
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/duplicate-pkgver/cabal.sandbox.config.in
|
||||
test/data/duplicate-pkgver/duplicate-pkgver.cabal
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/pattern-synonyms/*.cabal
|
||||
test/data/pattern-synonyms/*.hs
|
||||
test/data/ghc-mod-check/*.cabal
|
||||
test/data/ghc-mod-check/*.hs
|
||||
test/data/ghc-mod-check/Data/*.hs
|
||||
test/data/subdir1/subdir2/dummy
|
||||
test/data/.cabal-sandbox/packages/00-index.tar
|
||||
|
||||
Library
|
||||
Default-Language: Haskell2010
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Other-Modules: Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
Language.Haskell.GhcMod.Cabal16
|
||||
Language.Haskell.GhcMod.Cabal18
|
||||
Language.Haskell.GhcMod.Cabal21
|
||||
Language.Haskell.GhcMod.CabalApi
|
||||
Language.Haskell.GhcMod.CabalConfig
|
||||
Language.Haskell.GhcMod.CaseSplit
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Convert
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
Language.Haskell.GhcMod.Debug
|
||||
Language.Haskell.GhcMod.Doc
|
||||
Language.Haskell.GhcMod.DynFlags
|
||||
Language.Haskell.GhcMod.Error
|
||||
Language.Haskell.GhcMod.FillSig
|
||||
Language.Haskell.GhcMod.Find
|
||||
Language.Haskell.GhcMod.Flag
|
||||
Language.Haskell.GhcMod.GHCApi
|
||||
Language.Haskell.GhcMod.GHCChoice
|
||||
Language.Haskell.GhcMod.Gap
|
||||
Language.Haskell.GhcMod.GhcPkg
|
||||
Language.Haskell.GhcMod.Info
|
||||
Language.Haskell.GhcMod.Lang
|
||||
Language.Haskell.GhcMod.Lint
|
||||
Language.Haskell.GhcMod.Logger
|
||||
Language.Haskell.GhcMod.Modules
|
||||
Language.Haskell.GhcMod.Monad
|
||||
Language.Haskell.GhcMod.PathsAndFiles
|
||||
Language.Haskell.GhcMod.PkgDoc
|
||||
Language.Haskell.GhcMod.Read
|
||||
Language.Haskell.GhcMod.SrcUtils
|
||||
Language.Haskell.GhcMod.Target
|
||||
Language.Haskell.GhcMod.Types
|
||||
Language.Haskell.GhcMod.Utils
|
||||
Language.Haskell.GhcMod.World
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.8.61
|
||||
, io-choice
|
||||
, monad-journal >= 0.4
|
||||
, old-time
|
||||
, pretty
|
||||
, process
|
||||
, syb
|
||||
, temporary
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc <= 7.4.2)
|
||||
-- Only used to constrain random to a version that still works with GHC 7.4
|
||||
Build-Depends: random <= 1.0.1.1
|
||||
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, async
|
||||
, data-default
|
||||
, directory
|
||||
, filepath
|
||||
, pretty
|
||||
, process
|
||||
, split
|
||||
, mtl >= 2.0
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Misc
|
||||
Utils
|
||||
GHC-Options: -Wall -threaded
|
||||
if os(windows)
|
||||
Cpp-Options: -DWINDOWS
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, async
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, old-time
|
||||
, process
|
||||
, split
|
||||
, time
|
||||
, ghc
|
||||
, ghc-mod
|
||||
|
||||
Test-Suite doctest
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
HS-Source-Dirs: test
|
||||
Ghc-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: doctests.hs
|
||||
Build-Depends: base
|
||||
, doctest >= 0.9.3
|
||||
|
||||
Test-Suite spec
|
||||
Default-Language: Haskell2010
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: Main.hs
|
||||
Hs-Source-Dirs: test, .
|
||||
Ghc-Options: -Wall
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: BrowseSpec
|
||||
CabalApiSpec
|
||||
CheckSpec
|
||||
Dir
|
||||
FlagSpec
|
||||
InfoSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
MonadSpec
|
||||
PathsAndFilesSpec
|
||||
Spec
|
||||
TestUtils
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, containers
|
||||
, deepseq
|
||||
, directory
|
||||
, filepath
|
||||
, ghc
|
||||
, ghc-paths
|
||||
, ghc-syb-utils
|
||||
, hlint >= 1.7.1
|
||||
, io-choice
|
||||
, monad-journal >= 0.4
|
||||
, old-time
|
||||
, pretty
|
||||
, process
|
||||
, syb
|
||||
, temporary
|
||||
, time
|
||||
, transformers
|
||||
, transformers-base
|
||||
, mtl >= 2.0
|
||||
, monad-control
|
||||
, hspec >= 1.8.2
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
, djinn-ghc >= 0.0.2.2
|
||||
if impl(ghc >= 7.8)
|
||||
Build-Depends: Cabal >= 1.18
|
||||
else
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
if impl(ghc < 7.6)
|
||||
Build-Depends: executable-path
|
||||
CPP-Options: -DSPEC=1
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: git://github.com/kazu-yamamoto/ghc-mod.git
|
@ -1,250 +0,0 @@
|
||||
X-Revision: 3
|
||||
Name: ghc-mod
|
||||
Version: 5.3.0.0
|
||||
Author: Kazu Yamamoto <kazu@iij.ad.jp>,
|
||||
Daniel Gröber <dxld@darkboxed.org>,
|
||||
Alejandro Serrano <trupill@gmail.com>
|
||||
Maintainer: Daniel Gröber <dxld@darkboxed.org>
|
||||
License: AGPL-3
|
||||
License-File: LICENSE
|
||||
License-Files: COPYING.BSD3 COPYING.AGPL3
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell Programming
|
||||
Description:
|
||||
ghc-mod is a backend program to enrich Haskell programming in editors. It
|
||||
strives to offer most of the features one has come to expect from modern IDEs
|
||||
in any editor.
|
||||
|
||||
ghc-mod provides a library for other haskell programs to use as well as a
|
||||
standalone program for easy editor integration. All of the fundamental
|
||||
functionality of the frontend program can be accessed through the library
|
||||
however many implementation details are hidden and if you want to
|
||||
significantly extend ghc-mod you should submit these changes upstream instead
|
||||
of implementing them on top of the library.
|
||||
|
||||
For more information, please see its home page.
|
||||
|
||||
Category: GHC, Development
|
||||
Cabal-Version: >= 1.14
|
||||
Build-Type: Custom
|
||||
Data-Files: elisp/Makefile
|
||||
elisp/*.el
|
||||
Data-Files: LICENSE COPYING.BSD3 COPYING.AGPL3
|
||||
Extra-Source-Files: ChangeLog
|
||||
SetupCompat.hs
|
||||
NotCPP/*.hs
|
||||
test/data/annotations/*.hs
|
||||
test/data/broken-cabal/*.cabal
|
||||
test/data/broken-cabal/cabal.sandbox.config.in
|
||||
test/data/broken-sandbox/cabal.sandbox.config
|
||||
test/data/broken-sandbox/dummy.cabal
|
||||
test/data/cabal-flags/cabal-flags.cabal
|
||||
test/data/cabal-project/*.cabal
|
||||
test/data/cabal-project/*.hs
|
||||
test/data/cabal-project/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
|
||||
test/data/cabal-project/cabal.sandbox.config.in
|
||||
test/data/cabal-project/subdir1/subdir2/dummy
|
||||
test/data/case-split/*.hs
|
||||
test/data/check-packageid/cabal.sandbox.config.in
|
||||
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/check-test-subdir/*.cabal
|
||||
test/data/check-test-subdir/src/Check/Test/*.hs
|
||||
test/data/check-test-subdir/test/*.hs
|
||||
test/data/check-test-subdir/test/Bar/*.hs
|
||||
test/data/duplicate-pkgver/cabal.sandbox.config.in
|
||||
test/data/duplicate-pkgver/duplicate-pkgver.cabal
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/foreign-export/*.hs
|
||||
test/data/ghc-mod-check/*.cabal
|
||||
test/data/ghc-mod-check/*.hs
|
||||
test/data/ghc-mod-check/lib/Data/*.hs
|
||||
test/data/hlint/*.hs
|
||||
test/data/home-module-graph/cpp/*.hs
|
||||
test/data/home-module-graph/cycle/*.hs
|
||||
test/data/home-module-graph/errors/*.hs
|
||||
test/data/home-module-graph/indirect/*.hs
|
||||
test/data/home-module-graph/indirect-update/*.hs
|
||||
test/data/import-cycle/*.hs
|
||||
test/data/non-exported/*.hs
|
||||
test/data/pattern-synonyms/*.cabal
|
||||
test/data/pattern-synonyms/*.hs
|
||||
test/data/quasi-quotes/*.hs
|
||||
test/data/template-haskell/*.hs
|
||||
test/data/target/*.hs
|
||||
test/data/check-missing-warnings/*.hs
|
||||
test/data/custom-cradle/custom-cradle.cabal
|
||||
test/data/custom-cradle/ghc-mod.package-db-stack
|
||||
test/data/custom-cradle/package-db-a/.gitkeep
|
||||
test/data/custom-cradle/package-db-b/.gitkeep
|
||||
test/data/custom-cradle/package-db-c/.gitkeep
|
||||
test/data/cabal-preprocessors/*.cabal
|
||||
test/data/cabal-preprocessors/*.hs
|
||||
test/data/cabal-preprocessors/*.hsc
|
||||
|
||||
Library
|
||||
Default-Language: Haskell2010
|
||||
GHC-Options: -Wall -fno-warn-deprecations
|
||||
Default-Extensions: ScopedTypeVariables, RecordWildCards, NamedFieldPuns,
|
||||
ConstraintKinds, FlexibleContexts,
|
||||
DataKinds, KindSignatures, TypeOperators
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Utils
|
||||
Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
Language.Haskell.GhcMod.CabalHelper
|
||||
Language.Haskell.GhcMod.Caching
|
||||
Language.Haskell.GhcMod.Caching.Types
|
||||
Language.Haskell.GhcMod.CaseSplit
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Convert
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
Language.Haskell.GhcMod.Debug
|
||||
Language.Haskell.GhcMod.Doc
|
||||
Language.Haskell.GhcMod.DynFlags
|
||||
Language.Haskell.GhcMod.Error
|
||||
Language.Haskell.GhcMod.FillSig
|
||||
Language.Haskell.GhcMod.Find
|
||||
Language.Haskell.GhcMod.Flag
|
||||
Language.Haskell.GhcMod.Gap
|
||||
Language.Haskell.GhcMod.GhcPkg
|
||||
Language.Haskell.GhcMod.HomeModuleGraph
|
||||
Language.Haskell.GhcMod.Info
|
||||
Language.Haskell.GhcMod.Lang
|
||||
Language.Haskell.GhcMod.Lint
|
||||
Language.Haskell.GhcMod.Logger
|
||||
Language.Haskell.GhcMod.Logging
|
||||
Language.Haskell.GhcMod.Modules
|
||||
Language.Haskell.GhcMod.Monad
|
||||
Language.Haskell.GhcMod.Monad.Types
|
||||
Language.Haskell.GhcMod.Output
|
||||
Language.Haskell.GhcMod.PathsAndFiles
|
||||
Language.Haskell.GhcMod.PkgDoc
|
||||
Language.Haskell.GhcMod.Pretty
|
||||
Language.Haskell.GhcMod.Read
|
||||
Language.Haskell.GhcMod.SrcUtils
|
||||
Language.Haskell.GhcMod.Target
|
||||
Language.Haskell.GhcMod.Types
|
||||
Language.Haskell.GhcMod.Utils
|
||||
Language.Haskell.GhcMod.World
|
||||
Build-Depends: base < 5 && >= 4.0
|
||||
, bytestring < 0.11
|
||||
, cereal < 0.5 && >= 0.4
|
||||
, containers < 0.6
|
||||
, cabal-helper < 0.6 && >= 0.5.1.0
|
||||
, deepseq < 1.5
|
||||
, directory < 1.3
|
||||
, filepath < 1.5
|
||||
, ghc < 7.11
|
||||
, ghc-paths < 0.2
|
||||
, ghc-syb-utils < 0.3
|
||||
, hlint < 1.10 && >= 1.8.61
|
||||
, monad-journal < 0.8 && >= 0.4
|
||||
, old-time < 1.2
|
||||
, pretty < 1.2
|
||||
, process < 1.3
|
||||
, syb < 0.7
|
||||
, temporary < 1.3
|
||||
, time < 1.6
|
||||
, transformers < 0.5
|
||||
, transformers-base < 0.5
|
||||
, mtl < 2.3 && >= 2.0
|
||||
, monad-control < 1.1 && >= 1
|
||||
, split < 0.3
|
||||
, haskell-src-exts < 1.17
|
||||
, text < 1.3
|
||||
, djinn-ghc < 0.1 && >= 0.0.2.2
|
||||
, fclabels == 2.0.*
|
||||
if impl(ghc < 7.8)
|
||||
Build-Depends: convertible
|
||||
if impl(ghc < 7.5)
|
||||
-- Only used to constrain random to a version that still works with GHC 7.4
|
||||
Build-Depends: random <= 1.0.1.1,
|
||||
ghc-prim
|
||||
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall -fno-warn-deprecations
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base < 5 && >= 4.0
|
||||
, async < 2.1
|
||||
, directory < 1.3
|
||||
, filepath < 1.5
|
||||
, pretty < 1.2
|
||||
, process < 1.3
|
||||
, split < 0.3
|
||||
, mtl < 2.3 && >= 2.0
|
||||
, ghc < 7.11
|
||||
, ghc-mod
|
||||
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Misc
|
||||
Utils
|
||||
GHC-Options: -Wall -threaded -fno-warn-deprecations
|
||||
if os(windows)
|
||||
Cpp-Options: -DWINDOWS
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src, .
|
||||
Build-Depends: base < 5 && >= 4.0
|
||||
, directory < 1.3
|
||||
, filepath < 1.5
|
||||
, process < 1.3
|
||||
, old-time < 1.2
|
||||
, time < 1.6
|
||||
|
||||
Test-Suite doctest
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
HS-Source-Dirs: test
|
||||
Ghc-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: doctests.hs
|
||||
if impl(ghc == 7.4.*)
|
||||
Buildable: False
|
||||
Build-Depends: base
|
||||
, doctest >= 0.9.3
|
||||
|
||||
Test-Suite spec
|
||||
Default-Language: Haskell2010
|
||||
Default-Extensions: ScopedTypeVariables, RecordWildCards, NamedFieldPuns,
|
||||
ConstraintKinds, FlexibleContexts,
|
||||
DataKinds, KindSignatures, TypeOperators
|
||||
Main-Is: Main.hs
|
||||
Hs-Source-Dirs: test, .
|
||||
Ghc-Options: -Wall -fno-warn-deprecations
|
||||
CPP-Options: -DSPEC=1
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Dir
|
||||
Spec
|
||||
TestUtils
|
||||
BrowseSpec
|
||||
CheckSpec
|
||||
FlagSpec
|
||||
InfoSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
MonadSpec
|
||||
PathsAndFilesSpec
|
||||
HomeModuleGraphSpec
|
||||
|
||||
Build-Depends: hspec >= 2.0.0
|
||||
if impl(ghc == 7.4.*)
|
||||
Build-Depends: executable-path
|
||||
X-Build-Depends-Like: CLibName
|
||||
|
||||
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: git://github.com/kazu-yamamoto/ghc-mod.git
|
@ -1,271 +0,0 @@
|
||||
X-Revision: 4
|
||||
Name: ghc-mod
|
||||
Version: 5.4.0.0
|
||||
Author: Kazu Yamamoto <kazu@iij.ad.jp>,
|
||||
Daniel Gröber <dxld@darkboxed.org>,
|
||||
Alejandro Serrano <trupill@gmail.com>
|
||||
Maintainer: Daniel Gröber <dxld@darkboxed.org>
|
||||
License: AGPL-3
|
||||
License-File: LICENSE
|
||||
License-Files: COPYING.BSD3 COPYING.AGPL3
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell Programming
|
||||
Description:
|
||||
ghc-mod is a backend program to enrich Haskell programming in editors. It
|
||||
strives to offer most of the features one has come to expect from modern IDEs
|
||||
in any editor.
|
||||
|
||||
ghc-mod provides a library for other haskell programs to use as well as a
|
||||
standalone program for easy editor integration. All of the fundamental
|
||||
functionality of the frontend program can be accessed through the library
|
||||
however many implementation details are hidden and if you want to
|
||||
significantly extend ghc-mod you should submit these changes upstream instead
|
||||
of implementing them on top of the library.
|
||||
|
||||
For more information, please see its home page.
|
||||
|
||||
Category: GHC, Development
|
||||
Cabal-Version: >= 1.14
|
||||
Build-Type: Custom
|
||||
Data-Files: elisp/Makefile
|
||||
elisp/*.el
|
||||
Data-Files: LICENSE COPYING.BSD3 COPYING.AGPL3
|
||||
Extra-Source-Files: ChangeLog
|
||||
SetupCompat.hs
|
||||
NotCPP/*.hs
|
||||
NotCPP/COPYING
|
||||
test/data/annotations/*.hs
|
||||
test/data/broken-cabal/*.cabal
|
||||
test/data/broken-cabal/cabal.sandbox.config.in
|
||||
test/data/broken-sandbox/cabal.sandbox.config
|
||||
test/data/broken-sandbox/dummy.cabal
|
||||
test/data/cabal-flags/cabal-flags.cabal
|
||||
test/data/cabal-project/*.cabal
|
||||
test/data/cabal-project/*.hs
|
||||
test/data/cabal-project/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b.conf
|
||||
test/data/cabal-project/cabal.sandbox.config.in
|
||||
test/data/cabal-project/subdir1/subdir2/dummy
|
||||
test/data/case-split/*.hs
|
||||
test/data/check-packageid/cabal.sandbox.config.in
|
||||
test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/check-test-subdir/*.cabal
|
||||
test/data/check-test-subdir/src/Check/Test/*.hs
|
||||
test/data/check-test-subdir/test/*.hs
|
||||
test/data/check-test-subdir/test/Bar/*.hs
|
||||
test/data/duplicate-pkgver/cabal.sandbox.config.in
|
||||
test/data/duplicate-pkgver/duplicate-pkgver.cabal
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112.conf
|
||||
test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d/template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c.conf
|
||||
test/data/foreign-export/*.hs
|
||||
test/data/ghc-mod-check/*.cabal
|
||||
test/data/ghc-mod-check/*.hs
|
||||
test/data/ghc-mod-check/lib/Data/*.hs
|
||||
test/data/hlint/*.hs
|
||||
test/data/home-module-graph/cpp/*.hs
|
||||
test/data/home-module-graph/cycle/*.hs
|
||||
test/data/home-module-graph/errors/*.hs
|
||||
test/data/home-module-graph/indirect/*.hs
|
||||
test/data/home-module-graph/indirect-update/*.hs
|
||||
test/data/import-cycle/*.hs
|
||||
test/data/non-exported/*.hs
|
||||
test/data/pattern-synonyms/*.cabal
|
||||
test/data/pattern-synonyms/*.hs
|
||||
test/data/quasi-quotes/*.hs
|
||||
test/data/template-haskell/*.hs
|
||||
test/data/target/*.hs
|
||||
test/data/check-missing-warnings/*.hs
|
||||
test/data/custom-cradle/custom-cradle.cabal
|
||||
test/data/custom-cradle/ghc-mod.package-db-stack
|
||||
test/data/custom-cradle/package-db-a/.gitkeep
|
||||
test/data/custom-cradle/package-db-b/.gitkeep
|
||||
test/data/custom-cradle/package-db-c/.gitkeep
|
||||
test/data/cabal-preprocessors/*.cabal
|
||||
test/data/cabal-preprocessors/*.hs
|
||||
test/data/cabal-preprocessors/*.hsc
|
||||
test/data/file-mapping/*.hs
|
||||
test/data/file-mapping/preprocessor/*.hs
|
||||
test/data/file-mapping/lhs/*.lhs
|
||||
test/data/nice-qualification/*.hs
|
||||
test/data/stack-project/stack.yaml
|
||||
test/data/stack-project/new-template.cabal
|
||||
test/data/stack-project/*.hs
|
||||
test/data/stack-project/app/*.hs
|
||||
test/data/stack-project/src/*.hs
|
||||
test/data/stack-project/test/*.hs
|
||||
|
||||
Library
|
||||
Default-Language: Haskell2010
|
||||
GHC-Options: -Wall -fno-warn-deprecations
|
||||
Default-Extensions: ScopedTypeVariables, RecordWildCards, NamedFieldPuns,
|
||||
ConstraintKinds, FlexibleContexts,
|
||||
DataKinds, KindSignatures, TypeOperators, ViewPatterns
|
||||
Exposed-Modules: Language.Haskell.GhcMod
|
||||
Language.Haskell.GhcMod.Internal
|
||||
Language.Haskell.GhcMod.Boot
|
||||
Language.Haskell.GhcMod.Browse
|
||||
Language.Haskell.GhcMod.CabalHelper
|
||||
Language.Haskell.GhcMod.Caching
|
||||
Language.Haskell.GhcMod.Caching.Types
|
||||
Language.Haskell.GhcMod.CaseSplit
|
||||
Language.Haskell.GhcMod.Check
|
||||
Language.Haskell.GhcMod.Convert
|
||||
Language.Haskell.GhcMod.Cradle
|
||||
Language.Haskell.GhcMod.CustomPackageDb
|
||||
Language.Haskell.GhcMod.Debug
|
||||
Language.Haskell.GhcMod.DebugLogger
|
||||
Language.Haskell.GhcMod.Doc
|
||||
Language.Haskell.GhcMod.DynFlags
|
||||
Language.Haskell.GhcMod.Error
|
||||
Language.Haskell.GhcMod.FileMapping
|
||||
Language.Haskell.GhcMod.FillSig
|
||||
Language.Haskell.GhcMod.Find
|
||||
Language.Haskell.GhcMod.Flag
|
||||
Language.Haskell.GhcMod.Gap
|
||||
Language.Haskell.GhcMod.GhcPkg
|
||||
Language.Haskell.GhcMod.HomeModuleGraph
|
||||
Language.Haskell.GhcMod.Info
|
||||
Language.Haskell.GhcMod.Lang
|
||||
Language.Haskell.GhcMod.Lint
|
||||
Language.Haskell.GhcMod.LightGhc
|
||||
Language.Haskell.GhcMod.Logger
|
||||
Language.Haskell.GhcMod.Logging
|
||||
Language.Haskell.GhcMod.Modules
|
||||
Language.Haskell.GhcMod.Monad
|
||||
Language.Haskell.GhcMod.Monad.Types
|
||||
Language.Haskell.GhcMod.Output
|
||||
Language.Haskell.GhcMod.PathsAndFiles
|
||||
Language.Haskell.GhcMod.PkgDoc
|
||||
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
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Utils
|
||||
Build-Depends: base < 5 && >= 4.0
|
||||
, bytestring < 0.11
|
||||
, cereal < 0.5 && >= 0.4
|
||||
, containers < 0.6
|
||||
, cabal-helper < 0.7 && >= 0.6.1.0
|
||||
, deepseq < 1.5
|
||||
, directory < 1.3
|
||||
, filepath < 1.5
|
||||
, ghc < 7.11
|
||||
, ghc-paths < 0.2
|
||||
, ghc-syb-utils < 0.3
|
||||
, hlint < 1.10 && >= 1.8.61
|
||||
, monad-journal < 0.8 && >= 0.4
|
||||
, old-time < 1.2
|
||||
, pretty < 1.2
|
||||
, process < 1.3
|
||||
, syb < 0.7
|
||||
, temporary < 1.3
|
||||
, time < 1.6
|
||||
, transformers < 0.5
|
||||
, transformers-base < 0.5
|
||||
, mtl < 2.3 && >= 2.0
|
||||
, monad-control < 1.1 && >= 1
|
||||
, split < 0.3
|
||||
, haskell-src-exts < 1.18
|
||||
, text < 1.3
|
||||
, djinn-ghc < 0.1 && >= 0.0.2.2
|
||||
, fclabels == 2.0.*
|
||||
, extra == 1.4.*
|
||||
, pipes == 4.1.*
|
||||
if impl(ghc < 7.8)
|
||||
Build-Depends: convertible
|
||||
if impl(ghc < 7.5)
|
||||
-- Only used to constrain random to a version that still works with GHC 7.4
|
||||
Build-Depends: random <= 1.0.1.1,
|
||||
ghc-prim
|
||||
|
||||
Executable ghc-mod
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
GHC-Options: -Wall -fno-warn-deprecations -threaded
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src
|
||||
Build-Depends: base < 5 && >= 4.0
|
||||
, async < 2.1
|
||||
, directory < 1.3
|
||||
, filepath < 1.5
|
||||
, pretty < 1.2
|
||||
, process < 1.3
|
||||
, split < 0.3
|
||||
, mtl < 2.3 && >= 2.0
|
||||
, ghc < 7.11
|
||||
, fclabels == 2.0.*
|
||||
, ghc-mod
|
||||
|
||||
Executable ghc-modi
|
||||
Default-Language: Haskell2010
|
||||
Main-Is: GHCModi.hs
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Misc
|
||||
Utils
|
||||
GHC-Options: -Wall -threaded -fno-warn-deprecations
|
||||
if os(windows)
|
||||
Cpp-Options: -DWINDOWS
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
HS-Source-Dirs: src, .
|
||||
Build-Depends: base < 5 && >= 4.0
|
||||
, directory < 1.3
|
||||
, filepath < 1.5
|
||||
, process < 1.3
|
||||
, old-time < 1.2
|
||||
, time < 1.6
|
||||
|
||||
Test-Suite doctest
|
||||
Type: exitcode-stdio-1.0
|
||||
Default-Language: Haskell2010
|
||||
HS-Source-Dirs: test
|
||||
Ghc-Options: -Wall
|
||||
Default-Extensions: ConstraintKinds, FlexibleContexts
|
||||
Main-Is: doctests.hs
|
||||
if impl(ghc == 7.4.*)
|
||||
Buildable: False
|
||||
Build-Depends: base
|
||||
, doctest < 0.11 && >= 0.9.3
|
||||
|
||||
Test-Suite spec
|
||||
Default-Language: Haskell2010
|
||||
Default-Extensions: ScopedTypeVariables, RecordWildCards, NamedFieldPuns,
|
||||
ConstraintKinds, FlexibleContexts,
|
||||
DataKinds, KindSignatures, TypeOperators, ViewPatterns
|
||||
Main-Is: Main.hs
|
||||
Hs-Source-Dirs: test, .
|
||||
Ghc-Options: -Wall -fno-warn-deprecations
|
||||
CPP-Options: -DSPEC=1
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: Paths_ghc_mod
|
||||
Dir
|
||||
Spec
|
||||
TestUtils
|
||||
BrowseSpec
|
||||
CustomPackageDbSpec
|
||||
CheckSpec
|
||||
FlagSpec
|
||||
InfoSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
MonadSpec
|
||||
PathsAndFilesSpec
|
||||
HomeModuleGraphSpec
|
||||
FileMappingSpec
|
||||
|
||||
Build-Depends: hspec < 2.3 && >= 2.0.0
|
||||
if impl(ghc == 7.4.*)
|
||||
Build-Depends: executable-path
|
||||
X-Build-Depends-Like: CLibName
|
||||
|
||||
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: https://github.com/kazu-yamamoto/ghc-mod.git
|
117
scripts/bounds.hs
Normal file
117
scripts/bounds.hs
Normal file
@ -0,0 +1,117 @@
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
import Control.Arrow
|
||||
import Data.List
|
||||
import Data.List.Split
|
||||
import Data.Maybe
|
||||
import Data.Function
|
||||
import Data.Map (Map)
|
||||
import qualified Data.Map as M
|
||||
import System.Environment
|
||||
import System.FilePath
|
||||
import System.Directory
|
||||
|
||||
import Distribution.Verbosity
|
||||
import Distribution.PackageDescription.Parse (readPackageDescription)
|
||||
import Distribution.PackageDescription.Configuration (flattenPackageDescription)
|
||||
import Distribution.PackageDescription
|
||||
import Distribution.Package
|
||||
import Distribution.Version
|
||||
import Distribution.Text
|
||||
import Text.PrettyPrint
|
||||
import System.Environment
|
||||
|
||||
|
||||
datadir = "hackage-metadata"
|
||||
|
||||
main = do
|
||||
[pkg,v] <- getArgs
|
||||
|
||||
let pkg_id = pkg ++ "-" ++ v
|
||||
cabal_file = datadir </> pkg_id <.> "cabal"
|
||||
|
||||
pkg_time <- getTime pkg v
|
||||
|
||||
ps <-
|
||||
mapMaybe (\case (p, "-any") -> Just p
|
||||
_ -> Nothing)
|
||||
|
||||
<$> getDeps cabal_file
|
||||
vs <- mapM (getClosestVersion pkg_time) ps
|
||||
print $ ps `zip` vs
|
||||
return ()
|
||||
|
||||
check :: VersionRange -> Version -> Bool
|
||||
check vr v = withinRange v vr
|
||||
|
||||
getClosestVersion :: Integer -> String -> IO String
|
||||
getClosestVersion pkg_time dep = do
|
||||
vs <- getVersions dep
|
||||
ts <- mapM (getTime dep) vs
|
||||
let vtalist = sortBy (flip compare `on` snd) $ vs `zip` ts
|
||||
((v,_t):_) = filter ((<pkg_time) . snd) vtalist
|
||||
-- Just v' = simpleParse v
|
||||
return v
|
||||
|
||||
getVersions :: String -> IO [String]
|
||||
getVersions p = do
|
||||
fs <- listDirectory datadir
|
||||
return $ nub
|
||||
$ map snd
|
||||
$ filter ((==p) . fst)
|
||||
$ map (parsePkgId . dropExtension)
|
||||
$ filter (p `isPrefixOf`) fs
|
||||
|
||||
getTime :: String -> String -> IO Integer
|
||||
getTime p v = do
|
||||
let pkg_id = p ++ "-" ++ v
|
||||
file = datadir </> pkg_id <.> "upload-date"
|
||||
read <$> readFile file
|
||||
|
||||
getDeps f = do
|
||||
pd <- flattenPackageDescription <$> readPackageDescription silent f
|
||||
return $ --nubBy ((==) `on` fst) $
|
||||
[ (unPackageName n, (render . disp) v)
|
||||
| (Dependency n v) <- buildDepends pd
|
||||
, not $ unPackageName n `elem` [
|
||||
"ghc-mod",
|
||||
"ghc",
|
||||
"array",
|
||||
"base",
|
||||
"bin-package-db",
|
||||
"binary",
|
||||
"bytestring",
|
||||
"containers",
|
||||
"deepseq",
|
||||
"directory",
|
||||
"filepath",
|
||||
"ghc-binary",
|
||||
"ghc-boot",
|
||||
"ghc-boot-th",
|
||||
"ghc-prim",
|
||||
"ghci",
|
||||
"haskelline",
|
||||
"haskell2010",
|
||||
"haskell98",
|
||||
"haskell98",
|
||||
"hoopl",
|
||||
"hpc",
|
||||
"integer-gmp",
|
||||
"old-locale",
|
||||
"old-time",
|
||||
"pretty",
|
||||
"process",
|
||||
"random",
|
||||
"rts",
|
||||
"template-haskell",
|
||||
"terminfo",
|
||||
"time",
|
||||
"transformers",
|
||||
"unix",
|
||||
"xhtml"
|
||||
]
|
||||
]
|
||||
|
||||
parsePkgId pkg_id = let
|
||||
v:pkgcs = reverse $ splitOn "-" pkg_id
|
||||
in
|
||||
(intercalate "-" $ reverse pkgcs, v)
|
@ -33,7 +33,7 @@ then
|
||||
fi
|
||||
|
||||
git checkout release
|
||||
#git merge master
|
||||
#git merge release-VER branch into 'release'
|
||||
git merge -s recursive -X theirs release-$VERSION
|
||||
|
||||
( tac ChangeLog; echo "\n$(date '+%Y-%m-%d') v$VERSION" ) | tac \
|
||||
@ -46,4 +46,4 @@ emacs -q -nw ChangeLog
|
||||
git add ChangeLog
|
||||
git commit -m "ChangeLog"
|
||||
|
||||
git tag "v$VERSION"
|
||||
git tag -f "v$VERSION"
|
||||
|
11
scripts/diff.hs
Normal file
11
scripts/diff.hs
Normal file
@ -0,0 +1,11 @@
|
||||
import Data.Tuple
|
||||
import System.FilePath
|
||||
import System.Environment
|
||||
import System.Process
|
||||
|
||||
main = do
|
||||
vs <- lines <$> getContents
|
||||
[pkg, dir] <- getArgs
|
||||
mapM_ system $ map (\(v1, v2) -> "diff -u --color=always " ++ file pkg dir v1 ++ " " ++ file pkg dir v2 ++ "; echo; echo; echo") $ map swap $ drop 1 vs `zip` vs
|
||||
where
|
||||
file pkg dir v = dir </> (pkg ++ "-" ++ v) <.> "cabal"
|
84
scripts/docker.sh
Executable file
84
scripts/docker.sh
Executable file
@ -0,0 +1,84 @@
|
||||
#!/bin/sh
|
||||
|
||||
namespace="registry.gitlab.com/dxld/ghc-mod"
|
||||
target="$1"
|
||||
|
||||
tmpdir=$(mktemp -p "${TMPDIR:-/tmp/}" -d ghc-mod-docker-XXXX) || exit 1
|
||||
trap 'rm -r '"$tmpdir" 0 2 15
|
||||
|
||||
while read ghc_rel ghc ghc_arch ghc_ext cabal image ghc_hash cabal_hash; do
|
||||
[ -n "$target" -a x"$ghc_rel" != x"$target" ] && continue
|
||||
|
||||
ghc_url="https://downloads.haskell.org/~ghc/${ghc_rel}/ghc-${ghc}-${ghc_arch}.tar.${ghc_ext}"
|
||||
cabal_install_url="https://www.haskell.org/cabal/release/cabal-install-${cabal}/cabal-install-${cabal}.tar.gz"
|
||||
|
||||
ADDITIONAL_COMMANDS=""
|
||||
WGET_OPTIONS=""
|
||||
|
||||
if [ x"$image" = x"debian:squeeze" ]; then
|
||||
WGET_OPTIONS="--no-check-certificate"
|
||||
GHC_VERIFY_COMMANDS="sha256sum -c ghc.sha256sum &&"
|
||||
CABAL_VERIFY_COMMANDS="sha256sum -c cabal.sha256sum &&"
|
||||
ADDITIONAL_PACKAGES=" libncursesw5"
|
||||
ADDITIONAL_COMMANDS='COPY sources.list /etc/apt/
|
||||
COPY 10-no-check-valid-until /etc/apt/apt.conf.d/
|
||||
COPY *.sha256sum /root/
|
||||
'
|
||||
|
||||
echo "$ghc_hash ghc-${ghc}-${ghc_arch}.tar.${ghc_ext}" \
|
||||
| cat > "$tmpdir"/ghc.sha256sum
|
||||
echo "$cabal_hash cabal-install-${cabal}.tar.gz" \
|
||||
| cat > "$tmpdir"/cabal.sha256sum
|
||||
|
||||
cat > "$tmpdir"/sources.list <<EOF
|
||||
deb http://archive.debian.org/debian-archive/debian/ squeeze main
|
||||
deb http://archive.debian.org/debian-archive/debian/ squeeze-lts main
|
||||
#deb http://snapshot.debian.org/archive/debian-security/20160216T165545Z/ squeeze/updates main
|
||||
EOF
|
||||
cat > "$tmpdir"/10-no-check-valid-until <<EOF
|
||||
Acquire::Check-Valid-Until "0";
|
||||
EOF
|
||||
fi
|
||||
|
||||
cat > "$tmpdir"/Dockerfile <<EOF
|
||||
FROM $image
|
||||
ARG GHC_VER
|
||||
ARG GHC_URL
|
||||
ARG CABAL_INSTALL_URL
|
||||
|
||||
## ensure locale is set during build
|
||||
ENV LANG C.UTF-8
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
$ADDITIONAL_COMMANDS
|
||||
|
||||
RUN apt-get update && apt-get upgrade && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
wget xz-utils gpgv ca-certificates build-essential libgmp3-dev zlib1g-dev $ADDITIONAL_PACKAGES && \
|
||||
apt-get clean
|
||||
RUN wget -nv $WGET_OPTIONS "\$GHC_URL" && $GHC_VERIFY_COMMANDS \
|
||||
tar -xf ghc-*.tar.* && \
|
||||
cd ghc-* && ./configure --prefix=/usr/local && make install && cd .. && \
|
||||
rm -r ghc-*
|
||||
RUN wget -nv $WGET_OPTIONS "\$CABAL_INSTALL_URL" && $CABAL_VERIFY_COMMANDS \
|
||||
tar -xf cabal-install-*.tar.* && \
|
||||
cd cabal-install-* && ./bootstrap.sh --global && cd .. && \
|
||||
rm -r cabal-*
|
||||
EOF
|
||||
|
||||
docker build \
|
||||
--build-arg GHC_URL="$ghc_url" \
|
||||
--build-arg CABAL_INSTALL_URL="$cabal_install_url" \
|
||||
-t "${namespace}:ghc${ghc}-cabal-install${cabal}" \
|
||||
"$tmpdir"
|
||||
done <<EOF
|
||||
8.2.1-rc1 8.2.0.20170404 x86_64-deb8-linux xz 1.24.0.2 debian:jessie
|
||||
8.0.2 8.0.2 x86_64-deb8-linux xz 1.24.0.2 debian:jessie
|
||||
7.10.3 7.10.3 x86_64-deb8-linux xz 1.22.8.0 debian:jessie
|
||||
7.8.4 7.8.4 x86_64-unknown-linux-deb7 xz 1.18.1.0 debian:jessie
|
||||
7.6.3 7.6.3 x86_64-unknown-linux bz2 1.18.1.0 debian:squeeze 398dd5fa6ed479c075ef9f638ef4fc2cc0fbf994e1b59b54d77c26a8e1e73ca0 d6abb6fef8204780a41aff2e93dfa297883673507cec557348aebf6b37843ae4
|
||||
7.4.2 7.4.2 x86_64-unknown-linux bz2 1.18.1.0 debian:squeeze da962575e2503dec250252d72a94b6bf69baef7a567b88e90fd6400ada527210 d6abb6fef8204780a41aff2e93dfa297883673507cec557348aebf6b37843ae4
|
||||
7.2.2 7.2.2 x86_64-unknown-linux bz2 1.18.1.0 debian:squeeze 43dd8b0f9bf713d51d2b1f3a3f5184add39d2a1375f7d3bec496e8a7520297f1 d6abb6fef8204780a41aff2e93dfa297883673507cec557348aebf6b37843ae4
|
||||
7.0.4 7.0.4 x86_64-unknown-linux bz2 1.18.1.0 debian:squeeze 29e122db0b7720a1604d9d3865fcc6d28b06acadcebd4f303f82fcce30cc8455 d6abb6fef8204780a41aff2e93dfa297883673507cec557348aebf6b37843ae4
|
||||
EOF
|
@ -17,12 +17,15 @@
|
||||
PACKAGE=$1
|
||||
OUTDIR=$2
|
||||
|
||||
versions="$(wget -O - https://hackage.haskell.org/package/"$PACKAGE"/preferred.json | jq '."normal-version"[]' -r)"
|
||||
versions="$(wget -O - https://hackage.haskell.org/package/"$PACKAGE"/preferred.json | jq '(."normal-version" + ."deprecated-version")[]' -r)"
|
||||
#versions="$(wget -O - https://hackage.haskell.org/package/"$PACKAGE"/preferred.json | jq '."deprecated-version"[]' -r)"
|
||||
|
||||
|
||||
|
||||
mkdir -p "$OUTDIR"
|
||||
|
||||
for v in $versions; do
|
||||
|
||||
wget https://hackage.haskell.org/package/"$PACKAGE-$v"/"$PACKAGE".cabal -O "$OUTDIR/${PACKAGE}-${v}.cabal"
|
||||
wget https://hackage.haskell.org/package/"$PACKAGE-$v"/"$PACKAGE".cabal -O "$OUTDIR/${PACKAGE}-${v}.cabal" &
|
||||
|
||||
done
|
||||
|
16
scripts/edit-bounds-macros.el
Normal file
16
scripts/edit-bounds-macros.el
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
(fset 'goto-lib-dep
|
||||
(lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ([134217788 21 19 94 108 105 98 114 97 114 121 13 19 98 117 105 108 100 45 100 101 112 101 110 100 115 58 13 19 44 32 25 13 18 44 13 6 6] 0 "%d")) arg)))
|
||||
|
||||
|
||||
(fset 'copy-dep-name
|
||||
(lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ([1 19 44 32 return 67108896 134217830 134217847 24 24 67108896 67108896] 0 "%d")) arg)))
|
||||
|
||||
(fset 'replace-with-lib-dep
|
||||
[?\C-a ?\M-x ?c ?o ?p ?y ?- ?d ?e ?p ?- ?n ?a ?m ?e ?\C-m ?\C-x ?r ? ?r ?\M-x ?g ?o ?t ?o ?- ?l ?i ?b ?- ?d ?e ?p ?\C-m ?\C- ?\C-e ?\M-w ?\C-x ?r ?j ?r ?\C-y ?\C-k ?\C-x ?\C-x ?\C- ?\C- ])
|
||||
|
||||
(fset 'yank-kill-replace
|
||||
[?\C- ?\C- ?\C-y ?\C-k ?\C-x ?\C-x ?\M-w])
|
||||
|
||||
(global-set-key (kbd "C-c C-r") 'replace-with-lib-dep)
|
||||
(global-set-key (kbd "C-c C-k") 'yank-kill-replace)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user