deprecating

Simon Peyton-Jones simonpj at microsoft.com
Tue Oct 23 13:51:34 CEST 2012


|  > It's an interesting question: does Rank2Types mean "I require at
|  > least
|  > rank-2 types" or "I only use rank-2 types"?
|  
|  I think it means "I require at least rank-2 types".
|  
|  To clarify, I think it's OK if a compiler accepts a program marked
|  "Rank2Types" and incorrectly not marked "RankNTypes" when it actually
|  requires rank-n types.

In every other flag it means the reverse of this.  For example if I say -XGADTs I mean "This program uses the GADT feature, and can be compiled by any program supporting GADTs.  It does not use kind polymorphism or type families, and if it turns out that the program *does* use those features it should be rejected".

So to accept a program with a rank-3 type with a flag saying Rank2Types would be, well, inconsistent. 

But someone said that foolish consistency is the hobgoblin of tiny minds, so if everyone things it's better to be inconsistent than to nudge package authors with deprecations, I can live with that.

(But I still think it's strange to have deprecations but to treat them as errors.  We could instead get rid of deprecations altogether and just say "oldFunction not in scope"!)

I doubt this is worth more of our time.  I'll just make Rank2Types and PolymorphicComponents a synonym for RankNTypes, and document that infelicity.

Simon


More information about the cabal-devel mailing list