Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download
Now! http://messenger.yahoo.com/download.php___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hello S.,
Wednesday, December 27, 2006, 2:24:00 AM, you wrote:
Having just done a major refactor of the HAppS HTTP API to make it
much much easier to use, I am now thinking about simplifying the
current boilerplate associated with XML serialization and state
deserialization.
are you
I'm looking at GHC's overlapping instances docs here:
http://web.mit.edu/ghc/www/users_guide/type-extensions.html#instance-decls
and I've ran into the incoherent instances problem.
Basically, I have a catch all instance that handles all types in a
generic manner using SYB introspection, and then
Steve Schafer wrote:
In my text/graphics formatting work, I find myself doing a lot of
pipeline processing, where a data structure will undergo a number of
step-by-step transformations from input to output. For example, I have a
function that looks like this (the names have been changed to
On 12/27/06, Paul Moore [EMAIL PROTECTED] wrote:
I'd like to print out a copy of the GHC manuals, for reference. I've
got the Haskell 98 report, and the GHC user guide, but the only
documentation I've found for the hierarchical libraries is in HTML
format (generated from Haddock).
Is there a
Hello Vyacheslav,
(returning to cafe)
Wednesday, December 27, 2006, 6:10:30 PM, you wrote:
Ah, so the moment something is passed through a polymorphic function
its type information is lost... This seems like a bug in the
specification/implementation, no? This is most certainly not the
On 12/27/06, Kirsten Chevalier [EMAIL PROTECTED] wrote:
(Personally I wouldn't find it at all
useful to have a printed copy of the library docs, even though I do
like printed manuals, because I only ever consult them to look up a
specific function or type, which is a lot easier to do in the
Hi Paul,
You're right - if I think about it, I'm not really looking for the
documentation, but more a paper or article which is a tour of the
GHC standard library.
A tour of the Prelude:
http://undergraduate.csse.uwa.edu.au/units/230.301/lectureNotes/tourofprelude.html
Only a few of the
Hello Paul,
Wednesday, December 27, 2006, 11:53:33 PM, you wrote:
You're right - if I think about it, I'm not really looking for the
documentation, but more a paper or article which is a tour of the
GHC standard library. That's something that would be really useful
i just read library
On 27/12/06, Neil Mitchell [EMAIL PROTECTED] wrote:
If someone wrote a tour of Data.List/Data.Maybe as well as a few
common functions out of Control.Monad that would probably make a nice
companion to a tour of the prelude.
Maybe:
Ok, I think I solved the problem. It actually simplified my design and
made it significantly cleaner and nicer :) I won't bore people with
the code/explanation here but I'll publish an article about it on
defmacro.
Actually what I was trying to do is described in the SYB 3 paper.
Thanks,
-
I'm trying to learn Haskell and translating some Lisp
functions as exercises.
How would I write a Haskell function named ALWAYS that
behaves like this:
one = always 1
bozo = always clown
map one [2,3,4,5,6]
[1,1,1,1,1]
one 62
1
map bozo [2,3,4,5,6]
[clown,clown ,clown, clown, clown]
bozo
I'm trying to learn Haskell and translating some Lisp
functions as exercises.
How would I write a Haskell function named ALWAYS that
behaves like this:
one = always 1
bozo = always clown
map one [2,3,4,5,6]
[1,1,1,1,1]
one 62
1
map bozo [2,3,4,5,6]
[clown,clown ,clown, clown, clown]
nowgate:
I'm trying to learn Haskell and translating some Lisp
functions as exercises.
How would I write a Haskell function named ALWAYS that
behaves like this:
one = always 1
bozo = always clown
map one [2,3,4,5,6]
[1,1,1,1,1]
one 62
1
map bozo [2,3,4,5,6]
[clown,clown
This is what I've been trying:
always :: (a - a) - a - a
always x = (\y - x)
Your function implementation is correct, but the type is wrong. Try
this:
always :: a - b - a
Or, just use the function const, from the Prelude. :-)
The type system can be very handy when learning Haskell. If you
Thanks! I figured I was close.
Didn't even know const was available.
I put together a compliment functions earlier
complement :: (a - Bool) - a - Bool
complement p x = not (p x)
By the signature, the first argument is a function
(predicate) which when given a value returns a Bool?
And the
Thanks Brian. I think these signatures are starting to
make sense. And I didn't know _ (don't care) could
be used like that. I'm liking Haskell more and more.
Michael
--- Bryan Burgers [EMAIL PROTECTED] wrote:
I'm trying to learn Haskell and translating some
Lisp
functions as exercises.
nowgate:
Thanks! I figured I was close.
Didn't even know const was available.
I put together a compliment functions earlier
complement :: (a - Bool) - a - Bool
complement p x = not (p x)
By the signature, the first argument is a function
(predicate) which when given a value returns
Hi Donald,
I think you misunderstood what I was asking. There's
not two cases. Maybe I'm not saying it sufficiently
well but the function ALWAYS just returns a function
that always returns the original argument to ALWAYS no
matter what else you give the resulting function.
when one is define as
nowgate:
Hi Donald,
I think you misunderstood what I was asking. There's
not two cases. Maybe I'm not saying it sufficiently
well but the function ALWAYS just returns a function
that always returns the original argument to ALWAYS no
matter what else you give the resulting function.
when
Steve Schafer wrote:
In my text/graphics formatting work, I find myself doing a lot of
pipeline processing, where a data structure will undergo a number of
step-by-step transformations from input to output. For example, I
have a function that looks like this (the names have been changed to
On Dec 27, 2006, at 22:55 , michael rice wrote:
By similar reasoning the always function would seem to
have a signature
a - (b - a)
where the first argument is just a value and the
return value is a function that when given a possibly
different value just returns the value originally
given
complement :: (a - Bool) - a - Bool
complement p x = not (p x)
By the signature, the first argument is a function
(predicate) which when given a value returns a Bool?
And the second argument is just a value? And the
function returns a Bool?
Indeed. In the type expression, the lower-case
23 matches
Mail list logo