Just a short note to show how the 3 evaluation orders can be written in
a very symmetric manner:
o...@okmij.org wrote these as:
In call-by-name, we have
lam f = S . return $ (unS . f . S)
In call-by-value, we have
lam f = S . return $ (\x - x = unS . f . S . return)
In
On Thu, Oct 08, 2009 at 12:54:14AM -0700, o...@okmij.org wrote:
Actually it is possible to implement all three evaluation orders
within the same final tagless framework, using the same interpretation
of types and reusing most of the code save the semantics of lam. That
is where the three
On Fri, Oct 9, 2009 at 11:12 AM, Felipe Lessa felipe.le...@gmail.com wrote:
On Thu, Oct 08, 2009 at 12:54:14AM -0700, o...@okmij.org wrote:
Actually it is possible to implement all three evaluation orders
within the same final tagless framework, using the same interpretation
of types and
On Fri, Oct 09, 2009 at 01:27:57PM -0400, David Menendez wrote:
On Fri, Oct 9, 2009 at 11:12 AM, Felipe Lessa felipe.le...@gmail.com wrote:
That's really nice, Oleg, thanks! I just wanted to comment that
I'd prefer to write
share :: IO a - IO (IO a)
share m = mdo r - newIORef (do x - m
On Fri, Oct 9, 2009 at 1:39 PM, Felipe Lessa felipe.le...@gmail.com wrote:
On Fri, Oct 09, 2009 at 01:27:57PM -0400, David Menendez wrote:
On Fri, Oct 9, 2009 at 11:12 AM, Felipe Lessa felipe.le...@gmail.com wrote:
That's really nice, Oleg, thanks! I just wanted to comment that
I'd prefer
Felipe Lessa wrote:
which unfortunately needs {-# LANGUAGE RecursiveDo #-} or
some ugliness from mfix
But mdo/mfix is awesome! :-(
Martijn.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Actually it is possible to implement all three evaluation orders
within the same final tagless framework, using the same interpretation
of types and reusing most of the code save the semantics of lam. That
is where the three orders differ, by their own definition.
In call-by-name, we have