packages feed

kindly-functors 0.1.0.0 → 0.1.0.1

raw patch · 3 files changed

+8/−14 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -2,6 +2,6 @@  ## Upcoming -## 0.1.0.0 -- 2024-02-04+## 0.1.0.1 -- 2024-02-04  * Initial Release.
kindly-functors.cabal view
@@ -1,7 +1,7 @@ cabal-version:   3.4 name:            kindly-functors category:        Control, Categories-version:         0.1.0.0+version:         0.1.0.1 synopsis:        A category polymorphic `Functor` typeclass description:     A category polymorphic `Functor` typeclass. homepage:        https://www.github.com/solomon-b/kindly-functors
test/Main.hs view
@@ -1,9 +1,9 @@ {-# LANGUAGE ImportQualifiedPost #-}+{-# LANGUAGE InstanceSigs #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeApplications #-}-{-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE InstanceSigs #-}+{-# LANGUAGE TypeOperators #-}  module Main (main) where @@ -11,10 +11,9 @@  import Data.Functor.Contravariant (Op (..), Predicate (..)) import Data.Functor.Identity (Identity (..))+import Data.Maybe (maybeToList) import Kindly qualified as UUT import Test.Hspec (describe, hspec, it, shouldBe)-import Data.Maybe (maybeToList)-import Data.Functor.Classes (Show1, Eq1)  -------------------------------------------------------------------------------- @@ -50,20 +49,15 @@     it "works covariantly" $ do       UUT.trimap show show show (True, False, ()) `shouldBe` ("True", "False", "()") -   describe "bmap" $ do     it "works" $ do       let hkd = MyHKD (Just True) Nothing-      UUT.bmap maybeToList hkd `shouldBe` MyHKD [True] []-+      project (UUT.bmap maybeToList hkd) `shouldBe` ([True], [])  data MyHKD f = MyHKD {one :: f Bool, two :: f ()} -instance Show1 f => Show (MyHKD f) where-  show MyHKD {..} = "MyHKD {one = " <> show one <> ", two = " <> show two <> "}"--instance Eq1 f => Eq (MyHKD f) where-  (MyHKD a b) == (MyHKD a' b') = a == a' && b == b'  +project :: MyHKD f -> (f Bool, f ())+project MyHKD {..} = (one, two)  instance UUT.CategoricalFunctor MyHKD where   type Dom MyHKD = (->) UUT.~> (->)