tazjin/elm-yesod — pull request #1 by snoyberg (2012-05-31 11:38:29+00:00)
Title: Simplify usage with a typeclass and simpler return type.

The addition of the `YesodElm` typeclass statically ensures that the necessary JS file is included in the page. Ideally, I'd like to also modify this so that the `BottomOfHeadBlocking` change isn't necessary, but this probably requires upstream changes in Elm itself (I at least couldn't get it working after working a few minutes on it).

Also, flattening the return type from `Handler Widget` to `Widget` makes it possible to write code such as:

```
getClockR :: Handler RepHtml
getClockR = do
defaultLayout $ do
setTitle "A clock"
toWidget $(elmFile "elm_source/clock.elm")
```