Merge pull request #1350 from peti/master

Fix build with ghc 8.6.1
This commit is contained in:
Vidar Holen 2018-10-04 20:11:40 -07:00 committed by GitHub
commit 79319558a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -35,7 +35,7 @@ custom-setup
setup-depends:
base >= 4 && <5,
process >= 1.0 && <1.7,
Cabal >= 1.10 && <2.3
Cabal >= 1.10 && <2.5
source-repository head
type: git

View File

@ -240,9 +240,10 @@ getParentTree t =
where
pre t = modify (first ((:) t))
post t = do
(_:rest, map) <- get
case rest of [] -> put (rest, map)
(x:_) -> put (rest, Map.insert (getId t) x map)
(x, map) <- get
case x of
_:rest -> case rest of [] -> put (rest, map)
(x:_) -> put (rest, Map.insert (getId t) x map)
-- Given a root node, make a map from Id to Token
getTokenMap :: Token -> Map.Map Id Token