|
|
|
# Proposal: Change the syntax of qualified operators
|
|
|
|
# Proposal: [QualifiedOperators](qualified-operators)
|
|
|
|
|
|
|
|
<table><tr><th> Type </th>
|
|
|
|
<th> change
|
|
|
|
</th></tr>
|
|
|
|
<tr><th> Status </th>
|
|
|
|
<th> discussion
|
|
|
|
</th></tr>
|
|
|
|
<tr><th> Owner </th>
|
|
|
|
<th> Simon Marlow
|
|
|
|
</th></tr>
|
|
|
|
<tr><th> Section </th>
|
|
|
|
<th> Lexical Syntax
|
|
|
|
</th></tr>
|
|
|
|
<tr><th> Dependencies </th>
|
|
|
|
<th></th></tr>
|
|
|
|
<tr><th> Related </th>
|
|
|
|
<th> replaces [QualifiedIdentifiers](qualified-identifiers) and [CompositionAsDot](composition-as-dot)</th></tr></table>
|
|
|
|
|
|
|
|
## Compiler support
|
|
|
|
|
|
|
|
<table><tr><th> GHC </th>
|
|
|
|
<th> full (`-XNewQualifiedOperators`)
|
|
|
|
</th></tr>
|
|
|
|
<tr><th> nhc98 </th>
|
|
|
|
<th> none
|
|
|
|
</th></tr>
|
|
|
|
<tr><th> Hugs </th>
|
|
|
|
<th> none
|
|
|
|
</th></tr>
|
|
|
|
<tr><th> UHC </th>
|
|
|
|
<th> none
|
|
|
|
</th></tr>
|
|
|
|
<tr><th> JHC </th>
|
|
|
|
<th> none
|
|
|
|
</th></tr>
|
|
|
|
<tr><th> LHC </th>
|
|
|
|
<th> none
|
|
|
|
</th></tr></table>
|
|
|
|
|
|
|
|
## Summary
|
|
|
|
|
|
|
|
|
|
|
|
Change the syntax for qualified operators from `Prelude.>>=` to `Prelude.(>>=)`.
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
|
|
|
|
|
|
|
The problem is that right now, qualified operators are written like
|
| ... | ... | @@ -63,3 +108,7 @@ You might argue that it is inconsistent to allow ``(+)`` but not allow `(`plus`) |
|
|
|
|
|
|
|
|
|
|
|
This proposal simplifies the story for composition: we don't have to worry about whether you need a space after `Prelude..`. Also, `Prelude.(.)` is much easier to read. The only disadvantage I can see is that it could break some code, but probably very little.
|
|
|
|
|
|
|
|
## References
|
|
|
|
|
|
|
|
## Report Delta |
|
|
\ No newline at end of file |