summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG3
-rw-r--r--language-ecmascript.cabal34
-rw-r--r--src/Language/ECMAScript3/Parser.hs3
3 files changed, 22 insertions, 18 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 411b9e7..2b46f2c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,8 @@
Version change log.
+=0.19.0.1=
+Version bumps and a build fix for GHC 8.8 (GitHub issue #85).
+
=0.19=
Pull request #84: Moved the Arbitrary instance and the testing-feat dependency to the test-suite. Removed tabs from the lexer.
diff --git a/language-ecmascript.cabal b/language-ecmascript.cabal
index 23e7556..fc8e5d1 100644
--- a/language-ecmascript.cabal
+++ b/language-ecmascript.cabal
@@ -1,8 +1,8 @@
Name: language-ecmascript
-Version: 0.19
+Version: 0.19.0.1
Cabal-Version: >= 1.12
Copyright: (c) 2007-2012 Brown University, (c) 2008-2010 Claudiu Saftoiu,
- (c) 2012-2015 Stevens Institute of Technology, (c) 2016 Eyal Lotem, (c) 2016-2018 Andrey Chudnov
+ (c) 2012-2015 Stevens Institute of Technology, (c) 2016 Eyal Lotem, (c) 2016-2020 Andrey Chudnov
License: BSD3
License-file: LICENSE
Author: Andrey Chudnov, Arjun Guha, Spiridon Aristides Eliopoulos,
@@ -11,7 +11,7 @@ Maintainer: Andrey Chudnov <oss@chudnov.com>
Homepage: http://github.com/jswebtools/language-ecmascript
Bug-reports: http://github.com/jswebtools/language-ecmascript/issues
Stability: experimental
-Tested-with: GHC==8.2.2
+Tested-with: GHC==8.8.1
Extra-Source-Files: test/parse-pretty/*.js, test/diff/left/*.js, test/diff/right/*.js, test/diff/expects/*.diff, CHANGELOG
Category: Language
Build-Type: Simple
@@ -29,13 +29,13 @@ Source-repository head
Source-repository this
type: git
location: git://github.com/jswebtools/language-ecmascript.git
- tag: 0.19
+ tag: 0.19.0.1
Library
Hs-Source-Dirs:
src
Build-Depends:
- base >= 4 && < 5,
+ base >= 4 && < 4.14,
mtl >= 1 && < 3,
parsec > 3 && < 3.2.0,
ansi-wl-pprint >= 0.6 && < 1,
@@ -44,7 +44,7 @@ Library
data-default-class >= 0.0.1 && < 0.2,
QuickCheck >= 2.5 && < 3,
template-haskell >= 2.7 && < 3,
- Diff == 0.3.*,
+ Diff == 0.4.*,
charset >= 0.3
ghc-options:
-fwarn-incomplete-patterns
@@ -72,21 +72,21 @@ Test-Suite test
Type: exitcode-stdio-1.0
Main-Is: TestMain.hs
Other-Modules:
- Language.ECMAScript3.Lexer
- Language.ECMAScript3.Parser
- Language.ECMAScript3.Parser.State
- Language.ECMAScript3.Parser.Type
- Language.ECMAScript3.PrettyPrint
- Language.ECMAScript3.SourceDiff
- Language.ECMAScript3.Syntax
- Language.ECMAScript3.Syntax.Annotations
+ Language.ECMAScript3.Lexer
+ Language.ECMAScript3.Parser
+ Language.ECMAScript3.Parser.State
+ Language.ECMAScript3.Parser.Type
+ Language.ECMAScript3.PrettyPrint
+ Language.ECMAScript3.SourceDiff
+ Language.ECMAScript3.Syntax
+ Language.ECMAScript3.Syntax.Annotations
Language.ECMAScript3.Syntax.Arbitrary
Test.Diff
Test.Unit
Test.Pretty
Test.Arbitrary
Build-Depends:
- base >= 4 && < 5,
+ base >= 4 && < 4.14,
mtl >= 1 && < 3,
parsec >= 3 && < 3.2.0,
ansi-wl-pprint >= 0.6 && < 1,
@@ -97,12 +97,12 @@ Test-Suite test
HUnit >= 1.2 && < 1.7,
QuickCheck >= 2.5 && < 3,
data-default-class >= 0.0.1 && < 0.2,
- testing-feat >= 0.4.0.2 && < 1.1,
+ testing-feat >= 0.4.0.2 && < 1.2,
test-framework >= 0.8 && < 0.9,
test-framework-hunit >= 0.3.0 && < 0.4,
test-framework-quickcheck2 >= 0.3.0.1 && < 0.4,
uniplate >= 1.6 && <1.7,
- Diff == 0.3.*,
+ Diff == 0.4.*,
language-ecmascript
Default-Extensions: DeriveDataTypeable, ScopedTypeVariables, DeriveFunctor, DeriveFoldable, DeriveTraversable, FlexibleContexts
Default-Language: Haskell2010
diff --git a/src/Language/ECMAScript3/Parser.hs b/src/Language/ECMAScript3/Parser.hs
index da6831d..c78cd65 100644
--- a/src/Language/ECMAScript3/Parser.hs
+++ b/src/Language/ECMAScript3/Parser.hs
@@ -42,6 +42,7 @@ import Control.Monad.Identity
import Data.Maybe (isJust, isNothing, fromMaybe)
import Control.Monad.Error.Class
import Control.Applicative ((<$>), (<*>))
+import Control.Exception (throwIO)
{-# DEPRECATED ParsedStatement, ParsedExpression, StatementParser,
ExpressionParser
@@ -794,7 +795,7 @@ parseJavaScriptFromFile :: MonadIO m => String -- ^ file name
parseJavaScriptFromFile filename = do
chars <- liftIO $ readFile filename
case parse parseScript filename chars of
- Left err -> fail (show err)
+ Left err -> liftIO $ throwIO $ userError $ show err
Right (Script _ stmts) -> return stmts
-- | Parse a JavaScript program from a string