Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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,828
    • Issues 4,828
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 448
    • Merge requests 448
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #20562

Closed
Open
Created Oct 26, 2021 by Oleg Grenrus@phadejDeveloper

Can't find interface-file declaration for variable getSolo

With a file:

{-# LANGUAGE PatternSynonyms #-}
module Main (main) where

import GHC.Tuple

type OneTuple = Solo

only :: OneTuple a -> a
only = getSolo

pattern OneTuple :: a -> Solo a
pattern OneTuple a = Solo a

main :: IO ()
main = print (only (OneTuple 'x'))

the current 9.2 tip and master fails with

Issue.hs:9:8: error:
    • Can't find interface-file declaration for variable getSolo
        Probable cause: bug in .hi-boot file, or inconsistent .hi file
        Use -ddump-if-trace to get an idea of which file caused the error
    • In the expression: getSolo
      In an equation for ‘only’: only = getSolo

This looks like a release blocker for 9.2


EDIT:

I think that having getSolo as a selector isn't as easy. Something to change in GHC.Builtin.Types? fst and snd aren't selectors of (,), though they could be, in pseudo-Haskell:

data (,) a b = (,)
    { fst :: a
    , snd :: b
    }

An easy fix, I suppose, is to demote getSolo to an ordinary function.

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