Yes. I found that issue and change the function to pure form which receives time as input argument.

When I tried to code in C++, I found myself coding in C only to feed the sources to g++.
I found myself coding in do-block for majority of Haskell code now. :-(

Thanks Yeoh!




2014-07-24 16:56 GMT+09:00 Kim-Ee Yeoh <ky3@atamo.com>:

On Wed, Jul 23, 2014 at 9:45 PM, 양철웅 <cwyang@aranetworks.com> wrote:
I changed the code like belows and it works.

On a higher-level, you might want to reconsider the design of that function called parseHeader.

It has type: (a -> IO b) only because there's a special case "now" which apparently requires querying for the current time. Other than that, it's a pure function.

Is there a way to make it a pure function?

-- Kim-Ee

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners