@@ -19,6 +19,7 @@ import Initialize
1919import Text.Blaze.Html (Html)
2020import Language.Elm.Quasi
2121
22+import qualified Data.Text as TS
2223import qualified Data.Text.Lazy as TL
2324
2425class ElmSource a where
@@ -41,6 +42,12 @@ instance ElmSource Elm where
4142 toParts = toPartsHelper . TL.unpack . renderElm
4243 toHtml elmL title = generateHtml elmL title . TL.unpack . renderElm
4344
45+-- |Strict text
46+instance ElmSource TS.Text where
47+ toParts = toPartsHelper . TS.unpack
48+ toHtml elmL title = generateHtml elmL title . TS.unpack
49+
50+-- |Lazy text
4451instance ElmSource TL.Text where
4552 toParts = toPartsHelper . TL.unpack
4653 toHtml elmL title = generateHtml elmL title . TL.unpack