From 72c69761f66e8740fce67a85fb98330638377350 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Thu, 13 Apr 2023 10:34:48 -0400 Subject: [PATCH] Fix the build with alex-3.2.7.2 `alex-3.2.7.2` generates code that uses `PatternGuards`, but because `saw-core` does not specify a `default-language` in its `.cabal` file, it defaults to `Haskell98`, which does not include `PatternGuards`. Arguably, we should make `saw-core`'s `default-language` be `Haskell2010` (which _does_ include `PatternGuards`), but that would be a somewhat larger change. For the sake of restoring the build, this applies the simplest possible fix of enabling `PatternGuards` in the affected file. Fixes #1854. --- saw-core/src/Verifier/SAW/Lexer.x | 1 + 1 file changed, 1 insertion(+) diff --git a/saw-core/src/Verifier/SAW/Lexer.x b/saw-core/src/Verifier/SAW/Lexer.x index 714a3c87bb..65bdb28a0c 100644 --- a/saw-core/src/Verifier/SAW/Lexer.x +++ b/saw-core/src/Verifier/SAW/Lexer.x @@ -2,6 +2,7 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE PatternGuards #-} {-# LANGUAGE ViewPatterns #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-}