[web-devel] Changes implemented in Hamlet

Michael Snoyman michael at snoyman.com
Sat Jan 15 22:44:02 CET 2011

Hi everyone,

I wanted to give you all an update on the changes in Hamlet 0.7[1]. So
far, the following have been implemented:

* Adding angle-bracket syntax
* Remove period-delimited variables, and allow qualified functions.
For example, $Data.List.sort myString$
* Change forall and maybe to use <-, eg $forall person <- people

I haven't tried it on real life code yet, but I have converted the
entire Hamlet test suite to use this, and I'm quite happy with the
result. Overall, I think things are much more readable. Just for the
record: the second item (period-delimited variables) affects Cassius
and Julius as well.

So now for the last few decisions:

* Do we rename maybe to just? I am leaning towards no on this.
* For Cassius, do we switch from a whitespace sensitive syntax to brackets?
* Do we convert from $my variable$ to #{my variable}.
    * And if we do this, can we consider #{my (nested call)} and #{my
$ nested call} the same?

Please see the wiki page[1] for more information on all of these. As
far as the I18N note at the bottom: I think we'll be able to release
such a feature without introducing any breaking changes. Most likely,
a "message" will be a specialization of standard variable
interpolation, eg:


In other words, I'm in no rush to get that feature in the 0.7.0
release, it can wait until 0.7.1. I *do*, however, want to get this
Hamlet released soon so that it doesn't hold up Yesod 0.7 any longer:
since Yesod 0.6 will not work with WAI 0.3, it also won't work with
Warp, and I think a lot of people will want to be able to use Warp


[1] http://wiki.yesodweb.com/Hamlet%200.7%20changes

More information about the web-devel mailing list