[GHC] #13755: GHC-8.0.2+ spits out $dm names in error messages

GHC ghc-devs at haskell.org
Thu May 25 14:03:29 UTC 2017


#13755: GHC-8.0.2+ spits out $dm names in error messages
-------------------------------------+-------------------------------------
           Reporter:  zilinc         |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.2
  (Type checker)                     |
           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:
-------------------------------------+-------------------------------------
 Example (copied from #12881)
 {{{
 {-# LANGUAGE FlexibleInstances #-}
 module Bug where

 class Arbitrary a where
   shrink :: a -> [a]
   shrink _ = []

 instance Arbitrary a
 instance Arbitrary Int
 }}}

 Error message is:
 {{{
 GHCInstance.hs:10:10: error:
     • Overlapping instances for Foo Int
         arising from a use of ‘Main.$dmfoo’
       Matching instances:
         instance Foo a -- Defined at GHCInstance.hs:9:10
         instance Foo Int -- Defined at GHCInstance.hs:10:10
     • In the expression: Main.$dmfoo @Int
       In an equation for ‘foo’: foo = Main.$dmfoo @Int
       In the instance declaration for ‘Foo Int’
 }}}
 Another example: code in #13754 description.

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


More information about the ghc-tickets mailing list