Re: deprecating

Ashley Yakeley <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc,gmane.comp.lang.haskell.cabal.devel
Message-ID <[email protected]>
On 23/10/12 02:36, Simon Marlow wrote:
>> 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.
>
> I don't think I understand why you would want an extension flag to 
> mean "at least" rather than "at most".  No other extension flag works 
> that way.  If you take that view to its logical conclusion, we would 
> never need to specify any extension flags at all.
>
> Rank2Types is only useful if it really means rank-2 types, which it 
> apparently doesn't, so I'm quite happy to deprecate it.  We don't have 
> to actually remove it for a long time, since the cost of maintaining 
> one flag that is a synonym for another flag is small.

Sorry, you're right. It means "I require at most rank-2 types"

Program A is marked "Rank2Types" and not "RankNTypes" and uses only 
rank-1 types.
Program B is marked "Rank2Types" and not "RankNTypes" and uses only 
rank-1 & rank-2 types.
Program C is marked "Rank2Types" and not "RankNTypes" and uses rank-3 types.

The compiler MUST accept A & B. It SHOULD reject C, but since GHC can't 
tell the difference, it's acceptable if it accepts it.

-- Ashley
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.