On Feb 13, 2008 9:33 AM,  <[EMAIL PROTECTED]> wrote:
> The approach is based on the final tagless representation. Here is our
> DSL:
>
> > class Exp repr where
> >    constant :: Int -> repr Int
> >    variable :: String -> repr Int
> >    add :: repr Int -> repr Int -> repr Int
> >    sub :: repr Int -> repr Int -> repr Int

This is very nice.  May I ask, though, what is the purpose of all the
Ints appearing as arguments to repr here?  Looking over this code, it
seems that it would work just as well if they were all omitted.

Thanks,
Luke
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to