Recognize LANGUAGE and OPTIONS_GHC pragmas in GHCi
Motivation
Continuing #20473 (closed) in which support for mixing imports and declarations in GHCi was added, I'd like to propose recognizing LANGUAGE
and OPTIONS_GHC
pragmas in GHCi as well, so that users pasting a code snippet won't have to enable language extensions and options manually.
Proposal
When a line is run in GHCi, if it contains any LANGUAGE
and/or OPTIONS_GHC
pragmas, set those options. I already have a working prototype at MorrowM/ghc@b659c189