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. 8 queens problem using multithreading (Igor Pinheiro Le?o)
2. Re: 8 queens problem using multithreading (divyanshu ranjan)
3. Re: 8 queens problem using multithreading (Brandon Allbery)
4. Re: hidden packages and ambiguous modules (Karl Voelker)
5. Re: hidden packages and ambiguous modules (Thomas Hallgren)
6. Re: 8 queens problem using multithreading (Igor Pinheiro Le?o)
7. Maybe monad and computations (Emmanuel Touzery)
----------------------------------------------------------------------
Message: 1
Date: Fri, 6 Sep 2013 11:29:25 -0300
From: Igor Pinheiro Le?o <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: [Haskell-beginners] 8 queens problem using multithreading
Message-ID:
<CAGrJ+gfr4MSicty+1V6Qi7_ACmJZ82JjN-unmUQzOcU1B52=r...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
can someone help me to understand how to implement a multithreading 8
queens problem using Haskell.
If it's not asking to much I also need a good Haskell thread related
source. It would be great.
Kind Regards,
Igor
--
Igor Vin?cius
Graduando em Ci?ncia da Computa??o
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130906/4e1707b6/attachment-0001.html>
------------------------------
Message: 2
Date: Fri, 6 Sep 2013 20:05:35 +0530
From: divyanshu ranjan <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] 8 queens problem using multithreading
Message-ID:
<CAL9hw249B8=vhdvssz-gz8ntjkg_xkak28cmcheuy3tgx4k...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Hi,
For parallel and concurrent haskell this is great resource :
http://chimera.labs.oreilly.com/books/1230000000929.
Divyanshu Ranjan
On Fri, Sep 6, 2013 at 7:59 PM, Igor Pinheiro Le?o <[email protected]> wrote:
> Hi,
> can someone help me to understand how to implement a multithreading 8 queens
> problem using Haskell.
> If it's not asking to much I also need a good Haskell thread related source.
> It would be great.
>
> Kind Regards,
> Igor
>
> --
> Igor Vin?cius
> Graduando em Ci?ncia da Computa??o
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
------------------------------
Message: 3
Date: Fri, 6 Sep 2013 10:36:10 -0400
From: Brandon Allbery <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] 8 queens problem using multithreading
Message-ID:
<CAKFCL4Ux1J5aPSQeOJv7FS5Sk5ugfcpc2CO2G6UuY+q_UW=z...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
On Fri, Sep 6, 2013 at 10:29 AM, Igor Pinheiro Le?o <[email protected]>wrote:
> If it's not asking to much I also need a good Haskell thread related
> source. It would be great.
>
Will http://chimera.labs.oreilly.com/books/1230000000929/index.html do?
--
brandon s allbery kf8nh sine nomine associates
[email protected] [email protected]
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130906/7c051644/attachment-0001.html>
------------------------------
Message: 4
Date: Fri, 6 Sep 2013 09:44:30 -0700
From: Karl Voelker <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] hidden packages and ambiguous modules
Message-ID:
<CAFfow0xgXdmmKHBoXz0iZG2Bk72q93hnAtiR3OrE-3zz4=f...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
You are hitting this problem because the "base" and "haskell98" packages
really do provide overlapping functionality. The Haskell 98 standard
specifies a few core modules and gives them very simple names, like "Maybe"
and "Time". Modules with these names are provided by haskell98 [1]. By
default, GHC provides the base package instead, which uses hierarchical
names, like "Data.Maybe" and "System.Time". But both packages provide a
module named "Prelude".
I think that in practice, this kind of conflict is quite rare.
The quick fix for your situation is probably to add the flag "-hide-package
base" to your command-line [2]. You could also write a cabal file for this
program - when building with cabal, all packages are hidden by default
unless explicitly listed.
-Karl
1: http://hackage.haskell.org/package/haskell98
2: http://www.haskell.org/ghc/docs/7.6.3/html/users_guide/packages.html
On Fri, Sep 6, 2013 at 2:12 AM, Dimitri Hendriks <[email protected]> wrote:
> Hi,
>
> I have ghc version 7.6.3.
> I am trying to compile some code (not mine) with
>
> $ ghc --make Main
>
> and get the message:
>
> Could not find module `Time'
> It is a member of the hidden package `haskell98-2.0.0.2'.
>
> Then I tried:
>
> $ ghc -package haskell98-2.0.0.2 --make Main
>
> resulting in
>
> Ambiguous module name `Prelude':
> it was found in multiple packages: base haskell98-2.0.0.2
>
> At this point I am stuck. How do I load the right packages without
> introducing ambiguities?
>
> Thanks!
>
> Greetings,
> Dimitri
> _______________________________________________
> 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/20130906/919bd08a/attachment-0001.html>
------------------------------
Message: 5
Date: Fri, 06 Sep 2013 19:25:48 +0200
From: Thomas Hallgren <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] hidden packages and ambiguous modules
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
Hi,
I just uploaded the package haskell98libraries [1] that you can use instead of
haskell98 to avoid this problem, i.e. you can use it together with base.
Thomas H
[1] http://hackage.haskell.org/package/haskell98libraries
On 2013-09-06 11:12 , Dimitri Hendriks wrote:
> Hi,
>
> I have ghc version 7.6.3.
> I am trying to compile some code (not mine) with
>
> $ ghc --make Main
>
> and get the message:
>
> Could not find module `Time'
> It is a member of the hidden package `haskell98-2.0.0.2'.
>
> Then I tried:
>
> $ ghc -package haskell98-2.0.0.2 --make Main
>
> resulting in
>
> Ambiguous module name `Prelude':
> it was found in multiple packages: base haskell98-2.0.0.2
>
> At this point I am stuck. How do I load the right packages without
> introducing ambiguities?
>
> Thanks!
>
> Greetings,
> Dimitri
>
------------------------------
Message: 6
Date: Fri, 6 Sep 2013 15:56:02 -0300
From: Igor Pinheiro Le?o <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] 8 queens problem using multithreading
Message-ID:
<CAGrJ+geo-P0Y6MonqqOhJd-7TggfA+ZwN=hoegjswecrtlo...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Thank you all guys!
I'm gonna first read the book and then later try to solve the problem.
Regards,
Igor
2013/9/6 Brandon Allbery <[email protected]>
> On Fri, Sep 6, 2013 at 10:29 AM, Igor Pinheiro Le?o <[email protected]>wrote:
>
>> If it's not asking to much I also need a good Haskell thread related
>> source. It would be great.
>>
>
> Will http://chimera.labs.oreilly.com/books/1230000000929/index.html do?
>
> --
> brandon s allbery kf8nh sine nomine
> associates
> [email protected]
> [email protected]
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
--
Igor Vin?cius
Graduando em Ci?ncia da Computa??o
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130906/48dae1c2/attachment-0001.html>
------------------------------
Message: 7
Date: Fri, 6 Sep 2013 21:49:22 +0200
From: Emmanuel Touzery <[email protected]>
To: "[email protected]" <[email protected]>
Subject: [Haskell-beginners] Maybe monad and computations
Message-ID:
<CAC42Re=y12hd8jvnmmc4iobvfw5c7gk51mp8gpieyvi07oo...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hello,
I'm often using the Maybe monad to combine Maybe computations one after
the other without conditionals.
But I'm not sure how to do it, when I have several operations which return
Maybe and I want all the indiviual values in the end, not a combination of
the values.
Currently I do:
let allTogether = do
ma <- doA
mb <- doB
return (ma, mb)
case allTogether of
Nothing -> ...
Just (a, b) -> ...
This way in this case I have one case instead of two, however I'm sure
there must be a nicer way to achieve this result?
Thank you!
Emmanuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130906/e60a6411/attachment.html>
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 63, Issue 8
****************************************