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:  Build HTTP package error (Alexander _)
   2. Re:  Build HTTP package error (Emmanuel Touzery)
   3.  Multiple declarations of value constructor (Emanuel Koczwara)
   4. Re:  Multiple declarations of value constructor (Brandon Allbery)


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

Message: 1
Date: Wed, 19 Dec 2012 19:58:53 +0600
From: Alexander _ <[email protected]>
Subject: Re: [Haskell-beginners] Build HTTP package error
To: [email protected]
Message-ID:
        <CAFPzW8-wALempDOhidHWx=toscnvm57ad958zczpo0xebbb...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hello,

I use:

ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.1

Thank you.


2012/12/19 Emmanuel Touzery <[email protected]>

> One more thing... For my HTTP needs I've been using without problems
> Network.HTTP.Conduit:
>
> http://hackage.haskell.org/packages/archive/http-conduit/1.2.1/doc/html/Network-HTTP-Conduit.html
>
> but I didn't research in which ways these two packages differ.
>
> Emmanuel
>
>
> On Wed, Dec 19, 2012 at 8:35 AM, Emmanuel Touzery <[email protected]>wrote:
>
>> Hello,
>>
>>  which is your GHC version? On the page for that package it is written
>> that it was successfully built for GHC-7.6. Maybe your GHC version is too
>> old? Otherwise I don't have a clue.
>>
>> http://hackage.haskell.org/package/HTTP-4000.2.6
>>
>> Emmanuel
>>
>>
>> On Tue, Dec 18, 2012 at 2:58 PM, Alexander _ <
>> [email protected]> wrote:
>>
>>> Hello,
>>>
>>> I try to install HTTP package. I make:
>>>
>>> cabal install HTTP and got error:
>>>
>>> [ 1 of 18] Compiling Network.HTTP.Base64 ( Network/HTTP/Base64.hs,
>>> dist/build/Network/HTTP/Base64.o )
>>> [ 2 of 18] Compiling Network.HTTP.MD5Aux ( Network/HTTP/MD5Aux.hs,
>>> dist/build/Network/HTTP/MD5Aux.o )
>>> [ 3 of 18] Compiling Paths_HTTP ( dist/build/autogen/Paths_HTTP.hs,
>>> dist/build/Paths_HTTP.o )
>>>
>>> dist/build/autogen/Paths_HTTP.hs:21:13: Not in scope: `catch'
>>>
>>> dist/build/autogen/Paths_HTTP.hs:22:13: Not in scope: `catch'
>>>
>>> dist/build/autogen/Paths_HTTP.hs:23:14: Not in scope: `catch'
>>>
>>> dist/build/autogen/Paths_HTTP.hs:24:17: Not in scope: `catch'
>>> cabal: Error: some packages failed to install:
>>> HTTP-4000.2.6 failed during the building phase. The exception was:
>>> ExitFailure 1
>>>
>>> How can i install it correctly?
>>>
>>> Thank you.
>>>
>>> _______________________________________________
>>> Beginners mailing list
>>> [email protected]
>>> http://www.haskell.org/mailman/listinfo/beginners
>>>
>>>
>>
>
> _______________________________________________
> 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/20121219/cdc6b58c/attachment-0001.htm>

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

Message: 2
Date: Wed, 19 Dec 2012 15:07:17 +0100
From: Emmanuel Touzery <[email protected]>
Subject: Re: [Haskell-beginners] Build HTTP package error
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"

looks like there is a bug about this:
https://github.com/haskell/cabal/issues/1137

seems you need to reinstall cabal or something like that.

emmanuel

