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. 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" <[email protected]>
Subject: [Haskell-beginners] Looking for some guidance to installing
GHCI on MAC
To: <[email protected]>
Message-ID: <[email protected]>
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 <[email protected]>
Subject: Re: [Haskell-beginners] Question about List Type Constraint
and Null
To: aditya siram <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
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 <[email protected]>
Subject: Re: [Haskell-beginners] Question about List Type Constraint
and Null
To: Daniel Fischer <[email protected]>
Cc: [email protected]
Message-ID:
<[email protected]>
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
<[email protected]> 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 <[email protected]>
Subject: Re: [Haskell-beginners] Looking for some guidance to
installing GHCI on MAC
To: patricklynch <[email protected]>
Cc: [email protected]
Message-ID:
<[email protected]>
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 <[email protected]> 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
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 31, Issue 23
*****************************************