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:  How to build a package? (Henk-Jan van Tuyl)
   2. Re:  How to build a package? (John M. Dlugosz)
   3. Re:  How to build a package? (Norbert Melzer)
   4. Re:  How to build a package? (Karl Voelker)
   5. Re:  why do classes require the type variable in type
      signatures? (Peter Hall)
   6. Re:  How to build a package? (John M. Dlugosz)
   7. Re:  How to build a package? (Norbert Melzer)


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

Message: 1
Date: Wed, 23 Apr 2014 15:01:14 +0200
From: "Henk-Jan van Tuyl" <[email protected]>
To: [email protected], "John M. Dlugosz"
        <[email protected]>
Subject: Re: [Haskell-beginners] How to build a package?
Message-ID: <op.xers4culpz0j5l@ubuntu>
Content-Type: text/plain; charset=iso-8859-15; format=flowed;
        delsp=yes

On Tue, 22 Apr 2014 20:52:04 +0200, John M. Dlugosz  
<[email protected]> wrote:

> I used cabal unpack to get the source of a package to read.  Now I want  
> to make a change.   How do I tell Haskell Platform to make that (the  
> same way cabal knows how to) and do so with the provided files rather  
> than downloading into temp.
> I got a package to work before using Leksah, but I'd like to do it  
> directly since the cabal file is present and works just fine.

Go to the directory where the .cabal file is, and type
   cabal install
without a package name.

> A related issue: what should I do about the local copy of a module name  
> that is also installed?  Can I make my project use that instead, without  
> having to globally change the name in all the files?

You can use a GHC extension, to specify the package to use, see
   http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html
look for
   Package-qualified imports

Regards,
Henk-Jan van Tuyl


-- 
Folding@home
What if you could share your unused computer power to help find a cure? In  
just 5 minutes you can join the world's biggest networked computer and get  
us closer sooner. Watch the video.
http://folding.stanford.edu/


http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--


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

Message: 2
Date: Wed, 23 Apr 2014 11:43:17 -0500
From: "John M. Dlugosz" <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] How to build a package?
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 4/23/2014 8:01 AM, Henk-Jan van Tuyl wrote:
>
> Go to the directory where the .cabal file is, and type
>    cabal install
> without a package name.

Ah, I see.  I was looking for a makefile or something that was part of the 
package.

But won't that "install" it, overwriting the normal one?

>
>> A related issue: what should I do about the local copy of a module name that 
>> is also
>> installed?  Can I make my project use that instead, without having to 
>> globally change
>> the name in all the files?
>
> You can use a GHC extension, to specify the package to use, see
>    http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html
> look for
>    Package-qualified imports
>
> Regards,
> Henk-Jan van Tuyl
>
>




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

Message: 3
Date: Wed, 23 Apr 2014 18:59:34 +0200
From: Norbert Melzer <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] How to build a package?
Message-ID:
        <ca+bcvsu5xmrpai9z72zwyy19g4fta3ibgdca+kk7t7gutrd...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Am 23.04.2014 18:44 schrieb "John M. Dlugosz" <[email protected]>:
>
> On 4/23/2014 8:01 AM, Henk-Jan van Tuyl wrote:
>>
>>
>> Go to the directory where the .cabal file is, and type
>>    cabal install
>> without a package name.
>
>
> Ah, I see.  I was looking for a makefile or something that was part of
the package.

You can consider the *.cabal file a Makefile describing the package.

> But won't that "install" it, overwriting the normal one?

Yes. But you could enter the cabal-file and change the name of the package.
There are ways to tell fh-wedel which package it shall use on compiletime.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20140423/84dd5649/attachment-0001.html>

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

Message: 4
Date: Wed, 23 Apr 2014 12:36:18 -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] How to build a package?
Message-ID: <[email protected]>
Content-Type: text/plain;       charset=us-ascii

> On Apr 23, 2014, at 9:43 AM, "John M. Dlugosz" <[email protected]> 
> wrote:
> 
> But won't that "install" it, overwriting the normal one?

It would be a good idea to do all of this in a cabal sandbox.

-Karl

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

Message: 5
Date: Wed, 23 Apr 2014 21:27:55 +0100
From: Peter Hall <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] why do classes require the type
        variable in type signatures?
Message-ID:
        <caa6hak7_s5lrob3ppbitd5jb8xdttrbahpvyiy5atjov1rj...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Consider two instances of your class:

     data Foo = Foo
     data Bar = Bar

     instance AlsoSpecial Foo where
        -- This implementation *must* be constant True or False because
        -- we don't constrain b at all, so it has to work for all b.
        isAlsoSpecial b = True

     instance AlsoSpecial Bar where
        isAlsoSpecial b = False


Now what would you expect this to output?

     isAlsoSpecial "hello"



Peter




On 23 April 2014 09:23, Dimitri DeFigueiredo <[email protected]>wrote:

> Hello All,
>
> Why does this compile
>
> class Special a where
>     isSpecial :: a -> Bool
>
> whereas, GHC 7.6 complains about this
>
> class AlsoSpecial a where
>     isAlsoSpecial :: b -> Bool
>
>
> This is the error message I get:
>
>     The class method `isAlsoSpecial'
>     mentions none of the type variables of the class AlsoSpecial a
>     When checking the class method:
>       isAlsoSpecial :: forall b. b -> Bool
>     In the class declaration for `AlsoSpecial'
>
> My question is: Why must I use the type variable of the class declaration
> (i.e. *a*) in the type signature for the associated method? Is there a
> fundamental reason for this or is it just a GHC specific limitation? I
> didn't see a need for it when watching this video
>
> http://channel9.msdn.com/posts/MDCC-TechTalk-Classes-
> Jim-but-not-as-we-know-them
>
> that explains the translation that GHC does to turn type classes into core.
>
>
> Thanks!
>
>
> 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/20140423/a9ab7259/attachment-0001.html>

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

Message: 6
Date: Wed, 23 Apr 2014 22:59:59 -0500
From: "John M. Dlugosz" <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] How to build a package?
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 4/23/2014 11:59 AM, Norbert Melzer wrote:
>
> Yes. But you could enter the cabal-file and change the name of the package. 
> There are ways
> to tell fh-wedel which package it shall use on compiletime.
>

What's fh-wedel?  GOogle only turns up a university of applied sciences in 
Germany.

Changing the name of the package would not change the name of the modules 
inside it, or is 
there a prefix I can add automatically or something?





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

Message: 7
Date: Thu, 24 Apr 2014 09:35:31 +0200
From: Norbert Melzer <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] How to build a package?
Message-ID:
        <CA+bCVssGGMZ5hGo8-cu6+7yg+OpHH3K-E03txeFpyvrNK8VM=a...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Google is right on FH Wedel, however, what I really wanted to write was
ghci instead. Auto correction on my must have gone wild ;-)
Am 24.04.2014 06:01 schrieb "John M. Dlugosz" <[email protected]>:

> On 4/23/2014 11:59 AM, Norbert Melzer wrote:
>
>>
>> Yes. But you could enter the cabal-file and change the name of the
>> package. There are ways
>> to tell fh-wedel which package it shall use on compiletime.
>>
>>
> What's fh-wedel?  GOogle only turns up a university of applied sciences in
> Germany.
>
> Changing the name of the package would not change the name of the modules
> inside it, or is there a prefix I can add automatically or something?
>
>
>
> _______________________________________________
> 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/20140424/11683dd2/attachment.html>

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

Subject: Digest Footer

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


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

End of Beginners Digest, Vol 70, Issue 46
*****************************************

Reply via email to