diff --git a/ChangeLog.md b/ChangeLog.md index 192f6126..9670a566 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -4,6 +4,10 @@ The main focus of this release was modularizing Happy. +* Generated parsers now activate the language extension `-XNoStrictData` without + which every use of a happy parser would lead to an immediate crash (#273). + This causes us to drop support for GHC < 8.0. + * Break up into libraries: - `happy-backend-glr` diff --git a/happy.cabal b/happy.cabal index f0326da6..cdafc096 100644 --- a/happy.cabal +++ b/happy.cabal @@ -140,7 +140,7 @@ executable happy hs-source-dirs: src main-is: Main.lhs - build-depends: base < 5, + build-depends: base >= 4.9 && < 5, array, containers >= 0.4.2, mtl >= 2.2.1, @@ -164,5 +164,5 @@ test-suite tests build-tools: happy ghc-options: -threaded - build-depends: base < 5, process < 1.7 + build-depends: base >= 4.9 && < 5, process < 1.7 default-language: Haskell98 diff --git a/packages/backend-lalr/src/Happy/Backend/LALR.hs b/packages/backend-lalr/src/Happy/Backend/LALR.hs index ade8fe78..2e234202 100644 --- a/packages/backend-lalr/src/Happy/Backend/LALR.hs +++ b/packages/backend-lalr/src/Happy/Backend/LALR.hs @@ -35,7 +35,7 @@ importsToInject debug = concat ["\n", import_array, import_bits, import_glaexts, "import Control.Monad (ap)\n" langExtsToInject :: [String] -langExtsToInject = ["MagicHash", "BangPatterns", "TypeSynonymInstances", "FlexibleInstances"] +langExtsToInject = ["MagicHash", "BangPatterns", "TypeSynonymInstances", "FlexibleInstances", "NoStrictData"] defines :: Bool -> Bool -> String defines debug coerce = unlines [ "#define " ++ d ++ " 1" | d <- vars_to_define ]