Skip to content

Commit dbbc191

Browse files
clyringBodigrim
authored andcommitted
Use default-extensions to tidy up a bit (#669)
* Use default-extensions to tidy up a bit * Fix ghc invocation in emulated CI jobs * Use Haskell2010 in emulated jobs, too
1 parent 51a20a1 commit dbbc191

40 files changed

+120
-206
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143
run: |
144144
curl -s https://hackage.haskell.org/package/data-array-byte-0.1/data-array-byte-0.1.tar.gz | tar xz
145145
ghc --version
146-
ghc --make -Iinclude -itests:tests/builder:data-array-byte-0.1 -o Main cbits/*.c tests/Main.hs +RTS -s
146+
ghc --make -XHaskell2010 -XBangPatterns -XDeriveDataTypeable -XDeriveGeneric -XDeriveLift -XFlexibleContexts -XFlexibleInstances -XLambdaCase -XMagicHash -XMultiWayIf -XNamedFieldPuns -XPatternSynonyms -XRankNTypes -XScopedTypeVariables -XStandaloneDeriving -XTupleSections -XTypeApplications -XTypeOperators -XUnboxedTuples -optP-Wall -optP-Werror=undef -DPURE_HASKELL=0 -Iinclude -itests:tests/builder:data-array-byte-0.1 -o Main cbits/*.c tests/Main.hs +RTS -s
147147
./Main +RTS -s
148148
149149
bounds-checking:

Data/ByteString.hs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
{-# OPTIONS_HADDOCK prune #-}
21
{-# LANGUAGE Trustworthy #-}
32

4-
{-# LANGUAGE BangPatterns #-}
5-
{-# LANGUAGE MagicHash #-}
6-
{-# LANGUAGE NamedFieldPuns #-}
7-
{-# LANGUAGE TupleSections #-}
8-
{-# LANGUAGE TypeApplications #-}
3+
{-# OPTIONS_HADDOCK prune #-}
94

105
-- |
116
-- Module : Data.ByteString

Data/ByteString/Builder.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
{-# LANGUAGE MagicHash #-}
2-
{-# LANGUAGE BangPatterns #-}
31
{-# LANGUAGE Trustworthy #-}
4-
{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-orphans #-}
2+
3+
{-# OPTIONS_GHC -fno-warn-orphans #-}
4+
--instance Show Builder, instance IsString Builder
5+
56
{- | Copyright : (c) 2010 Jasper Van der Jeugt
67
(c) 2010 - 2011 Simon Meier
78
License : BSD3-style (see LICENSE)

Data/ByteString/Builder/Extra.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{-# LANGUAGE BangPatterns #-}
21
{-# LANGUAGE Trustworthy #-}
2+
33
-----------------------------------------------------------------------------
44
-- | Copyright : (c) 2010 Jasper Van der Jeugt
55
-- (c) 2010-2011 Simon Meier

Data/ByteString/Builder/Internal.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
{-# LANGUAGE ScopedTypeVariables, CPP, BangPatterns, RankNTypes, TupleSections #-}
21
{-# LANGUAGE Unsafe #-}
2+
33
{-# OPTIONS_HADDOCK not-home #-}
4+
45
-- | Copyright : (c) 2010 - 2011 Simon Meier
56
-- License : BSD3-style (see LICENSE)
67
--

Data/ByteString/Builder/Prim.hs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
{-# LANGUAGE BangPatterns, ScopedTypeVariables #-}
2-
{-# LANGUAGE MagicHash, UnboxedTuples, PatternGuards #-}
3-
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
41
{-# LANGUAGE Trustworthy #-}
2+
53
{- | Copyright : (c) 2010-2011 Simon Meier
64
(c) 2010 Jasper van der Jeugt
75
License : BSD3-style (see LICENSE)
@@ -457,17 +455,14 @@ import qualified Data.ByteString as S
457455
import qualified Data.ByteString.Internal as S
458456
import qualified Data.ByteString.Lazy.Internal as L
459457

460-
import Data.Monoid
461-
import Data.Char (chr, ord)
462-
import Control.Monad ((<=<), unless)
458+
import Data.Char (ord)
463459

464460
import Data.ByteString.Builder.Prim.Internal hiding (size, sizeBound)
465-
import qualified Data.ByteString.Builder.Prim.Internal as I (size, sizeBound)
461+
import qualified Data.ByteString.Builder.Prim.Internal as I
466462
import Data.ByteString.Builder.Prim.Binary
467463
import Data.ByteString.Builder.Prim.ASCII
468464

469465
import Foreign
470-
import Foreign.C.Types
471466
import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)
472467
import GHC.Word (Word8 (..))
473468
import GHC.Exts

Data/ByteString/Builder/Prim/ASCII.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE ScopedTypeVariables #-}
21
-- | Copyright : (c) 2010 Jasper Van der Jeugt
32
-- (c) 2010 - 2011 Simon Meier
43
-- License : BSD3-style (see LICENSE)

Data/ByteString/Builder/Prim/Binary.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{-# LANGUAGE Trustworthy #-}
22

3-
{-# LANGUAGE TypeApplications #-}
4-
53
-- | Copyright : (c) 2010-2011 Simon Meier
64
-- License : BSD3-style (see LICENSE)
75
--

Data/ByteString/Builder/Prim/Internal.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
{-# LANGUAGE ScopedTypeVariables, CPP #-}
1+
{-# LANGUAGE CPP #-}
22
{-# LANGUAGE Unsafe #-}
3+
34
{-# OPTIONS_HADDOCK not-home #-}
5+
46
-- |
57
-- Copyright : 2010-2011 Simon Meier, 2010 Jasper van der Jeugt
68
-- License : BSD3-style (see LICENSE)

Data/ByteString/Builder/Prim/Internal/Base16.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{-# LANGUAGE MagicHash #-}
21
{-# LANGUAGE CPP #-}
2+
33
-- |
44
-- Copyright : (c) 2011 Simon Meier
55
-- License : BSD3-style (see LICENSE)

0 commit comments

Comments
 (0)