Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,862
    • Issues 4,862
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 455
    • Merge requests 455
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #20489
Closed
Open
Created Oct 07, 2021 by sheaf@sheafMaintainer

Backpack error message prints out data from interface file instead of source file

unit sig where
  signature Sig where
    data A
    instance Show A

unit impl where
  module Impl where
    type A = Int -> Int

unit main where
  dependency sig[Sig=impl:Impl]
  module Main where
    import Impl
    main = print "no"
ghc --backpack Error3.bkp                                       
[1 of 3] Processing sig                                                                                                   
  [1 of 1] Compiling Sig[sig]         ( sig\Sig.hsig, nothing ) [Flags changed]                                           
[2 of 3] Processing impl                                                                                                  
  Instantiating impl                                                                                                      
  [1 of 1] Compiling Impl             ( impl\Impl.hs, impl\Impl.o ) [Flags changed]                                       
[3 of 3] Processing main                                                                                                  
  Instantiating main                                                                                                      
  [1 of 1] Including sig[Sig=impl:Impl]                                                                                   
    Instantiating sig[Sig=impl:Impl]                                                                                      
    [1 of 1] Compiling Sig[sig]         ( sig\Sig.hsig, sig\sig-Absk5cIXTXe6UYhGMYGber\Sig.o )                            
                                                                                                                          
sig\sig-Absk5cIXTXe6UYhGMYGber\..\Sig.hi:1:1: error:                                                                      
    * No instance for (GHC.Show.Show A)                                                                                   
        arising when attempting to show that                                                                              
        instance [safe] GHC.Show.Show A -- Defined at Error3.bkp:4:14                                                     
        is provided by `impl:Impl'                                                                                        
        (maybe you haven't applied a function to enough arguments?)                                                       
    * while checking that impl:Impl implements signature Sig in sig[Sig=impl:Impl]                                        
  |                                                                                                                       
1 | ☺??d♂90320210928?????☻???☺???☺?☺?☺☺☻☺☺☺☻☺☻??????☺????X?☺?Ã?????☺?????<???????☺???◄►???????????????☺?v????☺????????☺???
?????☺???????B???????☺☻???☻?☻♥?☻♦                                                                                         
  | ^                                                                                                                     

It seems the problem is that we decide to report information contained in the interface file Sig.hi, which doesn't make any sense.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking