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
  • #20488
Closed
Open
Created Oct 07, 2021 by sheaf@sheafMaintainer

Incorrect module name in .bkp instantiation causes a "Failed to load interface" error

When attempting to compile the following .bkp file:

unit basic where
  signature Basic where

unit mod where
  module Mod where

unit main where
  dependency basic
    [ Basic = mod:Nonsense ]

GHC produces the error:

ghc --backpack Error2.bkp
[1 of 3] Processing basic
[2 of 3] Processing mod
  Instantiating mod
  [1 of 1] Compiling Mod              ( mod\Mod.hs, mod\Mod.o )
[3 of 3] Processing main
  Instantiating main
  [1 of 1] Including basic[Basic=mod:Nonsense]
    Instantiating basic[Basic=mod:Nonsense]
    [1 of 1] Compiling Basic[sig]       ( basic\Basic.hsig, basic\basic-ER8okxhuIcsFJ32OYv1Qcp\Basic.o )

<no location info>: error:
    Failed to load interface for `Nonsense'
There are files missing in the `mod' package,
try running 'ghc-pkg check'.
Use -v (or `:set -v` in ghci) to see a list of the files searched for.

It would be better to catch this problem earlier on, and report a proper error message.

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