Skip to content

Commit

Permalink
Add -XPatternGuards and build tests with -XHaskell98 (#309)
Browse files Browse the repository at this point in the history
Fixes #309.
  • Loading branch information
sgraf812 committed Sep 23, 2024
1 parent d9aaaa9 commit 34e8451
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/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", "NoStrictData"]
langExtsToInject = ["MagicHash", "BangPatterns", "TypeSynonymInstances", "FlexibleInstances", "PatternGuards", "NoStrictData"]

defines :: Bool -> Bool -> String
defines debug coerce = unlines [ "#define " ++ d ++ " 1" | d <- vars_to_define ]
Expand Down
2 changes: 1 addition & 1 deletion tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# [2021-07-14, PR #196](https://github.com/haskell/happy/pull/196)
#
HC ?= ghc
HC_OPTS=-package array -Wall -Werror
HC_OPTS=-package array -Wall -Werror -XHaskell98

# NOTE: `cabal test` will take care to build the local `happy`
# executable and place it into $PATH for us to pick up.
Expand Down

0 comments on commit 34e8451

Please sign in to comment.