Polymorphism in the Prelude

Edward Kmett ekmett at gmail.com
Tue Jun 24 23:10:00 UTC 2014

> On Jun 24, 2014, at 3:08 PM, Daniel Gorín <dgorin at dc.uba.ar> wrote:
>> On Tue, Jun 24, 2014 at 3:42 AM, Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> wrote:
>> Do you have anything specific in mind here? At first I was just going to
>> dismiss this as wishful thinking but perhaps we could actually do
>> something about this.
>> Maybe we could provide ‘alternative’ signatures which would make types
>> more specific with some (which? all of known ones?) instances.
> One thing that might help is to list the specific type of methods below instance declarations, in a collapsible view to avoid cluttering. An example rendering (in "expanded view")  would be:
>> [-] instance Functor ((->) r) where
>>     fmap :: (a -> b) -> (r -> a) -> (r -> b)

Being able to "open" an instance line in haddock to see what it means could be quite useful. It'd likely require a fair bit of work in haddock though as it'd have to synthesize that information somehow.

More information about the Libraries mailing list