- An instance for ElmSource (urlRenderFn, url -> Elm) has been added.
- elm-yesod's elmWidget function now supports URL interpolation, it
returns a widget in the GHandler monad and needs to be used
differently. The elm-yesod example has not yet been updated.
Language.Elm.Quasi now exports QuasiQuoters for Shakespearean Elm
templates which support variable and URL interpolation.
Several important types and type classes have been added in the process:
Elm :: Elm is a newtype wrapper around Data.Text.Lazy.Builder which
contains Elm source code
ElmUrl url :: ElmUrl is a type synonym for a function that renders Elm
with interpolated type-safe URLs.
ToElm a :: ToElm is a type class which contains variables that can be
interpolated in the Elm QuasiQuoters
ElmSource a :: ElmSource is a type class which contains all types
currently understood by the Elm compilation functions, toParts and
toHtml
--
elm-yesod has been updated to reflect the changes, but a Widget
instance for Elm is planned. This would allow embedding Elm by simply
using toWidgt [elm|...|]
The elm-yesod and elm-happstack are likely broken through these changes
(untested), as well as the elm-server. Those will later be updated
accordingly.
Some dependencies went missing, as well as the export of the
QuasiQuoter. Here they are again.
I have also added the GHC -Wall option to the cabal file because there
are still quite a few warnings (especially missing type signatures) in
the code.
The elm QuasiQuoter now supports variable interpolation using the ^{..}
syntax. An updated elm-yesod example will follow soon.
Version bumped to 0.1.2 because this is a rather significant change,
thanks to mikeplus64 for the QuasiQuoter he wrote that I could have a
look at while writing ours.
Elm-server now works with the "new" structure of Elm as well. The elm
package exports Language.Elm.generateHtml which is equivalent to the
compileToHtml function of the old Language.Elm package.
Since a dependency on blaze exists either way, a separate elm-blaze
package is not necessary.
I am splitting the elm package up into several packages, elm itself
which exports the Language.Elm* modules and builds the compiler
executable, elm-server which contains the standalone, Happstack-based
Elm server and elm-yesod, which provides the generateWidget function
for using Elm together with Yesod.