mkloczko / derive-storable-plugin

MIT License
11 stars 4 forks source link

Error when compiling with GHC 9.2.2 #9

Closed RichardWarfield closed 2 years ago

RichardWarfield commented 2 years ago

I'm seeing the following error compiling with GHC 9.2.2:

src/Foreign/Storable/Generic/Plugin/Internal/Compile.hs:185:45: error:
    • Couldn't match type: ghci-9.2.2:GHCi.RemoteTypes.ForeignRef
                             ghci-9.2.2:GHCi.RemoteTypes.HValue
                     with: ForeignRef a0
      Expected: ForeignRef a0
        Actual: ghci-9.2.2:GHCi.RemoteTypes.ForeignHValue
      NB: ‘ForeignRef’
            is defined in ‘GHCi.RemoteTypes’ in package ‘ghci-9.2.2’
          ‘ghci-9.2.2:GHCi.RemoteTypes.ForeignRef’
            is defined in ‘GHCi.RemoteTypes’ in package ‘ghci-9.2.2’
    • In the first argument of ‘withForeignRef’, namely ‘foreign_hval’
      In the second argument of ‘($)’, namely
        ‘withForeignRef foreign_hval localRef’
      In a stmt of a 'do' block:
        hval <- liftIO $ withForeignRef foreign_hval localRef
    |
185 |     hval         <- liftIO $ withForeignRef foreign_hval localRef
mkloczko commented 2 years ago

Will look into it next week (or next weekend, that is 8th of July)

RichardWarfield commented 2 years ago

Actually upon further investigation I think this is related to my Nix configuration. Sorry for the trouble.