[GHC] #14907: Error message: (%, %) shows up when with accidental paren

GHC ghc-devs at haskell.org
Fri Mar 9 14:09:48 UTC 2018


#14907: Error message: (%,%) shows up when with accidental paren
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.5
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Poor/confusing    |  Unknown/Multiple
  error message                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Description changed by Iceland_jack:

Old description:

> I accidentally wrote an extra closing parens in instance declaration
>
> {{{#!hs
> $ ghci -ignore-dot-ghci -XRankNTypes
> GHCi, version 8.2.1: http://www.haskell.org/ghc/  :? for help
> Prelude> class (Category (Src f), forall xx. xx => Eq xx)) => Functor f
>
> <interactive>:1:8: error:
>     Unexpected type ‘Category (Src f)’
>     In the class declaration for ‘GHC.Classes.(%,%)’
>     A class declaration should have form
>       class GHC.Classes.(%,%) a b where ...
> Prelude>
> }}}
>
> `(%,%)` shouldn't show up here, same happens on 8.5.20180105

New description:

 I accidentally wrote an extra closing parens in instance declaration

 {{{
 $ ghci -ignore-dot-ghci -XRankNTypes
 GHCi, version 8.2.1: http://www.haskell.org/ghc/  :? for help
 Prelude> class (Category (Src f), forall xx. xx => Eq xx)) => Functor f

 <interactive>:1:8: error:
     Unexpected type ‘Category (Src f)’
     In the class declaration for ‘GHC.Classes.(%,%)’
     A class declaration should have form
       class GHC.Classes.(%,%) a b where ...
 Prelude>
 }}}

 `(%,%)` shouldn't show up here, same happens on 8.5.20180105

--

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


More information about the ghc-tickets mailing list