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:  Cabal complains that cabal-dev ?indirectly depends on
      multiple versions of the same package?, even though it
      (apparently) does not (Brandon Allbery)
   2. Re:  Cabal complains that cabal-dev ?indirectly depends on
      multiple versions of the same package?, even though it
      (apparently) does not (James Fisher)
   3. Re:  Cabal complains that cabal-dev ?indirectly depends on
      multiple versions of the same package?, even though it
      (apparently) does not (Brent Yorgey)
   4. Re:  Cabal complains that cabal-dev ?indirectly depends on
      multiple versions of the same package?, even though it
      (apparently) does not (James Fisher)
   5. Re:  Relation between monads and computations (Dmitriy Matrosov)


----------------------------------------------------------------------

Message: 1
Date: Wed, 15 Feb 2012 16:25:28 -0500
From: Brandon Allbery <[email protected]>
Subject: Re: [Haskell-beginners] Cabal complains that cabal-dev
        ?indirectly depends on multiple versions of the same package?, even
        though it (apparently) does not
To: James Fisher <[email protected]>
Cc: [email protected]
Message-ID:
        <CAKFCL4Ud2A2-c50=_dOWatM0Fjhsud+Au6YqWV_VPy4=wmk...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

On Wed, Feb 15, 2012 at 16:15, James Fisher <[email protected]> wrote:

>
> $ cabal update
> Downloading the latest package list from hackage.haskell.org
> james@bast:~/.cabal/packages$ cabal install cabal-dev
> Resolving dependencies...
> Downloading cabal-dev-0.9.1...
> [1 of 1] Compiling Main             ( 
> /tmp/cabal-dev-0.9.124882/cabal-dev-0.9.1/Setup.hs, 
> /tmp/cabal-dev-0.9.124882/cabal-dev-0.9.1/dist/setup/Main.o )
> Linking /tmp/cabal-dev-0.9.124882/cabal-dev-0.9.1/dist/setup/setup ...
> Configuring cabal-dev-0.9.1...
> Warning: This package indirectly depends on multiple versions of the same
> package. This is highly likely to cause a compile failure.
> package containers-0.4.2.1 requires array-0.4.0.0
> package Cabal-1.14.0 requires array-0.4.0.0
> package text-0.11.1.13 requires array-0.4.0.0
> package deepseq-1.3.0.0 requires array-0.4.0.0
> package containers-0.4.2.1 requires array-0.4.0.0
> package HTTP-4000.2.2 requires array-0.4.0.0
> package cabal-dev-0.9.1 requires containers-0.4.2.1
> package Cabal-1.14.0 requires containers-0.4.2.1
> package template-haskell-2.7.0.0 requires containers-0.4.2.1
>
>
I think you'll need -v to see what's going on, but my guess is you somehow
have multiple versions of either array or containers with the same version
number but different hashes, or that one of the packages depends on a no
longer installed package with the right version but had a different hash.

My guess is it's containers, because the containers -> array dependency is
listed twice --- making me suspicious that those are two separate instances
with the same version but different hashes (which aren't normally shown
there).


>     Cabal-1.14.0-4af45d3c8d10dc27db38ae0e7e5a952b is unusable due to missing 
> or recursive dependencies:
>       array-0.4.0.0-46f61f5fd9543ebf309552ef84dccc86 
> containers-0.4.2.1-98f9aa15f9c08b13673dc9d89385f449
>
> This shows the hashes for one of those sets, but not the other.

-- 
brandon s allbery                                      [email protected]
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120215/69ed4deb/attachment-0001.htm>

------------------------------

Message: 2
Date: Wed, 15 Feb 2012 21:55:32 +0000
From: James Fisher <[email protected]>
Subject: Re: [Haskell-beginners] Cabal complains that cabal-dev
        ?indirectly depends on multiple versions of the same package?, even
        though it (apparently) does not
To: Brandon Allbery <[email protected]>
Cc: [email protected]
Message-ID:
        <cac_q48csvpfldega6vt8a2zj-rk0f33u2eze9ywxf+4dodh...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Brandon


On Wed, Feb 15, 2012 at 9:25 PM, Brandon Allbery <[email protected]>wrote:
>
> I think you'll need -v to see what's going on
>

This seems to provide no more information.  There's some extra junk in the
output, but it still gives me the same message about a dependency on
multiple versions (of *what*? if it knows there exists such a package,
presumably it knows *which*?), and despite cabal telling me that -v will
provide more information on the missing or recursive dependency (what, are
"missing" and "recursive" so similar we can't tell them apart? They seem
like totally different problems to me), there is no such extra information
with -v.

but my guess is you somehow have multiple versions of either array or
> containers with the same version number but different hashes, or that one
> of the packages depends on a no longer installed package with the right
> version but had a different hash.
>
> My guess is it's containers, because the containers -> array dependency is
> listed twice --- making me suspicious that those are two separate instances
> with the same version but different hashes (which aren't normally shown
> there).
>

ghc-pkg tells me I have two array versions installed.  I unregistered the
earlier array-0.3.0.3, but I still get the same error when trying to
install cabal-dev.


