Skip to content

Commit

Permalink
Use -XNoStrictData in generated parser (#273)
Browse files Browse the repository at this point in the history
Fixes #273.
  • Loading branch information
sgraf812 committed Sep 13, 2024
1 parent d1d2665 commit f936185
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion packages/backend-lalr/src/Happy/Backend/LALR.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand Down

0 comments on commit f936185

Please sign in to comment.