bizzlelude 4.20.2.0.1 → 4.20.2.0.2
raw patch · 3 files changed
+27/−14 lines, 3 filesdep ~bytestringdep ~directorydep ~mtl
Dependency ranges changed: bytestring, directory, mtl, pcre-light, text, validation
Files
- bizzlelude.cabal +7/−7
- src/main/External.hs +6/−5
- src/main/Misc.hs +14/−2
bizzlelude.cabal view
@@ -1,6 +1,6 @@ Cabal-Version: 3.8 Name: bizzlelude-Version: 4.20.2.0.1+Version: 4.20.2.0.2 License: BSD-3-Clause License-File: LICENSE.txt Author: Jason Bertsche@@ -33,13 +33,13 @@ -funbox-strict-fields Build-depends: , base == 4.20.2.0- , bytestring >= 0.12.0 && < 0.13.0+ , bytestring >= 0.12.0 && < 0.13 , containers >= 0.7 && < 0.8- , directory >= 1.3.0 && < 1.4.0- , mtl >= 2.3.0 && < 2.4.0- , pcre-light >= 0.4.0 && < 0.5.0- , text >= 2.1.0 && < 2.2.0- , validation >= 1.1.0 && < 1.2.0+ , directory >= 1.3.0 && < 1.4+ , mtl >= 2.3.0 && < 2.4+ , pcre-light >= 0.4.0 && < 0.5+ , text >= 2.1.0 && < 2.2+ , validation >= 1.1.0 && < 1.2 -- The below is copied from the `exposed-modules` in 'base' (modulo `prelude`) -- https://gitlab.haskell.org/ghc/ghc/-/blob/master/libraries/base/base.cabal.in
src/main/External.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE NoImplicitPrelude #-}-module External(module Control.Arrow, module Control.Applicative, module Control.Monad, module Control.Monad.IO.Class, module Control.Monad.State, module Data.Bifoldable, module Data.Bifunctor, module Data.Bool, module Data.ByteString, module Data.Char, module Data.Either, module Data.Eq, module Data.Foldable, module Data.Function, module Data.Functor, module Data.Int, module Data.IntSet, module Data.List.NonEmpty, module Data.Map, module Data.Maybe, module Data.Monoid, module Data.Ord, module Data.Semigroup, module Data.Set, module Data.Text, module Data.Traversable, module Data.Tuple, module Data.Validation, module Data.Void, module Data.Word, module Debug.Trace, module GHC.Base, module GHC.Enum, module GHC.Err, module GHC.Float, module GHC.IO, module GHC.Num, module GHC.Real, module GHC.Show, module Numeric, module System.IO.Error, module Text.Read) where+module External(module Control.Arrow, module Control.Applicative, module Control.Monad, module Control.Monad.IO.Class, module Control.Monad.State, module Data.Bifoldable, module Data.Bifunctor, module Data.Bool, module Data.ByteString, module Data.Char, module Data.Either, module Data.Eq, module Data.Foldable, module Data.Function, module Data.Functor, module Data.Int, module Data.IntSet, module Data.List.NonEmpty, module Data.Map, module Data.Maybe, module Data.Monoid, module Data.Ord, module Data.Semigroup, module Data.Set, module Data.Text, module Data.Traversable, module Data.Tuple, module Data.Type.Equality, module Data.Validation, module Data.Void, module Data.Word, module Debug.Trace, module GHC.Base, module GHC.Enum, module GHC.Err, module GHC.Float, module GHC.IO, module GHC.Num, module GHC.Real, module GHC.Show, module Numeric, module System.IO.Error, module Text.Read) where import Control.Arrow((&&&), (***)) import Control.Applicative((<**>), Alternative((<|>), many, some), Applicative((<*>), (<*), (*>), pure), liftA2, optional)@@ -14,7 +14,7 @@ import Data.Char(Char, digitToInt, intToDigit) import Data.Either(Either(Left, Right), either, lefts, isLeft, isRight, partitionEithers, rights) import Data.Eq(Eq((==), (/=)))-import Data.Foldable(Foldable(fold, foldMap, foldr, foldr', foldl, foldl', foldr1, foldl1, null, length, elem, maximum, minimum, sum, product), foldlM, for_, sequenceA_, and, or, any, all, maximumBy, minimumBy, find)+import Data.Foldable(and, any, all, Foldable(elem, fold, foldMap, foldr, foldr', foldl, foldl', foldr1, foldl1, null, maximum, minimum, sum, product), find, foldlM, foldrM, for_, maximumBy, minimumBy, or, sequenceA_) import Data.Function(($), (.), const, flip, id, on) import Data.Functor((<$), (<$>), ($>), Functor(fmap), void) import Data.Int(Int, Int8, Int16, Int32, Int64)@@ -29,6 +29,7 @@ import Data.Text(lines, Text, unlines, unwords, words) import Data.Traversable(for, sequenceA, Traversable, traverse) import Data.Tuple(curry, fst, snd, swap, uncurry)+import Data.Type.Equality(type (~)) import Data.Word(Word, Word8, Word16, Word32, Word64) import Data.Validation(bindValidation, validation, Validation(Failure, Success)) import Data.Void(Void)@@ -42,11 +43,11 @@ import GHC.Float(Double, Float) import GHC.IO(FilePath, IO) import GHC.Num(Integer, Num((+), (-), (*), abs, signum, fromInteger, negate), subtract)-import GHC.Real((^), (^^), Fractional(recip, fromRational), fromIntegral, Integral(quot, rem, div, mod, quotRem, divMod, toInteger), RealFrac(properFraction, truncate, round, ceiling, floor), Real(toRational))+import GHC.Real((^), (^^), Fractional(recip, fromRational), fromIntegral, Integral(quot, rem, div, mod, quotRem, divMod, toInteger), RealFrac(properFraction, truncate, round, ceiling, floor), Real(toRational), realToFrac) import GHC.Show(Show(show)) -import Numeric(Floating, pi, exp, log, sqrt, (**), logBase, sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh)+import Numeric(Floating, pi, exp, log, sqrt, (**), logBase, sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh, showFFloat) import System.IO.Error(IOError, ioError, userError) -import Text.Read(read, readMaybe)+import Text.Read(read, Read, readMaybe)
src/main/Misc.hs view
@@ -1,12 +1,12 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-missing-import-lists #-}-module Misc((|>), (&>), (&>=), (>>>), (>=>), (/#), aempty, asString, asPath, asText, showText, concat, error, fromEither, map, pam, (<&>), cartProduct, regexMatch, groupOn, return', scalaGroupBy, putStrFlush, traceLabel, unsafeRead, listDirsRecursively, uncurry5) where+module Misc((|>), (&>), (&>=), (>>>), (>=>), (/#), aempty, asString, asPath, asText, showText, concat, error, failOrM, fromEither, map, pam, (<&>), cartProduct, regexMatch, groupOn, length, orElse, return', scalaGroupBy, putStrFlush, traceLabel, unsafeRead, listDirsRecursively, uncurry5, uncurry6) where import External import Data.Text.Encoding(decodeUtf8, encodeUtf8) -import GHC.Real(Fractional((/)), realToFrac)+import GHC.Real(Fractional((/))) import qualified Control.Applicative as Apply import qualified Control.Arrow as CArrow@@ -68,6 +68,15 @@ pam = flip map (<&>) = flip map +failOrM :: Monad m => Validation f s1 -> (s1 -> m (Validation f s2)) -> m (Validation f s2)+v `failOrM` vm = validation (Failure &> return) vm v++orElse :: Maybe a -> a -> a+orElse m x = maybe x id m++length :: Foldable t => t a -> Word+length = Foldable.length &> fromIntegral+ cartProduct :: [a] -> [b] -> [(a, b)] cartProduct xs ys = [(x, y) | x <- xs, y <- ys] @@ -119,3 +128,6 @@ uncurry5 :: (a -> b -> c -> d -> e -> f) -> ((a, b, c, d, e) -> f) uncurry5 f (a, b, c, d, e) = f a b c d e++uncurry6 :: (a -> b -> c -> d -> e -> f -> g) -> ((a, b, c, d, e, f) -> g)+uncurry6 g (a, b, c, d, e, f) = g a b c d e f