[Haskell-cafe] Network CGI : outputFPS ByteString problem

Luke Palmer lrpalmer at gmail.com
Sat Jan 17 13:34:51 EST 2009


On Sat, Jan 17, 2009 at 11:09 AM, Pieter Laeremans <pieter at laeremans.org>wrote:

> Hello,
>
> When I try to render  a byteString template using outputFPS like this :
>
> outputBsTemplate :: StringTemplate ByteString ->  CGI CGIResult
> outputBsTemplate template = let bs = renderFPS template in
>                            outputFPS bs
>
>
> I get this error :
>
> Couldn't match expected type `Data.ByteString.Lazy.Internal.ByteString'
>           against inferred type `ByteString'


It's expecting a Lazy bytestring and you're giving it a Strict one.

Simplest fix: import Data.ByteString.Lazy instead.

Luke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090117/d3ca1ad5/attachment.htm


More information about the Haskell-Cafe mailing list