#7557: Default implementation for a type class function missing when profiling 
Reporter:  JohnWiegley       |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  7.6.1             |       Keywords:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
 Failure:  None/Unknown      |      Blockedby:                  
Blocking:                    |        Related:                  
 I tried to reduce this to a simpler case, but was unable to produce the

 At the following line you'll see the function `loadObject'` defined for
 the type class `Updatable`:


 And on this line I create an instance of the `Updatable` type class, with
 no override for this function:


 All is well until I build with profiling, as follows:
     cabal configure                             \
         --enable-tests                          \
         --enable-benchmarks                     \
         --enable-library-profiling              \
         --enable-executable-profiling           \
         --ghc-option=-rtsopts                   \
         --ghc-option=-prof                      \
         --ghc-option=-fprof-auto                \
     cabal build
 When built with profiling, the linker thinks that Blob.hs is trying to
 call another version of `loadObject'`,
 `_gitlibzm0zi5zi3_DataziGitziInternal_loadObjectzq_C1h_cc`, which is not
 defined anywhere.  The default implementation in the type class definition
 is named `_gitlibzm0zi5zi3_DataziGitziInternal_loadObjectzq_C1g_cc`.

 The happens with both 7.4.2 and 7.6.1.

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

Glasgow-haskell-bugs mailing list

Reply via email to