Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Cannot build basement with GHC 9.0: unsafeCoerce# no longer exported by GHC.Prim in base 4.15+ #548

@LaurentRDC

Description

@LaurentRDC

Hello,

I wanted to bring to your attention that I could not build my package pandoc-plot with GHC 9.0.1 because in basement-0.0.11, unsafeCoerce# is imported from GHC.Prim:

...
basement                         > [16 of 84] Compiling Basement.Floating
basement                         > [17 of 84] Compiling Basement.Monad
basement                         > 
basement                         > /tmp/stack-68bc6b9780c2c4d5/basement-0.0.11/Basement/Monad.hs:98:31: error:
basement                         >     Variable not in scope:
basement                         >       unsafeCoerce#
...

From the migrating guide:

The unsafeCoerce# function has been moved from GHC.Prim to Unsafe.Coerce. As a result, attempting to import unsafeCoerce# from GHC.Prim (or GHC.Base, which previously re-exported unsafeCoerce#) will result in an error with GHC 9.0. A backwards-compatible way to fix the error is to import unsafeCoerce# from GHC.Exts instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions