Thomas Schilling wrote:

(1) Wildcards:

  1.*   ~~>   >= 1 && < 2

in general

m.n.o.* ~~> >= m.n.o && < m.n.(o+1)

I like this.

(2) Ranges:

  1 - 2.1   ~~>    >= 1 && <= 2.1

in general

  m - n   ~~>   >= m && <= n

If the upper limit is supposed to be exclusive, this can be combined
with (1):

  1 - 2.0.*  ~~>  >= 1 && < 2.1

I like this, too, though maybe "to" instead of "-" would be a more readable token to use.

A possible alternatve syntax (subsuming both (1) and (2)) could be:

[1, 2.1] ~~> >= 1 && <= 2.1 [1, 2.1) ~~> >= 1 && < 2.1

This is too prone to fencepost errors due to the ease of getting the parens wrong. Also, interval notation isn't widely enough used that people will readily remember which kind of paren means what.

        <b
_______________________________________________
cabal-devel mailing list
cabal-devel@haskell.org
http://www.haskell.org/mailman/listinfo/cabal-devel

Reply via email to