n into another type error ;)
--
% Andre Pang : trust.in.love.to.save <http://www.algorithm.com.au/>
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
On 24/05/2005, at 2:03 AM, Andre Pang wrote:
Hi all, I have the following snippet of code:
mutableMemoryArray <- newArray_ (0, bufferSize - 1)
bytesRead <- hGetArray handle mutableMemoryArray bufferSize
The problem is that hGetArray (like hGetBuf) may read less than the
amoun
ated, or even if I could use hGetBuf and somehow efficiently
create an array from a (Ptr Word8). I know I could simply re-
allocate another array and garbage collect the first one if
bytesRead /= bufferSize, but that seems pretty inelegant.
Thanks!
--
% Andre Pang : trust.in.love.t
undefined). The type
is not polymorphic in "a" on the RHS, it is abstract! You'd need to
encapsulate a value of the same type (or a constructing function) as
well to this type useful.
Ah, OK! That's quite enlightening. Thanks Andreas, Krasimir, and
Tomasz for all your repli
m what you say, this sounds like
a big difference in implementation, but from a Haskell
(non-type-wizard) user's point of view, is there a practical difference
between the two? I can't think of a situation where
rank-N/existentials couldn't be substituted for the other .
me, since the data
constructors have the same type. However, I can't help but feel that
I'm missing something fundamental about a difference between them. Are
the two completely isomorphic? Is there some advantage or disadvantage
to using one over the other?
--
% And
of 'inline Haskell' there ...), which wraps the SHA1
Haskell module:
http://svn.openfoundry.org/pugs/modules/SHA1/src/SHA1.hs
Perl 6 is indeed looking like something to phear, with a ph. It may be
some of the best publicity that Haskell's ever got.
--
% Andre Pang : trust.in.l
to GHC 6.4). Does anyone know
of any other way to do something like this?
Hi Thomas,
I'm working on getting HOC to compile with GHC 6.4 now. Watch the HOC
website or hoc-users mailing list in the next few days; I'll announce
it there (and here) when it's done and
hich can do what you want and far, far
more. Runtime Haskell evaluation never felt so good:
http://www.cse.unsw.edu.au/~dons/hs-plugins/
http://www.cse.unsw.edu.au/~dons/hs-plugins/paper/
--
% Andre Pang : trust.in.love.to.save <http://www.algor
u have to write it all by hand ...
--
% Andre Pang : trust.in.love.to.save
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
er than be explicitly spliced in at the call site. (People who
know better, shoot me down if I'm wrong ...)
I'd actually go so far blame the lack of macro support in TH on the
Haskell community as a whole, since the general consensus I get from
e.g. the mailing lists is that "syntactic s
rror "Foo"
Both error (i.e. _|_) and undefined are not ill-typed here, but
IANATT[1].
1. I Am Not A Type Theorist
--
% Andre Pang : trust.in.love.to.save
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
em, the more I'm convinced that the approach I've suggested
is the ideal way to go about it--implementation details being a minor
detail, of course ;). What I'm secretly hoping is that the
GHC/hugs/HBC people will see what I'm trying to achieve, tell me I'm
totally nuts,
write 'import FiniteMap as FM' followed by 'FM.add fm', instead of
simply 'fm.add'. We fix the problems Alastair mentioned, but are still
left with an less-than-optimal solution.
--
% Andre Pang : trust.in.love.to.save
__
on-Jones:
http://research.microsoft.com/~simonpj/Papers/oo-haskell/index.htm
--
% Andre Pang : just.your.average.bounty.hunter
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
15 matches
Mail list logo