[GHC] #10756: Allow users to indicate inaccessible patterns
GHC
ghc-devs at haskell.org
Sat Aug 22 21:48:11 UTC 2015
#10756: Allow users to indicate inaccessible patterns
-------------------------------------+-------------------------------------
Reporter: edsko | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by YitzGale):
Replying to [comment:9 goldfire]:
Correct. The first two would be valid and retain their current meaning.
The third is invalid for two reasons: because `Just` requires an argument,
and because the bound RHS value is omitted after an impossible pattern.
I'm not sure what you mean by "top level". My proposal is similar to many
other features of Haskell as well as almost every other language - that
certain tokens are given special meaning in specific syntactic contexts.
Why is that a weird wrinkle? A few existing examples: `as` and `qualified`
have special meaning only in `import` statements; `forall` and `.` only
have special meaning in type expresssions; etc. In general, it's a good
idea to keep keywords to a minimum; otherwise the language becomes
increasingly awkward to use.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10756#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list