From 57bedc0d8c2f5d662bce849aaab9c0b5361dad15 Mon Sep 17 00:00:00 2001 From: Jan Mas Rovira Date: Wed, 7 Feb 2024 12:46:13 +0100 Subject: [PATCH] Remove BangPattern pragmas (#2626) `BangPatterns` is already enabled by [`GHC2021`](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/control.html#extension-GHC2021), so it makes sense to remove the pragmas and add the corresponding flag to ormolu --- .github/workflows/ci.yml | 1 + Makefile | 1 + src/Juvix/Compiler/Core/Evaluator.hs | 6 ------ src/Juvix/Compiler/Tree/Evaluator.hs | 5 ----- src/Juvix/Prelude/Base.hs | 6 ------ 5 files changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9ce5bfb8..9317553a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,7 @@ jobs: --ghc-opt -XStandaloneDeriving --ghc-opt -XTemplateHaskell --ghc-opt -XUnicodeSyntax + --ghc-opt -XBangPatterns build-and-test-linux: runs-on: ubuntu-22.04 diff --git a/Makefile b/Makefile index 86b6becfd..924813052 100644 --- a/Makefile +++ b/Makefile @@ -97,6 +97,7 @@ ormolu: --ghc-opt -XMultiParamTypeClasses \ --ghc-opt -XTemplateHaskell \ --ghc-opt -XImportQualifiedPost \ + --ghc-opt -XBangPatterns \ --mode ${ORMOLUMODE} \ $(ORMOLUFILES) diff --git a/src/Juvix/Compiler/Core/Evaluator.hs b/src/Juvix/Compiler/Core/Evaluator.hs index 1d5373764..072299228 100644 --- a/src/Juvix/Compiler/Core/Evaluator.hs +++ b/src/Juvix/Compiler/Core/Evaluator.hs @@ -1,9 +1,3 @@ -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} - -{-# HLINT ignore "Avoid restricted extensions" #-} -{-# HLINT ignore "Avoid restricted flags" #-} - module Juvix.Compiler.Core.Evaluator where import Control.Exception qualified as Exception diff --git a/src/Juvix/Compiler/Tree/Evaluator.hs b/src/Juvix/Compiler/Tree/Evaluator.hs index 2809bf2d5..5d27c3ed6 100644 --- a/src/Juvix/Compiler/Tree/Evaluator.hs +++ b/src/Juvix/Compiler/Tree/Evaluator.hs @@ -1,8 +1,3 @@ -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} - -{-# HLINT ignore "Avoid restricted extensions" #-} -{-# HLINT ignore "Avoid restricted flags" #-} module Juvix.Compiler.Tree.Evaluator where import Control.Exception qualified as Exception diff --git a/src/Juvix/Prelude/Base.hs b/src/Juvix/Prelude/Base.hs index 97dd23708..9da32ed13 100644 --- a/src/Juvix/Prelude/Base.hs +++ b/src/Juvix/Prelude/Base.hs @@ -1,9 +1,3 @@ -{-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} - -{-# HLINT ignore "Avoid restricted extensions" #-} -{-# HLINT ignore "Avoid restricted flags" #-} - module Juvix.Prelude.Base ( module Juvix.Prelude.Base, module Control.Applicative,