[Haskell-cafe] Re: Finally tagless - stuck with implementation
of?"lam"
Don Stewart
dons at galois.com
Mon Oct 5 23:10:54 EDT 2009
ccshan:
> class HOAS repr arrow int where
>
> lam :: (repr a -> repr b) -> repr (arrow a b)
> app :: repr (arrow a b) -> repr a -> repr b
> fix :: (repr a -> repr a) -> repr a
> let_ :: repr a -> (repr a -> repr b) -> repr b
>
> int :: int -> repr int
> add :: repr int -> repr int -> repr int
> sub :: repr int -> repr int -> repr int
> mul :: repr int -> repr int -> repr int
>
> > The underlying problem with the implementation of 'lam' is that
> > you have to pick an evaluation order for the side effects you want in
> > the semantics of your embedded language. The two obvious options are
> > call-by-name and call-by-value.
>
> (Section 5 of our (JFP) paper addresses both CBN and CBV.)
Do you have a link to the paper?
-- Don
More information about the Haskell-Cafe
mailing list