User:Zzo38/Proposal for instance disambiguation

From HaskellWiki
< User:Zzo38
Revision as of 05:45, 20 November 2011 by Zzo38 (talk | contribs) (New page: This document has some of my ideas about instance disambiguations and related things how it could be implemented in Haskell. =Select instances from imported modules= Example: import A ()...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This document has some of my ideas about instance disambiguations and related things how it could be implemented in Haskell.

Select instances from imported modules

Example:

import A () instance ();
import B class (AAA as ZZZ qualified as HHH);
import C hiding instance (Num String, Num Bool);

From module A imports nothing not even instances. From module B imports instances of class AAA to be instances of class ZZZ instead, where all its methods are prefixed with "HHH." at the front. From module C, does not import instances of Num class for type String (this is only valid if type synonym instances is enabled, and means the same thing here) and Bool.