[GHC] #12371: Error message, room for improvement

GHC ghc-devs at haskell.org
Thu Jul 7 00:12:44 UTC 2016


#12371: Error message, room for improvement
-------------------------------------+-------------------------------------
           Reporter:  Iceland_jack   |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
  TypeApplications                   |
       Architecture:                 |   Type of failure:  Incorrect
  Unknown/Multiple                   |  warning at compile-time
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 {{{
 $ ghci -ignore-dot-ghci
 GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
 Prelude> :set -XPatternSynonyms
 Prelude> :set -XViewPatterns
 Prelude> pattern Foo a <- ((\uncons -> Just (a, as) -> a) -> a)

 <interactive>:3:20: error:
     Pattern syntax in expression context: \ uncons -> Just (a, as) -> a
     Did you mean to enable TypeApplications?
 }}}

 Let's:
 {{{
 Prelude> :set -XTypeApplications
 Prelude> pattern Foo a <- ((\uncons -> Just (a, as) -> a) -> a)

 <interactive>:5:20: error:
     Pattern syntax in expression context: \ uncons -> Just (a, as) -> a
     Did you mean to enable TypeApplications?
 Prelude>
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12371>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list