lude

Haskell prelude alternative
git clone git://git.rr3.xyz/lude | git clone gits://git.rr3.xyz/lude
Log | Files | Refs | README | LICENSE

commit 6d41b7f3f1653a2c17a9b7e4bea1ea2e26d959cd
parent 104ce6fc751b56d8859745e83a15e6a650a075af
Author: Robert Russell <robert@rr3.xyz>
Date:   Wed, 16 Sep 2026 09:48:01 -0700

Algebra.Category: add commented-out InteropCategory (there are issues with witnessMor)

Diffstat:
Msrc/Lude/Algebra/Category/Core.hs | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/Lude/Algebra/Category/Core.hs b/src/Lude/Algebra/Category/Core.hs @@ -30,7 +30,7 @@ module Lude.Algebra.Category.Core ( ) where import Data.Coerce -import Prelude qualified +import Data.Functor qualified import Lude.Constraint.Predicate import Lude.Haskell @@ -240,13 +240,20 @@ instance Functorial Given where -------------------------------------------------------------------------------- -- Interop +-- type InteropCategory :: forall {i}. Endo (Cat i) +-- newtype InteropCategory p a b = MkInteropCategory {unInteropCategory :: p a b} + +-- instance (Control.Category.Category p) => Categorical (InteropCategory p) where +-- identity = coerce Control.Category.id +-- compose = coerce (Control.Category..) + type InteropFunctor :: Endo (Endo Type) newtype InteropFunctor f a = MkInteropFunctor {unInteropFunctor :: f a} -instance (Prelude.Functor f) => Functorial (InteropFunctor f) where +instance (Data.Functor.Functor f) => Functorial (InteropFunctor f) where type Dom (InteropFunctor f) = Function type Cod (InteropFunctor f) = Function - map = coerce Prelude.fmap + map = coerce Data.Functor.fmap deriving via InteropFunctor IO instance Functorial IO deriving via InteropFunctor List instance Functorial List