Hi,
Haskell Report 6.3.4, pg 86-87, talks about arithmetic sequences.
For all four of these Prelude numeric types, all of the enumFrom
family of functions are strict in all their arguments.
This seems to imply that for other Prelude types, functions of the
enumFrom family aren't. Yet,
bot
Hi,
Consider the following code fragment:
data Colour = Red | Black | Blue deriving (Show, Bounded)
instance Enum Colour where
succ Red = Black
succ Black = Blue
succ Blue = error succ of maxBound
fromEnum Red = 1
fromEnum Black = 2
fromEnum Blue = 3
toEnum 1 = Red
Hi,
Chp 8 of the Haskell Report says:
In this chapter the entire Haskell Prelude is given. It constitutes a
*specification* for the Prelude.
Many of the definitions are written with clarity rather than
efficiency in mind, and it is not required
that the specification be implemented as shown
Hi Mark,
isSorted xs = and (zipWith (=) xs (tail xs))
In other words: When is a list xs sorted? If each element in xs is
less than or equal to its successor in the list (i.e., the corresponding
element in tail xs).
That's right ... under cbn! At the same time David's version with
* * * Ketil Malde [EMAIL PROTECTED] wrote:
ut - the converse is not true, is it? I can write
... = case foo of
(Foo f) - ...
(Bar b) - ...
ut I can't express that as a pattern-guarded expression, can I?
You probably have already seen John's reply
* * * Johannes Waldmann wrote:
But if you want to be really weird you can write something
like (I haven't typed this in):
f x | (Foo _) == x =
f x | (Bar _) == x =
no, you can't, e. g. hugs (Feb 2000) says
Prelude let f x | Just 4 == x = 0 in f (Just 4)
0
Prelude let f x |
[incomprehensible (not necessarily wrong!) stuff about polynomials,
rings, modules over Z and complaints about the current prelude nuked]
--- Marcin 'Qrczak' Kowalczyk pisze ---
Please show a concrete proposal how Prelude classes could be improved.
--- Jerzy Karczmarczuk repondre ---
I am
Hi,
I'm using a 4.06. I have a piece of code (in my version of the compiler)
which is in the uniq supply monad, but the result of the computation is
*ignored*. Nevertheless, it gives an error from Subst.lhs: nonexhaustive
patterns in zip_ty_env (my code calls coreExprType). I always thought
Hi,
I attach a piece of code: it's part of my thesis, attempts to turn
(strict) functions to catamorphisms (see the comment in the code). It
compiles just fine with core lint and debug on, but when I add the call
to cheapSimplify it produces a runtime error:
[hsc: no threads to run: infinite
the gnu web site, freshly installed. After 'make' the
libgmp.so.2 file was generated from libgmp.a by ld -Bsymbolic.
If anyone had similar problems or knows how to fix this I would
appreciate any hints.
Thanks,
Laszlo Nemeth
Paul Hudak wrote:
P.S. I really like the idea someone suggested of maintaining a list of
open projects, who's working on what, etc. as in the Linux community.
One major difference between the Linux community and the Haskell
community is that in LinuxLand the reward is the name, recognition,
Mark Jones wrote:
One of the greatest disappointments to date of the move
to more liberal (i.e. free software) licenses for systems
like Hugs and GHC, is that it has done almost nothing to
stimulate contributions to the implementations themselves
from outside the immediate (and small) group
Erik Meijer wrote:
Zipping lists however is *much* easier expressed using anamorphisms
or unfold. The reason is that when zipping two lists you are
co-inductively *constructing* a list, and not so much inductively
destructing a list. Hence the trick of inductively destructing a
list that
Lennart Augustsson wrote:
Kevin Atkinson wrote:
Lennart Augustsson wrote:
No, it will not be as efficient. foldr is not the right primitive for making
functions on lists. You want the more general
recurse :: (a - c a - b - b) - b - c a - b
Could you give me some refrence
Kevin Atkinson wrote:
cons :: a - c a - c a
empty :: c
foldr :: (a - b - b) - b - c a - b
I am not an expert. I have a minor problem with this, the type of
empty: if c stands for a type constructor then empty should have type
(c a). Moreover, I don't understand why you use 'c' for lists
for + and ^. So I wanted to fetch them from the
archive...which was last updated on the 28 May. Is the archive broken
or just rarely updated?
Thanks,
Laszlo Nemeth
Chris Okasaki wrote:
Unfortunately, it's not quite that easy. For a library with several
implementations
of, say, sets, you want the various implementations to support the same
fold function. In other words, in a library with abstract data types, you
want
the folds to be over the
Hi,
This looks like a bug: freshly checked out ghc-3-branch, I am
compiling it on easter (with the installed 3.02) with -fno-specialise
and -dcore-lint and get this message:
/local/fp/bin/i386-unknown-linux/ghc-3.02 -cpp -fglasgow-exts -Rghc-timing -I.
-IcodeGen -InativeGen -Iparser
Hi,
I tried your version of exec. Still the same problem. With 2.10 it
outputs "aaa" (as expected) and doesn't terminate (???), with 3.03
(-fno-specialise) it gives
^@^@^@ and terminates.
I guess it is some control character...And yes, this is Solaris. I
would bet that this has something to do
(with apologies to D. Adams)
Hi,
The code enclosed, works as expected for 2.10, works for
proto-3.03-15-Jul but breaks for 3.03 (latest from the CVS). The
problems seems to be something to do with handles: you write something
to it, but it doesn't go to the pipe.
With the code I am working
20 matches
Mail list logo