Send Beginners mailing list submissions to
        beginners@haskell.org

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
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  Looking for some guidance to installing GHCI on  MAC
      (patricklynch)
   2. Re:  Question about List Type Constraint and Null (Daniel Fischer)
   3. Re:  Question about List Type Constraint and Null (aditya siram)
   4. Re:  Looking for some guidance to installing GHCI on MAC
      (Antoine Latter)


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

Message: 1
Date: Sat, 22 Jan 2011 17:45:13 -0500
From: "patricklynch" <kmandpjly...@verizon.net>
Subject: [Haskell-beginners] Looking for some guidance to installing
        GHCI on MAC
To: <beginners@haskell.org>
Message-ID: <e1542a1055c14d05920f81aa913f1...@stsv.com>
Content-Type: text/plain; charset=US-ASCII

Good afternoon,
I have HUGS installed on my MAC OSX...
Can you please give me some guidance to installing GHCI on the same  MAC
OSX?
I need to keep both HUGS and GHCI on the MAC.
Thank you




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

Message: 2
Date: Sat, 22 Jan 2011 23:26:05 +0100
From: Daniel Fischer <daniel.is.fisc...@googlemail.com>
Subject: Re: [Haskell-beginners] Question about List Type Constraint
        and Null
To: aditya siram <aditya.si...@gmail.com>
Cc: beginners@haskell.org
Message-ID: <201101222326.06255.daniel.is.fisc...@googlemail.com>
Content-Type: text/plain;  charset="iso-8859-1"

On Saturday 22 January 2011 23:11:07, aditya siram wrote:
> > The value of `null res' for a given String obviously depends on the
> > type at which res is used.
>
> Why does it matter what the type of res is as long as it is some kind
> of list? Doesn't 'reads' always gives [(a1,String)]? So why does it
> matter what type 'a1' is?

Because

reads "True, that" :: [(Bool,String)]
~> [(True,", that")]

and

reads "True, that" :: [(Int,String)]
~> []

So to evaluate `null res', the type of res must be known/fixed.
If it isn't, the compiler has two choices.
It can refuse to compile or it can compile and let the runtime throw an 
error "Can't evaluate because I don't know the type" (I think the second 
option isn't available for GHC).
In my opinion, the first option is preferable.

>
> Thanks for the clear explanation of the monomorphism restriction.
> -deech




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

Message: 3
Date: Sat, 22 Jan 2011 16:29:33 -0600
From: aditya siram <aditya.si...@gmail.com>
Subject: Re: [Haskell-beginners] Question about List Type Constraint
        and Null
To: Daniel Fischer <daniel.is.fisc...@googlemail.com>
Cc: beginners@haskell.org
Message-ID:
        <aanlktimldjtj51qyub6tnhp1q0wbbs9fj-4qpjhhj...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Wow, 'reads' is a weird function. Thanks a bunch for the explanation.
-deech

On Sat, Jan 22, 2011 at 4:26 PM, Daniel Fischer
<daniel.is.fisc...@googlemail.com> wrote:
> On Saturday 22 January 2011 23:11:07, aditya siram wrote:
>> > The value of `null res' for a given String obviously depends on the
>> > type at which res is used.
>>
>> Why does it matter what the type of res is as long as it is some kind
>> of list? Doesn't 'reads' always gives [(a1,String)]? So why does it
>> matter what type 'a1' is?
>
> Because
>
> reads "True, that" :: [(Bool,String)]
> ~> [(True,", that")]
>
> and
>
> reads "True, that" :: [(Int,String)]
> ~> []
>
> So to evaluate `null res', the type of res must be known/fixed.
> If it isn't, the compiler has two choices.
> It can refuse to compile or it can compile and let the runtime throw an
> error "Can't evaluate because I don't know the type" (I think the second
> option isn't available for GHC).
> In my opinion, the first option is preferable.
>
>>
>> Thanks for the clear explanation of the monomorphism restriction.
>> -deech
>
>



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

Message: 4
Date: Sat, 22 Jan 2011 16:30:25 -0600
From: Antoine Latter <aslat...@gmail.com>
Subject: Re: [Haskell-beginners] Looking for some guidance to
        installing GHCI on MAC
To: patricklynch <kmandpjly...@verizon.net>
Cc: beginners@haskell.org
Message-ID:
        <AANLkTikRB84V=gsr2zi-sdtrysgf2zddyll0jmrb5...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Have you tried the instructions for the Haskell Platform? From what I
understands it includes GHC (which usually includes GHCi) and various
Haskell libraries:

http://hackage.haskell.org/platform/mac.html

Antoine

On Sat, Jan 22, 2011 at 4:45 PM, patricklynch <kmandpjly...@verizon.net> wrote:
> Good afternoon,
> I have HUGS installed on my MAC OSX...
> Can you please give me some guidance to installing GHCI on the same ?MAC
> OSX?
> I need to keep both HUGS and GHCI on the MAC.
> Thank you
>
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>



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

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 31, Issue 23
*****************************************

Reply via email to