Alexteslin [EMAIL PROTECTED] writes:
I am really sorry, but i still can't define the function. The chapter the
exercise is in precedes algebraic types or Maybe a types. And is seems that
must being easy to define.
I answered some exercises on using foldr such as summing for example, but
Chaddaï Fouché [EMAIL PROTECTED] writes:
so you need an f so that c `f` x is c (for any c and x) and
yet (b `f` c) is c for any c and b -- this is impossible (or
I'm asleep).
Well, it isn't impossible but quite hard (and not even standard H98
if I'm not mistaken)
If it is possible, I'm
Kim-Ee Yeoh [EMAIL PROTECTED] writes:
Aaron Denney wrote:
I find the first far more readable. The compiler should be able to
assemble it all at compile time, right?
'Course not. The (++) function like all Haskell functions is only a
/promise/ to do its job.
I find this comment
I wrote:
the compile-time/run-time dichotomy is only relevant when a
value depends on data only available at run-time.
Something I've wanted to experiment with for a long time and
never got round to is writing CAFs back to the load module
at the end of a run (if they're small enough or took a
Stefan O'Rear [EMAIL PROTECTED] writes:
Indeed, you've caught on an important technical distinction.
Lazy: Always evaluating left-outermost-first.
I think most people would rather use the term normal order¨
for that; lazy means evaluating in normal order /and/ not
evaluating the same
Peter Verswyvelen [EMAIL PROTECTED] writes:
A while ago I confused currying with partial
application, which was pointed out by members of this
community, and the wiki pages got adapted so that newbies
like me don't make the same mistake twice ;) That's great.
Anyway, at the risk of making
Brandon S. Allbery KF8NH [EMAIL PROTECTED] writes:
On Sep 4, 2007, at 5:02 , Miguel Mitrofanov wrote:
It depends on arbitrary restrictions on what constitutes an
(boolean) expression, something that is anathema to
functional programmers :-) Spot the language:
while if E
then S; F
Sterling Clover [EMAIL PROTECTED] writes:
of course you could rewrite this in a while loop too
although you'd have to use an assignment, but at least
still not one with a silly done variable.
People seem to have overlooked the bit of Algol68 I posted,
so I'll repeat it
While If E
apfelmus [EMAIL PROTECTED] writes:
Tristan Allwood wrote:
Does anyone know if there is a function that tells you if a haskell
value has been forced or not?
e.g. isWHNF :: a - IO Bool
let x = (map succ [0..]) in do
putStrLn . show (isWHNF x)-- False
putStrLn . show .
Lihn, Steve [EMAIL PROTECTED] writes:
Hi,
I have been hacking the Haskell installation a few days on Redhat Linux.
GHC 6.6 - 6.6.1 - Lambdabot does not work.
[...]
Anyway, now my question is, how do I thoroughly clean up Haskell? (And
maybe try again after a few days of rest.)
Is
David Benbennick [EMAIL PROTECTED] writes:
On 10/17/07, John Meacham [EMAIL PROTECTED] wrote:
Oops, sorry, the version I posted was an intermediate one that had a
different addition algorithm. here is a better one that fixes that issue:
Zero + y = y
Sum x n1 + y = Sum x (y + n1)
note that
Simon Peyton-Jones [EMAIL PROTECTED] writes:
I realise belatedly that my message might have sounded
dismissive. My apologies; it wasn't intended to be. Good
ideas are just that: good. Reinventing them is a sign of
good taste.
As to documenting GHC, we try to do that by writing papers.
Peter Hercek [EMAIL PROTECTED] writes:
Jon Fairbairn wrote:
A hyperlink of the form a
href=http://.../long-research-paper.html#interesting-paragraph;
interesting bit/a is far more useful than one of the form
a href=http://.../long-research-paper.pdf;look for
section 49.7.3/a. It may
Brandon S. Allbery KF8NH [EMAIL PROTECTED] writes:
On Oct 21, 2007, at 6:29 , Jon Fairbairn wrote:
No, they (or at least links to them) typically are that bad!
Mind you, as far as fragment identification is concerned, so
are a lot of html pages. But even if the links do have
fragment ids
Derek Elkins [EMAIL PROTECTED] writes:
On Mon, 2007-10-22 at 01:12 +0100, Lennart Augustsson wrote:
There's nothing wrong with Haskell types. It's the terms that make
Haskell types an inconsistent logic.
Logics are what are consistent or not, so saying the logic Haskell's
type system
Hugh Perkins [EMAIL PROTECTED] writes:
On 10/26/07, John Meacham [EMAIL PROTECTED] wrote:
Heh, the plethora of pdf papers on Haskell is part of what originally
brought me to respect it. Something about that metafont painted cmr
just makes me giddy as a grad student. A beautifully rendered
Cale Gibbard [EMAIL PROTECTED] writes:
On 21/10/2007, Jon Fairbairn [EMAIL PROTECTED] wrote:
No, they (or at least links to them) typically are that bad!
Mind you, as far as fragment identification is concerned, so
are a lot of html pages. But even if the links do have
fragment ids, pdfs
Hans van Thiel [EMAIL PROTECTED] writes:
On Fri, 2007-11-09 at 14:30 -0500, Brent Yorgey wrote:
On Nov 9, 2007 2:08 PM, Hans van Thiel [EMAIL PROTECTED] wrote:
Hello All,
Can anybody explain the results for 1.0, 2.0 and 3.0 times pi
below?
GHCi yields the
PR Stanley [EMAIL PROTECTED] writes:
Hi
taken from ch.8.3 in the Hutton book:
Whereas return v always succeeds, the dual parser failure
always fails regardless of the contents of the input
string:
The dual parser failure?
It's a question of how you parse the phrase dual parser
failure.
Duncan Coutts [EMAIL PROTECTED] writes:
We all know that Functor should have been a superclass of Monad, and
indeed we now know that Applicative should be too. Making such a change
would break lots of things however so the change does not happen.
However in this case the Monad operations can
Cristian Baboi [EMAIL PROTECTED] writes:
What I should have been told about upfront:
- the syntax for an expression
Since there are only declarations and expressions, the
syntax of an expression involves pretty much all of the
language, so it would be difficult to tell it upfront.
- the
Cristian Baboi [EMAIL PROTECTED] writes:
On Tue, 18 Dec 2007 11:56:36 +0200, Jon Fairbairn
[EMAIL PROTECTED] wrote:
Cristian Baboi [EMAIL PROTECTED] writes:
- the syntax for a block
Not sure what you mean by block.
do a - [1..10]
b - [3,4]
return (a,b)
is an expression... you
Neil Mitchell [EMAIL PROTECTED] writes:
Hi,
Are CAF's specified in the Haskell report? I couldn't find them mentioned.
CAF is a term of art. If you define
fred = 2 + 2
that's a CAF.
If not, why do all Haskell compilers support them?
How could they not? I'm not sure I understand your
Neil Mitchell [EMAIL PROTECTED] writes:
I should have been more precise with my question. Given the code:
fred = 2 + 2
bob = fred + fred
In a Haskell implementation fred would be evaluated once to 4, then
used twice. The 2+2 would only happen once (ignore defaulting and
overloaded
Leon Smith leon.p.sm...@gmail.com writes:
On Sat, Mar 27, 2010 at 1:56 PM, Jason Dagit da...@codersbase.com wrote:
For some reason it started out as a male dominated field.
Let's assume for cultural reasons. Once it became a male
dominated field, us males unknowingly made the work and
Jens Blanck jens.bla...@gmail.com writes:
On 1 April 2010 10:53, Ivan Lazar Miljenovic ivan.miljeno...@gmail.comwrote:
Jens Blanck jens.bla...@gmail.com writes:
I was wondering if someone could give me some references to
when and why the choice was made to default integral
numerical
Ivan Lazar Miljenovic ivan.miljeno...@gmail.com writes:
Daryoush Mehrtash dmehrt...@gmail.com writes:
Is there a way to persist a [IO ()] to say a file then retrieve it later and
execute it using a sequence function?
I'm not sure I understand what you're wanting... you can pass around
John Goerzen jgoer...@complete.org writes:
It is somewhat of a surprise to me that I'm making this
post, given that there was a day when I thought Haskell was
moving too slow ;-)
My problem here is that it has become rather difficult to
write software in Haskell that will still work with
John Millikin jmilli...@gmail.com writes:
Thanks for the library! I'm sure it will be very useful for people
dealing with internationalized applications / libraries. I have a few
suggestions, which might make your library easier to use and maintain.
First, it's very common to include
R J rj248...@hotmail.com writes:
I'm trying to prove that (==) is reflexive, symmetric, and
transitive over the Bools, given this definition:
(==):: Bool - Bool - Bool
x == y = (x y) || (not x not y)
Since Bool is a type, and all Haskell types include ⊥, you need
to add conditions in
Alexander Solla a...@2piix.com writes:
On May 22, 2010, at 1:32 AM, Jon Fairbairn wrote:
Since Bool is a type, and all Haskell types include ⊥, you need
to add conditions in your proofs to exclude it.
Not really. Bottom isn't a value, so much as an expression
for computations that don't
Alexander Solla a...@2piix.com writes:
On May 23, 2010, at 1:35 AM, Jon Fairbairn wrote:
It seems to me relevant here, because one of the uses to which
one might put the symmetry rule is to replace an expression “e1
== e2” with “e2 == e1”, which can turn a programme that
terminates
R J rj248...@hotmail.com writes:
What's an elegant definition of a Haskell function that takes
two strings and returns Nothing in case the first string
isn't a substring of the first, or Just i, where i is the
index number of the position within the first string where the
second string
On 2006-06-15 at 17:33BST Vladimir Portnykh wrote:
Fibonacci numbers implementations in Haskell one of the classical examples.
An example I found is the following:
fibs :: [Int]
fibs = 0 : 1 : [ a + b | (a, b) - zip fibs (tail fibs)]
Can we do better?
Well, you've had various variously
On 2006-06-19 at 15:24- C Rodrigues wrote:
Here's a puzzle I haven't been able to solve. Is it possible to write the
initlast function?
There are functions init and last that take constant stack space and
traverse the list at most once. You can think of traversing the list as
On 2006-06-22 at 15:16BST Brian Hulley wrote:
minh thu wrote:
y and yq are infinite...
But how does this change the fact that y still has 1 more element than yq?
yq is after all, not a circular list.
infinity+1 = infinity
I don't see why induction can't just be applied infinitely
to
On 2006-06-22 at 15:45BST Brian Hulley wrote:
Jon Fairbairn wrote:
infinity+1 = infinity
Surely this is just a mathematical convention, not reality! :-)
I'm not sure how to answer that. The only equality worth
talking about on numbers (and lists) is the mathematical
one, and it's
On 2006-07-13 at 02:29BST Neil Mitchell wrote:
Hi,
Are cool kids supposed to put the comma in front like this?
Some cool kids do, some cool kids don't. Some do both, depending on their
mood.
The advantage of a leading , is that now the comma's line up, and if
you want to add an item on
On 2006-07-12 at 23:24BST Brian Hulley wrote:
Christian Maeder wrote:
Donald Bruce Stewart schrieb:
Question over whether it should be:
splitBy (=='a') aabbaca == [,,bb,c,]
or
splitBy (=='a') aabbaca == [bb,c]
I argue the second form is what people usually want.
Yes,
On 2006-07-13 at 11:15+0200 Henning Thielemann wrote:
Optimal notation of lists, because of most easiest editing, is
a:
b:
c:
[]
That made me smile. In Ponder I had used up : for types, and
lists could be
a::
b::
c:.
but when I suggested this at a Haskell meeting, Simon PJ
complained
On 2006-07-13 at 09:35EDT [EMAIL PROTECTED] (Mark T.B. Carroll) wrote:
Jon Fairbairn [EMAIL PROTECTED] writes:
a::
b::
c:.
but when I suggested this at a Haskell meeting, Simon PJ
complained that it looks like hopscotch. I've never quite
understood that complaint!
http
On 2006-07-13 at 10:16BST I wrote:
Hooray! I've been waiting to ask Why aren't we asking what
laws hold for these operations?
Having thought about this for a bit, I've come up with the
below. This is intended to give the general idea -- it's not
polished code, and I'm not at all wedded to the
On 2006-07-20 at 18:31BST I wrote:
On 2006-07-13 at 10:16BST I wrote:
Hooray! I've been waiting to ask Why aren't we asking what
laws hold for these operations?
Having thought about this for a bit, I've come up with the
below. This is intended to give the general idea -- it's not
On 2006-07-27 at 01:33EDT Paul Hudak wrote:
Thanks for asking about this -- it probably should be in the paper. Dan
Doel's answer is closest to the truth:
I imagine the answer is that having the syntax for it looks nicer/is
clearer. if a b c could be more cryptic than if a then b
On 2006-07-27 at 13:01+0200 Tomasz Zielonka wrote:
But because if-then-else is an expression, there is another
problem.
That was exactly my point when I made the muttering about
self-bracketing (if ... fi, like everything else, is an
expression in Algol68) all those years ago. I really regret
On 2006-11-07 at 18:30+0100 Henning Thielemann wrote:
On Tue, 7 Nov 2006, Simon Marlow wrote:
This is a much more heavyweight change, and its not a clear win.
Haskell 2 ? :-)
If you'd like to make a concrete proposal, then feel free to do so and
I'll make sure it gets onto the wiki.
Alexander Seliverstov [EMAIL PROTECTED] writes:
How does caller choose which particular instance of Num they want?
They specify the type... or just pass the result to
something that specifies the type. Try it in ghci:
Prelude let f:: Integral i = Integer - i; f = fromIntegral
Prelude let g ::
Bulat Ziganshin [EMAIL PROTECTED] writes:
Hello Jon,
Monday, January 21, 2008, 9:28:09 PM, you wrote:
Ok. I have a my own class class A a and want to write function like
this f:: (A a)=Integer-a. Can I do it?
But in general you are going to want something a bit more
useful, which means
[EMAIL PROTECTED] writes:
Jerzy Karczmarczuk (pronounced as written)
Do you mean you don't care, or are you assuming that we know
whether the convention is to read it as Polish orthography,
English, or French?
Jón (invariably mispronounced)
--
Jón Fairbairn
This was mentioned on the yi-devel list
http://groups.google.com/group/yi-devel/browse_frm/thread/392c3cd612490b1a/c304d54ffc000e4a?lnk=gstq=HSgtk.o%3A+unknown+symbol#
but didn't cause much excitement as it's not clear whose
problem it is, so I'll ask here as well:
I recently downloaded yi-0.3
Richard A. O'Keefe [EMAIL PROTECTED] writes:
On the subject of data types, I've recently seen Haskell code using
data Foo ... = Foo { ... }
where I would have used newtype instead of data. When is it a good
idea to avoid newtype?
When the code was written before newtype was introduced
Krzysztof Skrzętnicki [EMAIL PROTECTED] writes:
Well, it is simply
coerce :: a - b
coerce _ = undefined
so coerce is simply empty function. But still, it is possible to write a
function of type (a-b).
Well, possibly I didn't write anything particularly new, but please excuse
me for I'm
Stephen Howard [EMAIL PROTECTED] writes:
I am a newcomer doing my obligatory struggling with
Haskell's type system,
That's your mistake. Don't struggle with the type system,
the type system is your friend; when it tells you you are
doing something wrong, it's usually right.
and I've got a
Robert Vollmert [EMAIL PROTECTED] writes:
Great reply!
Thanks.
One minor point: If real_programme is to be pure, you should use let:
Whoops! I was thinking let but wrote the wrong thing. If
my email had been through a type-checker, it would have
spotted the mistake.
--
Jón Fairbairn
Adrian Neumann [EMAIL PROTECTED] writes:
Hello,
while studying for a exam I came across this little pearl:
Y = (L L L L L L L L L L L L L L L L L L L L L L L L L L L L)
where
L = λabcdefghijklmnopqstuvwxyzr. (r (t h i s i s a f i x e d
p o i n t c o m b i n a t o r))
posted by Cale
michael rice nowg...@yahoo.com writes:
This is from Learn You A Haskell:
==
Curried functions
Every function in Haskell officially only takes one
parameter. So how is it possible that we defined and used
several functions that take more than one parameter so far?
Well, it's a
David Virebayre dav.vire+hask...@gmail.com writes:
On Mon, Oct 5, 2009 at 11:52 AM, Jon Fairbairn
jon.fairba...@cl.cam.ac.uk wrote:
[1] A pet peeve of mine is x supports y being used backwards (as in
our application supports windows Vista, which would only make sense if
it were something
Pasqualino \Titto\ Assini tittoass...@gmail.com writes:
The syntax is similar, but what else is?
What would you expect from an empty tuple?
(a,b,c) has a constructor function p3 a b c = (a,b,c) and three
destructor functions s3_1 (a,b,c) = a, s3_2 (a,b,c) = b and s3_3 (a,b,c)=c
(a,b) has a
Deniz Dogan deniz.a.m.do...@gmail.com writes:
Has there been any serious suggestion or attempt to change the syntax
of Haskell to allow hyphens in identifiers, much like in Lisp
languages? E.g. hello-world would be a valid function name.
I (among others) suggested it right at the beginning
Deniz Dogan deniz.a.m.do...@gmail.com writes:
2009/12/8 Jon Fairbairn jon.fairba...@cl.cam.ac.uk:
Deniz Dogan deniz.a.m.do...@gmail.com writes:
[...] allow hyphens in identifiers, much like in Lisp
languages? E.g. hello-world would be a valid function name.
I (among others) suggested
Daniel Fischer daniel.is.fisc...@web.de writes:
Am Dienstag 15 Dezember 2009 03:04:43 schrieb Richard O'Keefe:
On Dec 14, 2009, at 5:11 PM, Daniel Fischer wrote:
1. I wasn't playing in the under_score vs. camelCase game, just
proposing a possible
reason why the camelCase may have been
On 2005-07-12 at 12:39- Dinh Tien Tuan Anh wrote:
i have just encountered another type error.
This program tries to print out partitions of a positive integer (i guess)
parts 0 = [[]]
parts x = [concat (map (y:) parts(x-y) | y-[1..(x `div` 2)]]
^
On 2005-10-07 at 22:42- Gerd M wrote:
As (memory) is a function, it
cannot be memoized (the function can be, but not its result, which is
what you're after).
How can a funcion be memoized but not it's result (what does this mean)!?
Since there are no side effects in Haskell why is it
On 2005-10-14 at 16:56+0200 Stephane Bortzmeyer wrote:
On Fri, Oct 14, 2005 at 03:34:33PM +0100,
Jon Fairbairn [EMAIL PROTECTED] wrote:
Because the language used inside these strings is standard,
multi-language, widely used and documented?
10,000 lemmings can't be wrong?
Right
On 2005-10-25 at 12:20+0200 Lemmih wrote:
On 10/25/05, Charles SDudu [EMAIL PROTECTED] wrote:
Hello, I need to calculate the frequency of each
character in a String. And if I can do this really well
in C, I dont find a nice (and fast) answer in haskell. I
tried several functions, listed
On 2005-11-17 at 13:21EST Cale Gibbard wrote:
Sebastian Sylvan wrote:
Personally I think that the dot is way to good of a symbol to be
wasted on function composition. I mean, how often do you really use
function composition in a way which doesn't obfuscate your code? I use
($) way more
On 2005-11-21 at 15:14EST Michael Benfield wrote:
I'm new to Haskell. I'm apparently misunderstanding something here.
When I run this program:
-
module Main where
import System.Posix
import System.CPUTime
printTime = getCPUTime = putStrLn . show
main = printTime sleep 5
On 2005-12-21 at 18:10GMT Daniel Carrera wrote:
Daniel Carrera wrote:
Hey,
The sqrt function is not doing what I want. This is what I want:
round sqrt(2)
Sigh... never fails. Spend an hour trying to solve a problem, and a
minute after you write to the list you find the solution.
On 2006-01-13 at 13:32PST Jared Updike wrote:
That works except it loses single newline characters.
let s = 1234\n5678\n\nabcdefghijklmnopq\n\n,,.,.,.
Prelude blocks s
[12345678,abcdefghijklmnopq,,,.,.,.]
Also the argument to groupBy ought to be some sort of
equivalence relation.
blocks =
On 2006-02-04 at 21:15GMT Brian Hulley wrote:
Stefan Holdermans wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Brian wrote:
I think the mystery surrounding :: and : might have been that
originally people thought type annotations would hardly ever be
needed whereas list cons
On 2006-02-17 at 20:12GMT rgo wrote:
Hi all,
my program probably goes into infinite loop... But i cannot understand where
and why.
getDirectoryContents will include . and .., so if you
follow those, you're bound to loop.
--
Jón Fairbairn Jon.Fairbairn at
On 2006-02-17 at 09:22PST Jared Updike wrote:
Yep. change one line to:
entry - if isdir name /= . name /= ..
and it does in fact work.
Only if no-one has been tricky with symbolic links.
--
Jón Fairbairn Jon.Fairbairn at cl.cam.ac.uk
On 2006-03-28 at 08:02+0200 Tomasz Zielonka wrote:
I wonder if it would be possible to remove the space-leak by running both
branches concurrently, and scheduling threads in a way that would
minimise the space-leak. I proposed this before
On 2006-04-05 at 12:35EDT Michael Goodrich wrote:
Greetings All:
GHC gives: Fail: loop
Hugs gives: [(ERROR - C stack overflow
Nowt's up wi' ' runtime error message. GHC's perfectly
lucid. It says your programme went into an infinite loop.
This sort of thing belongs on
On 2006-04-05 at 14:03EDT Michael Goodrich wrote:
BTW, I can't seem to locate 'haskell-cafe'.
http://www.haskell.org/mailman/listinfo/haskell-cafe
The message responding to my sign-up said nothing about
haskell-cafe.
Perhaps it should. It's so long since I signed up to haskell
that I've
On 2006-04-06 at 11:25EDT Michael Goodrich wrote:
Thanks so much for your help. I should have made clear that I was aware that
the definitions were mutually dependent. What I was hoping was that Haskell
could solve this for me without my having to resort to effectively finessing
any
On 2006-05-29 at 15:46+0200 =?UTF-8?B?RHXFoWFuIEtvbMOhxZk=?= wrote:
OK. If we have these two expressions:
1) (\x.x b x)
2) (\x.x c x)
The question is, are they equal? (They are not identical, of course.)
For answer no, there is a strong argument - there is no reduction
sequence
On 2006-05-29 at 19:03BST Brian Hulley wrote:
Dominic Steinitz wrote:
I think it's fascinating that already with ((.).(.)) there
is something that can be used practically and proved
equivalent to something easily comprehensible,
Well, it is compose composed with compose, so you can start
Andrew Coppin andrewcop...@btinternet.com writes:
The other day, I accidentally came up with this:
|{-# LANGUAGE RankNTypes #-}
type Either x y= forall r. (x - r) - (y - r) - r
left :: x - Either x y
left x f g= f x
right :: y - Either x y
right y f g= g y
|
This is
Lennart Augustsson lenn...@augustsson.net writes:
Jon, you beat me to it. I was going to mention Ponder.
Strange chance; yesterday was the first time I read haskell café
for something like half a year.
But Ponder did have a builtin type, it had the function type built in. :)
Well, to use
I'm probably terribly out of date with this, so I wonder if
anyone can save me the bother of working out what the
/preferred/ libraries are for (a) determining the
last-modified-time of a file or directory and (b) manipulating
the resulting time datum.
I can find
Daniel Fischer daniel.is.fisc...@web.de writes:
On Wednesday 17 November 2010 19:09:16, Jerzy M wrote:
Hallo,
let me take this simple function: (2*).
If I check its type
:t (2*)
I'll obtain
(2*) :: (Num a) = a - a
But now it suffices to write
g = (2*)
and check
:t g
to obtain
g
a...@cs.uu.nl writes:
Utrecht Haskell Compiler -- first release, version 1.0.0
The UHC team is happy to announce the first public release of the
Utrecht Haskell Compiler (UHC). UHC supports almost all Haskell98
Achim Schneider bars...@web.de writes:
Jon Fairbairn jon.fairba...@cl.cam.ac.uk wrote:
a...@cs.uu.nl writes:
Utrecht Haskell Compiler -- first release, version 1.0.0
The UHC team is happy to announce the first
Miguel Mitrofanov miguelim...@yandex.ru writes:
Well, the problem is that every implementor does choose a
subset of standart to implement.
That's what I'm complaining about.
It's much worse in JavaScript - essential features working
differently in Internet Explorer, Firefox, Opera, and
Colin Paul Adams co...@colina.demon.co.uk writes:
Lennart == Lennart Augustsson lenn...@augustsson.net writes:
Lennart Of course, n+k will be missed by Haskell obfuscators. I
Lennart mean, what will we do without (+) + 1 + 1 = (+) ?
I think what would be missed would you be having
Sittampalam, Ganesh ganesh.sittampa...@credit-suisse.com writes:
Jon Fairbairn wrote:
But we can remove them in future language versions. The point I was
trying to make at the beginning of this subthread was that
implementations should follow the definition, because having a core
language
John A. De Goes j...@n-brain.net writes:
That's absurd. You have no way to access private source
code, so any decision on what features to exclude from
future versions of Haskell must necessarily look at
publicly accessible source code.
This is all entirely beside the point. The question
Tim Wawrzynczak inforichl...@gmail.com writes:
On Tue, Apr 28, 2009 at 8:08 PM, michael rice [1]nowg...@yahoo.com
wrote:
Hi,
My Prelude docs must be out of date because chr and ord don't seem to be
there. How do I access these functions?
Michael, those functions are not in the
Henning Thielemann schlepp...@henning-thielemann.de writes:
Paul Keir schrieb:
There's nothing better than making a data type an instance of Num. In
particular, fromInteger is a joy. But how about lists?
http://www.haskell.org/haskellwiki/Num_instance_for_functions
Vasili I. Galchin vigalc...@gmail.com writes:
Hello,
I am confused between Haskell as delineated in the Haskell Report VS
ghc pragmas which extend Haskell beyond the Haskell Report.
Pragmas are part of the report, and while I agree that using
them for extensions is stretching the
Jason Dusek jason.du...@gmail.com writes:
Why don't we have a picture of a cool dinosaur instead?
Something cool because the last heat of life went out of it
65 million years ago?
--
Jón Fairbairn jon.fairba...@cl.cam.ac.uk
Dan Doel dan.d...@gmail.com writes:
There was talk of adding a readMaybe a while ago, but apparently it
never happened.
As it is, you can use reads, read s becomes:
case reads s of
[(a, rest)] | all isSpace rest - code using a
_ - error case
Dan Doel dan.d...@gmail.com writes:
On Thursday 02 July 2009 6:36:09 am Jon Fairbairn wrote:
check :: (MonadPlus m) = (a - Bool) - a - m a
check p a
| p a = return a
| otherwise = mzero
I've often noticed the need for a similar function in conjunction with
unfoldr
Wolfgang Jeltsch g9ks1...@acme.softbase.org writes:
Am Freitag, 10. Juli 2009 05:26 schrieb rocon...@theorem.ca:
I find it amazing that you independently chose to spell colour with a `u'.
It makes me feel better about my choice.
I have to admit that it makes me unhappy. :-(
Why do we use
Matthias Görgens matthias.goerg...@googlemail.com writes:
doesn't make much sense to me yet, although I suspect I can read the mu as a
lambda on types?
Not really. The mu has more to do with recursion.
I'd say it's entirely to do with recursion. It's like the Y combinator
(or fix) for
Fernan Bolando fernanbola...@mailc.net writes:
Hi all
I recently used 2 hours of work looking for a bug that was causing
Program error: Prelude.!!: index too large
This is not very informative. It did not give me a hint which function
was causing this. In C adding a few printf would have
Fernan Bolando fernanbola...@mailc.net writes:
On Thu, Jul 16, 2009 at 4:10 PM, Jon
Fairbairnjon.fairba...@cl.cam.ac.uk wrote:
I wonder if your code has to use !! at all? I took a look at a random
module from the above link, and (without making much attempt at
understanding it), I'd guess
Henning Thielemann lemm...@henning-thielemann.de writes:
On Thu, 16 Jul 2009, Fernan Bolando wrote:
Hi all
I recently used 2 hours of work looking for a bug that was causing
Program error: Prelude.!!: index too large
A good way to avoid such problems is to avoid partial
functions at
Fernan Bolando fernanbola...@mailc.net writes:
On Sun, Jul 19, 2009 at 7:40 AM, wren ng thorntonw...@freegeek.org wrote:
Fernan Bolando wrote:
The intention is z0 is a system parameter and database, it contains a
set of info needed to define a particular simulation
A single-constructor
1 - 100 of 231 matches
Mail list logo