using ghc with make

Hello Simon,
Thursday, April 20, 2006, 11:54:59 AM, you wrote:
> Bulat Ziganshin wrote:
>> 1) lazyGet/lazyPut. it's no problem to copy your implementation but i
>> still don't understand how lazyGet should work - it share the same
>> buffer pointer as one used in `get`. so `get` and consuming structure
>> returned by lazyGet should interfere
> lazyGet can only be used to read something that was written with
> lazyPut. lazyPut writes the offset of the end of the serialised data at
> the beginning, so that lazyGet can skip over it, and subsequent gets
> start from the next item in the stream.
the problem is what there is ONLY ONE read pointer, so it should be
impossible to intersperse reading with `get` and consuming structure
returned by `lazyGet`, either for BinMem or BinIO
... hmm, on the other side they don't interspersed because there is
only one call to the unsafeInterleaveIO. closures returned by lazyGet
just should be evaluated STRICTLY after all other `get` operation. and
changing the `getAt` implementation to the following:
getAt bh p = do p0 <- tellBin bh
seekBin bh p
a <- get bh
seekBin bh p0
return a
should omit even this restriction
>> can you recommend me paper to read about using Haskell class system?
well, how about this?
> Overloading isn't all "resolved at compile time", most of the time
> dictionaries of functions are passed around representing class predicates.
i'm tried to say that there is no such dynamic beast as virtual
functions in C++
--
Best regards,
Bulat mailto:Bulat.Ziganshin at gmail.com