purescriptとscalazとMonadRecというstack safeなモナド

1
Phil Freeman @paf31

purescript-free is now completely stack safe, even when interpreting a free monad in StateT, WriterT, ErrorT, etc. github.com/purescript/pur…

2015-03-03 06:10:59
Kenji Yoshida @xuwei_k

@aloiscochard @paf31 I have tried with scalaz. but I'm not sure if whether we can do it. github.com/scalaz/scalaz/…

2015-03-03 21:45:54
Kenji Yoshida @xuwei_k

@aloiscochard @paf31 because I think purescript-tailrec depends on internal representation of Eff Monad github.com/purescript/pur… /cc @jdegoes

2015-03-03 21:46:40
Aloïs Cochard @aloiscochard

@xuwei_k great effort! I'm curious to hear feedback from @jdegoes on this :-) /cc @paf31

2015-03-04 01:13:15
John A De Goes @jdegoes

@aloiscochard @xuwei_k @paf31 It's stack safe, it depends on MonadRec, which is an unfold, so you have to express (self) recursion that way.

2015-03-04 01:17:23
John A De Goes @jdegoes

@aloiscochard @xuwei_k @paf31 Trampolines are still needed (e.g., mutual recursion) as well as trampoline-friendly StateT (which PS lacks).

2015-03-04 01:18:55
Kenji Yoshida @xuwei_k

@jdegoes @paf31 should I use scalaz.effect. IO instead of Eff? Is this line the same meaning as unsafePerformIO? github.com/purescript/pur…

2015-03-04 01:35:45
John A De Goes @jdegoes

@paf31 @aloiscochard @xuwei_k Think mutrec grammar defined by parser combinators. Then choose trampolines instead. :-)

2015-03-04 02:06:13
John A De Goes @jdegoes

@xuwei_k @paf31 Yeah, IO. Eff is just a granular IO. tailRecEff is not unsafe, it is 100% externally pure.

2015-03-04 02:10:04
Phil Freeman @paf31

@jdegoes @aloiscochard @xuwei_k It's basically defunctionalization by hand :)

2015-03-04 02:19:14
John A De Goes @jdegoes

@paf31 @aloiscochard @xuwei_k Yes. I'd like to see more of this in Scala as Trampolining seems even slower there.

2015-03-04 02:20:11