Re: [Haskell-cafe] type families and type signatures

2008-04-08 Thread Martin Sulzmann
Manuel said earlier that the source of the problem here is foo's ambiguous type signature (I'm switching back to the original, simplified example). Type checking with ambiguous type signatures is hard because the type checker has to guess types and this guessing step may lead to too many (ambigu

Re: [Haskell-cafe] type families and type signatures

2008-04-08 Thread Ganesh Sittampalam
On Wed, 9 Apr 2008, Manuel M T Chakravarty wrote: Sittampalam, Ganesh: No, I meant can't it derive that equality when matching (Id a) against (Id b)? As you say, it can't derive (a ~ b) at that point, but (Id a ~ Id b) is known, surely? No, it is not know. Why do you think it is? Well,

Re: [Haskell-cafe] translating from fundeps into type families

2008-04-08 Thread Manuel M T Chakravarty
Chaddaï Fouché: 2008/4/8, Manuel M T Chakravarty <[EMAIL PROTECTED]>: You need to write the instance as instance (b ~ TheFoo a, Foo a) => Bar (Either a b) where bar (Left a) = foo' a bar (Right b) = foo' (foo b :: a) If you do that, the program compile, but res still raise a panic in

Re: [Haskell-cafe] deriving

2008-04-08 Thread Jonathan Cast
On 8 Apr 2008, at 7:06 PM, Dan Weston wrote: Richard A. O'Keefe wrote: On 8 Apr 2008, at 7:15 am, Dan Weston wrote: [1] Yes, I know that "conciseness" is the much more common and accepted word for this, but if we can say "precision", "decision", and "incision", then it seems foolish to not

Re: [Haskell-cafe] type families and type signatures

2008-04-08 Thread Manuel M T Chakravarty
Sittampalam, Ganesh: Manuel Chakravarty wrote: Ganesh Sittampalam: On Mon, 7 Apr 2008, Manuel M T Chakravarty wrote: Ganesh Sittampalam: The following program doesn't compile in latest GHC HEAD, although it does if I remove the signature on foo'. Is this expected? Yes, unfortunately, this

Re: [Haskell-cafe] deriving

2008-04-08 Thread Dan Weston
Richard A. O'Keefe wrote: On 8 Apr 2008, at 7:15 am, Dan Weston wrote: [1] Yes, I know that "conciseness" is the much more common and accepted word for this, but if we can say "precision", "decision", and "incision", then it seems foolish to not also use "concision". I will henceforth take on

Re: [Haskell-cafe] deriving

2008-04-08 Thread Richard A. O'Keefe
On 8 Apr 2008, at 7:15 am, Dan Weston wrote: [1] Yes, I know that "conciseness" is the much more common and accepted word for this, but if we can say "precision", "decision", and "incision", then it seems foolish to not also use "concision". I will henceforth take on this quixotic quest to p

[Haskell-cafe] ANN: graphics-drawingcombinators 0.1

2008-04-08 Thread Luke Palmer
graphics-drawingcombinators 0.1 has just been uploaded to hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/graphics-drawingcombinators-0.1 Have you ever tried to write a simple 2D interface or game but found: * wxHaskell and gtk2hs are hard to install and learn * SDL does

Re: [Haskell-cafe] ANN: Hayoo! beta 0.1

2008-04-08 Thread Steve Lihn
Bug report: I am using IE6. The "Powered by" bar at the bottom does not reposition as I scroll down. So there is a small portion on the page always masked by the "Powered by" bar. Nice work. Great google-like speed... Steve On 4/8/08, Timo B. Hübel <[EMAIL PROTECTED]> wrote: > > Hello, > > than

Re: [Haskell-cafe] problems building hpodder

2008-04-08 Thread gwern0
On 2008.04.08 15:19:12 -0500, John Goerzen <[EMAIL PROTECTED]> scribbled 1.1K characters: > On Mon April 7 2008 9:31:04 pm [EMAIL PROTECTED] wrote: > > > > Well, changing the deps at least would be a good idea. > > Right. I've uploaded a new version of hpodder to hackage that will require > the c

Re: [Haskell-cafe] ANN: Hayoo! beta 0.1

2008-04-08 Thread Timo B. Hübel
Hello, thanks for all the feedback so far! We have just deployed some minor updates for Hayoo!, mainly improving the ranking mechanism. It should now prefer modules from the Prelude as well as functions exactly matching the query terms. Additionally, we have started a blog about Hayoo! and Hol

Re: [Haskell-cafe] What's the difference?

2008-04-08 Thread Dan Weston
Yes, sorry I should have read the post more carefully. I was talking specifically the use of => in class declarations, and this is a good example of how inconsistent the notation seems to me. It is in the class declaration that the arrow is backwards. (I imagine this decision was more syntacti

Re: [Haskell-cafe] What's the difference?

2008-04-08 Thread Krzysztof Skrzętnicki
On Tue, Apr 8, 2008 at 11:05 PM, PR Stanley <[EMAIL PROTECTED]> wrote: > > > > > > > What is the difference between > > > > > >data T0 f a = MkT0 a > > >instance Eq (T0 f a) where ... > > > > > >and > > > > > >data T0 f a = MkT0 a > > >instance Eq a => Eq (T0 f a) where ...

Re: [Haskell-cafe] What's the difference?

2008-04-08 Thread PR Stanley
What is the difference between data T0 f a = MkT0 a instance Eq (T0 f a) where ... and data T0 f a = MkT0 a instance Eq a => Eq (T0 f a) where ... The second one says that "TO f a" is only an instance of "Eq" if "a" is, while the first says that "TO f a" is an instanc

Re: [Haskell-cafe] problems building hpodder

2008-04-08 Thread Karl Hasselström
On 2008-04-07 18:57:39 -0400, [EMAIL PROTECTED] wrote: > So almost certainly the issue is that HaXml has updated and changed > things around in a way that broke Hpodder; not surprising, since > HaXml-1.19.2 is as recent as 14 January 2008, and Goerzen may simply > not have updated and discovered t

Re: [Haskell-cafe] problems building hpodder

2008-04-08 Thread John Goerzen
On Tue April 8 2008 3:21:34 pm Karl Hasselström wrote: > http://www.haskell.org/haskellwiki/Package_versioning_policy seems to > have something relevant to say. build-depends: HaXml >= 1.13.3 && < > 1.14 ought to do the trick, since any changes in the published > interface are supposed to be accom

[Haskell-cafe] Re: HXT 7.4/7.5 leaking TCP connections

2008-04-08 Thread Daniel McAllansmith
Hello all. On Wed, 09 Apr 2008 05:36:40 Paul Brown wrote: > Hi, Bjorn and Uwe -- > > > > this is a known problem with HTTP package (version 3001.0.4). > > > Paul Brown has described this somewere in his blog. > > > (http://mult.ifario.us/t/haskell), but my firefox only shows > > > an incom

Re: [Haskell-cafe] problems building hpodder

2008-04-08 Thread Karl Hasselström
On 2008-04-07 20:20:24 -0500, John Goerzen wrote: > On Monday 07 April 2008 5:57:39 pm [EMAIL PROTECTED] wrote: > > > So almost certainly the issue is that HaXml has updated and > > changed things around in a way that broke Hpodder; not surprising, > > since HaXml-1.19.2 is as recent as 14 January

Re: [Haskell-cafe] testing for same characters in lists of strings

2008-04-08 Thread Henning Thielemann
On Tue, 8 Apr 2008, Jackm139 wrote: Thanks for all the replies! I have it working somewhat. It works as long as there is only one string in each list, but if the lists contain more than one string it fails. here is what I have: import List same :: [[Char]] -> [[Char]] -> Bool same [xs] [ys

Re: [Haskell-cafe] ANN: Hayoo! beta 0.1

2008-04-08 Thread Timo B. Hübel
> However, I have found two bugs, or annoyances: > Using Opera 9.27 or Internet Explorer 7, > - Search results vanish when using the "back" button Yes, that is a known problem. Although I have no good idea how to solve this while keeping the AJAX stuff (that is, find as you type). > - the "Sourc

Re: [Haskell-cafe] Function Precedence

2008-04-08 Thread Hans Aberg
On 2 Apr 2008, at 16:20, Loup Vaillant wrote: class AdditiveSemiMonoid a where (+) :: a -> a -> a Err, why *semi* monoid? Plain "monoid" would not be accurate? I found an example where it is crucial that the monoid has a unit: When given a monoid m, then one can also define an m-algebra, b

Re: [Haskell-cafe] What's the difference?

2008-04-08 Thread Joachim Breitner
Hi, Am Dienstag, den 08.04.2008, 11:51 -0700 schrieb Dan Weston: > Paul Johnson wrote: > > You can regard an "instance" declaration as an inference rule for the > > type checker, with "=>" meaning "implies" (though I don't think its the > > answer to your other question about names). > > "implie

Re: [Haskell-cafe] What's the difference?

2008-04-08 Thread Dan Weston
Paul Johnson wrote: You can regard an "instance" declaration as an inference rule for the type checker, with "=>" meaning "implies" (though I don't think its the answer to your other question about names). "implies" might be a bad word, because the direction is backwards: Eq a => Ord a is cl

Re: [Haskell-cafe] testing for same characters in lists of strings

2008-04-08 Thread Justin Bailey
On Tue, Apr 8, 2008 at 10:24 AM, Jackm139 <[EMAIL PROTECTED]> wrote: > import List > > same :: [[Char]] -> [[Char]] -> Bool > same [xs] [ys] = map (normalize) [[xs]] == map (normalize) [[ys]] > > normalize :: [String] -> [String] > normalize [xs] = [(sort (nub xs))] > Your pattern binding [xs

[Haskell-cafe] Re: [darcs-devel] announcing the darcs 2.0.0 release

2008-04-08 Thread zooko
Hooray for the release of darcs-2! Way to go, David! Regards, Zooko ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: HXT 7.4/7.5 leaking TCP connections

2008-04-08 Thread Paul Brown
Hi, Bjorn and Uwe -- > > this is a known problem with HTTP package (version 3001.0.4). > > Paul Brown has described this somewere in his blog. > > (http://mult.ifario.us/t/haskell), but my firefox only shows > > an incomplete page of this blog, the solution is missing. > > Paul promissed

Re: [Haskell-cafe] testing for same characters in lists of strings

2008-04-08 Thread Jackm139
Thanks for all the replies! I have it working somewhat. It works as long as there is only one string in each list, but if the lists contain more than one string it fails. here is what I have: import List same :: [[Char]] -> [[Char]] -> Bool same [xs] [ys] = map (normalize) [[xs]] == map (norma

Re: [Haskell-cafe] What's the difference?

2008-04-08 Thread Paul Johnson
PR Stanley wrote: Hi What is the difference between data T0 f a = MkT0 a instance Eq (T0 f a) where ... and data T0 f a = MkT0 a instance Eq a => Eq (T0 f a) where ... The second one says that "TO f a" is only an instance of "Eq" if "a" is, while the first says that "

[Haskell-cafe] What's the difference?

2008-04-08 Thread PR Stanley
Hi What is the difference between data T0 f a = MkT0 a instance Eq (T0 f a) where ... and data T0 f a = MkT0 a instance Eq a => Eq (T0 f a) where ... I've only seen the "=>" operator used for declaring extended classes but never with class insta

Re: [Haskell-cafe] Problem building HXT

2008-04-08 Thread ln
Neil Mitchell schrieb: > Hi > > >> You got it right. The issue is that in TagSoup.hs there is a line like >> 'parseTagsOptions (options { foo =...}'. That's invalid syntax AFAIK; >> > > It's just record syntax, which is very handy. > > >> more importantly, it's using functions from ndm

Re: [Haskell-cafe] Re: deriving

2008-04-08 Thread Hans Aberg
On 8 Apr 2008, at 17:03, Christian Maeder wrote: "deriving Eq" i.e. following "data List a = List a" creates an instance like: instance Eq a => Eq (List a) where The problem was discussed for Stand-alone deriving declarations: http://www.haskell.org/ghc/docs/latest/html/users_guide/derivin

Re: [Haskell-cafe] deriving

2008-04-08 Thread Hans Aberg
On 8 Apr 2008, at 16:57, Anton van Straaten wrote: So what is the difference from the current state? None. See how efficient a solution it is? ;) So for a change, you propose it should be the same. So you are one of those A-programmers :-). Seriously, there's only so much connotational

[Haskell-cafe] Re: deriving

2008-04-08 Thread Christian Maeder
Anton van Straaten wrote: > How about making "deriving x" an expression which means: > > instance x where "deriving Eq" i.e. following "data List a = List a" creates an instance like: instance Eq a => Eq (List a) where The problem was discussed for Stand-alone deriving declarations: http:

Re: [Haskell-cafe] deriving

2008-04-08 Thread Anton van Straaten
Hans Aberg wrote: On 8 Apr 2008, at 16:32, Anton van Straaten wrote: There are two processes here: deriving, i.e., inheriting an interface; and instantiating, i.e., producing running code. Haskell denotes derivation by "=>". And "data deriving (b_1, ..., b_k)" is really a short for data

Re: [Haskell-cafe] deriving

2008-04-08 Thread Hans Aberg
On 8 Apr 2008, at 16:32, Anton van Straaten wrote: There are two processes here: deriving, i.e., inheriting an interface; and instantiating, i.e., producing running code. Haskell denotes derivation by "=>". And "data deriving (b_1, ..., b_k)" is really a short for data instance b_1 wh

[Haskell-cafe] Re: announcing the darcs 2.0.0 release

2008-04-08 Thread Simon Michael
David, thank you for the last push, and clear re-org! And thanks to all darcs 2 contributors. -Simon ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] deriving

2008-04-08 Thread Anton van Straaten
Hans Aberg wrote: There are two processes here: deriving, i.e., inheriting an interface; and instantiating, i.e., producing running code. Haskell denotes derivation by "=>". And "data deriving (b_1, ..., b_k)" is really a short for data instance b_1 where ... instance b_k where So

Re: [Haskell-cafe] Parsec expressions with alphaNum operators

2008-04-08 Thread Chris Casinghino
On Tue, Apr 8, 2008 at 4:46 AM, Paul Keir <[EMAIL PROTECTED]> wrote: > I have noticed something interesting though. If I simply omit the "a" > from "opLetter", the problem is gone. In fact, leaving "opStart", > "opLetter", and "reservedOpNames" all empty works fine too. That makes sense. opLet

Re: Re[4]: [Haskell-cafe] deriving

2008-04-08 Thread Hans Aberg
On 8 Apr 2008, at 15:26, PR Stanley wrote: I'm sure you could introduce change gradually without too much pain. So then you only have to get the compilers to gradually understand it :-). I personally think "deriving" is a descriptive term, now that I understand its role better. There ar

RE: [Haskell-cafe] Re: Type Families: infinite compile process?

2008-04-08 Thread Simon Peyton-Jones
You might find it helpful to read our new paper: Type checking with open type functions http://research.microsoft.com/%7Esimonpj/papers/assoc-types/index.htm From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hugo Pacheco Sent: 07 April 2008 22:47 To: Haskell Cafe Subject: [Haskell-

Re[4]: [Haskell-cafe] deriving

2008-04-08 Thread PR Stanley
Hello Hans, Tuesday, April 8, 2008, 12:17:38 PM, you wrote: > "deriving" which I think is not used elsewhere. It will break a lot > of code, but it is easy to change, and also easy to make a > compatibility mode. it's also easy to replace all the books, update all code repositories and reteac

[Haskell-cafe] Haskell IDE: Someone else interested in enhancing Shim ? / How to contact author Benedikt Schmidt ?

2008-04-08 Thread Marc Weber
Hi, I've added some features to shim. You can get my patches here: http://mawercer.de/~publicrepos/shim/ The Vim interface now supports :GrepScope regex Which greps the whole scope of all used packages by regex. Very useful to find all functions taking/ returning some type

[Haskell-cafe] Re: HXT 7.4/7.5 leaking TCP connections

2008-04-08 Thread Uwe Schmidt
Daniel McAllansmith wrote: > I'm having some problems with connections leaking when using 7.4.  I've > just checked and it happens with 7.5 off of hackage as well. > > It appears that readDocument doesn't close the connection when using the > haskell http library, it works ok when curl is used tho

Re: [Haskell-cafe] Problem building HXT

2008-04-08 Thread Uwe Schmidt
ln wrote: > I would like to try HXT, but I can't manage to build it. I resolved all > > the dependencies, but I get the following error: > > > [EMAIL PROTECTED]:~/Desktop/hxt$ make all > > > make -C src all VERSION=7.5 > > > make[1]: Entering directory `/home/ln/Desktop/hxt/src' > > > make in

[Haskell-cafe] ANN: The Monad.Reader Issue 10

2008-04-08 Thread Wouter Swierstra
I am pleased to announce that a new issue of The Monad.Reader is now available: http://www.haskell.org/haskellwiki/The_Monad.Reader Issue 10 consists of the following two articles: * Bernie Pope Step inside the GHCi debugger * Matthew Naylor Evaluating Haskell in Haskel

Re: [Haskell-cafe] announcing the darcs 2.0.0 release

2008-04-08 Thread Iain Lane
On Mon, Apr 07, 2008 at 10:22:25AM -0700, David Roundy wrote: > Hello darcs users, > > I am pleased to announce the release of darcs 2.0.0! It's been a long time > coming, and hopefully you will be pleased with the result. Notable new > features include (in no particular order): > Hello, Congr

Re: [Haskell-cafe] translating from fundeps into type families

2008-04-08 Thread Chaddaï Fouché
2008/4/8, Manuel M T Chakravarty <[EMAIL PROTECTED]>: > You need to write the instance as > > instance (b ~ TheFoo a, Foo a) => Bar (Either a b) where > bar (Left a) = foo' a > bar (Right b) = foo' (foo b :: a) > If you do that, the program compile, but res still raise a panic in GHC6.8

Re: Re[4]: [Haskell-cafe] deriving

2008-04-08 Thread Hans Aberg
On 8 Apr 2008, at 10:47, Bulat Ziganshin wrote: "deriving" which I think is not used elsewhere. It will break a lot of code, but it is easy to change, and also easy to make a compatibility mode. it's also easy to replace all the books, update all code repositories and reteach all the programmer

[Haskell-cafe] instance Monad m => Functor m

2008-04-08 Thread Hans Aberg
Using 'hugs -98', I noticed it accepts: instance Monad m => Functor m where fmap f x = x >>= return.f Has this been considered (say) as a part of the upcoming Haskell Prime? Hans Aberg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org ht

Re: [Haskell-cafe] Re: type families and type signatures

2008-04-08 Thread Martin Sulzmann
The point is that Mark proposes a *pessimistic* ambiguity check whereas Tom (as well as GHC) favors an *optimistic* ambiguity check. By pessimistic I mean that we immediately reject a program/type if there's a potential unambiguity. For example, class Foo a b forall a b. Foo a b => b -> b

Re[4]: [Haskell-cafe] deriving

2008-04-08 Thread Bulat Ziganshin
Hello Hans, Tuesday, April 8, 2008, 12:17:38 PM, you wrote: > "deriving" which I think is not used elsewhere. It will break a lot > of code, but it is easy to change, and also easy to make a > compatibility mode. it's also easy to replace all the books, update all code repositories and reteach

RE: [Haskell-cafe] Parsec expressions with alphaNum operators

2008-04-08 Thread Paul Keir
Thanks Chris, When I looked at the Fortran alphaNum operators (.and. .or. etc.) I had hoped that supplying Parsec's "opStart" with a dot would have been hitting the nail on the head. Oh well. I have noticed something interesting though. If I simply omit the "a" from "opLetter", the problem is gon

Re: Re[2]: [Haskell-cafe] deriving

2008-04-08 Thread Hans Aberg
On 8 Apr 2008, at 00:30, Bulat Ziganshin wrote: At least Hugs complains if one does not indent "deriving ...", but I do not know what the standard says. If is required, then it can be changed. deriving is a part of data clause and indentation just allows us to continue clause from prev. line. i

Re: [Haskell-cafe] Quick check?

2008-04-08 Thread Ketil Malde
"Galchin, Vasili" <[EMAIL PROTECTED]> writes: > What are some examples of libraries in HackageDB that use either Quick > Check (pure side) or Monad testing? Is there a way to use "darcs" to answer my > question? I used the ByteString library as a guideline when developing testing (and to a

Re: [Haskell-cafe] Problem building HXT

2008-04-08 Thread Neil Mitchell
Hi > You got it right. The issue is that in TagSoup.hs there is a line like > 'parseTagsOptions (options { foo =...}'. That's invalid syntax AFAIK; It's just record syntax, which is very handy. > more importantly, it's using functions from ndm's TagSoup library. TagSoup, > with version 0.5, r

Re: [Haskell-cafe] Re: type families and type signatures

2008-04-08 Thread Tom Schrijvers
Hi Tom, It seems we are thinking of different things. I was referring to the characterization of a type of the form P => t as being "ambiguous" if there is a type variable in P that is not determined by the variables in t; this condition is used in Haskell to establish coherence (i.e., to show t

[Haskell-cafe] Quick check?

2008-04-08 Thread Galchin, Vasili
Hello, What are some examples of libraries in HackageDB that use either Quick Check (pure side) or Monad testing? Is there a way to use "darcs" to answer my question? Thanks, vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.

RE: [Haskell-cafe] type families and type signatures

2008-04-08 Thread Sittampalam, Ganesh
Manuel Chakravarty wrote: >Ganesh Sittampalam: >> On Mon, 7 Apr 2008, Manuel M T Chakravarty wrote: >> >>> Ganesh Sittampalam: The following program doesn't compile in latest GHC HEAD, although it does if I remove the signature on foo'. Is this expected? >>> >>> Yes, unfortunately, this

Re: [Haskell-cafe] type families and type signatures

2008-04-08 Thread Manuel M T Chakravarty
Ganesh Sittampalam: On Mon, 7 Apr 2008, Manuel M T Chakravarty wrote: Ganesh Sittampalam: The following program doesn't compile in latest GHC HEAD, although it does if I remove the signature on foo'. Is this expected? Yes, unfortunately, this is expected, although it is very unintuitive.