You don't normally call x::Int a computation of an Int because there's
nothing that distinguishes the value of the x from what it was before you
computed it. So I prefer to regard x as a value (in a domain, of course).
But for x :: (Monad m) = m Int there is something else happening, so the
word
I think Haskell is the right language to nail down the semantics of Erlang
and to prototype an implementation.
For performance, I think Haskell is probably not the right language, because
you need high performing low level code.
This isn't impossible in Haskell, but the implementations are not
But if the strings are all constant it's perfectly feasible to concatenate
them at compile time.
On 8/16/07, Kim-Ee Yeoh [EMAIL PROTECTED] wrote:
Aaron Denney wrote:
On 2007-08-15, Pekka Karjalainen [EMAIL PROTECTED] wrote:
A little style issue here on the side, if I may. You don't need
evaluation as is practically possible.
And as a previous poster showed, ghc does concatenate strings.
On 8/17/07, Kim-Ee Yeoh [EMAIL PROTECTED] wrote:
Lennart Augustsson wrote:
On 8/16/07, Kim-Ee Yeoh [EMAIL PROTECTED] wrote:
'Course not. The (++) function like all Haskell functions is only
On 8/17/07, Kim-Ee Yeoh [EMAIL PROTECTED] wrote:
Lennart Augustsson wrote:
And as a previous poster showed, ghc does concatenate strings.
And Haskell (as in the current language definition) does not.
I was talking about Haskell.
Haskell says nothing about compile time or run time
I agree. Computation on the type level does not imply computation on the
value level.
On 8/18/07, Tim Chevalier [EMAIL PROTECTED] wrote:
On 8/17/07, Kim-Ee Yeoh [EMAIL PROTECTED] wrote:
Incidentally, GHC's type checker is Turing complete. You
already have as much static evaluation as is
Use
value :: a - Integer
On 8/18/07, DavidA [EMAIL PROTECTED] wrote:
Hi,
I am trying to implement quadratic fields Q(sqrt d). These are numbers of
the
form a + b sqrt d, where a and b are rationals, and d is an integer.
In an earlier attempt, I tried
data QF = QF Integer Rational
How can you hope to convert an arbitrary Num to a Float?
Num contains things like complex numbers that don't have any reasonable
translation to a Float.
But anyway, realToFrac is a good conversion function.
-- Lennart
On 8/21/07, Peter Verswyvelen [EMAIL PROTECTED] wrote:
Does a general
You're right. The list syntax is only for lists in Haskell. It would be
nice if the list syntax was overloaded too.
You can overload numeric literals (by defining fromInteger) and string
literals (by defining fromString, in 6.7).
BTW, the [1..10] syntax is overloaded, you need an Enum instance.
Because you can play very clever tricks with DFS to make it efficient, time
and space.
On 9/5/07, Stefan O'Rear [EMAIL PROTECTED] wrote:
On Wed, Sep 05, 2007 at 01:21:52PM +1000, Thomas Conway wrote:
but to interpret this as a *program* you have to consider how it will
be executed. In
I'm not sure what you mean by abstract function. It's a function like any
other function.
But otherwise you're right. :)
-- Lennart
On 9/22/07, PR Stanley [EMAIL PROTECTED] wrote:
Ah, I understand now. Let me get this right:
The resulting (a - c) is a kind of abstract function formed by
If we're discussing bad versions of reverse, don't forget this one:
rev [] = []
rev (x:xs) =
case rev xs of
[] - [x]
y:ys - y : rev (x : rev ys)
It's different from most versions of reverse because it doesn't use any
auxiliarry functions.
It's also extremely inefficient.
--
I agree. This situation is totally detectable.
On 9/23/07, Neil Mitchell [EMAIL PROTECTED] wrote:
Hi
I'm not sure, but since it would require the detection of an evaluation
that does not terminate, it comes down to the halting problem, which is
not generally solvable. Maybe the experts
But this was a very particular case when a thread starts evaluating a node
and then comes back to the same node again.
The general case is (of course) undecidable.
On 9/23/07, Bulat Ziganshin [EMAIL PROTECTED] wrote:
Hello Lennart,
Sunday, September 23, 2007, 2:05:46 PM, you wrote:
i bet
Well, my goal when I first wrote it was to see if I could write reverse
without calling any other functions.
I did realize that it was really bad. :)
-- Lennart
On 9/23/07, Felipe Almeida Lessa [EMAIL PROTECTED] wrote:
On 9/23/07, Lennart Augustsson [EMAIL PROTECTED] wrote:
If we're
Since natural numbers are trivial to implement (inefficiently) I took 15
minutes and added them to my numbers package in Hackage.
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/numbers-2007.9.24
-- Lennart
On 9/24/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Neil Mitchell wrote:
PS.
Prelude Data.List Data.Number.Natural genericLength [1..] (10 :: Natural)
True
On 9/24/07, Lennart Augustsson [EMAIL PROTECTED] wrote:
Since natural numbers are trivial to implement (inefficiently) I took 15
minutes and added them to my numbers package in Hackage.
http
It's reasonably easy to read.
But you could make it more readable. Type signatures, naming the first
lambda...
On 9/25/07, Andrew Coppin [EMAIL PROTECTED] wrote:
While using Haskell, I often find myself writing convoluted
constructions such as this:
show_system =
unlines .
zipWith
Text.printf only has one type. But it is a bit involved. Just use it
without worrying exactly how it works. :)
Like 's ++ printtf %g*x%d x i'
On 9/25/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Chaddaï Fouché wrote:
2007/9/25, Andrew Coppin [EMAIL PROTECTED]:
printf don't always perform
Things can go arbitrarily wrong if you misuse unsafePerformIO, you can even
subvert the type system.
On 9/26/07, Jorge Marques Pelizzoni [EMAIL PROTECTED] wrote:
Hi, all!
This is a newbie question: I sort of understand what unsafePerformIO does
but I don't quite get its consequences. In
You could do this:
r :: IORef [a]
r = unsafePerformIO $ newIORef []
cast :: a - b
cast a = unsafePerformIO $ do
writeIORef r [a]
x - readIORef r
return $ head x
On 9/26/07, Dan Piponi [EMAIL PROTECTED] wrote:
On 9/26/07, Lennart Augustsson [EMAIL PROTECTED] wrote:
Things can go
Yes, that web page is a terrible introduction to dependent types. :)
On 10/6/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Dan Piponi wrote:
On 10/6/07, Andrew Coppin [EMAIL PROTECTED] wrote:
I've seen quite a few people do crazy things to abuse the Haskell type
system in order to perform
Come on people! This discussion is absurd. The numeric classes in Haskell
have a lot of choices that are somewhat arbitrary. Just live with it. If
pi has a default or not has no practical consequences.
-- Lennart
___
Haskell-Cafe mailing list
The Mersenne twister should be able to split better than most. but I'm not
sure how efficient it is.
On 10/14/07, Isaac Dupree [EMAIL PROTECTED] wrote:
Don Stewart wrote:
I've seen similar results switching to the SIMD mersenne twister C
implementation for randoms:
You don't need to unsubscribe. Just avoid posting things that are totally
wrong (at least without a warning).
-- Lennart
On 10/14/07, Andrew Coppin [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
I will be impolite.
If this were the first posting of A.C., I would suspect that he is
You realize that Djinn can write all that code for you? :)
Well, not with your encoding of Not, but with a similar one.
-- Lennart
On 10/14/07, Tim Newsham [EMAIL PROTECTED] wrote:
I've been struggling with this for the last day and a half. I'm
trying to get some exercise with the type
And Haskell embedded a logical programming language on accident.
On 10/15/07, Manuel M T Chakravarty [EMAIL PROTECTED] wrote:
Dan Piponi wrote,
On 10/12/07, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote:
He wants to write entire programs in the type system,
something like the crazies
If naturals have a perfectly reasonable subtraction then they also have a
perfectly reasonable negate; the default is 0-x.
(Oh, subtraction wasn't THAT reasonable, you say. :) )
-- Lennart
On 10/17/07, John Meacham [EMAIL PROTECTED] wrote:
On Tue, Oct 16, 2007 at 06:27:19PM -0300, Isaac
Check Wikipedia. Peirce law, law of excluded middle, double negation, ...
they are all equivalent and it can be instructive to see how one can derive
one from the other.
On 10/17/07, Tim Newsham [EMAIL PROTECTED] wrote:
Very clear tutorial indeed. But why isn't propCC shown as Pierce's
Law?
The one in the numbers package is not quite as clever as John's; it's the
naïve version of lazy naturals.
On 10/17/07, Stuart Cook [EMAIL PROTECTED] wrote:
On 10/17/07, John Meacham [EMAIL PROTECTED] wrote:
if anyone is interested, Although I bet this has been implemented a
hundred times
All of Haskell was possible 20 years ago. The LML compiler (written in LML)
compiled a language similar to Haskell, the only real differences is syntax
and the type system (and monadic IO wasn't invented yet). It was a bit slow
to recompile itself, but not bad. A 16MHz 386 and 8M of memory
There's nothing wrong with Haskell types. It's the terms that make Haskell
types an inconsistent logic.
But that doesn't mean that the C-H correspondence doesn't have any insight
to offer.
-- Lennart
On 10/21/07, Derek Elkins [EMAIL PROTECTED] wrote:
On Wed, 2007-10-17 at 15:06 -0700, Dan
There are many ways to implement currying. And even with GHC you can get it
to do some work given one argument if you write the function the right way.
I've used this in some code where it was crucial.
But yeah, a code generator at run time is a very cool idea, and one that has
been studied, but
Yes, of course. But they don't do partial evaluation.
On 11/1/07, Bulat Ziganshin [EMAIL PROTECTED] wrote:
Hello Lennart,
Thursday, November 1, 2007, 2:45:49 AM, you wrote:
But yeah, a code generator at run time is a very cool idea, and one
that has been studied, but not enough.
When discussing the complexity of fib don't forget that integer
operations for bignums are no longer constant time.
-- Lennart
On Nov 7, 2007 6:55 AM, Henning Thielemann
[EMAIL PROTECTED] wrote:
On Tue, 6 Nov 2007 [EMAIL PROTECTED] wrote:
However, this is still an O(log n) algorithm,
It's interesting that the article completely fails to mention hbc
which I know they used during the GHC bootstrap. Oh well. :)
On Nov 11, 2007 2:41 PM, Richard Kelsall [EMAIL PROTECTED] wrote:
Andrew Coppin wrote:
...if GHC is written in Haskell, how the heck did they compile GHC in
the
No worries.
I read the History of Haskell paper twice, but not the final version, I guess.
As far as I remember you started the bootstrapping with the ghc built
on the LML compiler. But as hbc became available it was soon more
reliable and produced better code, so you switched to that until the
No, Haskell functions take exactly one argument.
On Nov 14, 2007 1:05 AM, Robin Green [EMAIL PROTECTED] wrote:
On Tue, 13 Nov 2007 13:51:13 -0800
Dan Piponi [EMAIL PROTECTED] wrote:
Up until yesterday I had presumed that guards only applied to
functions. But I was poking about in the
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
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
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 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.
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
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
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
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
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
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
?
--- 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
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
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
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?
___
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
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
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
Turn on OverloadedStrings and you can pattern match on any type you
like that is in the IsString class.
Which means that Data.Text can use string literals just like regular
strings (but you can't use Char literals in the match).
On Mon, Mar 22, 2010 at 1:15 PM, Ivan Miljenovic
It's important to switch from mod to rem. This can be done by a
simple abstract interpretation.
I'm nore sure if it's jhc or gcc that does this for jhc.
-- Lennart
On Sat, Mar 27, 2010 at 10:30 PM, Rafael Cunha de Almeida
almeida...@gmail.com wrote:
John Meacham wrote:
Here are jhc's
Does anything change if you swap the first two rhss?
On Sun, Mar 28, 2010 at 1:28 AM, Roman Leshchinskiy r...@cse.unsw.edu.au
wrote:
On 28/03/2010, at 09:47, Lennart Augustsson wrote:
It's important to switch from mod to rem. This can be done by a
simple abstract interpretation.
Also
What Don said.
2010/3/29 Don Stewart d...@galois.com:
gue.schmidt:
Hi all,
I notice that posts from the Haskell elders are pretty rare now. Only
every now and then we hear from them.
How come?
Because there is too much noise on this list, Günther
-- Don
Of course Haskell' should have an empty case. As soon as empty data
declarations are allowed then empty case must be allowed just by using
common sense.
On Tue, Mar 30, 2010 at 11:03 PM, Ashley Yakeley ash...@semantic.org wrote:
wagne...@seas.upenn.edu wrote:
I believe I was claiming that, in
The cost factor of Integer vs Int is far, far smaller than the factor
between computable reals vs Double.
On Thu, Apr 1, 2010 at 6:33 PM, Jens Blanck jens.bla...@gmail.com wrote:
Yes, the cost for computable reals will be an order of magnitude or possibly
two for well-behaved computations. For
Your question is actually deeper than some of the people answering you
seem to realize.
How does ghci decide what to do when you say
show []
?
The expression [] has type [a], which means it could be a list of any
type 'a', including Char.
Normally, when Haskell can't determine the type in this
For Bool, I'm not sure, but for, e.g., () it's certainly true.
Take this definition of ==
() == _ = True
Using case analysis of just the constructors, ignoring the value
bottom, you can easily prove symmetry.
But '() == undefined' terminates, whereas 'undefined == ()' does not.
Ignore bottom
There is no clean proof of that statement because it is false.
(Consider the argument 'undefined'.)
2010/5/23 R J rj248...@hotmail.com:
Given the following definition of either, from the prelude:
either :: (a - c, b - c) - Either a b - c
either (f, g) (Left x)
Actually, I didn't notice the typo. It's still not a true statement.
(h . either (f, g)) undefined /= (either (h . f, h . g)) undefined
Also, it's not exactly the function either from the Prelude.
-- Lennart
2010/5/23 R J rj248...@hotmail.com:
Correction: the theorem is
h . either
That's totally false. You don't evaluate 'undefined' before calling 'id'.
(Or if you, it's because you've made a transformation that is valid
because 'id' is strict.)
On Mon, May 24, 2010 at 9:05 AM, Alexander Solla a...@2piix.com wrote:
Yes, but only because it doesn't work at all. Consider
There are no interesting (i.e. total) functions of that type.
2010/5/25 Yitzchak Gale g...@sefer.org:
Günther Schmidt wrote:
http://www.hpaste.org/fastcgi/hpaste.fcgi/view?id=25694
in which I attempt to develop a currying combinator library.
I'm stuck at some point and would appreciate any
So what would you consider a proof that there are no total Haskell
functions of that type?
Or, using Curry-Howard, a proof that the corresponding logical formula
is unprovable in intuitionistic logic?
As I understand, in general this can only be proven using meta theory
rather than the logic
just consider cut free proofs there's usually infinitely many.)
On Fri, May 28, 2010 at 8:14 AM, wren ng thornton w...@freegeek.org wrote:
Lennart Augustsson wrote:
So what would you consider a proof that there are no total Haskell
functions of that type?
Or, using Curry-Howard, a proof
I would not use the continuation monad just for early exit. Sounds
like the error monad to me.
2010/6/10 Günther Schmidt gue.schm...@web.de:
Hi everyone,
I'm about to write a rather lengthy piece of IO code. Depending on the
results of some of the IO actions I'd like the computation to stop
Try to make Set an instance of Functor and you'll see why it isn't.
It's very annoying.
On Mon, Jul 26, 2010 at 11:55 PM, Gregory Crosswhite
gcr...@phys.washington.edu wrote:
Is there a specific reason why Set doesn't have instances for Functor
and Traversable? Or have they just not been
,
www.cs.kuleuven.be/~toms/Research/papers/constraint_families.pdf
On Tue, Jul 27, 2010 at 10:17 AM, o...@okmij.org wrote:
Lennart Augustsson wrote:
Try to make Set an instance of Functor and you'll see why it isn't.
It's very annoying.
And yet the very simple, and old solution works.
http
Sounds like cartesian product to me.
So you could try
combinations [] = [[]]
combinations (xs:xss) = liftM2 (:) xs (combinations xss)
-- Lennart
[EMAIL PROTECTED] wrote:
Hi,
I need a functions which takes as argument a list of lists like this one:
[[1,2],[3],[4]]
and gives me a list
On Jul 17, 2006, at 10:04 , Bulat Ziganshin wrote:
#!/usr/bin/env runhaskell
instead of
#!/usr/bin/runhaskell
at the start of Setup.hs file. Is that really better?
Yes, much better. I think it's crazy to have runhaskell installed
in /usr/bin. It should be somewhere in your path, but
There are two places where confusion could arise if you didn't have
the case distinction in Haskell: pattern matching (does a name refer
to a constructor or not) and type expressions (is it a type variable
or not).
In Haskell the distinction is made by case, but this is far from the
only
Even though I'm largely responsible for making CPP available in a
Haskell compiler I think it's an abomination. It should be avoided.
If we standardize it, people will use it even more. I think we
should discourage it instead, then looking at exactly what it's used
for and supplying sane
On Aug 17, 2006, at 17:11 , Brian Hulley wrote:
On Thursday, August 17, 2006 7:54 PM, Brian Smith wrote:
I want to have conditionals limited in their placement
to make things easier for refactoring tools. But, I
don't have any ideas about how to deal with
conditional exports without
On Aug 19, 2006, at 05:14 , Henk-Jan van Tuyl wrote:
[...]
*Iteration fromtoby 12 42 3 (flip (**) 0.33)
fromtoby 12 42 3 (**0.33)
And why approximate so much?
fromtoby 12 42 3 (** (1/3))
___
Haskell-Cafe mailing list
things that are more
tedious to write as primatives in other languages.. The only other
language that was as easy to get to this stage with was scheme.
Sorry for the ramble,
gene
On 8/19/06, Lennart Augustsson [EMAIL PROTECTED] wrote:
On Aug 19, 2006, at 05:14 , Henk-Jan van Tuyl wrote
to equal
equal_ = error Not enough operands on stack
-- Lennart
On Aug 21, 2006, at 04:42 , Gene A wrote:
Lennart and all,
On 8/19/06, Lennart Augustsson [EMAIL PROTECTED] wrote:
There are much better ways than storing strings on the stack.
Like using a data type
I like sigfpe's introduction to monads:
http://sigfpe.blogspot.com/2006/08/you-could-have-invented-monads-
and.html
-- Lennart
On Aug 26, 2006, at 14:04 , Andrea Rossato wrote:
Il Fri, Aug 25, 2006 at 01:13:58PM -0400, Cale Gibbard ebbe a
scrivere:
Hey cool, a new monad tutorial!
General Haskell constructs map really poorly to FPGAs.
You could define a subset that maps nicely, though. But as far as I
know noone has made such a compiler. It's a rather big undertaking.
You could look at Cryptol and Bluespec, they are languages with
similarities to Haskell better
Well, bind is extracting an 'a'. I clearly see a '\ a - ...'; it
getting an 'a' so it can give that to g. Granted, the extraction is
very convoluted, but it's there.
-- Lennart
On Sep 2, 2006, at 19:44 , Udo Stenzel wrote:
Benjamin Franksen wrote:
Sure. Your definition of bind
that extraction, and that's fine by
me. :)
-- Lennart
On Sep 3, 2006, at 12:32 , Daniel Fischer wrote:
Am Sonntag, 3. September 2006 15:39 schrieb Lennart Augustsson:
Well, bind is extracting an 'a'. I clearly see a '\ a - ...'; it
getting an 'a' so it can give that to g. Granted
Sonntag, 3. September 2006 15:39 schrieb Lennart Augustsson:
Well, bind is extracting an 'a'. I clearly see a '\ a - ...'; it
getting an 'a' so it can give that to g. Granted, the
extraction is
very convoluted, but it's there.
-- Lennart
But
instance Monad (Cont r) where
return
I'd like to see a mix of the two systems. Top level quantifiers
should be optional; they often don't improve readability.
-- Lennart
On Sep 4, 2006, at 04:21 , Janis Voigtlaender wrote:
[EMAIL PROTECTED] wrote:
G'day all.
Quoting Donald Bruce Stewart [EMAIL PROTECTED]:
Get some
1 - 100 of 583 matches
Mail list logo