Limit scope of -Wno-error=unused-do-binds

This also removes -fno-unused-do-binds from modules that had it inline,
and enables -Wall for the general build.
This commit is contained in:
Aaron VonderHaar 2022-05-01 17:10:45 -07:00
parent cf1cf4fdd0
commit 809cf42da7
14 changed files with 20 additions and 16 deletions

View File

@ -1,5 +1,3 @@
{-# OPTIONS_GHC -Wall -fno-warn-unused-do-bind #-}
module Compile
( Artifacts (..),
compile,

View File

@ -3,6 +3,8 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE UnboxedTuples #-}
{-# OPTIONS_GHC -Wall #-}
-- Temporary while implementing gren format
{-# OPTIONS_GHC -Wno-error=unused-do-bind #-}
module Gren.Docs
( Documentation,

View File

@ -3,6 +3,8 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE UnboxedTuples #-}
{-# OPTIONS_GHC -Wall #-}
-- Temporary while implementing gren format
{-# OPTIONS_GHC -Wno-error=unused-do-bind #-}
module Gren.Kernel
( Content (..),

View File

@ -2,7 +2,7 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE UnboxedTuples #-}
{-# OPTIONS_GHC -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
module Json.Decode
( fromByteString,

View File

@ -1,5 +1,6 @@
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -Wall -fno-warn-unused-do-bind #-}
-- Temporary while implementing gren format
{-# OPTIONS_GHC -Wno-error=unused-do-bind #-}
module Parse.Declaration
( Decl (..),

View File

@ -1,5 +1,6 @@
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -Wall -fno-warn-unused-do-bind #-}
-- Temporary while implementing gren format
{-# OPTIONS_GHC -Wno-error=unused-do-bind #-}
module Parse.Expression
( expression,

View File

@ -1,5 +1,8 @@
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -Wall #-}
-- Temporary while implementing gren format
{-# OPTIONS_GHC -Wno-error=unused-do-bind #-}
{-# OPTIONS_GHC -Wno-error=unused-matches #-}
module Parse.Module
( fromByteString,

View File

@ -1,7 +1,8 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE UnboxedTuples #-}
{-# OPTIONS_GHC -Wall -fno-warn-unused-do-bind #-}
-- Temporary while implementing gren format
{-# OPTIONS_GHC -Wno-error=unused-do-bind #-}
module Parse.Pattern
( term,

View File

@ -1,7 +1,7 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE UnboxedTuples #-}
{-# OPTIONS_GHC -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
module Parse.Primitives
( fromByteString,

View File

@ -1,7 +1,6 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE UnboxedTuples #-}
{-# OPTIONS_GHC -Wall -fno-warn-unused-do-bind #-}
module Parse.Space
( Parser,

View File

@ -2,7 +2,6 @@
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE UnboxedTuples #-}
{-# OPTIONS_GHC -Wall -fno-warn-unused-do-bind #-}
module Parse.String
( string,

View File

@ -1,5 +1,6 @@
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -Wall -fno-warn-unused-do-bind #-}
-- Temporary while implementing gren format
{-# OPTIONS_GHC -Wno-error=unused-do-bind #-}
module Parse.Type
( expression,

View File

@ -36,11 +36,8 @@ Flag dev {
Common gren-common
if flag(dev)
ghc-options: -O0 -Wall -Werror
-- temporary while implementing gren format
ghc-options: -Wno-error=unused-do-bind -Wno-error=unused-matches
else
ghc-options: -O2 -threaded "-with-rtsopts=-N"
ghc-options: -O2 -Wall -threaded "-with-rtsopts=-N"
Hs-Source-Dirs:
compiler/src

View File

@ -326,9 +326,9 @@ annotation =
err_ _ _ _ = ()
in do
name <- PV.lower err
PS.chompAndCheckIndent err_ err
_ <- PS.chompAndCheckIndent err_ err
P.word1 0x3A {-:-} err
PS.chompAndCheckIndent err_ err
_ <- PS.chompAndCheckIndent err_ err
(_, _) <- P.specialize err_ PT.expression
PS.checkFreshLine err
return name