[Haskell-cafe] Language complexity & beginners (Was: New type of ($) operator in GHC 8.0 is problematic)
rf at rufflewind.com
Mon Feb 8 23:05:34 UTC 2016
> Another great question that has come up is about Haddock output (Hackage). I
> think Haddock needs to add a facility where library authors can include
> specializations of an overly general type. This can be done in commentary,
> but it's not as prominent.
I think a low-hanging fruit would be to add the ability for Haddock to
parse some sort of specialized types annotation (could be entirely in
the comments) and display them adjacent to the true type. The types
do have to be manually written, but at least they can be type-checked.
Lens does this in its documentation and they are very helpful for
learning the library.
> (^.) :: s -> Getting a s a -> a
> (^.) :: s -> Getter s a -> a
> (^.) :: Monoid m => s -> Fold s m -> m
> (^.) :: s -> Iso' s a -> a
> (^.) :: s -> Lens' s a -> a
> (^.) :: Monoid m => s -> Traversal' s m -> m
More information about the Haskell-Cafe