I would represent the data structure in a pure way, and restrict the
IO monad to the operations that actually do IO.
If you need some kind of mutable graph, I suggest representing that
graph as a map (Data.Map) from node names to neighbors.
The mutation is then just updating the map. An extra
They are all defense contractors.
On Sat, Aug 30, 2008 at 12:18 PM, Ashley Yakeley [EMAIL PROTECTED] wrote:
Paul Johnson wrote:
This is a strange question, I know, but is there anyone working in any of
the above companies on this mailing list?
Everyone will no doubt be wondering what they
I'm certain you can write a kernel in Haskell where the only use of
global variables is those that hardware interfacing forces you to use.
On Thu, Aug 28, 2008 at 3:32 AM, John Meacham [EMAIL PROTECTED] wrote:
On Thu, Aug 28, 2008 at 12:15:10AM +0100, Lennart Augustsson wrote:
I didn't say
C calls.
-- Lennart
On Thu, Aug 28, 2008 at 5:26 PM, Adrian Hey [EMAIL PROTECTED] wrote:
Jonathan Cast wrote:
On Thu, 2008-08-28 at 10:00 +0100, Adrian Hey wrote:
Lennart Augustsson wrote:
I don't don't think global variables should be banned, I just think
they should be severly
As I said earlier, global variables may be necessary when interfacing
with legacy things (software or hardware).
If Haskell had always taken the pragmatic path of adding what seems
easiest and most in line with imperative practice it would not be the
language it is today. It would be Perl, ML,
I've also written quite a few hosted and non-hosted device drivers (in C).
None of them have any global variables.
On Wed, Aug 27, 2008 at 9:07 AM, Adrian Hey [EMAIL PROTECTED] wrote:
Lennart Augustsson wrote:
I told you where to look at code. It's C code, mind you, but written
in a decent
You can get rid of all recursive bindings by transforming them into a
use of a fixpoint combinator.
And then you can use a non-recursive definition of the fixpoint
combinator, and never worry about recursive bindings again.
-- Lennart
On Wed, Aug 27, 2008 at 8:59 PM, Andrew Coppin
[EMAIL
IMO, there's no justification for having IORefs etc in the IO monad.
They should be in a separate monad. There could then be an operation
to lift that monad to the IO monad, if you so wish.
But wait, we already have that, it's the ST monad! (So there is no
justification.)
-- Lennart
On Wed,
I didn't say NetBSD doesn't use global variables, I said the device
driver model doesn't use global variables.
And quite a few things that used to be in global variables have been
moved into allocated variables and are being passed around instead.
That's simply a better way to structure the code.
Making a network stack from peek and poke is easy in a well structured OS.
The boot loader (or whatever) hands you the capability (call it
something else if you want) to do raw hardware access, and you build
from there. If you look at well structured OSs like NetBSD, this is
pretty much how they
The values Z, S Z, and S (S Z) all have the same runtime
representation and there is no linear increase in size when you add a
extra S.
BUT, if you make something overloaded and there is a dictionary
associated with the type (Z, S Z, or S (S Z)) then the dictionary
takes up space, and that space
(whatever that might be) access token (akin
to a capability).
I know you're not going to be convinced, so I won't even try. :)
-- Lennart
On Tue, Aug 26, 2008 at 9:47 PM, Adrian Hey [EMAIL PROTECTED] wrote:
Lennart Augustsson wrote:
Making a network stack from peek and poke is easy in a well
BTW, I'm not contradicting that the use of global variables can be
necessary when interfacing with legacy code, I just don't think it's
the right design when doing something new.
-- Lennart
On Tue, Aug 26, 2008 at 9:47 PM, Adrian Hey [EMAIL PROTECTED] wrote:
Lennart Augustsson wrote:
Making
Have a look at http://okmij.org/ftp/Haskell/eliminating-array-bound-check.lhs
On Mon, Aug 18, 2008 at 8:16 AM, Ramin Honary [EMAIL PROTECTED] wrote:
Really? Where the bounds checking can be done at compile-time? (Excluding
cases where the array object is accessed by a constant value set at
As for array updating, there are many ways to improve the O(n) update.
You can use a tree representation and get O(log n) for all operations.
You can use the array single threaded in the ST monad and get all the
usual array operation complexities.
Etc. etc.
On Mon, Aug 18, 2008 at 8:16 AM, Ramin
You can code array types with static bounds with the existing Haskell
type system.
On Sun, Aug 17, 2008 at 3:45 PM, Ramin [EMAIL PROTECTED] wrote:
I am new to both the Haskell language, and to this group, but I have
recently become obsessed with the mathematical precision of Haskell, and I
I'm with Neil on this. Suggestion 1 is great, whereas suggestion 2
just makes it easier to make mistakes, and that's not what we want.
On Fri, Aug 15, 2008 at 6:34 PM, Isaac Dupree [EMAIL PROTECTED] wrote:
There are two separate parts I propose, the second one I'm less sure of, but
they're
If scaleFloat and exponent are implemented with bit twiddling they can
be quite fast.
I have a feeling that they involve slow FFI calls in GHC (being the
original author of a lot of the code involved).
On Thu, Jul 17, 2008 at 8:21 PM, stefan kersten [EMAIL PROTECTED] wrote:
On 17.07.2008, at
Yes, early ML had nested pairs. We introduced n-tuples in Lazy ML
because in a lazy language n-tuples are not isomorphic to nested pairs
(whereas they are in a strict language). So n-tuples are nasty
because they are not inductive, but they are in many ways much more
reasonable than lazy nested
Haskell does not allow you to change rounding mode, NaN signallng mode, etc.
But otherwise Haskell on modern platforms conforms to IEEE 754.
-- Lennart
On Sun, Jun 22, 2008 at 9:37 AM, Sean McLaughlin [EMAIL PROTECTED] wrote:
Hello,
I'm considering using Haskell for a numerical
'/'toInt'.
claus
Thanks a million, Lennart! -fno-method-sharing was the missing piece. -
Conal
On Sat, Jun 7, 2008 at 5:07 AM, Lennart Augustsson
[EMAIL PROTECTED]
wrote:
Here's something that actually works. You need to pass
-fno-method-sharing on the command line.
Instead of using
Interesting. The problem seems to be that GHC always inlines toInt
and fromInt early, but this means that the rewrite rule no longer
applies.
And, of course, it doesn't inline toInt and fromInt in the rewrite rule.
I have no idea if you can write a rule that will actually work,
because after
Here's something that actually works. You need to pass
-fno-method-sharing on the command line.
Instead of using rules on methods it uses rules on global functions,
and these global functions don't get inlined until late (after the
rule has fired).
-- Lennart
module F where
-- | Domain of a
There are no rules written down. But the fast exponentiation
algorithm used by (^) assumes that (*) is associative.
I also don't think that fast exponentiation should ever multiply by 1.
-- Lennart
On Sun, Jun 1, 2008 at 6:34 PM, Serge D. Mechveliani [EMAIL PROTECTED] wrote:
On Sun, Jun 01,
Try reading
http://www.physics.ohio-state.edu/~dws/grouplinks/floating_point_math.pdf
On Wed, May 28, 2008 at 8:04 AM, PR Stanley [EMAIL PROTECTED] wrote:
Hello
Why does sqrt (-16) return NaN? What is NaN?
Thanks
Paul
___
Haskell-Cafe mailing
These things become easier if you are explicit about type applications
(which Haskell isn't).
Phillippa mentioned it in an earlier post, but here it is again.
First the old stuff, if you have a term of type (S-T) then the
(normal form of) term must be (\ x - e), where x has type S and e has
type
I certainly don't use 50% IO monads. I regard any use of the IO monad
except at the top level as a failure. :)
On Wed, May 21, 2008 at 7:14 PM, Dan Weston [EMAIL PROTECTED] wrote:
Dan Doel wrote:
On Tuesday 20 May 2008, [EMAIL PROTECTED] wrote:
Actually, it's true less than 50% of the time.
Also, the way we write numbers is little endian when writing in
Arabic; we just forgot to reverse the digits when we borrowed the
notation.
Little endian is more logical unless you also number your bits with
MSB as bit 0.
On Tue, May 13, 2008 at 7:35 PM, Aaron Denney [EMAIL PROTECTED] wrote:
On
Well, if you want to be picky evaluating (calling) (xs ++ ys) takes whatever
time it takes to evaluate xs to WHNF and if xs is null then it in addition
takes the time it takes to evaluate ys to WHNF. Saying anything about time
complexity with lazy evaluation requires a lot of context to be exact.
Try making a type class for the functions. That will allow you both varargs
and unions.
Have a look at Text.Printf.
-- Lennart
On Sat, May 10, 2008 at 1:28 PM, Eric Stansifer [EMAIL PROTECTED]
wrote:
I have been trying to write a DSL for Povray (see www.povray.org) in
Haskell, using the
GHC already ignores the existence of seq, for instance when doing list
fusion.
The unconstrained seq function just ruins too many things.
I say, move seq top a type class (where is used to be), and add an unsafeSeq
for people who want to play dangerously.
-- Lennart
On Tue, May 6, 2008 at 3:27
Are there any invariants you wish to maintain when inserting? If not, it's
rather trivial.
-- Lennart
On Fri, May 9, 2008 at 11:35 PM, PR Stanley [EMAIL PROTECTED] wrote:
Hi
data Ord a = Tree a = Nil | Node (Tree a) a (Tree a)
How would one go about inserting a value in a binary search
And what's the denotational semantics of type classes? As far as I know it
has never been done, because it's very complex.
On Tue, May 6, 2008 at 2:57 PM, Achim Schneider [EMAIL PROTECTED] wrote:
Well, it's an unformalised and not much thought about out-of-the-tub
idea, but here it goes:
I agree with Neil. Translators are very difficult to do right, except for
the most trivial transformations.
Changing tabs to spaces is about as far as I would trust an automatic
translator.
-- Lennart
On Thu, Apr 24, 2008 at 9:21 AM, Neil Mitchell [EMAIL PROTECTED] wrote:
Hi
I think
Haskell has now reached the point where backwards compatibility is something
that must be taken very seriously.
The motivation behind Haskell' was to bring the most common extensions into
the standard, it was all going to be done in a year.
Haskell' is not a new language, but growing Haskell98
:
Am Donnerstag, 24. April 2008 09:30 schrieb Lennart Augustsson:
Haskell has now reached the point where backwards compatibility is
something
that must be taken very seriously.
Would you be opposed to a Haskell 2 which would break lots of things?
[…]
Best wishes,
Wolfgang
I've never thought of one being shorthand for the other, really.
Since they are logically equivalent (in my interpretation) I don't really
care which one we regard as more primitive.
On Fri, Apr 18, 2008 at 9:26 AM, Martin Sulzmann [EMAIL PROTECTED]
wrote:
Lennart Augustsson wrote:
To reuse
) (Lit str) where
eId = FId
eLit = FLit
eApply = FApply
On Fri, Apr 18, 2008 at 9:26 AM, Martin Sulzmann [EMAIL PROTECTED]
wrote:
Lennart Augustsson wrote:
To reuse a favorite word, I think that any implementation that
distinguishes 'a - b, a - c' from 'a - b c' is broken
To reuse a favorite word, I think that any implementation that distinguishes
'a - b, a - c' from 'a - b c' is broken. :)
It does not implement FD, but something else. Maybe this something else is
useful, but if one of the forms is strictly more powerful than the other
then I don't see why you
On Thu, Apr 10, 2008 at 4:20 AM, Manuel M T Chakravarty
[EMAIL PROTECTED] wrote:
the five signatures
forall a. S a
forall b. S b
forall a b. S (a, b)
Int
S Int
By alpha-convertible I mean the usual thing from lambda calculus, they are
identical modulo the names of bound variables.
for missing signatures enabled, and we turn
warnings into errors. We have to disbale this for certain definitions,
because you cannot give them a signature. I find that broken.
-- Lennart
On Thu, Apr 10, 2008 at 5:52 AM, Manuel M T Chakravarty
[EMAIL PROTECTED] wrote:
Lennart Augustsson:
Let's
On Thu, Apr 10, 2008 at 4:20 AM, Manuel M T Chakravarty
[EMAIL PROTECTED] wrote:
Lennart Augustsson:
On Wed, Apr 9, 2008 at 8:53 AM, Martin Sulzmann
[EMAIL PROTECTED] wrote:
Lennart, you said
(It's also pretty easy to fix the problem.)
What do you mean? Easy to fix the type
Let's look at this example from a higher level.
Haskell is a language which allows you to write type signatures for
functions, and even encourages you to do it.
Sometimes you even have to do it. Any language feature that stops me from
writing a type signature is in my opinion broken.
TFs as
On Wed, Apr 9, 2008 at 8:53 AM, Martin Sulzmann [EMAIL PROTECTED]
wrote:
Lennart, you said
(It's also pretty easy to fix the problem.)
What do you mean? Easy to fix the type checker, or easy to fix the program
by inserting annotations
to guide the type checker?
Martin
I'm referring
Mark Jones brought higher order polymorphism to Haskell.
On Wed, Apr 2, 2008 at 8:08 AM, Janis Voigtlaender
[EMAIL PROTECTED] wrote:
apfelmus wrote:
Janis Voigtlaender wrote:
Loup Vaillant wrote:
Thanks to some geniuses (could someone name them?), we have type
classes and
GHC is bad at CSE. Of course, in general CSE might not be a good idea, but
with strict computations it is. So someone needs to add a CSE pass.
On Sat, Mar 29, 2008 at 2:23 AM, Don Stewart [EMAIL PROTECTED] wrote:
conal:
I'd like to know if it's possible to get GHC to perform some simple
No, Haskell wasn't designed with type level programming in mind. In fact it
took a few years before any serious type level programming was done. And lo
and behold, the type level has an untyped logic language.
-- Lennart
On Fri, Mar 14, 2008 at 9:41 PM, Ben Franksen [EMAIL PROTECTED]
wrote:
Wow, you have a tough mission if you want to replicate the bit level answers
for double (btw, hi Jacob).
Libraries differ for transcendental function, and even worse, CPUs differ.
You may get different answers on an Intel and and AMD.
That said, I think your best bet is to import log2 and log10
I don't think writing (1,) is an option for Haskell, it looks like a section
(and should be one).
On Wed, Mar 12, 2008 at 9:13 PM, Bryan O'Sullivan [EMAIL PROTECTED]
wrote:
Lennart Augustsson wrote:
Yes, I wish Haskell had a 1-tuple. The obvious syntax is already taken,
but I could accept
I agree, I view == as some kind of equivalence relation in Haskell, and not
a congruence relation (which would force x==y = f x == f y).
Of course, the Haskell type system isn't strong enough to enforce anything
more than it being a function returning a boolean.
-- Lennart
On Wed, Mar 12, 2008
I'd say that any polymorphic code that assumes that x==y implies x=y is
broken.
But apart from that, floating point numbers break all kinds of laws that we
might expect to hold. Even so, they are convenient to have instances of
various classes.
On Wed, Mar 12, 2008 at 7:31 PM, Adrian Hey [EMAIL
Yes, I wish Haskell had a 1-tuple. The obvious syntax is already taken, but
I could accept something different, like 'One a'.
On Mon, Mar 10, 2008 at 11:17 PM, Dan Weston [EMAIL PROTECTED]
wrote:
I understand the lack of distinction between a unit type and a 0-tuple,
since they are
Thanks for an interesting write-up. And not bad for a first Haskell
program. :)
There's still a number of things you could do to limit the boiler plate
code, though.
On Tue, Mar 4, 2008 at 6:29 AM, Alan Carter [EMAIL PROTECTED] wrote:
Many thanks for the explanations when I was first
It's a matter of taste. I prefer the function composition in this case.
It reads nicely as a pipeline.
-- Lennart
On Fri, Feb 1, 2008 at 9:48 PM, Dan Licata [EMAIL PROTECTED] wrote:
Not to start a flame war or religious debate, but I don't think that
eta-expansions should be considered bad
You mean as the the POPL paper, http://lambda-the-ultimate.org/node/2622 ?
On Jan 27, 2008 10:30 PM, Don Stewart [EMAIL PROTECTED] wrote:
And just as PLT Scheme announces they're moving to immutable, pure lists
http://lambda-the-ultimate.org/node/2631
They'll be getting a type system soon,
Well, the POPL talk was very pro-types, saying that when you move from a
scripting language to a language to write real systems you need static
types.
On Jan 27, 2008 9:52 PM, Derek Elkins [EMAIL PROTECTED] wrote:
On Sun, 2008-01-27 at 14:30 -0800, Don Stewart wrote:
brian.sniffen:
On Jan
You should use an MVar if you want it to be thread safe.
On Jan 19, 2008 1:36 PM, David Roundy [EMAIL PROTECTED] wrote:
Using ghc 6.6, but I've since isolated the bug as being unrelated to the
IORefs and threading, it was in an FFI binding that somehow never died
until I was testing this new
There is no technical reason for this. It's a matter of taste. As someone
else pointed out, different arities is usually a bug.
-- Lennart
On Jan 13, 2008 3:12 PM, Neil Mitchell [EMAIL PROTECTED] wrote:
Hi,
It's nice to write functions in point free style:
f = sort . nub
But
is a much more interesting measure, since that's what you
really care about in the end.
On Jan 14, 2008 2:03 PM, Ben Franksen [EMAIL PROTECTED] wrote:
Lennart Augustsson wrote:
What is a reduction anyway?
I am not an expert but I thought in lambda calculus one has primitive
rules
for evaluation
That would give you a language with a semantics I don't want to touch.
Sometimes useful, yes, but far to intensional for my taste.
-- Lennart
On Jan 11, 2008 5:59 AM, Achim Schneider [EMAIL PROTECTED] wrote:
Yes, thanks. I actually do think that many things would be easier if
every
that you
might think exist for numbers.
-- Lennart
On Jan 11, 2008 1:27 AM, Wolfgang Jeltsch [EMAIL PROTECTED]
wrote:
Am Freitag, 11. Januar 2008 08:11 schrieb Lennart Augustsson:
Some people seem to think that == is an equality predicate.
This is a big source of confusion for them; until
If you can't stomach the weirdness of floating point then perhaps you should
try to define your own type that obeys all the expected laws? :)
On Jan 11, 2008 3:36 AM, Wolfgang Jeltsch [EMAIL PROTECTED]
wrote:
Am Freitag, 11. Januar 2008 11:03 schrieb Felipe Lessa:
Another thing for the
Also, there are only two zeros, +0 and -0 and they compare equal.
On Jan 11, 2008 10:12 AM, Achim Schneider [EMAIL PROTECTED] wrote:
I was wrong in claiming that
But then there's +0/0 and -0/0, which would be +Infinity and
-Infinity, and +0 0 -0. AFAIK there are no floats with three
Some people seem to think that == is an equality predicate.
This is a big source of confusion for them; until they realize that == is
just another function returning Bool they will make claims like [1..]==[1..]
having an unnatural result.
The == function is only vaguely related to the equality
Thank you Duncan, you took the words out of my mouth. :)
On Jan 10, 2008 5:42 PM, Duncan Coutts [EMAIL PROTECTED] wrote:
On Fri, 2008-01-11 at 01:12 +0100, Achim Schneider wrote:
Tillmann Rendel [EMAIL PROTECTED] wrote:
Achim Schneider wrote:
[1..] == [1..]
[some discussion
What is a reduction anyway?
On Jan 8, 2008 2:48 PM, Fernando Rodriguez [EMAIL PROTECTED] wrote:
Hello Stefan O'Rear,
No.
(rambling explanation snipped awaiting further request)
Stefan
OK, I'll take the bait: why not?
___
id is well defined and there is only one of them.
On Dec 29, 2007 3:13 PM, Cristian Baboi [EMAIL PROTECTED] wrote:
On Sat, 29 Dec 2007 16:01:51 +0200, Achim Schneider [EMAIL PROTECTED]
wrote:
Cristian Baboi [EMAIL PROTECTED] wrote:
It appears as if lambda calculus is defined by lambda
There's no (valid) formalism that says that [n..]==[n..] is True.
The formalism says that [n..] and [n..] are equal. But being equal does not
mean that the Haskell (==) function returns True.
The (==) function is just an approximation of semantic equality (by
necessity).
-- Lennart
On Dec 28,
You are right, Portable Haskell Dynamic libraries do not exist because the
Haskell standard does not talk about them at all.
Portable C Dynamic libraries do not exist either. Given POSIX they exist,
but if you happen upon a platform that only has a C compiler it won't have
them.
On Dec 28, 2007
?
--- Forwarded message ---
From: Cristian Baboi [EMAIL PROTECTED]
To: Lennart Augustsson [EMAIL PROTECTED]
Cc: haskell-cafe@haskell.org haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Wikipedia on first-class object
Date: Thu, 27 Dec 2007 16:08:58 +0200
On Thu, 27 Dec 2007 14:02:36 +0200
One value. One infinite value.
On Dec 27, 2007 3:53 PM, Cristian Baboi [EMAIL PROTECTED] wrote:
On Thu, 27 Dec 2007 16:50:10 +0200, Lennart Augustsson
[EMAIL PROTECTED] wrote:
Absolutly. Every expression in Haskell denotes a value.
Now, we've not agreed what value means, but to me
I had it pretty well worked out for single parameter type classes, but I
couldn't see any nice extension to multiple parameters.
On Dec 11, 2007 5:30 PM, Simon Peyton-Jones [EMAIL PROTECTED] wrote:
| If it really would work ok we should get it fully specified and
| implemented so we can fix
Not can, should. And it might even survive in th world of Unicode.
On Dec 12, 2007 4:17 PM, Brent Yorgey [EMAIL PROTECTED] wrote:
On Dec 12, 2007 10:36 AM, Arie Groeneveld [EMAIL PROTECTED] wrote:
Reinier Lamers schreef:
printint :: Int - [Char]
printint = map chr . map (+0x30) .
I had it pretty well worked out for single parameter type classes, but I
couldn't see any nice extension to multiple parameters.
On Dec 11, 2007 5:30 PM, Simon Peyton-Jones [EMAIL PROTECTED] wrote:
| If it really would work ok we should get it fully specified and
| implemented so we can fix
And more power to those who are pursuing the vision!
But in the mean time I need to read and write files, start up external
programs, call Excel through FFI, etc, etc.
And there's no clever API for that yet, only IO. And I'd rather do IO in
Haskell than in C++.
I share the vision, though. I'm
If Haskell wants yo significantly widen it's audience then the tutorials
have to cater for the impatient.
Perhaps it's better to remain a fringe language. I truly don't know.
-- Lennart
On Dec 10, 2007 7:00 PM, Henning Thielemann [EMAIL PROTECTED]
wrote:
On Mon, 10 Dec 2007, Dan Piponi
Before we can talk about what right and wrong we need to know what the
semantics of IVars should be.
On Dec 8, 2007 7:12 PM, Marc A. Ziegert [EMAIL PROTECTED] wrote:
many many answers, many guesses...
let's compare these semantics:
readIVar :: IVar a - IO a
readIVar' :: IVar a - a
There's an ARM backend in hbc.
On Nov 2, 2007 8:30 PM, Greg Fitzgerald [EMAIL PROTECTED] wrote:
Anybody know of an ARM back end for any of the Haskell compilers?
Thanks,
Greg
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
in a functional
language, you can. For instance, write real, interactive programs in FRP,
phooey, or TV. And if you do, you'll get semantic simplicity, powerful
simpler reasoning, safety and composability.
- Conal
On Dec 8, 2007 1:26 AM, Lennart Augustsson [EMAIL PROTECTED] wrote:
I agree
I would claim that it's fine to use the type
readIVar :: IVar a - a
if you're willing to give the right semantics to
newIVar :: IO (IVar a)
The semantics is that sometimes when you create an IVar you'll get one that
always returns _|_ when read, sometimes you'll get a proper one. Now if you
,
phooey, or TV. And if you do, you'll get semantic simplicity,
powerful
simpler reasoning, safety and composability.
- Conal
On Dec 8, 2007 1:26 AM, Lennart Augustsson [EMAIL PROTECTED]
wrote:
[...]
IO is important because you can't write any real program without
write *any* real program without
using IO?
Cheers, - Conal
On Dec 9, 2007 12:02 PM, Lennart Augustsson [EMAIL PROTECTED]
wrote:
Conal,
It's true that you can avoid using IO (except for a wrapper) for certain
kinds of programs.
For instance, if all you want is a String-String function
get semantic simplicity,
powerful
simpler reasoning, safety and composability.
- Conal
On Dec 8, 2007 1:26 AM, Lennart Augustsson
[EMAIL PROTECTED] wrote:
[...]
IO is important because you can't write any real program without
using it.
So why
I agree with Dan here.
IO is important because you can't write any real program without using it.
So why not teach enough of it to get people off the ground straight away?
People who hang around long enough to do some more Haskell programming
will run into the other monads sooner or later. But
0x02 is not a Char, it's a numeric constant. Perhaps you meant '\x02' ?
On Dec 8, 2007 9:02 AM, Galchin Vasili [EMAIL PROTECTED] wrote:
Hello,
I am writing a function(actually much more than this):
bozo :: Char - Char
bozo 0x02 = 'a'
...
However, I get complaints from ghc
I agree. There are other ways that to solve the same problem as the case
distinction does.
On Dec 7, 2007 12:45 PM, Johannes Waldmann [EMAIL PROTECTED]
wrote:
On Fri, 7 Dec 2007, Manuel M T Chakravarty wrote:
The problem is that Haskell 98 already messed that up.
If type functions are
I don't think it's highly problematic. I agree that it would be nice to
have the type and value levels have a similar structure, but if there are
compelling reasons to do otherwise that fine too.
You could still allow symbol type variables if they have an explicit binding
occurence, which you
the IO in readIVar :: IVar a - IO a, instead of
just readIVar :: IVar a - a? After all, won't readIVar iv yield the same
result (eventually) every time it's called?
On Dec 3, 2007 12:29 AM, Lennart Augustsson [EMAIL PROTECTED]
wrote:
You can make them from MVars.
On Dec 2, 2007 8:03 PM
control
over when it happened.
Simon
*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On
Behalf Of *Lennart Augustsson
*Sent:* 04 December 2007 08:19
*To:* Conal Elliott
*Cc:* haskell@haskell.org
*Subject:* Re: [Haskell] IVars
Good question. That must be a matter of taste
I don't even understand what your notation means.
But apart from that, there are good reasons to define strictness
denotationally instead of operationally. Remember that _|_ is not only
exceptions, but also non-termination.
For instance, the following function is strict without using its
You can make them from MVars.
On Dec 2, 2007 8:03 PM, Conal Elliott [EMAIL PROTECTED] wrote:
what became of (assign-once) IVars? afaict, they were in concurrent
haskell and now aren't.
___
Haskell mailing list
Haskell@haskell.org
This is an idea that has been kicking around for a long time. But no
Haskell implementation that I know of implements it.
On Nov 27, 2007 3:43 PM, Maurício [EMAIL PROTECTED] wrote:
Hi,
If available memory is low, is the
garbage collector going to eliminate
data that is still referenced,
But IEEE can be run with projective infinity in which case there is only one
of them.
On Nov 27, 2007 7:41 PM, Isaac Dupree [EMAIL PROTECTED] wrote:
Henning Thielemann wrote:
On Mon, 26 Nov 2007, Jason Dusek wrote:
Among numeric types, it seems that only integer types are Bounded.
Or use a preprocessor that inserts a LANGUAGE pragma. :)
On Nov 22, 2007 9:14 AM, Simon Marlow [EMAIL PROTECTED] wrote:
Alex Jacobson wrote:
In any case, I'm pretty sure the correct answer is not 50 language
pragmas with arbitrary spellings for various language features at the
top of
IMHO, no one in the right mind uses Windows voluntarily. :)
I'm forced to use it at work, and it's a pain. But since many are forced to
use Windows it would be nice if ghc was as well supported on Windows and
Unix.
On Nov 22, 2007 12:11 AM, Aaron Denney [EMAIL PROTECTED] wrote:
On 2007-11-21,
This seems very, very wrong. The missing instance(s) might be left out
because of some good reason (e.g. if you have implemented sets with list and
not provided Ord).
On Nov 21, 2007 12:59 AM, Duncan Coutts [EMAIL PROTECTED] wrote:
On Tue, 2007-11-20 at 19:18 -0500, Alex Jacobson wrote:
When
This seems very, very wrong. The missing instance(s) might be left out
because of some good reason (e.g. if you have implemented sets with list and
not provided Ord).
On Nov 21, 2007 12:59 AM, Duncan Coutts [EMAIL PROTECTED] wrote:
On Tue, 2007-11-20 at 19:18 -0500, Alex Jacobson wrote:
When
I'm very much in favor of listing the exact extensions used in each file,
because I try to keep them to a minimum.
I would like to see a LANGUAGE Haskell' which includes the things that are
likely to be in Haskell' (if there is ever a Haskell').
-- Lennart
On Nov 20, 2007 9:42 PM, Alex
I implemented Tetris in LML long before Haskell existed.
It was text based, but looked good with a custom font. :)
Haskell has no problem with state, it's just explicit.
-- Lennart
On Nov 19, 2007 9:25 PM, Andrew Coppin [EMAIL PROTECTED] wrote:
If you were going to implement Tetris in
I totally agree with Derek. Which exception you get can vary with compiler
version, compiler flags, time of day, phase of the moon, ...
It will be one in a set of exceptions, but you don't know which one.
-- Lennart
On Nov 18, 2007 8:34 PM, Derek Elkins [EMAIL PROTECTED] wrote:
On Sun,
301 - 400 of 1011 matches
Mail list logo