Re[2]: [Haskell-cafe] NewBinary/ BinMem and IO monad

2006-05-06 Thread Bulat Ziganshin
Hello Marc, Saturday, May 6, 2006, 2:39:46 AM, you wrote: >> just add unsafePerformIO: > great idea! > In my case I can also use unsafeInterleaveIO or lazyness, can't I? sorry, i don't remember your case, next time add more citation. in general 'unsafeInterleaveIO' can be used only in IO context

Re: [Haskell-cafe] NewBinary/ BinMem and IO monad

2006-05-05 Thread Marc Weber
On Sat, May 06, 2006 at 12:39:46AM +0200, Marc Weber wrote: > > just add unsafePerformIO: > great idea! > In my case I can also use unsafeInterleaveIO or lazyness, can't I? Of cause I can't. unsafePerformIO is of type IO a -> IO a. Sorry for posting before thinking ;) Marc ___

Re: [Haskell-cafe] NewBinary/ BinMem and IO monad

2006-05-05 Thread Marc Weber
> just add unsafePerformIO: great idea! In my case I can also use unsafeInterleaveIO or lazyness, can't I? Marc ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] NewBinary/ BinMem and IO monad

2006-05-03 Thread Bulat Ziganshin
Hello Marc, Thursday, May 4, 2006, 2:21:58 AM, you wrote: > getTable1 bh = do > bh = seek bh offset -- seek to the beginning of the table > get binary data and build internal representation > return list of glyph and outlines and ... just add unsafePerformIO: getTable1 bh = unsafePerformI

[Haskell-cafe] NewBinary/ BinMem and IO monad

2006-05-03 Thread Marc Weber
I'm trying to write some true type library (implementing only the tables I need at the moment). When loading a font file it doesn't make sense to "parse" every table which isn't needed. So lazyness of haskell would perfectly meet requirements here. My problem: NewBinary supports memory buffers. Af