Skip to content
This repository was archived by the owner on Feb 1, 2019. It is now read-only.

Commit 8e53b7e

Browse files
committed
Merge pull request #48 from elfenlaid/7.8.2-update
Fix build dependencies
2 parents b8edec0 + 5f2ad67 commit 8e53b7e

File tree

3 files changed

+46
-14
lines changed

3 files changed

+46
-14
lines changed

.travis.yml

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,38 @@
11
language: haskell
2-
ghc:
3-
- 7.6
4-
- 7.8
5-
script:
6-
- cabal install --dependencies-only && cabal build
2+
3+
env:
4+
- GHCVER=7.6.3
5+
- GHCVER=7.8.2
6+
- GHCVER=7.8.3
7+
8+
before_install:
9+
# If $GHCVER is the one travis has, don't bother reinstalling it.
10+
# We can also have faster builds by installing some libraries with
11+
# `apt`. If it isn't, install the GHC we want from hvr's PPA along
12+
# with cabal-1.18.
13+
- |
14+
if [ $GHCVER = `ghc --numeric-version` ]; then
15+
# Try installing some of the build-deps with apt-get for speed.
16+
travis/cabal-apt-install --enable-tests $MODE
17+
export CABAL=cabal
18+
else
19+
# Install the GHC we want from hvr's PPA
20+
travis_retry sudo add-apt-repository -y ppa:hvr/ghc
21+
travis_retry sudo apt-get update
22+
travis_retry sudo apt-get install cabal-install-1.18 ghc-$GHCVER happy
23+
export CABAL=cabal-1.18
24+
export PATH=/opt/ghc/$GHCVER/bin:$PATH
25+
fi
26+
# Uncomment whenever hackage is down.
27+
# - mkdir -p ~/.cabal && cp travis/config ~/.cabal/config && $CABAL update
28+
- $CABAL update
29+
30+
# Update happy when building with GHC head
31+
- |
32+
if [ $GHCVER = "7.8.3" ] || [ $GHCVER = "7.8.2" ]; then
33+
$CABAL install happy alex
34+
export PATH=$HOME/.cabal/bin:$PATH
35+
fi
36+
37+
install:
38+
- $CABAL install --dependencies-only --enable-tests && $CABAL build

haskell/LTHaskellClient.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import qualified Data.ByteString.Lazy.Char8 as BS
1818

1919
import GHC.Generics (Generic)
2020
import Language.Haskell.GhcMod (check, defaultOptions, findCradle,
21-
lintSyntax, withGHC)
21+
lint, runGhcModT)
2222

2323
import Language.Haskell.Stylish
2424

@@ -166,10 +166,10 @@ format x = do
166166

167167
getSyntaxIssues :: FilePath -> IO [String]
168168
getSyntaxIssues filePath = do
169-
cradle <- findCradle
170-
withGHC filePath $ check defaultOptions cradle [filePath]
169+
(Right result, _) <- runGhcModT defaultOptions $ check [filePath]
170+
return $ either (:[]) lines result
171171

172172
getLintIssues :: FilePath -> IO [String]
173173
getLintIssues file = do
174-
syntaxIssues <- lintSyntax defaultOptions file
175-
return $ lines syntaxIssues
174+
(Right lintIssues, _) <- runGhcModT defaultOptions $ lint file
175+
return $ lines lintIssues

light-haskell.cabal

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ executable light-haskell
5151

5252
-- Other library packages from which modules are imported.
5353
build-depends:
54-
base ==4.6.*,
55-
network ==2.4.*,
54+
base (>=4.0 && <5),
55+
network >=2.4,
5656
directory ==1.2.*,
5757
containers ==0.5.*,
5858
text ==1.1.*,
5959
bytestring ==0.10.*,
6060
aeson ==0.7.*,
61-
process ==1.1.*,
62-
ghc-mod ==3.1.*,
61+
process >=1.1,
62+
ghc-mod >=5.1,
6363
stylish-haskell ==0.5.*
6464

6565
-- Directories containing source files.

0 commit comments

Comments
 (0)