Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DerivingVia is not allowed in Safe Haskell #1

Open
kakkun61 opened this issue Feb 23, 2022 · 1 comment
Open

DerivingVia is not allowed in Safe Haskell #1

kakkun61 opened this issue Feb 23, 2022 · 1 comment

Comments

@kakkun61
Copy link

My package depends on the category package and cabal v2-test produced this:

…
Build profile: -w ghc-9.2.1 -O1
…
Building library for util-0.1.17.1..

on the commandline: warning:
    -XDerivingVia is not allowed in Safe Haskell; ignoring -XDerivingVia
…
Util.hs:122:49: error:
    Illegal deriving strategy: via
    Use DerivingVia to enable this extension
    |
122 |   deriving (Eq, Ord, Read, Show, Bounded, Enum) via p a
    |                                                 ^^^^^^^
@kakkun61
Copy link
Author

Workaround is to add this snippet to cabal.project etc.:

# cabal.project

package util
  ghc-options: -fno-safe-haskell

package alg
  ghc-options: -fno-safe-haskell

package category
  ghc-options: -fno-safe-haskell

sternenseemann added a commit to NixOS/nixpkgs that referenced this issue Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant