Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.haskell.org/cgi-bin/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. cabal install glfw failing (Martin Vlk)
2. Re: Usage of $ (Rein Henrichs)
3. Re: Usage of $ (Mike Meyer)
4. Re: Usage of $ (Rein Henrichs)
5. Re: Usage of $ (Mike Meyer)
----------------------------------------------------------------------
Message: 1
Date: Mon, 08 Jun 2015 12:31:39 +0000
From: Martin Vlk <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: [Haskell-beginners] cabal install glfw failing
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
Hi, I am trying to install the Euterpea library, which depends on glfw,
but it is failing to install with a compilation failure.
Could someone take a look at the error and tell me what might be wrong?
Many Thanks
Martin
The Glorious Glasgow Haskell Compilation System, version 7.10.1
cabal-install version 1.22.4.0
using version 1.22.3.0 of the Cabal library
$ cabal update
$ cabal install glfw
Resolving dependencies...
Configuring GLFW-0.5.2.2...
Failed to install GLFW-0.5.2.2
Build log ( /home/martin/.cabal/logs/GLFW-0.5.2.2.log ):
cabal: Error: some packages failed to install:
GLFW-0.5.2.2 failed during the configure step. The exception was:
user error ('/home/martin/.ghc/bin/ghc' exited with an error:
/tmp/GLFW-0.5.2.2-20349/GLFW-0.5.2.2/dist/setup/setup.hs:106:14:
No instance for (Applicative (StateT ConfState IO))
arising from a use of ?modify?
In the expression: modify
In the expression:
modify $ \ (ConfState fs ls) -> ConfState fs (lib : ls)
In an equation for ?addLib?:
addLib lib
= modify $ \ (ConfState fs ls) -> ConfState fs (lib : ls)
/tmp/GLFW-0.5.2.2-20349/GLFW-0.5.2.2/dist/setup/setup.hs:242:10:
Could not deduce (Applicative (StateT s m))
arising from the superclasses of an instance declaration
from the context (Monad m)
bound by the instance declaration
at /tmp/GLFW-0.5.2.2-20349/GLFW-0.5.2.2/dist/setup/setup.hs:242:10-40
In the instance declaration for ?Monad (StateT s m)?
/tmp/GLFW-0.5.2.2-20349/GLFW-0.5.2.2/dist/setup/setup.hs:252:10:
Could not deduce (Applicative (StateT s m))
arising from the superclasses of an instance declaration
from the context (Monad m)
bound by the instance declaration
at /tmp/GLFW-0.5.2.2-20349/GLFW-0.5.2.2/dist/setup/setup.hs:252:10-47
In the instance declaration for ?MonadState s (StateT s m)?
)
------------------------------
Message: 2
Date: Mon, 08 Jun 2015 17:06:40 +0000
From: Rein Henrichs <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Usage of $
Message-ID:
<cajp6g8w_vcm9zt+vskqo9g0ndkpw3the+txinmat7kyqfmk...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
The point is that there is no parsing happening here. Just evaluation.
On Mon, Jun 8, 2015 at 3:20 AM Mike Meyer <[email protected]> wrote:
>
> On Jun 8, 2015 05:01, "Martin Vlk" <[email protected]> wrote:
> >
> > Mike Meyer:
> > > s mp $ n - 1 parses as s mp (n - 1)
> > > s mp n - 1 parses as (s mp n) - 1
> >
> >
> > Hi, I think it is misleading to say that $ "parses" to something.
>
> Which is why I didn't say such a thing. The two sentences show how the
> expressions he was having trouble with are parsed.
>
> > ($) is an infix operator with type:
> >
> > ($) :: (a -> b) -> a -> b -- Defined in ?GHC.Base?
> > infixr 0 $
> >
> > So what it does is it takes a function on the left hand side and applies
> > it to the second argument on the right hand side. The trick is it has
> > the lowest possible precedence value (0) so everything on the right hand
> > side will be evaluated before applying the function on the left.
>
> Which explains why the expression containing a $ parses as it does, which
> is also useful information.
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.haskell.org/pipermail/beginners/attachments/20150608/835fc238/attachment-0001.html>
------------------------------
Message: 3
Date: Mon, 8 Jun 2015 13:01:52 -0500
From: Mike Meyer <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Usage of $
Message-ID:
<CAD=7U2BNjn0W6X_QK0YYTnNgvbcc=kstvhmb9yvzz7pxce1...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Are you saying that GHC doesn't have a haskell parser?
On Mon, Jun 8, 2015 at 12:06 PM, Rein Henrichs <[email protected]>
wrote:
> The point is that there is no parsing happening here. Just evaluation.
>
> On Mon, Jun 8, 2015 at 3:20 AM Mike Meyer <[email protected]> wrote:
>
>>
>> On Jun 8, 2015 05:01, "Martin Vlk" <[email protected]> wrote:
>> >
>> > Mike Meyer:
>> > > s mp $ n - 1 parses as s mp (n - 1)
>> > > s mp n - 1 parses as (s mp n) - 1
>> >
>> >
>> > Hi, I think it is misleading to say that $ "parses" to something.
>>
>> Which is why I didn't say such a thing. The two sentences show how the
>> expressions he was having trouble with are parsed.
>>
>> > ($) is an infix operator with type:
>> >
>> > ($) :: (a -> b) -> a -> b -- Defined in ?GHC.Base?
>> > infixr 0 $
>> >
>> > So what it does is it takes a function on the left hand side and applies
>> > it to the second argument on the right hand side. The trick is it has
>> > the lowest possible precedence value (0) so everything on the right hand
>> > side will be evaluated before applying the function on the left.
>>
>> Which explains why the expression containing a $ parses as it does, which
>> is also useful information.
>> _______________________________________________
>> Beginners mailing list
>> [email protected]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.haskell.org/pipermail/beginners/attachments/20150608/0ec74a42/attachment-0001.html>
------------------------------
Message: 4
Date: Mon, 08 Jun 2015 19:06:57 +0000
From: Rein Henrichs <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Usage of $
Message-ID:
<CAJp6G8yLj7VOnAZHurOqTZqxH66k=ounziv1v4tpxyc2k2h...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Of course not. What a silly thing to suggest. I'm saying that parsing is
not relevant to the behavior of ($). The parser can't tell the *semantic*
difference between $ and any other operator.
On Mon, Jun 8, 2015 at 11:02 AM Mike Meyer <[email protected]> wrote:
> Are you saying that GHC doesn't have a haskell parser?
>
>
> On Mon, Jun 8, 2015 at 12:06 PM, Rein Henrichs <[email protected]>
> wrote:
>
>> The point is that there is no parsing happening here. Just evaluation.
>>
>> On Mon, Jun 8, 2015 at 3:20 AM Mike Meyer <[email protected]> wrote:
>>
>>>
>>> On Jun 8, 2015 05:01, "Martin Vlk" <[email protected]> wrote:
>>> >
>>> > Mike Meyer:
>>> > > s mp $ n - 1 parses as s mp (n - 1)
>>> > > s mp n - 1 parses as (s mp n) - 1
>>> >
>>> >
>>> > Hi, I think it is misleading to say that $ "parses" to something.
>>>
>>> Which is why I didn't say such a thing. The two sentences show how the
>>> expressions he was having trouble with are parsed.
>>>
>>> > ($) is an infix operator with type:
>>> >
>>> > ($) :: (a -> b) -> a -> b -- Defined in ?GHC.Base?
>>> > infixr 0 $
>>> >
>>> > So what it does is it takes a function on the left hand side and
>>> applies
>>> > it to the second argument on the right hand side. The trick is it has
>>> > the lowest possible precedence value (0) so everything on the right
>>> hand
>>> > side will be evaluated before applying the function on the left.
>>>
>>> Which explains why the expression containing a $ parses as it does,
>>> which is also useful information.
>>> _______________________________________________
>>> Beginners mailing list
>>> [email protected]
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>>
>>
>> _______________________________________________
>> Beginners mailing list
>> [email protected]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>
>>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.haskell.org/pipermail/beginners/attachments/20150608/47eec0d7/attachment-0001.html>
------------------------------
Message: 5
Date: Mon, 8 Jun 2015 14:17:43 -0500
From: Mike Meyer <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Usage of $
Message-ID:
<CAD=7u2ck9wxek-nzx+kiphta8mmb3rfjg6x7-lgxo1au6uz...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
The OP's problem wasn't with the semantics of $. The OP's problem was that
the two expression had different parse trees that gave him different
results when evaluated. So not only was there parsing happening here, but
it was the root cause of his confusion.
Given that the output of GHC's parser was the cause of the confusion, I
couldn't think of anything else you might have meant that made sense in
context.
On Mon, Jun 8, 2015 at 2:06 PM, Rein Henrichs <[email protected]>
wrote:
> Of course not. What a silly thing to suggest. I'm saying that parsing is
> not relevant to the behavior of ($). The parser can't tell the *semantic*
> difference between $ and any other operator.
> On Mon, Jun 8, 2015 at 11:02 AM Mike Meyer <[email protected]> wrote:
>
>> Are you saying that GHC doesn't have a haskell parser?
>> On Mon, Jun 8, 2015 at 12:06 PM, Rein Henrichs <[email protected]>
>> wrote:
>>
>>> The point is that there is no parsing happening here. Just evaluation.
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.haskell.org/pipermail/beginners/attachments/20150608/b05fc97b/attachment.html>
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 84, Issue 12
*****************************************