[Hugs-users] explicit kind information; other question
luc.duponcheel at accenture.com
luc.duponcheel at accenture.com
Thu Sep 22 06:02:18 EDT 2005
Hi all,
as an addition to my previous email about dealing with
> ...
> type C ct23 ct12 c1 x y = ct23 (ct12 c1) x y in ...
> here is what hugs infers
> :info C
> -- type constructor with kind (* -> * -> * -> *) -> (* -> *) -> * -> * -> * -> *
> type C a b c d e = <restricted>
>...
I see that, from the definition of C only,
one cannot really infer a more specific kind than the one inferred above.
But, if' C ct23 ct12 c1 x y' (as a synonym for 'ct23 (ct12 c1) x y')
is used in a context where the expressions 'ct12 c1 x y' and 'c1 x y' are used as well,
then, the kind inferencer can infer that c1 has kind (* -> * -> *),
ct12 has kind ((* -> * -> *) -> * -> * -> *), ct12 c1 has kind (* -> * -> *),
and ct23 has kind ((* -> * -> *) -> * -> * -> *).
So, explicit kind information is not needed if the kind inferencer is a bit smarter.
Any comments?
Luc Duponcheel
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
More information about the Hugs-Users
mailing list