The online-readable copy is all ready to go. I'm just awaiting a final
ok from Marnie and I'll announce it. For a paper copy we'll await
John's Cafepress efforts. Much thanks to both Marnie and John.
Simon
| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
| * As far as I can determine, there is no way to check pattern matches
for
| exhaustiveness. Coming from OCaml, this feels like losing a
significant
| safety net! How do people program so as not to be getting dynamic
match
| failures all the time?
GHC has -fwarn-incomplete-patterns and
On Fri, 7 Jan 2005, Simon Peyton-Jones wrote:
| * As far as I can determine, there is no way to check pattern matches
for
| exhaustiveness. Coming from OCaml, this feels like losing a
significant
| safety net! How do people program so as not to be getting dynamic
match
| failures
Here's a summary of the state of Unicode support in GHC and other
compilers. There are several aspects:
- Can the Char type hold the full range of Unicode characters?
This has been true in GHC for some time, and is now true in Hugs.
I don't think it's true in nhc98 (please correct me if
[EMAIL PROTECTED] writes:
I'm constantly surprised hearing from so many people about their space
problems. I cannot remember having space problems with my programs. I
don't know what everybody else is doing wrong :-)
At least two common cases.
Extracting compact data structures from large
Simon Marlow [EMAIL PROTECTED] writes:
Here's a summary of the state of Unicode support in GHC and other
compilers. There are several aspects:
- Can the Char type hold the full range of Unicode characters?
This has been true in GHC for some time, and is now true in Hugs.
I don't
Hi,
Lennart Augustsson wrote:
Simon Marlow wrote:
Here's a summary of the state of Unicode support in GHC and other
compilers. There are several aspects:
- Can the Char type hold the full range of Unicode characters?
This has been true in GHC for some time, and is now true in Hugs.
I don't
Hello
What is the best way of doing an computation with a timeout?
A naive implementation using two threads is easy to create - but
what is the preferred solution?
withTimeout :: forall a. Int - IO a - IO (Maybe a)
withTimeout time fun =
do mv - newEmptyMVar
tid - forkIO (fun =
On 07 January 2005 12:30, Malcolm Wallace wrote:
Simon Marlow [EMAIL PROTECTED] writes:
Here's a summary of the state of Unicode support in GHC and other
compilers. There are several aspects:
- Can the Char type hold the full range of Unicode characters?
This has been true in GHC
Benjamin Pierce wrote:
OK, I'm taking the plunge and using Haskell in a course I'm teaching this
semester. To get ready, I've been doing quite a bit of Haskell programming
myself, and this has raised a few questions...
* What are the relative advantages of Hugs and GHC, beyond the obvious (Hugs
Simon Marlow wrote:
Many years ago, hbc claimed to be the only compiler with support for
this.
What encoding(s) did hbc allow in source files? The docs only mention
unicode characters inside character string literals.
The Java encoding, i.e., \u.
-- Lennart
On Fri, Jan 07, 2005 at 03:31:10PM +0200, Einar Karttunen wrote:
Hello
What is the best way of doing an computation with a timeout?
A naive implementation using two threads is easy to create - but
what is the preferred solution?
withTimeout :: forall a. Int - IO a - IO (Maybe a)
btw
Tomasz Zielonka [EMAIL PROTECTED] writes:
import Control.Concurrent (forkIO, threadDelay)
import Control.Concurrent.STM
withTimeout :: Int - STM a - IO (Maybe a)
withTimeout time fun = do
mv - atomically newEmptyTMVar
tid - forkIO $ do
threadDelay time
On Fri, Jan 07, 2005 at 02:57:19PM +0100, Tomasz Zielonka wrote:
My guess is it would be something like this, however you may want to do it
differently to get better compositionality (withTimeout returns an IO action,
not a STM action):
Maybe this will suffice, but I don't know if the delay
On Fri, Jan 07, 2005 at 04:55:05PM +0200, Einar Karttunen wrote:
Isn't this buggy if fun just keeps working without throwing an exception
or using retry? I meant wholly inside STM
There is not that much that you can do inside STM. This may be a problem
if you want to wait for a genuine IO
Henning Thielemann wrote:
What about dropping Guards? :-) Are they necessary? Do they lead to more
readable source code? Do they lead to more efficient code? I could
perfectly live without them up to now.
I hardly need guards too, but their advantage is that they let pattern
matching fail,
On Fri, Jan 07, 2005 at 04:55:05PM +0200, Einar Karttunen wrote:
if we use IO as the signature then using the TMVar has few advantages over
using an MVar.
Yes, I think you are right here.
Best regards,
Tomasz
___
Haskell-Cafe mailing list
Einar Karttunen writes:
What is the best way of doing an computation with a timeout?
At http://cryp.to/child/ you'll find a very readable and
straightforward implementation of a generic timeout
function:
type Timeout = Int
timeout :: Timeout - IO a - IO (Maybe a)
The function uses the
Simon Marlow [EMAIL PROTECTED] writes:
- Can the Char type hold the full range of Unicode characters?
This has been true in GHC for some time, and is now true in Hugs.
I don't think it's true in nhc98 (please correct me if I'm wrong).
You're wrong :-). nhc98 has always had
Malcolm Wallace wrote:
Lennart writes:
What encoding(s) did hbc allow in source files? The docs only mention
unicode characters inside character string literals.
The Java encoding, i.e., \u.
Well, in that case, nhc98 also supports Unicode in source files,
identically to hbc.
Well, you have
On Fri, 07 Jan 2005 15:31:10 +0200, Einar Karttunen
ekarttun@cs.helsinki.fi wrote:
Hello
What is the best way of doing an computation with a timeout?
I like the approach taken in Tackling the ackward squad:
First a funcion which will race two IO computations against each
other, returning
On Fri, 7 Jan 2005 20:56:42 +0100, Sebastian Sylvan
[EMAIL PROTECTED] wrote:
On Fri, 07 Jan 2005 15:31:10 +0200, Einar Karttunen
ekarttun@cs.helsinki.fi wrote:
Hello
What is the best way of doing an computation with a timeout?
I like the approach taken in Tackling the ackward squad:
On Fri, Jan 07, 2005 at 04:47:12PM +0100, Tomasz Zielonka wrote:
On Fri, Jan 07, 2005 at 04:55:05PM +0200, Einar Karttunen wrote:
if we use IO as the signature then using the TMVar has few advantages over
using an MVar.
Yes, I think you are right here.
Hmmm, TMVar's seem to be
In article
[EMAIL PROTECTED]
ft.com,
Simon Marlow [EMAIL PROTECTED] wrote:
True. Anyone care to take Hugs' implementation of the character class
functions and put it in GHC?
There's extensive character property tables in code in
http://cvs.sourceforge.net/viewcvs.py/haskell-i18n/Source/.
24 matches
Mail list logo