On 19.12.2012 14:58, Alexander _ wrote:
> Hello,
>
> I use:
>
> ghc --version
> The Glorious Glasgow Haskell Compilation System, version 7.6.1
>
> Thank you.
>
>
> 2012/12/19 Emmanuel Touzery <[email protected] 
> <mailto:[email protected]>>
>
>     One more thing... For my HTTP needs I've been using without
>     problems Network.HTTP.Conduit:
>     
> http://hackage.haskell.org/packages/archive/http-conduit/1.2.1/doc/html/Network-HTTP-Conduit.html
>
>     but I didn't research in which ways these two packages differ.
>
>     Emmanuel
>
>
>     On Wed, Dec 19, 2012 at 8:35 AM, Emmanuel Touzery
>     <[email protected] <mailto:[email protected]>> wrote:
>
>         Hello,
>
>          which is your GHC version? On the page for that package it is
>         written that it was successfully built for GHC-7.6. Maybe your
>         GHC version is too old? Otherwise I don't have a clue.
>
>         http://hackage.haskell.org/package/HTTP-4000.2.6
>
>         Emmanuel
>
>
>         On Tue, Dec 18, 2012 at 2:58 PM, Alexander _
>         <[email protected]
>         <mailto:[email protected]>> wrote:
>
>             Hello,
>
>             I try to install HTTP package. I make:
>
>             cabal install HTTP and got error:
>
>             [ 1 of 18] Compiling Network.HTTP.Base64 (
>             Network/HTTP/Base64.hs, dist/build/Network/HTTP/Base64.o )
>             [ 2 of 18] Compiling Network.HTTP.MD5Aux (
>             Network/HTTP/MD5Aux.hs, dist/build/Network/HTTP/MD5Aux.o )
>             [ 3 of 18] Compiling Paths_HTTP (
>             dist/build/autogen/Paths_HTTP.hs, dist/build/Paths_HTTP.o )
>
>             dist/build/autogen/Paths_HTTP.hs:21:13: Not in scope: `catch'
>
>             dist/build/autogen/Paths_HTTP.hs:22:13: Not in scope: `catch'
>
>             dist/build/autogen/Paths_HTTP.hs:23:14: Not in scope: `catch'
>
>             dist/build/autogen/Paths_HTTP.hs:24:17: Not in scope: `catch'
>             cabal: Error: some packages failed to install:
>             HTTP-4000.2.6 failed during the building phase. The
>             exception was:
>             ExitFailure 1
>
>             How can i install it correctly?
>
>             Thank you.
>
>             _______________________________________________
>             Beginners mailing list
>             [email protected] <mailto:[email protected]>
>             http://www.haskell.org/mailman/listinfo/beginners
>
>
>
>
>     _______________________________________________
>     Beginners mailing list
>     [email protected] <mailto:[email protected]>
>     http://www.haskell.org/mailman/listinfo/beginners
>
>
>
>
> _______________________________________________
> 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/20121219/2133629d/attachment-0001.htm>

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

Message: 3
Date: Wed, 19 Dec 2012 16:52:38 +0100
From: Emanuel Koczwara <[email protected]>
Subject: [Haskell-beginners] Multiple declarations of value
        constructor
To: "[email protected]" <[email protected]>
Message-ID: <1355932358.25512.7.camel@emanuel-Dell-System-Vostro-3750>
Content-Type: text/plain; charset="UTF-8"

Hi,

-- tests.hs
data MyType1 = Value1 | Value2
data MyType2 = Value1 | Value2


Prelude> :l tests
[1 of 1] Compiling Main             ( tests.hs, interpreted )

tests.hs:3:16:
    Multiple declarations of `Main.Value1'
    Declared at: tests.hs:1:16
                 tests.hs:3:16

tests.hs:3:25:
    Multiple declarations of `Main.Value2'
    Declared at: tests.hs:1:25
                 tests.hs:3:25
Failed, modules loaded: none.

If so, how are numbers defined? I can use 1 :: Int or 1 :: Integer. Why not 
Value1 :: MyType1 and Value1 :: MyType2?

Emanuel






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

Message: 4
Date: Wed, 19 Dec 2012 11:09:48 -0500
From: Brandon Allbery <[email protected]>
Subject: Re: [Haskell-beginners] Multiple declarations of value
        constructor
To: Emanuel Koczwara <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID:
        <cakfcl4wjqotbz96asm4xhubzcw+zqit3m+2hkz82r4+jvrh...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

On Wed, Dec 19, 2012 at 10:52 AM, Emanuel Koczwara <
[email protected]> wrote:

> If so, how are numbers defined? I can use 1 :: Int or 1 :: Integer. Why
> not Value1 :: MyType1 and Value1 :: MyType2?
>

Numbers are special-cased in the compiler, because they're polymorphic; in
effect, the literal is output as a call to "fromIntegral" or "fromRational"
as appropriate for the type, on some low level internal representation of
the literal.  (There is an extension to enable this for strings as well,
but not for other types.)  You can't do this with user defined types
because you can't make a constructor a typeclass function.

Note that various things, in particular pattern matching, rely on
constructor names unambiguously identifying types.  (Again, numeric
literals are a special case; patterns involving them actually get rewritten
into guards.  If you want to know the gory details, they're documented in
the Haskell Language Report.)

-- 
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/20121219/15474058/attachment.htm>

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

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


End of Beginners Digest, Vol 54, Issue 28
*****************************************

Reply via email to