I've seen many cases where a type is specified using a record, but it is not used for simple cases. For example,

data X = X { a :: String, b :: String }

let t = X "abc" "def"

Thus the ordering of record elements is crucial and should match the one shown in the haddocks.
It might be possible for haddock to have a button that sorts them, on demand. That'd be the best of both worlds.

On 8 June 2015 at 08:58, Ivan Lazar Miljenovic <ivan.miljenovic@gmail.com> wrote:
On 8 June 2015 at 13:23, aditya siram <aditya.siram@gmail.com> wrote:
> How would people feel about Haddock alphabetizing record accessors by
> default?
>
> For example:
>     data T { b :: ..., c :: ... , a :: ... }
> displays as:
>     data T { a :: ..., b :: ... , c :: ... }
>
> Seems as though projects that have large records like Cabal & Parsec would
> benefit from this.

In some (many?) cases, there is a logical ordering to the values.
Considering my own code, the records in GraphvizParams here matches
the ordering that they're used/found in the resultant Dot graph:
http://hackage.haskell.org/package/graphviz-2999.17.0.2/docs/Data-GraphViz.html#t:GraphvizParams

>
> Thanks!
> -deech
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>



--
Ivan Lazar Miljenovic
Ivan.Miljenovic@gmail.com
http://IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe



--
Regards

Sumit Sahrawat