Hi,
Error messages from GHC contain inferred type variables, is there
anyway to find out which term an inferred type variable is for(if the
term exists)?
Thanks,
Shiqi
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Tim Newsham wrote:
I'm goofing with TH and I have my program mostly done:
http://hpaste.org/10713
If I have the $(deriveBinary ''MyData) line commented out it
prints out what looks to me like correct code. I can even paste
it into a program and it compiles.
Pasting the text output can
Josef Svenningsson wrote:
Stephan Friedrichs wrote:
My question is: Is there a case, where finding a persistent
solution that performs equally well is *impossible* rather than just
harder? I mean might there be a case where (forced) persistence (as we
have in pure Haskell) is a definite
Wolfgang Jeltsch wrote:
Am Freitag, 26. September 2008 09:24 schrieb Magnus Therning:
Recently I received an email with a question regarding the licensing
of a module I've written and uploaded to Hackage. I released it under
LGPL. The sender wondered if I would consider re-licensing the
Hello Magnus,
Saturday, September 27, 2008, 3:48:27 PM, you wrote:
AFAIU you are saying that the linker is reaching into the module's .a
file, pulling out the .o file, and then reaching into that .o file to
pull out an individual function's ASM code. I believe that's a bit more
than regular
On 25 Sep 2008, at 06:11, Matthew Eastman wrote:
Hey guys,
This is probably more of a question about functional programming
than it is about Haskell, but hopefully you can help me out. I'm new
to thinking about things in a functional way so I'm not sure what
the best way to do some
David Menendez wrote:
I wouldn't say that. It's important to remember that Haskell class
Monad does not, and can not, represent *all* monads, only (strong)
monads built on a functor from the category of Haskell types and
functions to itself.
Data.Set is a functor from the category of Haskell
Matthew Brecknell wrote:
Matthew Eastman said:
i.e. popping Blue in [Red, Red, Blue, Red, Blue] would give [Red,
Red,
Blue]
Hmm, did you mean [Red,Blue] or [Red,Red,Red,Blue]? Judging by your
implementation of remUseless, I'm guessing the latter.
Yes, I meant the latter. Popping Blue in
Thomas Davie wrote:
In this interprettation, here's what I think is an O(1)
implementation:
...
rbPop :: Colour - RBStack a - RBStack a
rbPop c Empty = error Empty Stack, can't pop
rbPop c (More c' v asCs nextNonC)
| c == c' = asCs
| otherwise = rbPop c nextNonC
...
Your pop doesn't
Magnus Therning wrote:
Wolfgang Jeltsch wrote:
Am Freitag, 26. September 2008 09:24 schrieb Magnus Therning:
Recently I received an email with a question regarding the licensing
of a module I've written and uploaded to Hackage. I released it under
LGPL. The sender wondered if I would
On 2008 Sep 27, at 9:24, Andrew Coppin wrote:
David Menendez wrote:
I wouldn't say that. It's important to remember that Haskell class
Monad does not, and can not, represent *all* monads, only (strong)
monads built on a functor from the category of Haskell types and
functions to itself.
On 2008 Sep 27, at 11:59, Simon Marlow wrote:
Magnus Therning wrote:
Wolfgang Jeltsch wrote:
Am Freitag, 26. September 2008 09:24 schrieb Magnus Therning:
Recently I received an email with a question regarding the
licensing
of a module I've written and uploaded to Hackage. I released it
On 2008 Sep 27, at 12:41, Andrew Coppin wrote:
I'm not sure how that qualifies set as not really a true monad
anyway - but then, I don't know what a monad is, originally. I only
know what it means in Haskell.
I think you read him backwards: Map and Set are category-theory
(true) monads,
Brandon S. Allbery KF8NH wrote:
On 2008 Sep 27, at 12:41, Andrew Coppin wrote:
I'm not sure how that qualifies set as not really a true monad
anyway - but then, I don't know what a monad is, originally. I only
know what it means in Haskell.
I think you read him backwards: Map and Set are
Albert Y. C. Lai wrote:
Andrew Coppin wrote:
If I understand this correctly, to solve this problem you need either
Functional Dependencies or Associated Types. Is that correct?
A motivating example in papers on FD is exactly typeclasses for
containers. Okasaki puts this into practice in the
On Sat, Sep 27, 2008 at 12:23 PM, Andrew Coppin
[EMAIL PROTECTED] wrote:
Can anybody actually demonstrate concretely how FDs and/or ATs would solve
this problem? (I.e., enable you to write a class that any container can be a
member of, despite constraints on the element types.)
Sure! Using
Le 27 sept. 08 à 15:24, Andrew Coppin a écrit :
David Menendez wrote:
I wouldn't say that. It's important to remember that Haskell class
Monad does not, and can not, represent *all* monads, only (strong)
monads built on a functor from the category of Haskell types and
functions to itself.
Hello Andrew,
Saturday, September 27, 2008, 9:23:47 PM, you wrote:
Can anybody actually demonstrate concretely how FDs and/or ATs would
solve this problem? (I.e., enable you to write a class that any
container can be a member of, despite constraints on the element types.)
you may find
Thomas Davie wrote:
Matthew Eastman wrote:
The part of the assignment I'm working on is to implement a
RedBlueStack, a stack where you can push items in as either Red or
Blue. You can pop Red and Blue items individually, but the stack has
to keep track of the overall order of items.
i.e.
Antoine Latter wrote:
Sure! Using type-families:
class Container c where
type Elem c
insert :: Elem c - c - c
instance Container [a] where
type Elem [a] = a
insert = (:)
instance Container ByteString where
type Elem ByteString = Word8
insert =
Bulat Ziganshin wrote:
Hello Andrew,
Saturday, September 27, 2008, 9:23:47 PM, you wrote:
Can anybody actually demonstrate concretely how FDs and/or ATs would
solve this problem? (I.e., enable you to write a class that any
container can be a member of, despite constraints on the element
On 27 Sep 2008, at 20:16, apfelmus wrote:
Thomas Davie wrote:
Matthew Eastman wrote:
The part of the assignment I'm working on is to implement a
RedBlueStack, a stack where you can push items in as either Red or
Blue. You can pop Red and Blue items individually, but the stack has
to keep
Here's some TH code for automatically deriving Data.Binary
and Control.Parallel.Strategies.NFData instances:
http://www.thenewsh.com/~newsham/store/DeriveBinary.hs
Tim Newsham
http://www.thenewsh.com/~newsham/
___
Haskell-Cafe mailing list
Malcolm.Wallace:
Guerilla videos of the Haskell Symposium 2008 presentations. Enjoy.
Now on haskell.org,
http://haskell.org/haskellwiki/Video_presentations/Haskell_Symposium_2008
Great work Malcolm!!
___
Haskell-Cafe mailing list
Taking this to haskell-cafe..
http://joyful.com/repos/darcs-sm/api-doc is a mashup of haddock, hoogle
and hscolour (and darcsweb, darcs-graph - see http://joyful.com/repos).
It's rough but quite useful - a few minutes here gave me a much better
understanding of the big picture of darcs code. By
I'm not actually bothered about every possible monad being representable
as such in Haskell. I'd just like Set to work. ;-)
What would work mean in this case? I see two different meanings:
1. Use monadic operations (mapM, guard) on Sets.
How would you decide which operations are allowed and
I'm a haskell beginner so the following code might not meet haskell
coding standards. I think that it is a correct O(1) implementation.
Sorry if i simply recoded an already posted solution that i did not
understand correctly.
--- code -
module Main where
data Col a
= Red a
| Blue a
Here's some TH code for automatically deriving Data.Binary
and Control.Parallel.Strategies.NFData instances:
http://www.thenewsh.com/~newsham/store/DeriveBinary.hs
Saizan pointed me to:
http://www-users.cs.york.ac.uk/~ndm/derive/
which does most of what DeriveBinary.hs does (and lots
28 matches
Mail list logo