Conal Elliott <[EMAIL PROTECTED]> wrote in article <[EMAIL PROTECTED]> in 
gmane.comp.lang.haskell.cafe:
> I share your perspective, Edsko.  If foo and (Let foo id) are
> indistinguishable to clients of your module and are equal with respect to
> your intended semantics of Exp, then I'd say at least this one monad law
> holds.  - Conal

I am at least sympathetic to this perspective, but the Expr constructors
are not as polymorphic as the monad operations: if in

    do a <- foo
       return a

foo has type "ExprM String" (perhaps foo is equal to "return []"), then
we want to generate the DSL expression "Let [] id", but "[]" is not of
type "Expr".  Because whenever foo's type is not "ExprM Expr" the above
code using do notation must be exactly equal to foo, by parametricity
even when foo's type is "ExprM Expr" we cannot generate Let.

-- 
Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
The pomotarians have nothing to lose but their value chains.

Call the Thermodynamics Police!

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

Reply via email to