Skip to content

Commit

Permalink
Add support for GHC 8.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwl committed May 8, 2019
1 parent 4ad872a commit 660e302
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .circleci/config.yml
Expand Up @@ -65,6 +65,11 @@ jobs:
environment:
- STACK_FILE: "stack-8.6.4.yaml"
<<: *defaults

ghc-8.6.5:
environment:
- STACK_FILE: "stack-8.6.5.yaml"
<<: *defaults

workflows:
version: 2
Expand All @@ -76,3 +81,4 @@ workflows:
- ghc-8.4.4
- ghc-8.6.3
- ghc-8.6.4
- ghc-8.6.5
10 changes: 8 additions & 2 deletions README.md
Expand Up @@ -48,14 +48,20 @@ cd haskell-code-explorer

To build Haskell Code Explorer Stack ([https://docs.haskellstack.org/en/stable/README/](https://docs.haskellstack.org/en/stable/README/)) is needed.

At the moment Haskell Code Explorer supports GHC 8.6.4, GHC 8.6.3, GHC 8.4.4, GHC 8.4.3, GHC 8.2.2, and 8.0.2.
At the moment Haskell Code Explorer supports GHC 8.6.5, 8.6.4, GHC 8.6.3, GHC 8.4.4, GHC 8.4.3, GHC 8.2.2, and 8.0.2.

For GHC 8.6.4:
For GHC 8.6.5:

```bash
stack install
```

For GHC 8.6.4:

```bash
stack --stack-yaml=stack-8.6.4.yaml install
```

For GHC 8.6.3:

```bash
Expand Down
2 changes: 1 addition & 1 deletion install.hs
Expand Up @@ -41,7 +41,7 @@ import System.Process.Typed
-- | Keep this in sync with the stack.yamls at the top level of the project.
supportedGhcVersions :: [Version]
supportedGhcVersions =
map Version ["8.0.2", "8.2.2", "8.4.3", "8.4.4", "8.6.3", "8.6.4"]
map Version ["8.0.2", "8.2.2", "8.4.3", "8.4.4", "8.6.3", "8.6.4","8.6.5"]

newtype Version = Version { unVersion :: String } deriving Eq

Expand Down
7 changes: 6 additions & 1 deletion src/HaskellCodeExplorer/PackageInfo.hs
Expand Up @@ -264,7 +264,12 @@ createPackageInfo packageDirectoryPath mbDistDirRelativePath sourceCodePreproces
HCE.ComponentId . T.append "bench-" . T.pack $ name
chComponentNameToComponentId ChSetupHsName = HCE.ComponentId "setup"

#if MIN_VERSION_GLASGOW_HASKELL(8,6,4,0)


#if MIN_VERSION_GLASGOW_HASKELL(8,6,5,0)
ghcVersion :: Version
ghcVersion = Version {versionBranch = [8, 6, 5, 0], versionTags = []}
#elif MIN_VERSION_GLASGOW_HASKELL(8,6,4,0)
ghcVersion :: Version
ghcVersion = Version {versionBranch = [8, 6, 4, 0], versionTags = []}
#elif MIN_VERSION_GLASGOW_HASKELL(8,6,3,0)
Expand Down
8 changes: 8 additions & 0 deletions stack-8.6.5.yaml
@@ -0,0 +1,8 @@
resolver: lts-13.20
packages:
- '.'
- location: vendor/cabal-helper-0.8.1.2
extra-dep: true
allow-newer: true
extra-deps:
- cabal-plan-0.4.0.0
2 changes: 1 addition & 1 deletion stack.yaml
@@ -1,4 +1,4 @@
resolver: lts-13.12
resolver: lts-13.20
packages:
- '.'
- location: vendor/cabal-helper-0.8.1.2
Expand Down
6 changes: 4 additions & 2 deletions test/Main.hs
Expand Up @@ -155,9 +155,11 @@ moduleInfoSpec modInfo =
HCE.idOccMap (modInfo :: HCE.ModuleInfo) `shouldBe` testIdOccMap

stackYamlArg :: [String]
#if MIN_VERSION_GLASGOW_HASKELL(8,6,4,0)
#if MIN_VERSION_GLASGOW_HASKELL(8,6,5,0)
stackYamlArg = []
#elif MIN_VERSION_GLASGOW_HASKELL(8,6,1,0)
#elif MIN_VERSION_GLASGOW_HASKELL(8,6,4,0)
stackYamlArg = ["--stack-yaml=stack-8.6.4.yaml"]
#elif MIN_VERSION_GLASGOW_HASKELL(8,6,3,0)
stackYamlArg = ["--stack-yaml=stack-8.6.3.yaml"]
#elif MIN_VERSION_GLASGOW_HASKELL(8,4,4,0)
stackYamlArg = ["--stack-yaml=stack-8.4.4.yaml"]
Expand Down
1 change: 1 addition & 0 deletions test/test-package/stack-8.6.4.yaml
@@ -0,0 +1 @@
resolver: lts-13.12
1 change: 1 addition & 0 deletions test/test-package/stack-8.6.5.yaml
@@ -0,0 +1 @@
resolver: lts-13.20
2 changes: 1 addition & 1 deletion test/test-package/stack.yaml
@@ -1 +1 @@
resolver: lts-13.12
resolver: lts-13.20

0 comments on commit 660e302

Please sign in to comment.