diff --git a/hledger-iadd.cabal b/hledger-iadd.cabal index 6760cec..a06ed94 100644 --- a/hledger-iadd.cabal +++ b/hledger-iadd.cabal @@ -71,7 +71,7 @@ library , transformers >= 0.3 , time >= 1.5 , vector - , megaparsec >= 7.0 && <7.1 + , megaparsec >= 7.0 && <8.1 , containers , optparse-applicative , directory @@ -102,7 +102,7 @@ executable hledger-iadd , xdg-basedir , unordered-containers , free >= 4.12.4 - , megaparsec >= 7.0 && <7.1 + , megaparsec >= 7.0 && <8.1 ghc-options: -threaded -Wall -fdefer-typed-holes -fno-warn-name-shadowing test-suite spec @@ -124,7 +124,7 @@ test-suite spec , hspec , QuickCheck , free >= 4.12.4 - , megaparsec >= 7.0 && <7.1 + , megaparsec >= 7.0 && <8.1 , text-zipper >= 0.10 build-tool-depends: hspec-discover:hspec-discover ==2.* ghc-options: -threaded -Wall -fdefer-typed-holes -fno-warn-name-shadowing diff --git a/src/ConfigParser.hs b/src/ConfigParser.hs index 26c6a25..eb5e3a0 100644 --- a/src/ConfigParser.hs +++ b/src/ConfigParser.hs @@ -4,6 +4,7 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GADTs, DeriveFunctor, ScopedTypeVariables #-} +{-# LANGUAGE CPP #-} -- | Applicative config parser. -- @@ -283,4 +284,7 @@ parseWithStart p pos s = snd (runParser' p state) , pstateTabWidth = mkPos 1 , pstateLinePrefix = "" } +#if MIN_VERSION_megaparsec(8,0,0) + , stateParseErrors = [] +#endif }