acme-functors 0.1.0.0 → 0.1.0.1
raw patch · 2 files changed
+18/−23 lines, 2 filesdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
- Acme.Functors: instance (Data.Semigroup.Semigroup extraThing, Data.Semigroup.Semigroup a) => Data.Semigroup.Semigroup (Acme.Functors.Also extraThing a)
- Acme.Functors: instance (Data.Semigroup.Semigroup otherThing, Acme.Functors.Classes.Monoid a) => Acme.Functors.Classes.Monoid (Acme.Functors.OrInstead otherThing a)
- Acme.Functors: instance (Data.Semigroup.Semigroup otherThing, Acme.Functors.Classes.Monoid a) => Acme.Functors.Classes.Monoid (Acme.Functors.OrInsteadFirst otherThing a)
- Acme.Functors: instance (Data.Semigroup.Semigroup otherThing, Data.Semigroup.Semigroup a) => Data.Semigroup.Semigroup (Acme.Functors.OrInstead otherThing a)
- Acme.Functors: instance (Data.Semigroup.Semigroup otherThing, Data.Semigroup.Semigroup a) => Data.Semigroup.Semigroup (Acme.Functors.OrInsteadFirst otherThing a)
- Acme.Functors: instance (GHC.Classes.Eq extraThing, GHC.Classes.Eq a) => GHC.Classes.Eq (Acme.Functors.Also extraThing a)
- Acme.Functors: instance (GHC.Classes.Eq otherThing, GHC.Classes.Eq a) => GHC.Classes.Eq (Acme.Functors.OrInstead otherThing a)
- Acme.Functors: instance (GHC.Classes.Eq otherThing, GHC.Classes.Eq a) => GHC.Classes.Eq (Acme.Functors.OrInsteadFirst otherThing a)
- Acme.Functors: instance (GHC.Show.Show extraThing, GHC.Show.Show a) => GHC.Show.Show (Acme.Functors.Also extraThing a)
- Acme.Functors: instance (GHC.Show.Show otherThing, GHC.Show.Show a) => GHC.Show.Show (Acme.Functors.OrInstead otherThing a)
- Acme.Functors: instance (GHC.Show.Show otherThing, GHC.Show.Show a) => GHC.Show.Show (Acme.Functors.OrInsteadFirst otherThing a)
- Acme.Functors: instance Data.Semigroup.Semigroup a => Data.Semigroup.Semigroup (Acme.Functors.AnyNumberOf a)
- Acme.Functors: instance Data.Semigroup.Semigroup a => Data.Semigroup.Semigroup (Acme.Functors.DeterminedBy parameter a)
- Acme.Functors: instance Data.Semigroup.Semigroup a => Data.Semigroup.Semigroup (Acme.Functors.LiftedButWhy a)
- Acme.Functors: instance Data.Semigroup.Semigroup a => Data.Semigroup.Semigroup (Acme.Functors.OneOrMore a)
- Acme.Functors: instance Data.Semigroup.Semigroup a => Data.Semigroup.Semigroup (Acme.Functors.OrNot a)
- Acme.Functors: instance Data.Semigroup.Semigroup a => Data.Semigroup.Semigroup (Acme.Functors.Two a)
- Acme.Functors: instance Data.Semigroup.Semigroup otherThing => GHC.Base.Applicative (Acme.Functors.OrInstead otherThing)
- Acme.Functors.Classes: fail :: Monad m => String -> m a
+ Acme.Functors: instance (GHC.Base.Semigroup extraThing, GHC.Base.Semigroup a) => GHC.Base.Semigroup (Acme.Functors.Also extraThing a)
+ Acme.Functors: instance (GHC.Base.Semigroup otherThing, Acme.Functors.Classes.Monoid a) => Acme.Functors.Classes.Monoid (Acme.Functors.OrInstead otherThing a)
+ Acme.Functors: instance (GHC.Base.Semigroup otherThing, Acme.Functors.Classes.Monoid a) => Acme.Functors.Classes.Monoid (Acme.Functors.OrInsteadFirst otherThing a)
+ Acme.Functors: instance (GHC.Base.Semigroup otherThing, GHC.Base.Semigroup a) => GHC.Base.Semigroup (Acme.Functors.OrInstead otherThing a)
+ Acme.Functors: instance (GHC.Base.Semigroup otherThing, GHC.Base.Semigroup a) => GHC.Base.Semigroup (Acme.Functors.OrInsteadFirst otherThing a)
+ Acme.Functors: instance (GHC.Classes.Eq a, GHC.Classes.Eq extraThing) => GHC.Classes.Eq (Acme.Functors.Also extraThing a)
+ Acme.Functors: instance (GHC.Classes.Eq a, GHC.Classes.Eq otherThing) => GHC.Classes.Eq (Acme.Functors.OrInstead otherThing a)
+ Acme.Functors: instance (GHC.Classes.Eq a, GHC.Classes.Eq otherThing) => GHC.Classes.Eq (Acme.Functors.OrInsteadFirst otherThing a)
+ Acme.Functors: instance (GHC.Show.Show a, GHC.Show.Show extraThing) => GHC.Show.Show (Acme.Functors.Also extraThing a)
+ Acme.Functors: instance (GHC.Show.Show a, GHC.Show.Show otherThing) => GHC.Show.Show (Acme.Functors.OrInstead otherThing a)
+ Acme.Functors: instance (GHC.Show.Show a, GHC.Show.Show otherThing) => GHC.Show.Show (Acme.Functors.OrInsteadFirst otherThing a)
+ Acme.Functors: instance GHC.Base.Semigroup a => GHC.Base.Semigroup (Acme.Functors.AnyNumberOf a)
+ Acme.Functors: instance GHC.Base.Semigroup a => GHC.Base.Semigroup (Acme.Functors.DeterminedBy parameter a)
+ Acme.Functors: instance GHC.Base.Semigroup a => GHC.Base.Semigroup (Acme.Functors.LiftedButWhy a)
+ Acme.Functors: instance GHC.Base.Semigroup a => GHC.Base.Semigroup (Acme.Functors.OneOrMore a)
+ Acme.Functors: instance GHC.Base.Semigroup a => GHC.Base.Semigroup (Acme.Functors.OrNot a)
+ Acme.Functors: instance GHC.Base.Semigroup a => GHC.Base.Semigroup (Acme.Functors.Two a)
+ Acme.Functors: instance GHC.Base.Semigroup otherThing => GHC.Base.Applicative (Acme.Functors.OrInstead otherThing)
+ Acme.Functors.Classes: infix 4 /=
+ Acme.Functors.Classes: infixl 1 >>
+ Acme.Functors.Classes: infixl 4 <$
+ Acme.Functors.Classes: infixr 6 <>
+ Acme.Functors.Classes: liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
- Acme.Functors: Determination :: ((->) parameter a) -> DeterminedBy parameter a
+ Acme.Functors: Determination :: (->) parameter a -> DeterminedBy parameter a
- Acme.Functors: OneAndMaybeMore :: a -> (AnyNumberOf a) -> AnyNumberOf a
+ Acme.Functors: OneAndMaybeMore :: a -> AnyNumberOf a -> AnyNumberOf a
- Acme.Functors.Classes: class Functor f => Applicative (f :: * -> *)
+ Acme.Functors.Classes: class Functor f => Applicative (f :: Type -> Type)
- Acme.Functors.Classes: class Functor (f :: * -> *)
+ Acme.Functors.Classes: class Functor (f :: Type -> Type)
- Acme.Functors.Classes: class Applicative m => Monad (m :: * -> *)
+ Acme.Functors.Classes: class Applicative m => Monad (m :: Type -> Type)
Files
- acme-functors.cabal +2/−8
- src/Acme/Functors.hs +16/−15
acme-functors.cabal view
@@ -1,9 +1,5 @@--- This file has been generated from package.yaml by hpack version 0.15.0.------ see: https://github.com/sol/hpack- name: acme-functors-version: 0.1.0.0+version: 0.1.0.1 synopsis: The best applicative functors. description: Types are great. Lifting them into some sort of applicative functor makes them even better. This package is an homage to our favorite applicatives, and to the semigroups with which they are instrinsically connected. category: ACME@@ -25,10 +21,8 @@ hs-source-dirs: src build-depends:- base >= 1 && < 5328762+ base >= 4 && < 5 exposed-modules: Acme.Functors Acme.Functors.Classes- other-modules:- Paths_acme_functors default-language: Haskell2010
src/Acme/Functors.hs view
@@ -67,6 +67,7 @@ LiftedButWhy f <*> LiftedButWhy a = LiftedButWhy (f a) -- | > LiftedButWhy a >>= f = f a+ instance Monad LiftedButWhy where LiftedButWhy a >>= f = f a@@ -182,7 +183,7 @@ -------------------------------------------------------------------------------- -- | __@AnyNumberOf@__ starts to get exciting. Any number of values you want.--- Zero... one ... two ... three ... four ... five ... The possibilities are+-- Zero ... one ... two ... three ... four ... five ... The possibilities are -- /truly/ endless. data AnyNumberOf a =@@ -214,7 +215,7 @@ -- -- > ( (+ 1) ~~ (* 2) ~~ (+ 5) ~~ ActuallyNone ) -- > <*> ( 1 ~~ 6 ~~ 4 ~~ 37 ~~ ActuallyNone )--- > = ( 7 ~~ 12 ~~ 9 ~~ ActuallyNone )+-- > = ( 2 ~~ 12 ~~ 9 ~~ ActuallyNone ) -- -- This example demonstrates how when there are more arguments than functions, -- any excess arguments (in this case, the @37@) are ignored.@@ -251,9 +252,9 @@ -- One-or-more -------------------------------------------------------------------------------- --- | __@OneOrMore@__ is more restrictive than AnyNumberOf, yet somehow actually--- /more/ interesting, because it excludes that dull situation where there--- aren't any values at all.+-- | __@OneOrMore@__ is more restrictive than @AnyNumberOf@, yet somehow+-- actually /more/ interesting, because it excludes that dull situation where+-- there aren't any values at all. data OneOrMore a = OneOrMore { theFirstOfMany :: a -- ^ Definitely at least this one.@@ -345,7 +346,7 @@ -- expression evaluates to the combination of the @otherThing@s. data (OrInstead otherThing) a =- NotInstead a -- ^ Some normal value.+ NotInstead a -- ^ A normal value. | Instead otherThing -- ^ Some totally unrelated other thing. deriving (Eq, Functor, Show) @@ -403,10 +404,10 @@ -- When you combine stuff with @(\<*\>)@ or @(\<\>)@, all of the values need to -- be present. If any of them are the @otherThing@ instead, then the whole -- expression evaluates to the /first/ @otherThing@ encountered, ignoring any--- additional @otherThings@ that may subsequently pop up+-- additional @otherThing@s that may subsequently pop up. data (OrInsteadFirst otherThing) a =- NotInsteadFirst a -- ^ Some normal value.+ NotInsteadFirst a -- ^ A normal value. | InsteadFirst otherThing -- ^ Some totally unrelated other thing. deriving (Eq, Functor, Show) @@ -467,7 +468,7 @@ -- annoying. data DeterminedBy parameter a = Determination ((->) parameter a)- deriving (Functor)+ deriving Functor -- | -- > pure a = Determination (\_ -> a)@@ -510,21 +511,21 @@ LiftedButWhy is Identity. -OrNot is Maybe, but with a different semigroup and monoid.+OrNot is Maybe, but with the monoid that is appropriate for its applicative. -Two doesn't have an analogue in the standard library as far as I know.+Two doesn't have an analogue in any standard library as far as I know. -AnyNumberOf is ZipList.+AnyNumberOf is ZipList, with the appropriate monoid added. -OneOrMore is NonEmpty.+OneOrMore is like NonEmpty, but with instances that match ZipList. -Also is (,), the 2-tuple.+Also is (,) — also known as the 2-tuple. OrInstead is AccValidation from the 'validation' package. OrInsteadFirst is Either. -DeterminedBy is (->) also known as a function, whose functor is also known as+DeterminedBy is (->), also known as a function, whose monad is also known as Reader. -}