From 7d65269cc3f40ce339bcafc438b7db1bcdbecf2e Mon Sep 17 00:00:00 2001 From: Eitan Chatav Date: Mon, 15 Jan 2024 02:29:21 -0800 Subject: [PATCH] Update Free.hs --- src/Control/Monad/Trans/Indexed/Free.hs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Control/Monad/Trans/Indexed/Free.hs b/src/Control/Monad/Trans/Indexed/Free.hs index 01c0a83..e80742d 100644 --- a/src/Control/Monad/Trans/Indexed/Free.hs +++ b/src/Control/Monad/Trans/Indexed/Free.hs @@ -25,8 +25,8 @@ up to the isomorphism `coerceIxFree`. `IxFree` and `IxMap`, the free `IndexedMonadTrans` and the free `IxFunctor`, can be combined as a "freer" `IndexedMonadTrans` -and used as a DSL generated by primitive commands like -[this Conor McBride example] +and used as a DSL generated by primitive commands like this +[Conor McBride example] (https://stackoverflow.com/questions/28690448/what-is-indexed-monad). >>> :set -XGADTs -XDataKinds @@ -58,7 +58,6 @@ eject = ixliftFreer Eject >>> :set -XQualifiedDo >>> import qualified Control.Monad.Trans.Indexed.Do as Indexed - >>> :{ swap :: (IxFree free, Monad m) @@ -104,9 +103,9 @@ type IxFunctor f = forall i j. Functor (f i j) {- | `IxMap` is the free `IxFunctor`. It's a left Kan extension. Combining `IxFree` with `IxMap` as demonstrated in the above example, -gives the "freer" `IndexedMonadTrans`, modeled on a definition of -[Oleg Kiselyov] -(https://okmij.org/ftp/Computation/free-monad.html#freer) +gives the "freer" `IndexedMonadTrans`, modeled on this +[Oleg Kiselyov explanation] +(https://okmij.org/ftp/Computation/free-monad.html#freer). -} data IxMap f i j x where IxMap :: (x -> y) -> f i j x -> IxMap f i j y