Re: [GHC] #14500: Coercion artifact ‘cobox’ appears in error message

GHC ghc-devs at haskell.org
Tue Nov 21 16:49:15 UTC 2017


#14500: Coercion artifact ‘cobox’ appears in error message
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Iceland_jack):

 More output: Replacing it with

 {{{#!hs
 pattern SO <- Bloop' (HRefl::N:~~:kk) (typeRep :: TypeRep O)
 }}}

 gives

 {{{
 /tmp/Bug.hs:14:40: error:
     • Could not deduce: a ~ ('O |> Sym cobox)
       from the context: (* ~ *, kk ~ N)
         bound by a pattern with constructor:
                    HRefl :: forall k1 (a :: k1). a :~~: a,
                  in a pattern synonym declaration
         at /tmp/Bug.hs:14:23-27
       ‘a’ is a rigid type variable bound by
         the signature for pattern synonym ‘SO’ at /tmp/Bug.hs:13:23
       Expected type: TypeRep a
         Actual type: TypeRep 'O
     • When checking that the pattern signature: TypeRep 'O
         fits the type of its context: TypeRep a
       In the pattern: typeRep :: TypeRep O
       In the pattern: Bloop' (HRefl :: N :~~: kk) (typeRep :: TypeRep O)
    |
 14 | pattern SO <- Bloop' (HRefl::N:~~:kk) (typeRep::TypeRep O)
    |                                        ^^^^^^^^^^^^^^^^^^
 }}}

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


More information about the ghc-tickets mailing list