[Haskell-cafe] Unicode strings

2006-11-05 Thread Pupeno
can see that the contents are not right. Any ideas what am I doing wrong here ? Thank you. -- Pupeno <[EMAIL PROTECTED]> (http://pupeno.com) import qualified System.IO as IO main = do let str = "←↑→↓" putStrLn str h <- IO.openFile "test.output" I

[Haskell-cafe] Testing serialization/deserialization.

2005-12-31 Thread Pupeno
27;t work: *Network.Server.DNS> runTestTT tests ### Error in: 1 user error (HUnit:i == i2 expected: 3 but got: 209944584) In general, what method/way do you recommend to test serialization/de-serialization (note: I'd like to use QuickCheck if possible)? Thank you. -- Pupeno

[Haskell-cafe] NewBinary on Ptrs

2005-12-27 Thread Pupeno
Hello, After trying my own code and reading the whole thread I started to understand NewBinary. I'm going to give it a try. My question now is how to turn a Ptr into a BinHandle to use NewBinary on it, or is there another way to do it ? Thanks. -- Pupeno <[EMAIL PROTECTED]> (http:/

Re: [Haskell-cafe] binary IO

2005-12-27 Thread Pupeno
seems easier to define my own binary functions[2]. Could you point me a bit what is the unifor interface so I might give it another chance (to work with NewBinary) ? Thanks. -- Pupeno <[EMAIL PROTECTED]> (http://pupeno.com) PS: Is anything wrong with [2] ? [1] I've been with Haskel

[Haskell-cafe] binary IO

2005-12-26 Thread Pupeno
appreciated. Thank you. -- Pupeno <[EMAIL PROTECTED]> (http://pupeno.com) pgpyIHzstxmo0.pgp Description: PGP signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Proper way to write this

2005-12-26 Thread Pupeno
runDaytimeServer :: DaytimeServer -> IO DaytimeServer runDaytimeServer dts = do dts' <- runStreamDaytimeServer dts dts' <- runDgramDaytimeServer dts' return dts' ? I moved the structure update of dts into run_DaytimeServer. Thanks. -- Pupeno <[EMAIL PROTECTED]&g

[Haskell-cafe] Proper way to write this

2005-12-25 Thread Pupeno
(kill-server (ds dts Is there a better way to write that on Haskell ? Thanks. -- Pupeno <[EMAIL PROTECTED]> (http://pupeno.com) PS: I have a worse case: -- | Having a 'DaytimeServer', run it according to its specifications. runDaytimeServer :: DaytimeServer -

[Haskell-cafe] Re: [Haskell] A simple server (or how to do io).

2005-12-20 Thread Pupeno
m for quiting ? am I missing some kind of event loop here ? > ps. I think it may be best to continue on haskell-cafe@ rather > than the main list. I am posting to there as well (to continue there). -- Pupeno <[EMAIL PROTECTED]> (http://pupeno.com) pgpTGml6i1rJa.pgp Description: P