I noticed a regression that was introduced in 0.6.1. Some git bisect'ing later, and I narrowed down the offending commit to this: fc8d09be0dc305c73b3e8b1d3f5c693e31ae18aa.
Looks like this was a pretty big change, so this is as far as I've gotten it.
Here's a file that highlights the issue. On 0.6.0, this prints t. On 0.6.1, this hits an error in Data.Text.Lazy and outputs Data.Text.Lazy.Text.toConstr. I've narrowed this error down to this line in Data.Text.Lazy which is part of the Data instance for Text involving toConstr.
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-}
module Main (main) where
import Text.Hastache
import Text.Hastache.Context
import Data.Data
import Data.Text.Lazy hiding (unlines)
import qualified Data.Text.Lazy.IO as TL
data C = C { someText :: Text }
deriving (Data, Typeable, Show)
main :: IO ()
main = hastacheStr defaultConfig (encodeStr template) context >>= TL.putStrLn
template :: String
template = unlines [ "{{#C}}"
, "{{someText}}"
, "{{/C}}"
]
context :: MuContext IO
context = let v = C { someText = "t" }
in mkGenericContext v
Hello,
I noticed a regression that was introduced in 0.6.1. Some git bisect'ing later, and I narrowed down the offending commit to this: fc8d09be0dc305c73b3e8b1d3f5c693e31ae18aa.
Looks like this was a pretty big change, so this is as far as I've gotten it.
Here's a file that highlights the issue. On 0.6.0, this prints
t
. On 0.6.1, this hits an error in Data.Text.Lazy and outputsData.Text.Lazy.Text.toConstr
. I've narrowed this error down to this line in Data.Text.Lazy which is part of the Data instance for Text involvingtoConstr
.Here's the cabal file I used to build this: