[GHC] #13557: error found hole: _ is not appropriate in the following case
GHC
ghc-devs at haskell.org
Mon Apr 10 15:30:17 UTC 2017
#13557: error found hole: _ is not appropriate in the following case
-------------------------------------+-------------------------------------
Reporter: vanto | Owner: (none)
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.2
Resolution: invalid | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
error/warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by simonpj):
* status: new => closed
* resolution: => invalid
Comment:
Here's a simplified version
{{{
f' = [True | s <- [_, _]]
}}}
Here `_` is not a wildcard pattern, as you say. It's an underscore in an
expression, which GHC treats as a wildcard ''expression''. See
[http://downloads.haskell.org/~ghc/master/users-guide/glasgow_exts.html
#typed-holes Typed Holes] in the user manual.
I think this is correct behaviour. Re-open if you disagree.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13557#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list