The effectful-plugin helps GHC resolve effect types in ambiguous contexts. Without the plugin, polymorphic functions like get or put in an Eff block may require explicit type applications if the surrounding context (like numeric literals or polymorphic operators) doesn't provide enough type information. With the plugin enabled, GHC can often infer the correct effect type automatically.
Without the plugin (requires explicit type application):
action :: (State Int :> es, State String :> es) => Eff es ()
action = do
x <- get @Int
put (x + 1)
With the plugin (automatic inference):
action :: (State Int :> es, State String :> es) => Eff es ()
action = do
x <- get
put (x + 1)