Skip to content

Commit

Permalink
Update Free.hs
Browse files Browse the repository at this point in the history
  • Loading branch information
echatav committed Jan 15, 2024
1 parent e564c86 commit 7d65269
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Control/Monad/Trans/Indexed/Free.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -58,7 +58,6 @@ eject = ixliftFreer Eject
>>> :set -XQualifiedDo
>>> import qualified Control.Monad.Trans.Indexed.Do as Indexed
>>> :{
swap
:: (IxFree free, Monad m)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7d65269

Please sign in to comment.