
Hi, Am Sonntag, den 15.09.2013, 17:24 -0400 schrieb Richard Eisenberg:
Because, from a user's point of view, defining
newtype Age = MkAge Int
automatically creates Coercible instances
instance Coercible Age Int instance Coercible Int Age
and defining datatypes also creates instances. This looks like a user-visible language feature to me, and I think it should be documented in the manual.
not really; if you type ":info Coercible" you see that there are no instances created. Just the type-checking of uses of coerce is a bit special. I think the question is rather: Where would the user search for documentation. And given that there are identifiers related to the feature (Coercible, coercion), the haddocks for that are the natural place to search. And as I’d like to avoid duplication, I’d not put the docs somewhere else again. I don’t mind adding a pointer from the “Special built-in functions” section to the haddock docs, though, if you think it would be helpful. Greetings, Joachim -- Joachim Breitner e-Mail: mail@joachim-breitner.de Homepage: http://www.joachim-breitner.de ICQ#: 74513189 Jabber-ID: nomeata@joachim-breitner.de