My question is: should I implement it through the FFI or as a
primitive ala primops.txt? Perhaps they amount to much the same
thing.
I'd make it a primop if there were some really unusual strictness
issues involved or, if I wanted to eliminate all overhead, as in
integer addition or if the
I'm curious about the implementation of Concurrent Haskell in GHC
and Hugs.
Hugs' implementation of concurrency is non-preemptive wherease GHC's
implementation is preemptive (or almost preemptive) as described by
Simon.
Does access to values possibly shared among threads cost the same in
Is there a reason why partial application cannot be
applied in arbitrary order? Was it a technical difficulty in the
design of Haskell? Or is it just following beta reduction
rigorously?
Haskell doesn't dictate any particular evaluation order. If you look
at the name of the Haskell report,
[mailing list trimmed]
Thanks Simon,
Explanation of why GreenCard generates that code attached.
Briefly, GreenCard has always marshalled Word8 as a Word32 (and so has
Hugs). I'm wondering if a recent change in GHC or in how Win32 is
compiled might have changed the way that Word32 is being
[EMAIL PROTECTED] writes:
I am a student who study a computer programing. I want to have
Haskell software to study . However, it is very hard to get
the Haskell . and I hope you give me the way to get the Heskell.
If you mail me to show the way to get the Heskell , I would
appreciate your
Is there something like a Hugs plugin for Netscape?
We used to have one at Yale. Can't remember what happened to it so I'm
adding John Peterson to the address list in case he can remember.
--
Alastair ReidReid Consulting (UK) Ltd
___
When I compile a program using GHC 5.02.2 on Windows 200 using HGL,
I don't have GHC installed on my Windows partition (nor space for it,
I suspect) so I'll ask some questions and hope they suggest an answer.
Does it work ok using Hugs and HGL?
Sigbjorn Finne did a great job of packaging
When I compile a program using GHC 5.02.2 on Windows 200 using HGL,
I don't have GHC installed on my Windows partition (nor space for it,
I suspect) so I'll ask some questions and hope they suggest an answer.
Does it work ok using Hugs and HGL?
Sigbjorn Finne did a great job of packaging
It would be possible to do strict evaluation in the case that the
suspended computation is known to take a small bounded amount of
time and space and can't fail - GHC doesn't do this, but we've
wondered about it from time to time.
I wonder if this would have the side-effect of making
Dean Herington:
I strongly prefer that that behavior _not_ be provision of any
normal Int value.
I agree.
I think a operation to let you examine the (possibly) underlying 2s
complement representation without raising an exception should be quite
separate from the operation to convert between
I hate to followup to myself, but looks like I had to. I really was
too tired and lazy version could be obtained by simple use of
accumulator:
Are you _sure_ that's all it takes?
I was expecting that you'd need 'unsafeInterleaveIO'. (This function
is used to implement hGetContents. Some
Also, GHC's NumExts has
doubleToFloat :: Double - Float
floatToDouble :: Float - Double
Q2: If we are going to run round adding functions to Numeric,
should we add those too? It's hard to know where to stop... but if
that conversion is what you want to do, H98 doesn't give a good
Hello, I am interested in using global variables (in GHC). I need a
variable to store list of Integers to store temporary results. I
have been reading the module MVar, but I wonder if there is an
alternative way of doing it. I have already implemented my function
using an auxiliar
George Russell [EMAIL PROTECTED] writes:
cast :: (Typeable a,Typeable b) = a - Maybe b
cast = fromDynamic . toDyn
My question is: is this the most efficient way of doing it, or is
there a better way?
I think I'd do it that way. toDyn and fromDynamic are both pretty
simple functions.
So, bringing back the solution of having manually written C wrapper
functions which platform-independent Haskell source files will call
out to, would be preferable (in short, avoid the use of hsc2hs *or
any other extra tool* alltogether). I'm willing to make the
necessary changes.
You
Simon Marlow [EMAIL PROTECTED] writes:
The upshot is that while GHC might notice that you have dropped a
Handle, another implementation which doesn't do black holing, stack
stubbing, strictness analysis, GC evaluation of selector thunks or
any of the other tricks we do to avoid space leaks
Simon (talking about using -ffunction-sections)
And there's bound to be some
complication due to the assumptions we make in the RTS about the
relative ordering of code/data.
Sounds like the mangler should do the function section magic.
Assuming the mangler understands where section
Ah, I forgot that you can't export a constructor on its own.
You can't?
I probably knew this once but looking at it now, it seems kinda
surprising. Haskell's module system is supposed to be just namespace
control --nothing more-- so why is it preventing me from doing something
which is
Leon Smith [EMAIL PROTECTED] writes:
My intuition says that none of the side-effects in my implementation
are visible from the abstract level of the module. However, the use
of unsafePerformIO certainly modifies the behaviour of the module.
Here's a simple test you can apply:
Can you
Rijk-Jan van Haaften [EMAIL PROTECTED]:
What does the language definition say about [tabs]?
Sigbjorn:
Nothing at all, I believe, but the convention is [...]
The Haskell 1.4 report says what is meant to happen (section 1.5)
(which was to follow the convention).
The Haskell 98 report omits
Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] writes:
Parsec [uses some variant of the error monad] and similar things. It
tries to generate reasonable messages of the form expecting foo,
found bar or unexpected bar annotated with source position,
making use of labels of higher level syntactic
If the GUI is based on the IO monad, then it doesn't seem like there is
a lot of advantage to doing it in Haskell. It seems like a better
idea to use a more natural language for IO and make RPC/interproc calls
to a haskell server to get stuff done.
In other words, if you use the IO monad,
Quick reply to just one point (more later, I hope):
Also, do these books have good coverage of things like
existential types, functional dependencies, other
experimental-but-apparently-crucial features that are hard to find
documentation for?
I consider myself a fairly hardcore
I think there's a lot of truth in all you said in your message and I
make the following comment merely as a point of information.
I think I speak for the majority of 'industrial' programmers when I
say Haskell is a very difficult language to approach. I believe a
great deal of this
Thanks. I think the decision here is to do the safe thing and mask
the return results ourselves, since it's only one extra insn. This
won't make it into 5.02, tho.
So GHC's Int/Word implementation is different from Hugs'? Hugs
represents Word8 (say) by a 32 bit int but doesn't guarantee
The
with [(oenv, oenv), (benv, benv)]
right at the end of this error message should be displayed in legal
Haskell syntax such as
with ?benv=benv; ?oenv=oenv
../TcUnits.hs:160:
Could not deduce `?cenv :: ClassEnv' from the context ()
Probable fix:
Add `?cenv :: ClassEnv'
hello, i just want to ask a simple question: does somebody have or
know where to find a haskell program that calculates the number e,
that is the list of infinite digits?
Hugs includes such a function in its demos.
Look at eFactBase in the file hugs98/demos/Examples.hs
There's a lot of other
Janis Voigtlaender [EMAIL PROTECTED] writes:
2. In a '93 paper, Jan Sparud describes an implementation technique
for avoiding space leaks when tuples are returned as function
result, and the values accessed by pattern matching in bindings. The
paper says this technique (of shorcircuiting all
[Metacomment: the only way to really answer your question is to use
one of the debugging tools mentioned previously in the space leak
threads. For large programs, anything else is just a list of
guesses.]
I think the space leak lies in the code you did not show us.
What does step look like?
Juan Carlos Arevalo Baeza [EMAIL PROTECTED] writes:
Hmmm... I guess I'll have to look more closely into the Hugs
documentation. I wasn't aware that it had profiling in it
too... O:-) And, looking closer, this option is not mentioned
anywhere, and it rejects the option. Hmmm... I have
Juan Carlos Arevalo Baeza [EMAIL PROTECTED] writes:
Seems to me like Haskell could do with a better list primitive,
where you can pattern-match on either side (with two constructors,
so to speak).
It does have better lists - Chris Okasaki's Edison library provides
a wholbunch of variants
[Hugs maintainer (Johan) added to list]
Writing about providing compiler-specific flags in package
descriptions, Simon Marlow [EMAIL PROTECTED] writes:
According to the Principle of Least Astonishment, we should
force the user to add any extra options himself, because if
'-package wibble'
Ashley Yakeley [EMAIL PROTECTED] writes:
data Zero; data Succ n;
Unfortunately this is contrary to the Haskell
Report. Nevertheless, Hugs allows it. But GHC, apparently,
does not.
Note that Hugs allows it principally so that we can write the following
in the Prelude:
data Float
data
I find it therefore of concern that many crucial Haskell documents,
including the standard and, for example, the various Glasgow Haskell
manuals, are only available online.
My printed copy of the Haskell 98 report is numbered:
YaleU/DCS/RR-1106
Copies can no doubt be obtained from the
[This is in reply to Andrew Tolmach's mail to the Haskell list. He
asked that replies should be sent to ghc-users.]
Many months after the topic was first raised, there is finally a draft
document describing a formal external syntax for GHC's Core
intermediate language.
Wow! This is very
Fergus Henderson [EMAIL PROTECTED] writes:
(It would be good for someone, perhaps Simon P-J., to keep a
list of issues like this which have been left out of Haskell 98
due to backwards compatibility concerns, so that they don't get
forgotten about when it comes to time for the next version.)
36 matches
Mail list logo