Re: [Haskell-cafe] Re: Hackage on Linux

2010-08-28 Thread Andrew Coppin
Erik de Castro Lopo wrote: Andrew Coppin wrote: Windows has more package management facilities than most people realise. For example, go install Office 2007. In fact, just install Excel 2007, not the whole thing. Windows Installer can automatically figure out that you *do* need to

[Haskell-cafe] (automatic) type classes context inference

2010-08-28 Thread João Paulo
Hello everyone, I am developing a toolset in which I have several (multiparameter) type classes; It is often the case that I can only define a data-type X as an instance of one such class (say A), if X is an instance of another class (say B); The thing is that, while it is hard for

Re: [Haskell-cafe] type classes and logic

2010-08-28 Thread Patrick Browne
Daniel Fischer wrote: class BEING human = HUMAN human where Sub-classing is logical implication BEING(human) = HUMAN(human) All types t that make BEING(t) = true also make HUMAN(t)=true No, it's the other way round. Every HUMAN is also a BEING, hence HUMAN(t) = BEING(t) Could I say

[Haskell-cafe] multi-line strings (Was: Hackage on Linux)

2010-08-28 Thread Joachim Breitner
Hi, Am Samstag, den 28.08.2010, 08:18 +1000 schrieb Ivan Lazar Miljenovic: On 28 August 2010 00:02, Felipe Lessa felipe.le...@gmail.com wrote: On 8/27/10, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Admittedly, Haskell has no multi-line String support which would make defining

Re: [Haskell-cafe] multi-line strings (Was: Hackage on Linux)

2010-08-28 Thread Ivan Lazar Miljenovic
On 28 August 2010 20:55, Joachim Breitner m...@joachim-breitner.de wrote: Hi, Am Samstag, den 28.08.2010, 08:18 +1000 schrieb Ivan Lazar Miljenovic: On 28 August 2010 00:02, Felipe Lessa felipe.le...@gmail.com wrote: On 8/27/10, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote:

Re: [Haskell-cafe] multi-line strings (Was: Hackage on Linux)

2010-08-28 Thread Joachim Breitner
Hi, Am Samstag, den 28.08.2010, 21:11 +1000 schrieb Ivan Lazar Miljenovic: A similar problem is solved by http://github.com/jgm/hsb2hs which might be useful if you need to embed larger pieces of text. Huh, very nice; thanks for the link. Unfortunately, it doesn't look like John has

[Haskell-cafe] Re: Haddock: Documentation of instances with un-documentable type arguments

