Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: Why aren't David Harley's QT bindings more popular?
(David Virebayre)
2. Re: type question (ARJANEN Lo?c Jean-David)
3. Re: Global variables (Michael Xavier)
4. Re: type question (Daniel Fischer)
5. Re: Why aren't David Harley's QT bindings more popular?
(Kyle Murphy)
6. Re: Global variables (Christopher Done)
7. Re: Various style at instance of a typeclass (Haisheng Wu)
8. Re: Global variables (Krzysztof Skrz?tnicki)
9. Re: concerning wxHaskell: wxcore fails to install (Mark Wright)
----------------------------------------------------------------------
Message: 1
Date: Wed, 29 Jun 2011 17:00:40 +0200
From: David Virebayre <[email protected]>
Subject: Re: [Haskell-beginners] Why aren't David Harley's QT bindings
more popular?
To: [email protected]
Message-ID:
<cam_wfvtg5d9unulk71p2xs98zlr+5fuf2r+57le9g3nvq5h...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
I'm sad that this qtHaskell thread was hijacked by wxHaskell.
David.
------------------------------
Message: 2
Date: Wed, 29 Jun 2011 17:10:44 +0200
From: ARJANEN Lo?c Jean-David <[email protected]>
Subject: Re: [Haskell-beginners] type question
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
If I understand correctly, ? is the logical not. It's a function from
booleans to booleans (denoted by it's type: Bool -> Bool) because it
takes as its argument a boolean to negate and returns the negation of
its parameter.
Hoping to have helped you,
Loic
> On Wed, 29 Jun 2011 14:55:50 +0000, Roelof Wobben wrote:
> Hello,
>
> I'm now following the book Programming in Haskel by Hutton.
> IM now reading the chapter about types.
>
> But I don't understand this :
>
> False :: Bool
> True :: Bool
> ?? :: Bool? ---> Bool
>
> So False? and True has the type Bool.
> That's clear.
>
> I find out that ? makes the opposite of True and False.
> But why is it also the type Bool --> Bool
------------------------------
Message: 3
Date: Wed, 29 Jun 2011 08:22:36 -0700
From: Michael Xavier <[email protected]>
Subject: Re: [Haskell-beginners] Global variables
To: ARJANEN Lo?c Jean-David <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
I tend to use Control.Monad.Reader for stateful stuff like this. It is found
in the mtl package
http://hackage.haskell.org/package/mtl-2.0.1.0
On Wed, Jun 29, 2011 at 7:40 AM, ARJANEN Lo?c Jean-David <
[email protected]> wrote:
> Hello,
>
> For a pet project I need a global counter, giving how many times a
> given function was called. What would you use for that purpose ?
>
> Loic
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
--
Michael Xavier
http://www.michaelxavier.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110629/2dfeed8f/attachment-0001.htm>
------------------------------
Message: 4
Date: Wed, 29 Jun 2011 17:23:29 +0200
From: Daniel Fischer <[email protected]>
Subject: Re: [Haskell-beginners] type question
To: [email protected]
Message-ID: <[email protected]>
Content-Type: Text/Plain; charset="utf-8"
On Wednesday 29 June 2011, 16:55:50, Roelof Wobben wrote:
> Hello,
>
> I'm now following the book Programming in Haskel by Hutton.
> IM now reading the chapter about types.
>
> But I don't understand this :
>
> False :: Bool
> True :: Bool
> ? :: Bool ---> Bool
>
> So False and True has the type Bool.
> That's clear.
>
> I find out that ? makes the opposite of True and False.
> But why is it also the type Bool --> Bool
It's a function from Bool to Bool, that type is denoted by
Bool -> Bool
in Haskell (generally, "a -> b" is the type of functions taking an argument
of type "a" and returning a value of type "b"; it's particularly
interesting if "b" is itself a type of functions, e.g. "b = c -> d", then
the function has type "a -> (c -> d)" or "a -> c -> d" [in that position,
the parentheses are optional, since the function arrow associates to the
right], and it can also be regarded as the type of functions taking two
arguments, one of type "a", one of type "c" and returning a value of type
"d"; now, "d" might again be a function type, ...).
Note that normally, it's written "not", and not with a fancy unicode
symbol.
>
> Roelof
------------------------------
Message: 5
Date: Wed, 29 Jun 2011 11:27:19 -0400
From: Kyle Murphy <[email protected]>
Subject: Re: [Haskell-beginners] Why aren't David Harley's QT bindings
more popular?
To: David Virebayre <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
Sorry, that wasn't intended, but to be fair I think it actually got hijacked
pretty close the beginning as a "What's the state of GUI frameworks in
Haskell?" thread. On the topic of qtHaskell I see that it's cross-platform
which is good, but I also see where it doesn't appear to be compatible with
the version of mingw that ships with GHC. The install instructions on the
site tell you to overwrite the version of mingw in the ghc folder with the
one shipped with qtHaskell which is a step I'm not willing to do currently.
I haven't really looked at the API itself, but until either GHC or qtHaskell
changes to not require overwriting the bundled mingw instance I'm going to
have to take a pass on qtHaskell. I may try to install it without going
through that step to see if it works anyway, although the comments about
poor OpenGL performance also put me off a bit.
-R. Kyle Murphy
--
Curiosity was framed, Ignorance killed the cat.
On Wed, Jun 29, 2011 at 11:00, David Virebayre
<[email protected]>wrote:
> I'm sad that this qtHaskell thread was hijacked by wxHaskell.
>
> David.
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110629/b4d8b354/attachment-0001.htm>
------------------------------
Message: 6
Date: Wed, 29 Jun 2011 17:27:35 +0200
From: Christopher Done <[email protected]>
Subject: Re: [Haskell-beginners] Global variables
To: Michael Xavier <[email protected]>
Cc: [email protected], ARJANEN Lo?c Jean-David
<[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
On 29 June 2011 17:22, Michael Xavier <[email protected]> wrote:
> I tend to use Control.Monad.Reader for stateful stuff like this. It is found
> in the mtl package
> http://hackage.haskell.org/package/mtl-2.0.1.0
How would you use reader for a counter?
------------------------------
Message: 7
Date: Wed, 29 Jun 2011 23:36:51 +0800
From: Haisheng Wu <[email protected]>
Subject: Re: [Haskell-beginners] Various style at instance of a
typeclass
To: Stephen Tetley <[email protected]>
Cc: Haskell Beginer <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
Thanks Stephen. Your explanation is comprehensive.
Well, how did you know Monad is with kind :: * -> * ?
What about the Arrow (From Control.Arrow) class?
Did you have any references or something regarding such concepts?
-Haisheng
On Wed, Jun 29, 2011 at 10:21 PM, Stephen Tetley
<[email protected]>wrote:
> The class Monad is more specifically a "constructor class" rather than
> a type class.
>
> Constructor classes have particular arities (numbers of parameters -
> "holes") called "kinds".
>
> Monad is a constructor class with kind :: * -> *
>
> (Write w) - has kind :: * -> *
>
> Write - has kind :: * -> * -> *
>
> (Write w a) - has kind :: *
>
> Thus only the first is compatible with the Monad class.
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110629/ceddd95d/attachment-0001.htm>
------------------------------
Message: 8
Date: Wed, 29 Jun 2011 17:42:39 +0200
From: Krzysztof Skrz?tnicki <[email protected]>
Subject: Re: [Haskell-beginners] Global variables
To: [email protected]
Cc: [email protected], ARJANEN Lo?c Jean-David
<[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
You can store IORef / MVar / whatever in the environment. The counter is
supposed to be global, so it should work for multiple threads.
Best regards,
Krzysztof Skrz?tnicki
On Wed, Jun 29, 2011 at 17:27, Christopher Done <[email protected]>wrote:
> On 29 June 2011 17:22, Michael Xavier <[email protected]> wrote:
> > I tend to use Control.Monad.Reader for stateful stuff like this. It is
> found
> > in the mtl package
> > http://hackage.haskell.org/package/mtl-2.0.1.0
>
> How would you use reader for a counter?
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110629/10800af3/attachment.htm>
------------------------------
Message: 9
Date: Thu, 30 Jun 2011 01:43:01 +1000
From: Mark Wright <[email protected]>
Subject: Re: [Haskell-beginners] concerning wxHaskell: wxcore fails to
install
To: Obscaenvs <[email protected]>, [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
On Wed, 29 Jun 2011 16:14:06 +0200, Obscaenvs <[email protected]> wrote:
> Attempting to install the wxcore package yields the following result on
> my Arch Linux box, got the same result on an Ubuntu box:
> <code>
> cabal: Error: some packages failed to install:
> wxcore-0.12.1.7 failed during the configure step. The exception was:
> ExitFailure 1
> </code>
>
> As a result, the package wx cannot be installed either. I am trying to
> get started with wxHaskell.
>
> Is there any way to fix this retaining one's sanity?
>
> /Fredrik
Hi Fredrik,
The error message does not give many hints. Of course wxHaskell requires
the wxWidgets C++ libraries. On Gentoo I had to patch wxcore:
https://github.com/gentoo-haskell/gentoo-haskell/blob/master/dev-haskell/wxcore/files/wxcore-0.12.1.7-db.patch
Maybe wxHaskell might install easier with the Arch Haskell packages:
http://archhaskell.wordpress.com/
Regards, Mark
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 36, Issue 82
*****************************************