... | @@ -36,4 +36,23 @@ And `type` gets an extra production: |
... | @@ -36,4 +36,23 @@ And `type` gets an extra production: |
|
|
|
|
|
- This is a straightforward generalisation, doesn't break any existing code, and improves the consistency of the syntax.
|
|
- This is a straightforward generalisation, doesn't break any existing code, and improves the consistency of the syntax.
|
|
|
|
|
|
## Cons |
|
## Cons
|
|
\ No newline at end of file |
|
|
|
|
|
## Observations
|
|
|
|
|
|
|
|
- Note that classes can be infix too; this is useful.
|
|
|
|
- Need to have a way to set the fixity of a type constructor `T` differently than the data constructor `T` (or not?).
|
|
|
|
- Need to allow infix notation in contexts
|
|
|
|
|
|
|
|
```wiki
|
|
|
|
f :: (a :>: b) => bla blah
|
|
|
|
```
|
|
|
|
- Watch out for code like this ([ http://hackage.haskell.org/trac/ghc/ticket/1727](http://hackage.haskell.org/trac/ghc/ticket/1727))
|
|
|
|
|
|
|
|
```wiki
|
|
|
|
infixr 5 `Foo`
|
|
|
|
infixr 6 `Bar`
|
|
|
|
|
|
|
|
data a `Foo` b = a `FOO` a `Bar` b
|
|
|
|
data a `Bar` b = a `BAR` b
|
|
|
|
``` |
|
|
|
\ No newline at end of file |