2010-08-28 Thread Johannes Waldmann
Perhaps Haddock could exclude class instance reporting when it cannot find a documentable link to a parameter? The cannot find documentable link problem also comes up in situations like this (that don't involve type classes): module Ex ( foo ) where data Secret = Secret foo = Secret

Re: [Haskell-cafe] multi-line strings (Was: Hackage on Linux)

2010-08-28 Thread Ivan Lazar Miljenovic
On 28 August 2010 21:33, Joachim Breitner m...@joachim-breitner.de wrote: Hi, Am Samstag, den 28.08.2010, 21:11 +1000 schrieb Ivan Lazar Miljenovic: A similar problem is solved by http://github.com/jgm/hsb2hs which might be useful if you need to embed larger pieces of text. Huh, very

Re: [Haskell-cafe] Re: Haddock: Documentation of instances with un-documentable type arguments

2010-08-28 Thread Ivan Lazar Miljenovic
On 28 August 2010 21:33, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: Perhaps Haddock could exclude class instance reporting when it cannot find a documentable link to a parameter? The cannot find documentable link problem also comes up in situations like this (that don't

[Haskell-cafe] Re: Haddock: Documentation of instances with un-documentable type arguments

2010-08-28 Thread Johannes Waldmann
in terms of how you could use it, that would be equivalent to also exporting Secret [...] well, expect that you cannot use the type's name in signatures, so you'd have to rely on type inference. Out of curiosity I just checked javadoc's behaviour on public class Ex { public interface

Re: [Haskell-cafe] Re: Haddock: Documentation of instances with un-documentable type arguments

2010-08-28 Thread Gábor Lehel
On Sat, Aug 28, 2010 at 1:41 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 28 August 2010 21:33, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: Perhaps Haddock could exclude class instance reporting when it cannot find a documentable link to a parameter? The

Re: [Haskell-cafe] Re: Re: Hackage on Linux

2010-08-28 Thread Magnus Therning
On 28/08/10 02:15, Ivan Lazar Miljenovic wrote: On 28 August 2010 11:09, Brandon S Allbery KF8NH allb...@ece.cmu.edu wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/27/10 05:58 , Simon Farnsworth wrote: If you don't mind, I'd like a proper reference for this; looking at the Linux

Re: [Haskell-cafe] type classes and logic

2010-08-28 Thread Sebastian Fischer
Daniel Fischer wrote: class BEING human = HUMAN human where Sub-classing is logical implication BEING(human) = HUMAN(human) All types t that make BEING(t) = true also make HUMAN(t)=true No, it's the other way round. Every HUMAN is also a BEING, hence HUMAN(t) = BEING(t) Could I say that

Re: [Haskell-cafe] Re: Hackage on Linux

2010-08-28 Thread Magnus Therning
On 28/08/10 09:55, Andrew Coppin wrote: [...] How about hoping that Linux and Mac devs are going to realise that Windows doesn't have some of the problems that people claim it does? Hmm, thinking about it... nah, that's not happening anytime soon either. ;-) Can you provide some links to

Re: [Haskell-cafe] type classes and logic

2010-08-28 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/28/10 06:17 , Patrick Browne wrote: In the light of the above examples how should I interpret the class-to-subclass relation as logical implication? Is it a) If BEING then HUMAN (sufficient condition): BEING = HUMAN b) HUMAN is true only if

Re: [Haskell-cafe] Slightly humorous: Headhunters toolbox (example for Germany)

2010-08-28 Thread Sean Leather
On Sat, Aug 28, 2010 at 01:29, Vo Minh Thu wrote: It would be interesting to know some other sources: [...] number of attendees to e.g. Utrecht summer school on FP, ... Just a bit over 30, I think. And it was interesting to see a significant number of non-student participants. Perhaps around

Re: [Haskell-cafe] Slightly humorous: Headhunters toolbox (example for Germany)

2010-08-28 Thread Vo Minh Thu
2010/8/28 Sean Leather leat...@cs.uu.nl: On Sat, Aug 28, 2010 at 01:29, Vo Minh Thu wrote: It would be interesting to know some other sources: [...] number of attendees to e.g. Utrecht summer school on FP, ... Just a bit over 30, I think. And it was interesting to see a significant number

Re: [Haskell-cafe] (automatic) type classes context inference

2010-08-28 Thread Carter Schonwald
i believe that a valid idiom is to define a class C that has no functions, but requires any instance to also be of type classes A and B, so that you can write: C a = blah rather than (A a,B a)= blah, though I don't know how often such is used in practice the same idea should apply more

Re: [Haskell-cafe] (automatic) type classes context inference

2010-08-28 Thread Evan Laforge
On Sat, Aug 28, 2010 at 12:22 PM, Carter Schonwald carter.schonw...@gmail.com wrote:  i believe that a valid idiom is to define a class C that has no  functions, but requires  any instance   to also be of type classes A and B, so that you can write: C a = blah rather than (A a,B a)= blah,

[Haskell-cafe] Unicode pretty-printing

2010-08-28 Thread Peter Gromov
Hi all, I've been considering using Haskell for my natural language processing project. Due to its nature, it has much to do with Unicode. Unfortunately, Haskell escapes UTF8 characters. I've been able to output these strings via System.IO.UTF8.putStrLn (though I wish it was less painful), but

