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

GHC ghc-devs at haskell.org
Thu May 25 14:59:21 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 (Type    |              Version:  8.0.2
  checker)                           |
      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 simonpj:

@@ -17,2 +17,3 @@
-     • Overlapping instances for Foo Int
-         arising from a use of ‘Main.$dmfoo’
+ T13755.hs:9:10: error:
+     • Overlapping instances for Arbitrary Int
+         arising from a use of ‘Bug.$dmshrink’
@@ -20,5 +21,5 @@
-         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’
+         instance Arbitrary a -- Defined at T13755.hs:8:10
+         instance Arbitrary Int -- Defined at T13755.hs:9:10
+     • In the expression: Bug.$dmshrink @Int
+       In an equation for ‘shrink’: shrink = Bug.$dmshrink @Int
+       In the instance declaration for ‘Arbitrary Int’

New description:

 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:
 T13755.hs:9:10: error:
     • Overlapping instances for Arbitrary Int
         arising from a use of ‘Bug.$dmshrink’
       Matching instances:
         instance Arbitrary a -- Defined at T13755.hs:8:10
         instance Arbitrary Int -- Defined at T13755.hs:9:10
     • In the expression: Bug.$dmshrink @Int
       In an equation for ‘shrink’: shrink = Bug.$dmshrink @Int
       In the instance declaration for ‘Arbitrary Int’
 }}}
 Another example: code in #13754 description.

--

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


More information about the ghc-tickets mailing list