Executable with re-exported 'main' action does not compile with GHC 9.0.1
I have a package with an executable defined as follows:
module Main (main) where
import Network.AWS.CloudFront.SignedCookies.CLI (main)
This was working in GHC 8.x, but in GHC 9.0.1 compilation fails:
executables/aws-cloudfront-signed-cookies.hs:1:1: error:
Error: The IO action ‘main’ is not defined in module ‘Main’
|
1 | module Main (main) where
| ^
I am able to work around this by rephrasing this module such that main
is its own definition in the Main
module rather than merely being re-exported from the Main
module. This version does compile with GHC 9.0.1:
module Main (main) where
import qualified Network.AWS.CloudFront.SignedCookies.CLI
main :: IO ()
main = Network.AWS.CloudFront.SignedCookies.CLI.main
I have not found anything in the release notes to suggest that this change was intentional.