Permalink
Browse files

General type in MuLambda constructor

  • Loading branch information...
1 parent 95d1635 commit 9defebf7b1fbad47c6772cafd4064e27be38fef9 @lymar lymar committed Nov 8, 2011
Showing with 7 additions and 7 deletions.
  1. +7 −7 Text/Hastache.hs
View
@@ -107,11 +107,11 @@ instance MuVar [Char] where
toLByteString k = k ~> encodeStr ~> toLBS
data MuType m =
- forall a. MuVar a => MuVariable a |
- MuList [MuContext m] |
- MuBool Bool |
- MuLambda (ByteString -> ByteString) |
- MuLambdaM (ByteString -> m ByteString) |
+ forall a. MuVar a => MuVariable a |
+ MuList [MuContext m] |
+ MuBool Bool |
+ forall a. MuVar a => MuLambda (ByteString -> a) |
+ forall a. MuVar a => MuLambdaM (ByteString -> m a) |
MuNothing
instance Show (MuType m) where
@@ -329,13 +329,13 @@ renderBlock contexts symb inTag afterClose otag ctag conf
next afterSection
Just (MuLambda func) ->
if normalSection then do
- func sectionContent ~> addResBS
+ func sectionContent ~> toLByteString ~> addResLZ
next afterSection
else do next afterSection
Just (MuLambdaM func) ->
if normalSection then do
res <- lift (func sectionContent)
- addResBS res
+ toLByteString res ~> addResLZ
next afterSection
else do next afterSection
_ -> next afterSection

0 comments on commit 9defebf

Please sign in to comment.