[Haskell-cafe] Network CGI : outputFPS ByteString problem

2009-01-17 Thread Pieter Laeremans
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'


Is this a library problem? Is the CGI bound with a too specific ByteString ?
Or am I doing something terrible wrong ?

thanks in advance,

Pieter




-- 
Pieter Laeremans pie...@laeremans.org

The future is here. It's just not evenly distributed yet.  W. Gibson
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Network CGI : outputFPS ByteString problem

2009-01-17 Thread Luke Palmer
On Sat, Jan 17, 2009 at 11:09 AM, Pieter Laeremans pie...@laeremans.orgwrote:

 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
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe