Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 26, 2026

Description

Polysemy.Plugin was configured inconsistently across the codebase via both per-file OPTIONS_GHC pragmas and cabal ghc-options. This standardizes on cabal-level configuration.

Changes:

  • Removed {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} from 32 source files (29 in spar, 3 in polysemy-wire-zoo)
  • Added -fplugin=Polysemy.Plugin to ghc-options in:
    • spar.cabal: library, test-suite spec, executable spar-integration
    • polysemy-wire-zoo.cabal: library, test-suite spec

Before:

{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

module Spar.API where

After:

module Spar.API where
library
  ghc-options: ... -fplugin=Polysemy.Plugin

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines
Original prompt

There are two ways to enable the Polysemy.Plugin GHC compiler plugin in our project:

  • By adding ghc-options: -fplugin=Polysemy.Plugin to .cabal files
  • By adding a language extension to .hs source files: `{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

We want to unify this.
Please,

  • remove all {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} language extensions from Haskell source files
  • Add -fplugin=Polysemy.Plugin to all ghc-options Cabal file sections that related to modules which are using/importing Polysemy.
  • ensure there are no duplicate entries of -fplugin=Polysemy.Plugin in ghc-options Cabal file sections

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: supersven <6235937+supersven@users.noreply.github.com>
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Jan 26, 2026
Copilot AI changed the title [WIP] Unify Polysemy.Plugin usage in project Consolidate Polysemy.Plugin configuration to cabal ghc-options Jan 26, 2026
Copilot AI requested a review from supersven January 26, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants