diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0e4a00fa..3eba6f0ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,7 +143,7 @@ jobs: run: | curl -s https://hackage.haskell.org/package/data-array-byte-0.1/data-array-byte-0.1.tar.gz | tar xz ghc --version - ghc --make -Iinclude -itests:tests/builder:data-array-byte-0.1 -o Main cbits/*.c tests/Main.hs +RTS -s + 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 ./Main +RTS -s bounds-checking: diff --git a/Data/ByteString.hs b/Data/ByteString.hs index 2b2831de0..2dc741463 100644 --- a/Data/ByteString.hs +++ b/Data/ByteString.hs @@ -1,11 +1,6 @@ -{-# OPTIONS_HADDOCK prune #-} {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE MagicHash #-} -{-# LANGUAGE NamedFieldPuns #-} -{-# LANGUAGE TupleSections #-} -{-# LANGUAGE TypeApplications #-} +{-# OPTIONS_HADDOCK prune #-} -- | -- Module : Data.ByteString diff --git a/Data/ByteString/Builder.hs b/Data/ByteString/Builder.hs index 09c85b210..1032526da 100644 --- a/Data/ByteString/Builder.hs +++ b/Data/ByteString/Builder.hs @@ -1,7 +1,8 @@ -{-# LANGUAGE MagicHash #-} -{-# LANGUAGE BangPatterns #-} {-# LANGUAGE Trustworthy #-} -{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-orphans #-} + +{-# OPTIONS_GHC -fno-warn-orphans #-} + --instance Show Builder, instance IsString Builder + {- | Copyright : (c) 2010 Jasper Van der Jeugt (c) 2010 - 2011 Simon Meier License : BSD3-style (see LICENSE) diff --git a/Data/ByteString/Builder/Extra.hs b/Data/ByteString/Builder/Extra.hs index c157df457..51a2bf4fc 100644 --- a/Data/ByteString/Builder/Extra.hs +++ b/Data/ByteString/Builder/Extra.hs @@ -1,5 +1,5 @@ -{-# LANGUAGE BangPatterns #-} {-# LANGUAGE Trustworthy #-} + ----------------------------------------------------------------------------- -- | Copyright : (c) 2010 Jasper Van der Jeugt -- (c) 2010-2011 Simon Meier diff --git a/Data/ByteString/Builder/Internal.hs b/Data/ByteString/Builder/Internal.hs index 82bdf560c..109c762e2 100644 --- a/Data/ByteString/Builder/Internal.hs +++ b/Data/ByteString/Builder/Internal.hs @@ -1,6 +1,7 @@ -{-# LANGUAGE ScopedTypeVariables, CPP, BangPatterns, RankNTypes, TupleSections #-} {-# LANGUAGE Unsafe #-} + {-# OPTIONS_HADDOCK not-home #-} + -- | Copyright : (c) 2010 - 2011 Simon Meier -- License : BSD3-style (see LICENSE) -- diff --git a/Data/ByteString/Builder/Prim.hs b/Data/ByteString/Builder/Prim.hs index a4bd22c77..82f5d18a9 100644 --- a/Data/ByteString/Builder/Prim.hs +++ b/Data/ByteString/Builder/Prim.hs @@ -1,7 +1,5 @@ -{-# LANGUAGE BangPatterns, ScopedTypeVariables #-} -{-# LANGUAGE MagicHash, UnboxedTuples, PatternGuards #-} -{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE Trustworthy #-} + {- | Copyright : (c) 2010-2011 Simon Meier (c) 2010 Jasper van der Jeugt License : BSD3-style (see LICENSE) @@ -457,17 +455,14 @@ import qualified Data.ByteString as S import qualified Data.ByteString.Internal as S import qualified Data.ByteString.Lazy.Internal as L -import Data.Monoid -import Data.Char (chr, ord) -import Control.Monad ((<=<), unless) +import Data.Char (ord) import Data.ByteString.Builder.Prim.Internal hiding (size, sizeBound) -import qualified Data.ByteString.Builder.Prim.Internal as I (size, sizeBound) +import qualified Data.ByteString.Builder.Prim.Internal as I import Data.ByteString.Builder.Prim.Binary import Data.ByteString.Builder.Prim.ASCII import Foreign -import Foreign.C.Types import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr) import GHC.Word (Word8 (..)) import GHC.Exts diff --git a/Data/ByteString/Builder/Prim/ASCII.hs b/Data/ByteString/Builder/Prim/ASCII.hs index 8f764200f..f73da790e 100644 --- a/Data/ByteString/Builder/Prim/ASCII.hs +++ b/Data/ByteString/Builder/Prim/ASCII.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE ScopedTypeVariables #-} -- | Copyright : (c) 2010 Jasper Van der Jeugt -- (c) 2010 - 2011 Simon Meier -- License : BSD3-style (see LICENSE) diff --git a/Data/ByteString/Builder/Prim/Binary.hs b/Data/ByteString/Builder/Prim/Binary.hs index a0ed9996a..a4d098b11 100644 --- a/Data/ByteString/Builder/Prim/Binary.hs +++ b/Data/ByteString/Builder/Prim/Binary.hs @@ -1,7 +1,5 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE TypeApplications #-} - -- | Copyright : (c) 2010-2011 Simon Meier -- License : BSD3-style (see LICENSE) -- diff --git a/Data/ByteString/Builder/Prim/Internal.hs b/Data/ByteString/Builder/Prim/Internal.hs index 18c78646c..a2a4212e8 100644 --- a/Data/ByteString/Builder/Prim/Internal.hs +++ b/Data/ByteString/Builder/Prim/Internal.hs @@ -1,6 +1,8 @@ -{-# LANGUAGE ScopedTypeVariables, CPP #-} +{-# LANGUAGE CPP #-} {-# LANGUAGE Unsafe #-} + {-# OPTIONS_HADDOCK not-home #-} + -- | -- Copyright : 2010-2011 Simon Meier, 2010 Jasper van der Jeugt -- License : BSD3-style (see LICENSE) diff --git a/Data/ByteString/Builder/Prim/Internal/Base16.hs b/Data/ByteString/Builder/Prim/Internal/Base16.hs index d0589ee50..26044e91c 100644 --- a/Data/ByteString/Builder/Prim/Internal/Base16.hs +++ b/Data/ByteString/Builder/Prim/Internal/Base16.hs @@ -1,5 +1,5 @@ -{-# LANGUAGE MagicHash #-} {-# LANGUAGE CPP #-} + -- | -- Copyright : (c) 2011 Simon Meier -- License : BSD3-style (see LICENSE) diff --git a/Data/ByteString/Builder/RealFloat/D2S.hs b/Data/ByteString/Builder/RealFloat/D2S.hs index d1062123a..8f5bc95ad 100644 --- a/Data/ByteString/Builder/RealFloat/D2S.hs +++ b/Data/ByteString/Builder/RealFloat/D2S.hs @@ -1,7 +1,5 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE MagicHash #-} -{-# LANGUAGE ScopedTypeVariables #-} + -- | -- Module : Data.ByteString.Builder.RealFloat.D2S -- Copyright : (c) Lawrence Wu 2021 diff --git a/Data/ByteString/Builder/RealFloat/F2S.hs b/Data/ByteString/Builder/RealFloat/F2S.hs index 7d885b155..448266d62 100644 --- a/Data/ByteString/Builder/RealFloat/F2S.hs +++ b/Data/ByteString/Builder/RealFloat/F2S.hs @@ -1,6 +1,5 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE BangPatterns, MagicHash #-} + -- | -- Module : Data.ByteString.Builder.RealFloat.F2S -- Copyright : (c) Lawrence Wu 2021 diff --git a/Data/ByteString/Builder/RealFloat/Internal.hs b/Data/ByteString/Builder/RealFloat/Internal.hs index 636830f7b..cd7efbd1d 100644 --- a/Data/ByteString/Builder/RealFloat/Internal.hs +++ b/Data/ByteString/Builder/RealFloat/Internal.hs @@ -1,7 +1,7 @@ -{-# LANGUAGE ScopedTypeVariables, ExplicitForAll #-} -{-# LANGUAGE BangPatterns, MagicHash, UnboxedTuples #-} {-# LANGUAGE CPP #-} + {-# LANGUAGE RecordWildCards #-} + -- | -- Module : Data.ByteString.Builder.RealFloat.Internal -- Copyright : (c) Lawrence Wu 2021 diff --git a/Data/ByteString/Builder/RealFloat/TableGenerator.hs b/Data/ByteString/Builder/RealFloat/TableGenerator.hs index 07b6f0683..d2ebd3857 100644 --- a/Data/ByteString/Builder/RealFloat/TableGenerator.hs +++ b/Data/ByteString/Builder/RealFloat/TableGenerator.hs @@ -1,7 +1,3 @@ -{-# LANGUAGE ExplicitForAll #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE BangPatterns, MagicHash, UnboxedTuples #-} -- | -- Module : Data.ByteString.Builder.RealFloat.TableGenerator -- Copyright : (c) Lawrence Wu 2021 diff --git a/Data/ByteString/Char8.hs b/Data/ByteString/Char8.hs index 1d4d9accd..f773d8322 100644 --- a/Data/ByteString/Char8.hs +++ b/Data/ByteString/Char8.hs @@ -1,8 +1,9 @@ -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE MagicHash #-} -{-# OPTIONS_HADDOCK prune #-} {-# LANGUAGE Trustworthy #-} + +{-# OPTIONS_HADDOCK prune #-} {-# OPTIONS_GHC -Wno-deprecations #-} + -- We use the deprecated Data.ByteString.{hGetLine,getLine} to + -- define the not-deprecated Char8 versions of the same functions. -- | -- Module : Data.ByteString.Char8 diff --git a/Data/ByteString/Internal/Pure.hs b/Data/ByteString/Internal/Pure.hs index 699bc358a..5f7cb4703 100644 --- a/Data/ByteString/Internal/Pure.hs +++ b/Data/ByteString/Internal/Pure.hs @@ -1,7 +1,3 @@ -{-# LANGUAGE MagicHash #-} -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE MultiWayIf #-} - -- Enable yields to make `isValidUtf8` safe to use on large inputs. {-# OPTIONS_GHC -fno-omit-yields #-} diff --git a/Data/ByteString/Internal/Type.hs b/Data/ByteString/Internal/Type.hs index f10236e4d..1759ab93e 100644 --- a/Data/ByteString/Internal/Type.hs +++ b/Data/ByteString/Internal/Type.hs @@ -1,18 +1,13 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE Unsafe #-} -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE MagicHash #-} -{-# LANGUAGE PatternSynonyms #-} +{-# OPTIONS_HADDOCK not-home #-} + {-# LANGUAGE TemplateHaskellQuotes #-} -{-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE UnliftedFFITypes #-} {-# LANGUAGE ViewPatterns #-} -{-# OPTIONS_HADDOCK not-home #-} - -- | -- Module : Data.ByteString.Internal.Type -- Copyright : (c) Don Stewart 2006-2008 diff --git a/Data/ByteString/Lazy.hs b/Data/ByteString/Lazy.hs index 53577b327..bf8bb3d7e 100644 --- a/Data/ByteString/Lazy.hs +++ b/Data/ByteString/Lazy.hs @@ -1,9 +1,6 @@ -{-# OPTIONS_HADDOCK prune #-} {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE TypeApplications #-} -{-# LANGUAGE ScopedTypeVariables #-} +{-# OPTIONS_HADDOCK prune #-} -- | -- Module : Data.ByteString.Lazy diff --git a/Data/ByteString/Lazy/Char8.hs b/Data/ByteString/Lazy/Char8.hs index 5147b5460..d97479c2d 100644 --- a/Data/ByteString/Lazy/Char8.hs +++ b/Data/ByteString/Lazy/Char8.hs @@ -1,6 +1,5 @@ -{-# LANGUAGE BangPatterns #-} {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE TypeApplications #-} + {-# OPTIONS_HADDOCK prune #-} -- | diff --git a/Data/ByteString/Lazy/Internal.hs b/Data/ByteString/Lazy/Internal.hs index 3d520b9f2..8135c8234 100644 --- a/Data/ByteString/Lazy/Internal.hs +++ b/Data/ByteString/Lazy/Internal.hs @@ -1,16 +1,10 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE DeriveLift #-} -{-# LANGUAGE StandaloneDeriving #-} -{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE Unsafe #-} -#ifdef HS_BYTESTRING_ASSERTIONS -{-# LANGUAGE PatternSynonyms #-} -#endif - {-# OPTIONS_HADDOCK not-home #-} +{-# LANGUAGE TypeFamilies #-} + -- | -- Module : Data.ByteString.Lazy.Internal -- Copyright : (c) Don Stewart 2006-2008 diff --git a/Data/ByteString/Lazy/ReadInt.hs b/Data/ByteString/Lazy/ReadInt.hs index 234bfe9fe..b5b1aca74 100644 --- a/Data/ByteString/Lazy/ReadInt.hs +++ b/Data/ByteString/Lazy/ReadInt.hs @@ -1,9 +1,4 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE MultiWayIf #-} -{-# LANGUAGE PatternSynonyms #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeApplications #-} -- This file is also included by "Data.ByteString.ReadInt", after defining -- "BYTESTRING_STRICT". The two modules share much of their code, but diff --git a/Data/ByteString/Lazy/ReadNat.hs b/Data/ByteString/Lazy/ReadNat.hs index 3a6030fcc..69fa8174d 100644 --- a/Data/ByteString/Lazy/ReadNat.hs +++ b/Data/ByteString/Lazy/ReadNat.hs @@ -1,9 +1,4 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE MultiWayIf #-} -{-# LANGUAGE PatternSynonyms #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeApplications #-} -- This file is included by "Data.ByteString.ReadInt", after defining -- "BYTESTRING_STRICT". The two modules are largely identical, except for the diff --git a/Data/ByteString/Short/Internal.hs b/Data/ByteString/Short/Internal.hs index b0a91b3fd..68fcb52ce 100644 --- a/Data/ByteString/Short/Internal.hs +++ b/Data/ByteString/Short/Internal.hs @@ -1,27 +1,14 @@ -{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE DeriveLift #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE MagicHash #-} -{-# LANGUAGE MultiWayIf #-} -{-# LANGUAGE PatternSynonyms #-} -{-# LANGUAGE RankNTypes #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TemplateHaskellQuotes #-} -{-# LANGUAGE TupleSections #-} -{-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE UnboxedTuples #-} -{-# LANGUAGE UnliftedFFITypes #-} {-# LANGUAGE Unsafe #-} -{-# LANGUAGE ViewPatterns #-} {-# OPTIONS_HADDOCK not-home #-} - {-# OPTIONS_GHC -fexpose-all-unfoldings #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE UnliftedFFITypes #-} +{-# LANGUAGE ViewPatterns #-} + #include "bytestring-cpp-macros.h" -- | diff --git a/Data/ByteString/Unsafe.hs b/Data/ByteString/Unsafe.hs index f470ab77a..3c4e3f5d2 100644 --- a/Data/ByteString/Unsafe.hs +++ b/Data/ByteString/Unsafe.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE MagicHash #-} {-# LANGUAGE Unsafe #-} -- | diff --git a/Data/ByteString/Utils/UnalignedAccess.hs b/Data/ByteString/Utils/UnalignedAccess.hs index 67ab5fdbb..841c6253c 100644 --- a/Data/ByteString/Utils/UnalignedAccess.hs +++ b/Data/ByteString/Utils/UnalignedAccess.hs @@ -1,3 +1,7 @@ +{-# LANGUAGE CPP #-} + +#include "bytestring-cpp-macros.h" + -- | -- Module : Data.ByteString.Utils.UnalignedAccess -- Copyright : (c) Matthew Craven 2023-2024 @@ -8,13 +12,6 @@ -- -- Primitives for reading and writing at potentially-unaligned memory locations -{-# LANGUAGE CPP #-} - -{-# LANGUAGE MagicHash #-} -{-# LANGUAGE UnboxedTuples #-} - -#include "bytestring-cpp-macros.h" - module Data.ByteString.Utils.UnalignedAccess ( unalignedWriteU16 , unalignedWriteU32 diff --git a/bench/BenchAll.hs b/bench/BenchAll.hs index 85f348748..76d2e5206 100644 --- a/bench/BenchAll.hs +++ b/bench/BenchAll.hs @@ -7,11 +7,6 @@ -- Portability : tested on GHC only -- -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE PackageImports #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE MagicHash #-} - module Main (main) where import Data.Foldable (foldMap) diff --git a/bench/BenchBoundsCheckFusion.hs b/bench/BenchBoundsCheckFusion.hs index 2bb281728..cac99ef66 100644 --- a/bench/BenchBoundsCheckFusion.hs +++ b/bench/BenchBoundsCheckFusion.hs @@ -8,8 +8,6 @@ -- -- Benchmark that the bounds checks fuse. -{-# LANGUAGE PackageImports, ScopedTypeVariables, BangPatterns #-} - module BenchBoundsCheckFusion (benchBoundsCheckFusion) where import Prelude hiding (words) diff --git a/bench/BenchCSV.hs b/bench/BenchCSV.hs index b5b75a919..cf5ba66e7 100644 --- a/bench/BenchCSV.hs +++ b/bench/BenchCSV.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + -- | -- Copyright : (c) 2010-2011 Simon Meier -- License : BSD3-style (see LICENSE) @@ -9,9 +11,6 @@ -- Running example for documentation of Data.ByteString.Builder -- -{-# LANGUAGE CPP #-} -{-# LANGUAGE OverloadedStrings #-} - module BenchCSV (benchCSV) where -- ************************************************************************** diff --git a/bench/BenchIndices.hs b/bench/BenchIndices.hs index 57c3c7ef7..f5e697449 100644 --- a/bench/BenchIndices.hs +++ b/bench/BenchIndices.hs @@ -6,8 +6,6 @@ -- -- Benchmark elemIndex, findIndex, elemIndices, and findIndices -{-# LANGUAGE BangPatterns #-} - module BenchIndices (benchIndices) where import Data.Foldable (foldMap) diff --git a/bench/BenchReadInt.hs b/bench/BenchReadInt.hs index 32d6bc1b2..11524f6c7 100644 --- a/bench/BenchReadInt.hs +++ b/bench/BenchReadInt.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + -- | -- Copyright : (c) 2021 Viktor Dukhovni -- License : BSD3-style (see LICENSE) @@ -7,14 +9,6 @@ -- Benchmark readInt and variants, readWord and variants, -- readInteger and readNatural -{-# LANGUAGE - CPP - , BangPatterns - , OverloadedStrings - , TypeApplications - , ScopedTypeVariables - #-} - module BenchReadInt (benchReadInt) where import qualified Data.ByteString.Builder as B diff --git a/bench/BenchShort.hs b/bench/BenchShort.hs index 351ff17a8..1efd1abc5 100644 --- a/bench/BenchShort.hs +++ b/bench/BenchShort.hs @@ -1,7 +1,3 @@ -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE PackageImports #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE MagicHash #-} {-# LANGUAGE OverloadedStrings #-} module BenchShort (benchShort) where diff --git a/bytestring.cabal b/bytestring.cabal index a9482ff54..d5b0e3d52 100644 --- a/bytestring.cabal +++ b/bytestring.cabal @@ -1,3 +1,5 @@ +Cabal-Version: 2.2 + Name: bytestring Version: 0.13.0.0 Synopsis: Fast, compact, strict and lazy byte strings with a list interface @@ -41,7 +43,7 @@ Description: . > import qualified Data.ByteString as BS -License: BSD3 +License: BSD-3-Clause License-file: LICENSE Category: Data Copyright: Copyright (c) Don Stewart 2005-2009, @@ -65,7 +67,6 @@ Tested-With: GHC==9.4.1, GHC==8.2.2, GHC==8.0.2 Build-Type: Simple -Cabal-Version: >= 1.10 extra-source-files: README.md Changelog.md include/bytestring-cpp-macros.h Flag pure-haskell @@ -82,65 +83,77 @@ source-repository head type: git location: https://github.com/haskell/bytestring + +common language + default-language: Haskell2010 + default-extensions: + BangPatterns + DeriveDataTypeable + DeriveGeneric + DeriveLift + FlexibleContexts + FlexibleInstances + LambdaCase + MagicHash + MultiWayIf + NamedFieldPuns + PatternSynonyms + RankNTypes + ScopedTypeVariables + StandaloneDeriving + TupleSections + TypeApplications + TypeOperators + UnboxedTuples + library - build-depends: base >= 4.9 && < 5, ghc-prim, deepseq, template-haskell + import: language + build-depends: base >= 4.9 && < 5, ghc-prim, deepseq, template-haskell if impl(ghc < 9.4) build-depends: data-array-byte >= 0.1 && < 0.2 - exposed-modules: Data.ByteString - Data.ByteString.Char8 - Data.ByteString.Unsafe - Data.ByteString.Internal - Data.ByteString.Lazy - Data.ByteString.Lazy.Char8 - Data.ByteString.Lazy.Internal - Data.ByteString.Short - Data.ByteString.Short.Internal - - Data.ByteString.Builder - Data.ByteString.Builder.Extra - Data.ByteString.Builder.Prim - Data.ByteString.Builder.RealFloat - - -- perhaps only exposed temporarily - Data.ByteString.Builder.Internal - Data.ByteString.Builder.Prim.Internal - other-modules: Data.ByteString.Builder.ASCII - Data.ByteString.Builder.Prim.ASCII - Data.ByteString.Builder.Prim.Binary - Data.ByteString.Builder.Prim.Internal.Base16 - Data.ByteString.Builder.Prim.Internal.Floating - Data.ByteString.Builder.RealFloat.F2S - Data.ByteString.Builder.RealFloat.D2S - Data.ByteString.Builder.RealFloat.Internal - Data.ByteString.Builder.RealFloat.TableGenerator - Data.ByteString.Internal.Type - Data.ByteString.Lazy.ReadInt - Data.ByteString.Lazy.ReadNat - Data.ByteString.ReadInt - Data.ByteString.ReadNat - Data.ByteString.Utils.ByteOrder - Data.ByteString.Utils.UnalignedAccess - - default-language: Haskell2010 - other-extensions: CPP, - ForeignFunctionInterface, - BangPatterns - UnliftedFFITypes, - MagicHash, - UnboxedTuples, - DeriveDataTypeable - ScopedTypeVariables - RankNTypes - NamedFieldPuns - - ghc-options: -Wall -fwarn-tabs -Wincomplete-uni-patterns - -optP -Wall -optP -Werror=undef - -O2 - -fmax-simplifier-iterations=10 - -fdicts-cheap - -fspec-constr-count=6 + exposed-modules: Data.ByteString + Data.ByteString.Char8 + Data.ByteString.Unsafe + Data.ByteString.Internal + Data.ByteString.Lazy + Data.ByteString.Lazy.Char8 + Data.ByteString.Lazy.Internal + Data.ByteString.Short + Data.ByteString.Short.Internal + + Data.ByteString.Builder + Data.ByteString.Builder.Extra + Data.ByteString.Builder.Prim + Data.ByteString.Builder.RealFloat + + -- perhaps only exposed temporarily + Data.ByteString.Builder.Internal + Data.ByteString.Builder.Prim.Internal + other-modules: Data.ByteString.Builder.ASCII + Data.ByteString.Builder.Prim.ASCII + Data.ByteString.Builder.Prim.Binary + Data.ByteString.Builder.Prim.Internal.Base16 + Data.ByteString.Builder.Prim.Internal.Floating + Data.ByteString.Builder.RealFloat.F2S + Data.ByteString.Builder.RealFloat.D2S + Data.ByteString.Builder.RealFloat.Internal + Data.ByteString.Builder.RealFloat.TableGenerator + Data.ByteString.Internal.Type + Data.ByteString.Lazy.ReadInt + Data.ByteString.Lazy.ReadNat + Data.ByteString.ReadInt + Data.ByteString.ReadNat + Data.ByteString.Utils.ByteOrder + Data.ByteString.Utils.UnalignedAccess + + ghc-options: -Wall -fwarn-tabs -Wincomplete-uni-patterns + -optP-Wall -optP-Werror=undef + -O2 + -fmax-simplifier-iterations=10 + -fdicts-cheap + -fspec-constr-count=6 if arch(javascript) || flag(pure-haskell) cpp-options: -DPURE_HASKELL=1 @@ -177,6 +190,7 @@ library bytestring-cpp-macros.h test-suite bytestring-tests + import: language type: exitcode-stdio-1.0 main-is: Main.hs other-modules: Builder @@ -205,11 +219,12 @@ test-suite bytestring-tests template-haskell, transformers >= 0.3, syb + ghc-options: -fwarn-unused-binds -threaded -rtsopts - default-language: Haskell2010 benchmark bytestring-bench + import: language main-is: BenchAll.hs other-modules: BenchBoundsCheckFusion BenchCount @@ -219,7 +234,7 @@ benchmark bytestring-bench BenchShort type: exitcode-stdio-1.0 hs-source-dirs: bench - default-language: Haskell2010 + ghc-options: -O2 "-with-rtsopts=-A32m" if impl(ghc >= 8.6) ghc-options: -fproc-alignment=64 diff --git a/tests/IsValidUtf8.hs b/tests/IsValidUtf8.hs index 254306c77..f081b1315 100644 --- a/tests/IsValidUtf8.hs +++ b/tests/IsValidUtf8.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE LambdaCase #-} - module IsValidUtf8 (testSuite) where import Data.Bits (shiftR, (.&.), shiftL) diff --git a/tests/Lift.hs b/tests/Lift.hs index 76816f6e0..b65130b4c 100644 --- a/tests/Lift.hs +++ b/tests/Lift.hs @@ -1,6 +1,8 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE TemplateHaskell #-} + {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TemplateHaskell #-} + module Lift (testSuite) where import Test.Tasty (TestTree, testGroup) diff --git a/tests/Properties.hs b/tests/Properties.hs index 09bb4baca..d04ea5209 100644 --- a/tests/Properties.hs +++ b/tests/Properties.hs @@ -1,10 +1,4 @@ {-# LANGUAGE AllowAmbiguousTypes #-} -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE MagicHash #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeApplications #-} -{-# LANGUAGE UnboxedTuples #-} - -- We need @AllowAmbiguousTypes@ in order to be able to use @TypeApplications@ -- to disambiguate the desired instance of class methods whose instance cannot -- be inferred from the caller's context. We would otherwise have to use diff --git a/tests/Properties/ByteString.hs b/tests/Properties/ByteString.hs index b8d13e6ea..cf1bc8634 100644 --- a/tests/Properties/ByteString.hs +++ b/tests/Properties/ByteString.hs @@ -7,9 +7,6 @@ {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ViewPatterns #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeApplications #-} - -- We need @AllowAmbiguousTypes@ in order to be able to use @TypeApplications@ -- to disambiguate the desired instance of class methods whose instance cannot -- be inferred from the caller's context. We would otherwise have to use diff --git a/tests/QuickCheckUtils.hs b/tests/QuickCheckUtils.hs index 80e7ee64b..7328aed5d 100644 --- a/tests/QuickCheckUtils.hs +++ b/tests/QuickCheckUtils.hs @@ -1,8 +1,4 @@ {-# LANGUAGE DataKinds #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE TypeApplications #-} -{-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} module QuickCheckUtils diff --git a/tests/builder/Data/ByteString/Builder/Prim/TestUtils.hs b/tests/builder/Data/ByteString/Builder/Prim/TestUtils.hs index 61cf6af5f..cfce7d8e4 100644 --- a/tests/builder/Data/ByteString/Builder/Prim/TestUtils.hs +++ b/tests/builder/Data/ByteString/Builder/Prim/TestUtils.hs @@ -1,5 +1,5 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE ScopedTypeVariables #-} + -- | -- Copyright : (c) 2011 Simon Meier -- License : BSD3-style (see LICENSE) diff --git a/tests/builder/Data/ByteString/Builder/Prim/Tests.hs b/tests/builder/Data/ByteString/Builder/Prim/Tests.hs index 230882335..60e0cf4a8 100644 --- a/tests/builder/Data/ByteString/Builder/Prim/Tests.hs +++ b/tests/builder/Data/ByteString/Builder/Prim/Tests.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE MagicHash #-} - -- | -- Copyright : (c) 2011 Simon Meier -- License : BSD3-style (see LICENSE) diff --git a/tests/builder/Data/ByteString/Builder/Tests.hs b/tests/builder/Data/ByteString/Builder/Tests.hs index 0d5afc6ba..a40c3fd2f 100644 --- a/tests/builder/Data/ByteString/Builder/Tests.hs +++ b/tests/builder/Data/ByteString/Builder/Tests.hs @@ -1,8 +1,3 @@ -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE MagicHash #-} -{-# LANGUAGE CPP #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} - -- | -- Copyright : (c) 2011 Simon Meier -- License : BSD3-style (see LICENSE)