Re: [Haskell-cafe] Unicode pretty-printing

2010-08-28 Thread Don Stewart
gromopetr: Hi all, I've been considering using Haskell for my natural language processing project. Due to its nature, it has much to do with Unicode. Unfortunately, Haskell escapes UTF8 characters. I've been able to output these strings via System.IO.UTF8.putStrLn (though I wish it was

Re: [Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-28 Thread Tilo Wiklund
On 26/08/2010, Daniel Fischer daniel.is.fisc...@web.de wrote: [...] Well, I just gave an example where one would want chunking for reasons other than performance. That iteratees don't provide the desired functionality is a different matter. [...] In the case of hashing, wouldn't it be more

[Haskell-cafe] On to applicative

2010-08-28 Thread michael rice
I'm looking at a discussion of Either (as functor) here: http://learnyouahaskell.com/making-our-own-types-and-typeclasses#the-functor-typeclass instance Functor (Either a) where       fmap f (Right x) = Right (f x)       fmap f (Left x) = Left x And this line in Data.Either Functor (Either

Re: [Haskell-cafe] Re: Support for lock-free/wait-free programming?

2010-08-28 Thread Gregory Collins
Gabriel Wicke wi...@wikidev.net writes: On Tue, 17 Aug 2010 01:09:41 -0400, Gregory Collins wrote: Hello all, Does GHC expose any primitives for things like atomic compare-and-swap? I can't seem to find anything in the docs. Hello Gregory, I have recently published experimental and

Re: [Haskell-cafe] On to applicative

2010-08-28 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/28/10 20:43 , michael rice wrote: I'm looking at a discussion of Either (as functor) here: http://learnyouahaskell.com/making-our-own-types-and-typeclasses#the-functor-typeclass instance Functor (Either a) where fmap f (Right x) =

Re: [Haskell-cafe] Re: Support for lock-free/wait-free programming?

2010-08-28 Thread Gregory Collins
Gregory Collins g...@gregorycollins.net writes: Gabriel Wicke wi...@wikidev.net writes: On Tue, 17 Aug 2010 01:09:41 -0400, Gregory Collins wrote: Hello all, Does GHC expose any primitives for things like atomic compare-and-swap? I can't seem to find anything in the docs. Hello

Re: [Haskell-cafe] Re: Hackage on Linux

2010-08-28 Thread Erik de Castro Lopo
Andrew Coppin wrote: On Linux, if I do, say, cabal install zlib, it falls over and tells me it can't find the zlib headers. So I go install them, rerun the command, and it works. On Windows, I issue the same command and it falls over and says that autoconf doesn't exist. It doesn't even

Re: [Haskell-cafe] Re: Hackage on Linux

2010-08-28 Thread Erik de Castro Lopo
Hmm, Sunday morning reply before caffeine. Erik de Castro Lopo wrote: Andrew Coppin wrote: On Linux, if I do, say, cabal install zlib, it falls over and tells me it can't find the zlib headers. So I go install them, rerun the command, and it works. On Windows, I issue the same

Re: [Haskell-cafe] On to applicative

2010-08-28 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/28/10 22:15 , michael rice wrote: Prelude fmap (*2) l interactive:1:0: No instance for (Functor (Either Integer)) arising from a use of `fmap' at interactive:1:0-10 Possible fix: add an instance declaration for

Re: [Haskell-cafe] On to applicative

2010-08-28 Thread michael rice
Thanks, Brandon. Michael --- On Sat, 8/28/10, Brandon S Allbery KF8NH allb...@ece.cmu.edu wrote: From: Brandon S Allbery KF8NH allb...@ece.cmu.edu Subject: Re: [Haskell-cafe] On to applicative To: michael rice nowg...@yahoo.com Cc: haskell-cafe@haskell.org Date: Saturday, August 28, 2010, 10:43