>
>     Cabal-1.14.0-4af45d3c8d10dc27db38ae0e7e5a952b is unusable due to missing 
> or recursive dependencies:
>>       array-0.4.0.0-46f61f5fd9543ebf309552ef84dccc86 
>> containers-0.4.2.1-98f9aa15f9c08b13673dc9d89385f449
>>
>> This shows the hashes for one of those sets, but not the other.
>

Sorry, what sets do you mean?  I see one hash for array-0.4.0.0, another
for containers-0.4.2.1, and another for Cabal-1.14.0.

I guess another thing I don't understand is: why is there both a version
number and a hash?  I'm told by Hackage that "Re-uploading a package with
the same version number is not permitted" (
http://hackage.haskell.org/packages/upload.html), so how could I have a
package with two different hashes?  Unless one or both came from somewhere
other than Hackage, perhaps?

Yet another thing I don't properly understand is the relationship between
all these Haskell packaging organizations and programs.  cabal seems to
have some pseudo-official relationship with Hackage.  And how do cabal and
ghc-pkg interact?  Where are things on my system apart from in ~/.cabal?

Thanks

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120215/fb33661f/attachment-0001.htm>

------------------------------

Message: 3
Date: Wed, 15 Feb 2012 17:09:53 -0500
From: Brent Yorgey <[email protected]>
Subject: Re: [Haskell-beginners] Cabal complains that cabal-dev
        ?indirectly depends on multiple versions of the same package?, even
        though it (apparently) does not
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

On Wed, Feb 15, 2012 at 09:55:32PM +0000, James Fisher wrote:
> 
> I guess another thing I don't understand is: why is there both a version
> number and a hash?  I'm told by Hackage that "Re-uploading a package with
> the same version number is not permitted" (
> http://hackage.haskell.org/packages/upload.html), so how could I have a
> package with two different hashes?  Unless one or both came from somewhere
> other than Hackage, perhaps?
> 
> Yet another thing I don't properly understand is the relationship between
> all these Haskell packaging organizations and programs.  cabal seems to
> have some pseudo-official relationship with Hackage.  And how do cabal and
> ghc-pkg interact?  Where are things on my system apart from in ~/.cabal?

For answers to all these questions (and more), see

  http://www.vex.net/~trebla/haskell/sicp.xhtml

-Brent



------------------------------

Message: 4
Date: Wed, 15 Feb 2012 23:27:38 +0000
From: James Fisher <[email protected]>
Subject: Re: [Haskell-beginners] Cabal complains that cabal-dev
        ?indirectly depends on multiple versions of the same package?, even
        though it (apparently) does not
To: Brent Yorgey <[email protected]>
Cc: [email protected]
Message-ID:
        <cac_q48a5du1zwjnwrzj8qraj1+zoou0hh-xt_+4wkh_uyjw...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

On Wed, Feb 15, 2012 at 10:09 PM, Brent Yorgey <[email protected]>wrote:
>
>
> For answers to all these questions (and more), see
>
>  http://www.vex.net/~trebla/haskell/sicp.xhtml


Wow, that article is clear and succinct.  I'll give it a closer read.

Thanks

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120215/6806be37/attachment-0001.htm>

------------------------------

Message: 5
Date: Thu, 16 Feb 2012 12:39:27 +0300
From: Dmitriy Matrosov <[email protected]>
Subject: Re: [Haskell-beginners] Relation between monads and
        computations
To: [email protected]
Message-ID:
        <CAFdVUF=-o7_deHE0dnn=X4FWJsAG0C3v8qzVWdqYUP85S=4...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

> > > > Now, using fucntions unitM and bindM there is possibly to convert 
> > > > arbitrary
> > > > function (k :: a -> b), which makes from initial value of type a value 
> > > > of type
> > > > b, into terms of general computation (represented by type M).
> > >
> > > Yes, (k :: a -> b) can be converted into a function of type  (a -> M
> > > b), but I think you have made it more complicated than necessary.  All
> > > you need to do is  (unitM . k).
> >
> > Hmm, so i was wrong here. Initially, i suppose, that the purpose of bindM is
> > to convert function of type (a -> b) into function of type (a -> M b), but 
> > now
> > i see it is wrong. Mentioned above quote from [2] says, that "the purpose of
> > bindM is to evaluate a computation, yielding a value.", which sounds a 
> > little
> > unfinished to me.  Then may be: the purpose of bindM is to make composition
> > of functions of type (a -> M b) and (b -> M c) possible. Is this
> > right?
>
> Yes!  In fact, there is a standard operator
>
>   (>=>) :: Monad m => (a -> m b) -> (b -> m c) -> (a -> m c)
>
> which is defined in terms of bind.  Implementing it is a good
> exercise.
>
> By the way, you may be interested in reading the Typeclassopedia:
>
>   http://www.haskell.org/haskellwiki/Typeclassopedia

Thank you very much, Brent! I'll try what you advise and read this link. And
then may be ask again.. :)

--
    Dmitriy Matrosov



------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 44, Issue 14
*****************************************

Reply via email to