packages feed

morley-prelude 0.5.3 → 0.6.0

raw patch · 6 files changed

+27/−12 lines, 6 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Fmt.Buildable: instance Fmt.Buildable.FormatAsHex Data.ByteString.Internal.ByteString
- Fmt.Buildable: instance Fmt.Buildable.FromDoc Data.ByteString.Internal.ByteString
- Fmt.Buildable: instance Fmt.Buildable.FromSimpleDoc Data.ByteString.Internal.ByteString
- Morley.Prelude.Length: instance Morley.Prelude.Length.DefaultToInt 'GHC.Types.False i
- Morley.Prelude.Length: instance Morley.Prelude.Length.DefaultToInt 'GHC.Types.True i
- Morley.Prelude.Word: type Word62 = OddWord Word64 One One One One One Zero ()
- Morley.Prelude.Word: type Word63 = OddWord Word64 One One One One One One ()
- Prelude: Option :: Maybe a -> Option a
- Prelude: [getOption] :: Option a -> Maybe a
- Prelude: listToMaybe :: [a] -> Maybe a
- Prelude: naturalFromInt :: Int -> Natural
- Prelude: newtype Option a
+ Fmt.Buildable: instance Fmt.Buildable.FormatAsHex Data.ByteString.Internal.Type.ByteString
+ Fmt.Buildable: instance Fmt.Buildable.FromDoc Data.ByteString.Internal.Type.ByteString
+ Fmt.Buildable: instance Fmt.Buildable.FromSimpleDoc Data.ByteString.Internal.Type.ByteString
+ Morley.Prelude.Length: instance Morley.Prelude.FromIntegral.CheckIntSubType Morley.Prelude.Length.Length i => Morley.Prelude.Length.DefaultToInt 'GHC.Types.False i
+ Morley.Prelude.Length: instance Morley.Prelude.FromIntegral.CheckIntSubType Morley.Prelude.Length.Length i => Morley.Prelude.Length.DefaultToInt 'GHC.Types.True i
+ Morley.Prelude.Word: data Word62
+ Morley.Prelude.Word: data Word63
+ Morley.Prelude.Word: instance GHC.Bits.Bits Morley.Prelude.Word.Word62
+ Morley.Prelude.Word: instance GHC.Bits.Bits Morley.Prelude.Word.Word63
+ Morley.Prelude.Word: instance GHC.Bits.FiniteBits Morley.Prelude.Word.Word62
+ Morley.Prelude.Word: instance GHC.Bits.FiniteBits Morley.Prelude.Word.Word63
+ Morley.Prelude.Word: instance GHC.Classes.Eq Morley.Prelude.Word.Word62
+ Morley.Prelude.Word: instance GHC.Classes.Eq Morley.Prelude.Word.Word63
+ Morley.Prelude.Word: instance GHC.Classes.Ord Morley.Prelude.Word.Word62
+ Morley.Prelude.Word: instance GHC.Classes.Ord Morley.Prelude.Word.Word63
+ Morley.Prelude.Word: instance GHC.Enum.Bounded Morley.Prelude.Word.Word62
+ Morley.Prelude.Word: instance GHC.Enum.Bounded Morley.Prelude.Word.Word63
+ Morley.Prelude.Word: instance GHC.Enum.Enum Morley.Prelude.Word.Word62
+ Morley.Prelude.Word: instance GHC.Enum.Enum Morley.Prelude.Word.Word63
+ Morley.Prelude.Word: instance GHC.Num.Num Morley.Prelude.Word.Word62
+ Morley.Prelude.Word: instance GHC.Num.Num Morley.Prelude.Word.Word63
+ Morley.Prelude.Word: instance GHC.Read.Read Morley.Prelude.Word.Word62
+ Morley.Prelude.Word: instance GHC.Read.Read Morley.Prelude.Word.Word63
+ Morley.Prelude.Word: instance GHC.Real.Integral Morley.Prelude.Word.Word62
+ Morley.Prelude.Word: instance GHC.Real.Integral Morley.Prelude.Word.Word63
+ Morley.Prelude.Word: instance GHC.Real.Real Morley.Prelude.Word.Word62
+ Morley.Prelude.Word: instance GHC.Real.Real Morley.Prelude.Word.Word63
+ Morley.Prelude.Word: instance GHC.Show.Show Morley.Prelude.Word.Word62
+ Morley.Prelude.Word: instance GHC.Show.Show Morley.Prelude.Word.Word63
+ Prelude: Base10 :: FractionalExponentBase
+ Prelude: Base2 :: FractionalExponentBase
+ Prelude: class a ~# b => (a :: k) ~ (b :: k)
+ Prelude: data () => FractionalExponentBase
+ Prelude: groupAllWith :: Ord b => (a -> b) -> [a] -> [NonEmpty a]
+ Prelude: groupBy :: Foldable f => (a -> a -> Bool) -> f a -> [NonEmpty a]
+ Prelude: groupWith :: (Foldable f, Eq b) => (a -> b) -> f a -> [NonEmpty a]
+ Prelude: mkRationalBase10 :: Rational -> Integer -> Rational
+ Prelude: mkRationalBase2 :: Rational -> Integer -> Rational
+ Prelude: mkRationalWithExponentBase :: Rational -> Integer -> FractionalExponentBase -> Rational
- Morley.Prelude.Length: length :: (Integral i, Container a, CheckIntSubType Length i, DefaultToInt (IsIntSubType Length i) i) => a -> i
+ Morley.Prelude.Length: length :: (Integral i, Container a, DefaultToInt (IsIntSubType Length i) i) => a -> i
- Prelude: class Bifunctor (p :: Type -> Type -> Type)
+ Prelude: class () => Bifunctor (p :: Type -> Type -> Type)
- Prelude: class Bounded a
+ Prelude: class () => Bounded a
- Prelude: class Container t where {
+ Prelude: class () => Container t where {
- Prelude: class ConvertUtf8 a b
+ Prelude: class () => ConvertUtf8 a b
- Prelude: class Enum a
+ Prelude: class () => Enum a
- Prelude: class Eq a
+ Prelude: class () => Eq a
- Prelude: class Foldable (t :: Type -> Type)
+ Prelude: class () => Foldable (t :: Type -> Type)
- Prelude: class FromList l where {
+ Prelude: class () => FromList l where {
- Prelude: class Functor (f :: Type -> Type)
+ Prelude: class () => Functor (f :: Type -> Type)
- Prelude: class Generic a
+ Prelude: class () => Generic a
- Prelude: class Hashable a
+ Prelude: class Eq a => Hashable a
- Prelude: class IsLabel (x :: Symbol) a
+ Prelude: class () => IsLabel (x :: Symbol) a
- Prelude: class IsString a
+ Prelude: class () => IsString a
- Prelude: class KnownNat (n :: Nat)
+ Prelude: class () => KnownNat (n :: Nat)
- Prelude: class MonadTrans (t :: Type -> Type -> Type -> Type)
+ Prelude: class () => MonadTrans (t :: Type -> Type -> Type -> Type)
- Prelude: class NFData a
+ Prelude: class () => NFData a
- Prelude: class Num a
+ Prelude: class () => Num a
- Prelude: class One x where {
+ Prelude: class () => One x where {
- Prelude: class Print a
+ Prelude: class () => Print a
- Prelude: class Read a
+ Prelude: class () => Read a
- Prelude: class Semigroup a
+ Prelude: class () => Semigroup a
- Prelude: class Show a
+ Prelude: class () => Show a
- Prelude: class SuperComposition a b c | a b -> c
+ Prelude: class () => SuperComposition a b c | a b -> c
- Prelude: class ToLText a
+ Prelude: class () => ToLText a
- Prelude: class ToPairs t
+ Prelude: class () => ToPairs t
- Prelude: class ToString a
+ Prelude: class () => ToString a
- Prelude: class ToText a
+ Prelude: class () => ToText a
- Prelude: class Typeable (a :: k)
+ Prelude: class () => Typeable (a :: k)
- Prelude: concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
+ Prelude: concatMap :: Container c => (Element c -> [b]) -> c -> [b]
- Prelude: cycle :: [a] -> [a]
+ Prelude: cycle :: HasCallStack => [a] -> [a]
- Prelude: data Bool
+ Prelude: data () => Bool
- Prelude: data Bug
+ Prelude: data () => Bug
- Prelude: data ByteString
+ Prelude: data () => ByteString
- Prelude: data CallStack
+ Prelude: data () => CallStack
- Prelude: data Char
+ Prelude: data () => Char
- Prelude: data Constraint
+ Prelude: data () => Constraint
- Prelude: data Double
+ Prelude: data () => Double
- Prelude: data Either a b
+ Prelude: data () => Either a b
- Prelude: data Float
+ Prelude: data () => Float
- Prelude: data FunPtr a
+ Prelude: data () => FunPtr a
- Prelude: data Handle
+ Prelude: data () => Handle
- Prelude: data HashMap k v
+ Prelude: data () => HashMap k v
- Prelude: data HashSet a
+ Prelude: data () => HashSet a
- Prelude: data IO a
+ Prelude: data () => IO a
- Prelude: data IOMode
+ Prelude: data () => IOMode
- Prelude: data IORef a
+ Prelude: data () => IORef a
- Prelude: data IdentityT (f :: k -> Type) (a :: k)
+ Prelude: data () => IdentityT (f :: k -> Type) (a :: k)
- Prelude: data Int
+ Prelude: data () => Int
- Prelude: data Int16
+ Prelude: data () => Int16
- Prelude: data Int32
+ Prelude: data () => Int32
- Prelude: data Int64
+ Prelude: data () => Int64
- Prelude: data Int8
+ Prelude: data () => Int8
- Prelude: data IntMap a
+ Prelude: data () => IntMap a
- Prelude: data IntSet
+ Prelude: data () => IntSet
- Prelude: data Integer
+ Prelude: data () => Integer
- Prelude: data MVar a
+ Prelude: data () => MVar a
- Prelude: data Map k a
+ Prelude: data () => Map k a
- Prelude: data Maybe a
+ Prelude: data () => Maybe a
- Prelude: data Natural
+ Prelude: data () => Natural
- Prelude: data NonEmpty a
+ Prelude: data () => NonEmpty a
- Prelude: data Ordering
+ Prelude: data () => Ordering
- Prelude: data Proxy (t :: k)
+ Prelude: data () => Proxy (t :: k)
- Prelude: data Ptr a
+ Prelude: data () => Ptr a
- Prelude: data Ratio a
+ Prelude: data () => Ratio a
- Prelude: data STM a
+ Prelude: data () => STM a
- Prelude: data Seq a
+ Prelude: data () => Seq a
- Prelude: data Set a
+ Prelude: data () => Set a
- Prelude: data SomeException
+ Prelude: data () => SomeException
- Prelude: data SomeNat
+ Prelude: data () => SomeNat
- Prelude: data TVar a
+ Prelude: data () => TVar a
- Prelude: data Text
+ Prelude: data () => Text
- Prelude: data Undefined
+ Prelude: data () => Undefined
- Prelude: data UnicodeException
+ Prelude: data () => UnicodeException
- Prelude: data Vector a
+ Prelude: data () => Vector a
- Prelude: data Void
+ Prelude: data () => Void
- Prelude: data Word
+ Prelude: data () => Word
- Prelude: data Word16
+ Prelude: data () => Word16
- Prelude: data Word32
+ Prelude: data () => Word32
- Prelude: data Word64
+ Prelude: data () => Word64
- Prelude: data Word8
+ Prelude: data () => Word8
- Prelude: data WrappedMonoid m
+ Prelude: data () => WrappedMonoid m
- Prelude: group :: Eq a => [a] -> [[a]]
+ Prelude: group :: (Foldable f, Eq a) => f a -> [NonEmpty a]
- Prelude: hashNub :: (Eq a, Hashable a) => [a] -> [a]
+ Prelude: hashNub :: Hashable a => [a] -> [a]
- Prelude: infix 4 <
+ Prelude: infix 4 ~
- Prelude: infixl 0 `hashWithSalt`
+ Prelude: infixl 0 `on`
- Prelude: infixl 1 >>
+ Prelude: infixl 1 >>=
- Prelude: infixr 0 $!
+ Prelude: infixr 0 ?:
- Prelude: infixr 5 :|
+ Prelude: infixr 5 ++
- Prelude: infixr 9 `Compose`
+ Prelude: infixr 9 .
- Prelude: newtype Alt (f :: k -> Type) (a :: k)
+ Prelude: newtype () => Alt (f :: k -> Type) (a :: k)
- Prelude: newtype Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1)
+ Prelude: newtype () => Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1)
- Prelude: newtype Const a (b :: k)
+ Prelude: newtype () => Const a (b :: k)
- Prelude: newtype Down a
+ Prelude: newtype () => Down a
- Prelude: newtype Dual a
+ Prelude: newtype () => Dual a
- Prelude: newtype Endo a
+ Prelude: newtype () => Endo a
- Prelude: newtype ExceptT e (m :: Type -> Type) a
+ Prelude: newtype () => ExceptT e (m :: Type -> Type) a
- Prelude: newtype First a
+ Prelude: newtype () => First a
- Prelude: newtype Identity a
+ Prelude: newtype () => Identity a
- Prelude: newtype Last a
+ Prelude: newtype () => Last a
- Prelude: newtype MaybeT (m :: Type -> Type) a
+ Prelude: newtype () => MaybeT (m :: Type -> Type) a
- Prelude: newtype Product a
+ Prelude: newtype () => Product a
- Prelude: newtype ReaderT r (m :: Type -> Type) a
+ Prelude: newtype () => ReaderT r (m :: Type -> Type) a
- Prelude: newtype StateT s (m :: Type -> Type) a
+ Prelude: newtype () => StateT s (m :: Type -> Type) a
- Prelude: newtype Sum a
+ Prelude: newtype () => Sum a
- Prelude: newtype ZipList a
+ Prelude: newtype () => ZipList a
- Prelude: readMaybe :: Read a => String -> Maybe a
+ Prelude: readMaybe :: forall b a. (ToString a, Read b) => a -> Maybe b
- Prelude: type Type = Type
+ Prelude: type Type = TYPE LiftedRep
- Prelude: type Traversal s t a b = forall (f :: Type -> Type). Applicative f => a -> f b -> s -> f t
+ Prelude: type Lens s t a b = forall (f :: Type -> Type). Functor f => a -> f b -> s -> f t
- Prelude: type family OneItem x;
+ Prelude: type family FromListC l
- Prelude: unstableNub :: (Eq a, Hashable a) => [a] -> [a]
+ Prelude: unstableNub :: Hashable a => [a] -> [a]

Files

CHANGES.md view
@@ -1,6 +1,11 @@ <!-- Unreleased: append new entries here -->  +0.6.0+=====+* [!1364](https://gitlab.com/morley-framework/morley/-/merge_requests/1364)+  Update to LTS-21.4 (GHC 9.4.5)+ 0.5.3 ===== * [!1352](https://gitlab.com/morley-framework/morley/-/merge_requests/1352)
morley-prelude.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           morley-prelude-version:        0.5.3+version:        0.6.0 synopsis:       A custom prelude used in Morley description:    A custom prelude used in Morley. It re-exports the Universum prelude and makes some tiny changes. category:       Prelude@@ -95,7 +95,7 @@       UndecidableInstances       UndecidableSuperClasses       ViewPatterns-  ghc-options: -Weverything -Wno-missing-exported-signatures -Wno-missing-import-lists -Wno-missed-specialisations -Wno-all-missed-specialisations -Wno-unsafe -Wno-safe -Wno-missing-local-signatures -Wno-monomorphism-restriction -Wno-implicit-prelude -Wno-prepositive-qualified-module -Wno-missing-safe-haskell-mode+  ghc-options: -Weverything -Wno-missing-exported-signatures -Wno-missing-import-lists -Wno-missed-specialisations -Wno-all-missed-specialisations -Wno-unsafe -Wno-safe -Wno-missing-local-signatures -Wno-monomorphism-restriction -Wno-implicit-prelude -Wno-prepositive-qualified-module -Wno-missing-safe-haskell-mode -Wno-missing-kind-signatures -Wno-implicit-lift -Wno-unticked-promoted-constructors   build-depends:       Cabal     , OddWord
src/Fmt/Buildable.hs view
@@ -94,8 +94,8 @@  >>> :{ layoutNarrow =-  Prettyprinter.layoutPretty Prettyprinter.LayoutOptions-    {Prettyprinter.layoutPageWidth = Prettyprinter.AvailablePerLine 20 1}+  Prettyprinter.layoutPretty $ Prettyprinter.LayoutOptions $+    Prettyprinter.AvailablePerLine 20 1 :}  >>> doc = reflowF "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
src/Morley/Prelude/Length.hs view
@@ -64,15 +64,15 @@ However, this lets us avoid the issue with integral literals. -} length-  :: (Integral i, Container a, CheckIntSubType Length i, DefaultToInt (IsIntSubType Length i) i)+  :: (Integral i, Container a, DefaultToInt (IsIntSubType Length i) i)   => a -> i length = Universum.fromIntegral . Universum.length  type DefaultToInt :: Bool -> Type -> Constraint-class DefaultToInt b i+class CheckIntSubType Length i => DefaultToInt b i -instance DefaultToInt 'True i-instance DefaultToInt 'False i+instance CheckIntSubType Length i => DefaultToInt 'True i+instance CheckIntSubType Length i => DefaultToInt 'False i  instance {-# incoherent #-} i ~ Int => DefaultToInt f i 
src/Morley/Prelude/Show.hs view
@@ -16,13 +16,14 @@ import Data.Fixed (Fixed) import Data.Time (NominalDiffTime) import Data.Typeable (TypeRep)-import Data.Word.Odd (Word62, Word63) import GHC.TypeLits (ErrorMessage(..), TypeError) import Language.Haskell.Extension (KnownExtension) import Language.Haskell.TH (Name) import Language.Haskell.TH.PprLib (Doc) import Universum hiding (show) import Universum qualified (show)++import Morley.Prelude.Word  -- | An open type family for types having a human-readable 'Show' representation. The -- kind is 'Constraint' in case we need to further constrain the instance, and also for
src/Morley/Prelude/Word.hs view
@@ -1,15 +1,24 @@ -- SPDX-FileCopyrightText: 2022 Oxhead Alpha -- SPDX-License-Identifier: LicenseRef-MIT-OA -{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE NoImplicitPrelude, CPP #-}  module Morley.Prelude.Word-  ( module Data.Word.Odd+  ( Word63+  , Word62   )   where +import Data.Bits (Bits, FiniteBits)+import Universum (Bounded, Enum, Eq, Integral, Num, Ord, Read, Real, Show)+ import Data.IntCast (IntBaseType, IntBaseTypeK(..))-import Data.Word.Odd (Word62, Word63)+import Data.Word.Odd qualified as OddWord++newtype Word62 = Word62 OddWord.Word62+  deriving newtype (Eq, Ord, Show, Read, Num, Real, Bounded, Enum, Integral, Bits, FiniteBits)+newtype Word63 = Word63 OddWord.Word63+  deriving newtype (Eq, Ord, Show, Read, Num, Real, Bounded, Enum, Integral, Bits, FiniteBits)  type instance IntBaseType Word63 = 'FixedWordTag 63 type instance IntBaseType Word62 = 'FixedWordTag 62