foundation 0.0.28 → 0.0.29
raw patch · 32 files changed
+40/−36 lines, 32 filesdep ~basementPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: basement
API changes (from Hackage documentation)
Files
- Foundation/Array/Bitmap.hs +1/−2
- Foundation/Array/Chunked/Unboxed.hs +0/−1
- Foundation/Bits.hs +1/−1
- Foundation/Check/Gen.hs +1/−1
- Foundation/Check/Main.hs +6/−4
- Foundation/Check/Property.hs +0/−1
- Foundation/Class/Storable.hs +1/−3
- Foundation/Collection/Buildable.hs +2/−1
- Foundation/Collection/Collection.hs +1/−0
- Foundation/Collection/Foldable.hs +4/−0
- Foundation/Collection/InnerFunctor.hs +1/−0
- Foundation/Collection/Sequential.hs +1/−0
- Foundation/Collection/Zippable.hs +1/−0
- Foundation/Conduit.hs +1/−0
- Foundation/Conduit/Internal.hs +1/−1
- Foundation/Conduit/Textual.hs +0/−2
- Foundation/Exception.hs +1/−1
- Foundation/Format/CSV/Types.hs +2/−3
- Foundation/Hashing/SipHash.hs +1/−1
- Foundation/List/DList.hs +1/−2
- Foundation/Monad.hs +1/−2
- Foundation/Monad/Except.hs +1/−1
- Foundation/Monad/Identity.hs +1/−1
- Foundation/Monad/Reader.hs +1/−1
- Foundation/Monad/State.hs +1/−1
- Foundation/Network/IPv4.hs +1/−0
- Foundation/Network/IPv6.hs +1/−1
- Foundation/Parser.hs +1/−0
- Foundation/Random/DRG.hs +1/−1
- Foundation/UUID.hs +1/−0
- Foundation/VFS/FilePath.hs +0/−1
- foundation.cabal +3/−3
Foundation/Array/Bitmap.hs view
@@ -42,7 +42,7 @@ import qualified Foundation.Collection as C import Foundation.Numerical-import Data.Bits+import Data.Bits hiding ((.<<.), (.>>.)) import Foundation.Bits import GHC.ST import qualified Data.List@@ -71,7 +71,6 @@ (<>) = append instance Monoid Bitmap where mempty = empty- mappend = append mconcat = concat type instance C.Element Bitmap = Bool
Foundation/Array/Chunked/Unboxed.hs view
@@ -47,7 +47,6 @@ (<>) = append instance Monoid (ChunkedUArray a) where mempty = empty- mappend = append mconcat = concat type instance C.Element (ChunkedUArray ty) = ty
Foundation/Bits.hs view
@@ -9,7 +9,7 @@ import Basement.Compat.Base import Foundation.Numerical-import Data.Bits+import Data.Bits hiding ((.<<.), (.>>.)) -- | Unsafe Shift Left Operator (.<<.) :: Bits a => a -> Int -> a
Foundation/Check/Gen.hs view
@@ -60,7 +60,7 @@ in ab a instance Monad Gen where- return a = Gen (\_ _ -> a)+ return = pure ma >>= mb = Gen $ \rng params -> let (r1,r2) = genGenerator rng a = runGen ma r1 params
Foundation/Check/Main.hs view
@@ -273,10 +273,12 @@ then return (GroupResult name 0 (planValidations st) []) else do displayCurrent name- forM_ fails $ \(PropertyResult name' nb r) ->- case r of- PropertySuccess -> whenVerbose $ displayPropertySucceed (name <> ": " <> name') nb- PropertyFailed w -> whenErrorOnly $ displayPropertyFailed (name <> ": " <> name') nb w+ forM_ fails $ \fail -> case fail of+ PropertyResult name' nb r ->+ case r of+ PropertySuccess -> whenVerbose $ displayPropertySucceed (name <> ": " <> name') nb+ PropertyFailed w -> whenErrorOnly $ displayPropertyFailed (name <> ": " <> name') nb w+ _ -> error "should not happen" return (GroupResult name (length fails) (planValidations st) fails) testProperty :: String -> Property -> CheckMain TestResult
Foundation/Check/Property.hs view
@@ -18,7 +18,6 @@ ) where import Basement.Imports hiding (Typeable)-import Data.Proxy (Proxy(..)) import Basement.Compat.Typeable import Foundation.Check.Gen import Foundation.Check.Arbitrary
Foundation/Class/Storable.hs view
@@ -30,8 +30,6 @@ #include "MachDeps.h" -import GHC.Types (Double, Float)- import Foreign.Ptr (castPtr) import qualified Foreign.Ptr import qualified Foreign.Storable (peek, poke)@@ -42,7 +40,7 @@ import Basement.Types.Word128 (Word128(..)) import Basement.Types.Word256 (Word256(..)) import Foundation.Collection-import Foundation.Collection.Buildable (builderLift, build_)+import Foundation.Collection.Buildable (builderLift) import Basement.PrimType import Basement.Endianness import Foundation.Numerical
Foundation/Collection/Buildable.hs view
@@ -24,6 +24,7 @@ import Basement.Monad import Basement.MutableBuilder import Basement.Compat.MonadTrans+import Data.Kind (Type) -- $setup -- >>> import Control.Monad.ST@@ -42,7 +43,7 @@ {-# MINIMAL append, build #-} -- | Mutable collection type used for incrementally writing chunks.- type Mutable col :: * -> *+ type Mutable col :: Type -> Type -- | Unit of the smallest step possible in an `append` operation. --
Foundation/Collection/Collection.hs view
@@ -20,6 +20,7 @@ {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE TypeOperators #-} module Foundation.Collection.Collection ( Collection(..) -- * NonEmpty Property
Foundation/Collection/Foldable.hs view
@@ -15,6 +15,10 @@ {-# LANGUAGE TypeOperators #-} #endif +#if __GLASGOW_HASKELL__ >= 904+{-# LANGUAGE UndecidableInstances #-}+#endif+ module Foundation.Collection.Foldable ( Foldable(..) , Fold1able(..)
Foundation/Collection/InnerFunctor.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE DefaultSignatures #-}+{-# LANGUAGE TypeOperators #-} module Foundation.Collection.InnerFunctor ( InnerFunctor(..) ) where
Foundation/Collection/Sequential.hs view
@@ -14,6 +14,7 @@ {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE TypeOperators #-} module Foundation.Collection.Sequential ( Sequential(..) ) where
Foundation/Collection/Zippable.hs view
@@ -12,6 +12,7 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE TypeOperators #-} module Foundation.Collection.Zippable ( BoxedZippable(..) , Zippable(..)
Foundation/Conduit.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE TypeOperators #-} module Foundation.Conduit ( Conduit , ResourceT
Foundation/Conduit/Internal.hs view
@@ -79,7 +79,7 @@ {-# INLINE (<*>) #-} instance (Functor m, Monad m) => Monad (Pipe l i o u m) where- return = Done+ return = pure {-# INLINE return #-} Yield p c o >>= fp = Yield (p >>= fp) c o
Foundation/Conduit/Textual.hs view
@@ -7,8 +7,6 @@ ) where import Basement.Imports hiding (throw)-import Basement.UArray (UArray)-import Foundation.String (String) import Foundation.Collection import qualified Basement.String as S import Foundation.Conduit.Internal
Foundation/Exception.hs view
@@ -5,7 +5,7 @@ ) where import Basement.Imports-import Control.Exception (Exception, SomeException)+import Control.Exception (SomeException) import Foundation.Monad.Exception finally :: MonadBracket m => m a -> m b -> m a
Foundation/Format/CSV/Types.hs view
@@ -31,14 +31,13 @@ ) where import Basement.Imports-import Basement.BoxedArray (Array, length, unsafeIndex)+import Basement.BoxedArray (length, unsafeIndex) import Basement.NormalForm (NormalForm(..)) import Basement.From (Into, into)-import Basement.String (String, any, elem, null, uncons)+import Basement.String (any, elem, null, uncons) import qualified Basement.String as String (singleton) import Basement.Types.Word128 (Word128) import Basement.Types.Word256 (Word256)-import Basement.Types.OffsetSize (Offset, CountOf) import Foundation.Collection.Element (Element) import Foundation.Collection.Collection (Collection, nonEmpty_) import Foundation.Collection.Sequential (Sequential)
Foundation/Hashing/SipHash.hs view
@@ -17,7 +17,7 @@ , Sip2_4 ) where -import Data.Bits+import Data.Bits hiding ((.<<.), (.>>.)) import Basement.Compat.Base import Basement.Types.OffsetSize import Basement.PrimType
Foundation/List/DList.hs view
@@ -37,7 +37,6 @@ (<>) dl1 dl2 = DList $ unDList dl1 . unDList dl2 instance Monoid (DList a) where mempty = DList id- mappend dl1 dl2 = DList $ unDList dl1 . unDList dl2 instance Functor DList where fmap f = foldr (cons . f) mempty@@ -48,7 +47,7 @@ instance Monad DList where (>>=) m k = foldr (mappend . k) mempty m- return = singleton+ return = pure type instance Element (DList a) = a
Foundation/Monad.hs view
@@ -20,7 +20,6 @@ import Foundation.Monad.Exception import Foundation.Monad.Transformer import Foundation.Numerical-import Control.Applicative (liftA2) #if MIN_VERSION_base(4,8,0) import Data.Functor.Identity@@ -66,5 +65,5 @@ where loop cnt | cnt <= 0 = pure []- | otherwise = liftA2 (:) f (loop (cnt - 1))+ | otherwise = (:) <$> f <*> (loop (cnt - 1)) {-# INLINEABLE replicateM #-}
Foundation/Monad/Except.hs view
@@ -35,7 +35,7 @@ mFail = ExceptT . pure . Left instance Monad m => Monad (ExceptT e m) where- return a = ExceptT $ return (Right a)+ return = pure m >>= k = ExceptT $ do a <- runExceptT m case a of
Foundation/Monad/Identity.hs view
@@ -28,7 +28,7 @@ {-# INLINE (<*>) #-} instance Monad m => Monad (IdentityT m) where- return x = IdentityT (return x)+ return = pure {-# INLINE return #-} ma >>= mb = IdentityT $ runIdentityT ma >>= runIdentityT . mb {-# INLINE (>>=) #-}
Foundation/Monad/Reader.hs view
@@ -34,7 +34,7 @@ {-# INLINE (<*>) #-} instance Monad m => Monad (ReaderT r m) where- return a = ReaderT $ const (return a)+ return = pure {-# INLINE return #-} ma >>= mab = ReaderT $ \r -> runReaderT ma r >>= \a -> runReaderT (mab a) r {-# INLINE (>>=) #-}
Foundation/Monad/State.hs view
@@ -42,7 +42,7 @@ {-# INLINE (<*>) #-} instance (Functor m, Monad m) => Monad (StateT s m) where- return a = StateT $ \s -> (,s) `fmap` return a+ return = pure {-# INLINE return #-} ma >>= mab = StateT $ runStateT ma >=> (\(a, s2) -> runStateT (mab a) s2) {-# INLINE (>>=) #-}
Foundation/Network/IPv4.hs view
@@ -12,6 +12,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeApplications #-}+{-# LANGUAGE TypeOperators #-} module Foundation.Network.IPv4 ( IPv4
Foundation/Network/IPv6.hs view
@@ -8,6 +8,7 @@ -- IPv6 data type -- {-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeOperators #-} module Foundation.Network.IPv6 ( IPv6@@ -28,7 +29,6 @@ import Foundation.Class.Storable import Foundation.Hashing.Hashable-import Basement.Numerical.Additive (scale) import Basement.Compat.Base import Data.Proxy import Foundation.Primitive
Foundation/Parser.hs view
@@ -24,6 +24,7 @@ {-# LANGUAGE Rank2Types #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeOperators #-} module Foundation.Parser ( Parser
Foundation/Random/DRG.hs view
@@ -44,7 +44,7 @@ in (f a, g3) instance Monad (MonadRandomState gen) where- return a = MonadRandomState $ \g -> (a, g)+ return = pure (>>=) m1 m2 = MonadRandomState $ \g1 -> let (a, g2) = runRandomState m1 g1 in runRandomState (m2 a) g2
Foundation/UUID.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeOperators #-} module Foundation.UUID ( UUID(..)
Foundation/VFS/FilePath.hs view
@@ -189,7 +189,6 @@ (<>) (FileName a) (FileName b) = FileName $ a `mappend` b instance Monoid FileName where mempty = FileName mempty- mappend (FileName a) (FileName b) = FileName $ a `mappend` b instance Path FilePath where type PathEnt FilePath = FileName
foundation.cabal view
@@ -1,5 +1,5 @@ name: foundation-version: 0.0.28+version: 0.0.29 synopsis: Alternative prelude with batteries and no dependencies description: A custom prelude with no dependencies apart from base.@@ -196,7 +196,7 @@ BangPatterns DeriveDataTypeable - if impl(ghc < 8.8) || impl(ghcjs)+ if impl(ghc < 8.10) || impl(ghcjs) buildable: False else build-depends: base@@ -206,7 +206,7 @@ if arch(i386) extra-libraries: gcc - build-depends: basement == 0.0.14+ build-depends: basement == 0.0.15 -- FIXME add suport for armel mipsel -- CPP-options: -DARCH_IS_LITTLE_ENDIAN