Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit f4600b7

Browse files
authored
Merge pull request #1482 from Avi-D-coder/hie-bios
GHC 8.8 support
2 parents 08e2bb0 + fbeb428 commit f4600b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+262
-94
lines changed

.azure/linux-stack.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
matrix:
88
stack-def:
99
YAML_FILE: stack.yaml
10+
stack-8.8.1:
11+
YAML_FILE: stack-8.8.1.yaml
1012
stack-8.6.5:
1113
YAML_FILE: stack-8.6.5.yaml
1214
stack-8.6.4:

.azure/macos-stack.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
matrix:
88
stack-def:
99
YAML_FILE: stack.yaml
10+
stack-8.8.1:
11+
YAML_FILE: stack-8.8.1.yaml
1012
stack-8.6.5:
1113
YAML_FILE: stack-8.6.5.yaml
1214
stack-8.6.4:

.azure/windows-stack.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ jobs:
55
vmImage: windows-2019
66
strategy:
77
matrix:
8-
stack-def:
9-
YAML_FILE: stack.yaml
8+
# We can't use stack.yaml while it uses ghc-8.8.1
9+
# stack-def:
10+
# YAML_FILE: stack.yaml
1011
stack-8.6.5:
1112
YAML_FILE: stack-8.6.5.yaml
1213
stack-8.6.4:

.circleci/config.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
cabal:
150150
working_directory: ~/build
151151
docker:
152-
- image: quay.io/haskell_works/ghc-8.6.5
152+
- image: haskell:8.8.1
153153
steps:
154154
- checkout
155155
- run:
@@ -161,18 +161,15 @@ jobs:
161161
- restore-cache:
162162
keys:
163163
- cabal-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
164-
- run:
165-
name: Cabal version
166-
command: cabal --version
167164
- run:
168165
name: Update
169-
command: cabal new-update
166+
command: cabal update
170167
- run:
171168
name: Configure
172-
command: cabal new-configure --enable-tests
169+
command: cabal configure --enable-tests
173170
- run:
174171
name: Build
175-
command: cabal new-build -j1 # need j1, else ghc-lib-parser triggers OOM
172+
command: cabal build -j1 # need j1, else ghc-lib-parser triggers OOM
176173
no_output_timeout: 30m
177174
- save_cache:
178175
key: cabal-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}

app/MainHie.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE OverloadedStrings #-}
23
{-# LANGUAGE RankNTypes #-}
34
module Main where
45

56
import qualified Control.Exception as E
67
import Control.Monad
8+
#if __GLASGOW_HASKELL__ < 808
79
import Data.Monoid ((<>))
10+
#endif
811
import Data.Version (showVersion)
912
import qualified Data.Text as T
1013
import qualified Data.Text.IO as T

hie-plugin-api/Haskell/Ide/Engine/Ghc.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import Control.Monad ( when )
2323
import Data.IORef
2424
import qualified Data.Map.Strict as Map
2525
-- import qualified Data.IntMap.Strict as IM
26-
import Data.Semigroup ((<>), Semigroup)
2726
import qualified Data.Set as Set
2827
import qualified Data.Text as T
2928
import qualified Data.Aeson
@@ -37,7 +36,12 @@ import Haskell.Ide.Engine.PluginUtils
3736
import DynFlags
3837
import GHC
3938
import qualified HscTypes
39+
40+
#if __GLASGOW_HASKELL__ < 808
41+
import Data.Semigroup ((<>), Semigroup)
4042
import Outputable (renderWithStyle)
43+
#endif
44+
4145
import Language.Haskell.LSP.Types ( NormalizedUri(..), toNormalizedUri )
4246

4347
import Haskell.Ide.Engine.GhcUtils

hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE DeriveGeneric #-}
23
{-# LANGUAGE DeriveFunctor #-}
34
{-# LANGUAGE DeriveAnyClass #-}
@@ -111,13 +112,17 @@ import qualified Data.List as List
111112
import Data.Dynamic ( Dynamic )
112113
import qualified Data.Map as Map
113114
import Data.Maybe
114-
import Data.Monoid ( (<>) )
115+
115116
import qualified Data.Set as S
116117
import Data.String
117118
import qualified Data.Text as T
118-
import Data.Typeable ( TypeRep
119-
, Typeable
120-
)
119+
import Data.Typeable ( TypeRep )
120+
121+
#if __GLASGOW_HASKELL__ < 808
122+
import Data.Monoid ( (<>) )
123+
import Data.Typeable ( Typeable )
124+
#endif
125+
121126
import System.Directory
122127
import GhcMonad
123128
import GHC.Generics

install/src/Env.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ getHieVersions = do
104104
& mapMaybe
105105
(T.stripPrefix stackYamlPrefix >=> T.stripSuffix stackYamlSuffix)
106106
& map T.unpack
107-
-- the following line excludes `8.6.3` on windows systems
108-
& filter (\p -> not isWindowsSystem || p /= "8.6.3")
107+
-- the following line excludes `8.6.3` and `8.8.1` on windows systems
108+
& filter (\p -> not (isWindowsSystem && p `elem` ["8.6.3","8.8.1"]))
109109
& sort
110110
return hieVersions
111111

src/Haskell/Ide/Engine/Completions.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE DeriveGeneric #-}
23
{-# LANGUAGE NamedFieldPuns #-}
34
{-# LANGUAGE OverloadedStrings #-}
@@ -23,7 +24,9 @@ import qualified Data.List as List
2324
import qualified Data.Text as T
2425
import qualified Data.Map as Map
2526
import Data.Maybe
27+
#if __GLASGOW_HASKELL__ < 808
2628
import Data.Semigroup (Semigroup(..))
29+
#endif
2730
import Data.Typeable
2831
import GHC.Generics ( Generic )
2932

src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE DeriveAnyClass #-}
23
{-# LANGUAGE DeriveGeneric #-}
34
{-# LANGUAGE DuplicateRecordFields #-}
@@ -19,7 +20,11 @@ import Control.Monad.IO.Class
1920
import Control.Monad.Trans.Except
2021
import Data.Aeson hiding (Error)
2122
import Data.Maybe
23+
24+
#if __GLASGOW_HASKELL__ < 808
2225
import Data.Monoid ((<>))
26+
#endif
27+
2328
import qualified Data.Text as T
2429
import GHC.Generics
2530
import Haskell.Ide.Engine.MonadFunctions

0 commit comments

Comments
 (0)