incipit-base 0.6.1.1 → 0.7.0.2
raw patch · 5 files changed
Files
- changelog.md +4/−0
- incipit-base.cabal +7/−7
- lib/Incipit/Debug.hs +2/−3
- lib/Incipit/Foldable.hs +1/−13
- lib/Incipit/List.hs +1/−1
changelog.md view
@@ -1,3 +1,7 @@+# 0.7.0.0++* Write trace messages to stderr.+ # 0.6.0.0 * Add polymorphic type family `Undefined` that emits a `TypeError`.
incipit-base.cabal view
@@ -1,11 +1,11 @@ cabal-version: 2.2 --- This file has been generated from package.yaml by hpack version 0.36.1.+-- This file has been generated from package.yaml by hpack version 0.38.3. -- -- see: https://github.com/sol/hpack name: incipit-base-version: 0.6.1.1+version: 0.7.0.2 synopsis: A Prelude for Polysemy – Base Reexports description: See https://hackage.haskell.org/package/incipit-base/docs/IncipitBase.html category: Prelude@@ -92,8 +92,10 @@ LiberalTypeSynonyms MonadComprehensions MultiWayIf+ NoFieldSelectors OverloadedLabels OverloadedLists+ OverloadedRecordDot OverloadedStrings PackageImports PartialTypeSignatures@@ -109,14 +111,12 @@ UndecidableInstances UnicodeSyntax ViewPatterns- OverloadedRecordDot- NoFieldSelectors ghc-options: -Wall -Widentities -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wredundant-constraints -Wunused-type-patterns -Wunused-packages build-depends:- base >=4.16.4.0 && <4.22+ base >=4.17.2.1 && <4.23 , bytestring >=0.11.1.0 && <0.13 , containers >=0.6.3.1 && <0.9 , data-default >=0.2 && <0.9- , stm >=2.5.0.2 && <2.6- , text >=1.2.5.0 && <2.2+ , stm >=2.5.1.0 && <2.6+ , text >=2.0.2 && <2.2 default-language: GHC2021
lib/Incipit/Debug.hs view
@@ -6,19 +6,18 @@ import qualified Data.Text as Text import Data.Text (Text) import GHC.Stack (CallStack, SrcLoc (..), callStack, getCallStack)+import System.IO (IO, hPutStrLn, stderr) import System.IO.Unsafe (unsafePerformIO) import Incipit.Base ( Applicative (pure), Functor ((<$)), HasCallStack,- IO, Monad, Semigroup ((<>)), Show, error, fromMaybe,- putStrLn, ) import Incipit.List (last) import Incipit.String.Conversion (ToString (toString), ToText (toText), show)@@ -33,7 +32,7 @@ Text -> IO () debugPrint SrcLoc {srcLocModule = (toText -> slm), srcLocStartLine} !msg =- putStrLn (toString moduleName <> ":" <> show srcLocStartLine <> " " <> toString msg)+ hPutStrLn stderr (toString moduleName <> ":" <> show srcLocStartLine <> " " <> toString msg) where moduleName = fromMaybe slm (last (Text.splitOn "." slm))
lib/Incipit/Foldable.hs view
@@ -6,7 +6,7 @@ import qualified Data.Foldable as Foldable import Data.Foldable (- Foldable (elem, fold, foldMap, foldMap', foldl', foldl1, foldr, foldr', foldr1, length, null, product, sum, toList),+ Foldable (elem, fold, foldMap, foldMap', foldl, foldl', foldl1, foldr, foldr', foldr1, length, null, product, sum, toList), all, and, any,@@ -25,18 +25,6 @@ ) import Data.Maybe (Maybe (Just, Nothing)) import Data.Ord (Ord, Ordering)---- |Default to using the strict version since the lazy one is so controversial.-foldl ::- ∀ t b a .- Foldable t =>- (b -> a -> b) ->- b ->- t a ->- b-foldl =- Foldable.foldl'-{-# inlineable foldl #-} -- |Safe version of 'Foldable.minimum'. minimum ::
lib/Incipit/List.hs view
@@ -29,5 +29,5 @@ tail :: [a] -> Maybe [a] tail = \case [] -> Nothing- as -> Just (List.tail as)+ _ : as -> Just as {-# inline tail #-}