[Haskell-cafe] Getting some funny brackets in Haddock docs

Johannes Waldmann johannes.waldmann at htwk-leipzig.de
Wed Jan 10 11:50:05 UTC 2018


Hi,

> It looks like you're saying that `M.size [(2,3)]` should not be 1 (but
> I'm not sure).

Sorry for being terse.
No, that was just a comment about syntax, not semantics.

I was just stating that because of the IsList instance,
we can write  [(2,3)]  instead of  M.fromList [(2,3)]

This would give shorter text in the examples in the API doc -
and has the immense benefit that it already works as-is,
does not need any haddock changes, unicodes, JS, etc.

But it would hide the type distinction (Map vs. List)
so it might turn out to be unhelpful.

- J


More information about the Haskell-Cafe mailing list