Send Beginners mailing list submissions to
        beginners@haskell.org

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
        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.  Multiple letters between -> -> (Marcus Manning)
   2. Re:  Multiple letters between -> -> (Francesco Ariis)


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

Message: 1
Date: Thu, 23 Nov 2017 18:19:51 +0100
From: Marcus Manning <icons...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: [Haskell-beginners] Multiple letters between -> ->
Message-ID: <41a13638-e655-5539-f8f5-2a2dad9ad...@gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed

Hi,

Original I thought a Signature like:

f :: h a -> h a

means that h is a higher kinded type just like in Type Classes ( for 
instance f in Functor f).

But I heard such a meaning is not allowed in normal Haskell functions. 
What instead is the meaning of h a?

Cheers,

Marcus.



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

Message: 2
Date: Thu, 23 Nov 2017 18:27:15 +0100
From: Francesco Ariis <fa...@ariis.it>
To: beginners@haskell.org
Subject: Re: [Haskell-beginners] Multiple letters between -> ->
Message-ID: <20171123172715.cwrtywpia47o5...@x60s.casa>
Content-Type: text/plain; charset=us-ascii

On Thu, Nov 23, 2017 at 06:19:51PM +0100, Marcus Manning wrote:
> Hi,
> 
> Original I thought a Signature like:
> 
> f :: h a -> h a
> 
> means that h is a higher kinded type just like in Type Classes ( for
> instance f in Functor f).
> 
> But I heard such a meaning is not allowed in normal Haskell functions. What
> instead is the meaning of h a?

Hello Marcus,
    you can write that but, since we know nothing about `h` and `a`,
the only possible (non-undefined) function to implement that
signature is:

    f :: h a -> h a
    f = id

Any other implementation would require us to know something about h,
hence a typeclass-constraint (e.g. Functor h =>) on h.


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

Subject: Digest Footer

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


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

End of Beginners Digest, Vol 113, Issue 21
******************************************

Reply via email to