rank-2 vs. arbitrary rank types

Andres Loeh loeh at iai.uni-bonn.de
Tue Feb 6 05:05:12 EST 2007


> I don't think that the rank-N system is any more expressive then the
> rank-2 one.  The reason is that by placing a polymorphic value in a
> datatype we can decrese its rank.  In this way we can reduce a program
> of any rank to just rank-2.  So it seems that the issue is one of
> software engineering---perhaps defining all these extra types is a
> burden?  In my experience, defining the datatypes actually makes the
> program easier to understand (of course, this is subjective) because I
> find it difficult to parse all the nested "forall" to the left of
> arrows, and see where the parens end (I susupect that this is related
> to Simon's next point).

Of course it's easier to define abbreviations for complex types,
which is what "type" is for ... However, if you define new datatypes,
you have to change your code, and applying dummy constructors everywhere
doesn't make the code more readable ...

Cheers,
  Andres


More information about the Haskell-prime mailing list