
25 Mar
2010
25 Mar
'10
4:26 a.m.
Tillmann Rendel wrote:
I like this idea, because it would enable non-monadic embedded DSLs to use layout.
For example, consider setting properties in wxHaskell:
layoutSet myButton $$ text := "Ok" on action := doSomething
You can abuse do notation to achieve that, by wrapping the list in a suitable Writer monad layoutSet myButton $ do text &= "Ok" on action &= doSomething with (&=) :: Property a -> a -> Writer Properties () It's ugly semantically but pleasant syntactically. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com