Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#2527 closed feature request (invalid)

all ghc language extensions should have their own flags

Reported by: fergushenderson Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.8.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Right now, to enable some ghc features such as unboxed types, there is no way of doing so except with "-fglasgow-exts", which also enables every other ghc feature. It would be nice to have individual options for every ghc language extension, so that we can only enable the specific extensions that we want.

Change History (4)

comment:1 Changed 8 years ago by duncan

Isn't this exactly what the language extensions given with the -X flags do? I was under the impression that as of ghc-6.8 there are no ghc extensions that are enabled just by -fglasgow-exts and don't have a specific language extension and corresponding -X flag.

Were you thinking of any extensions in particular? Unboxed tuples uses the UnboxedTuples language extension, ie the -XUnboxedTuples ghc flag or a pragma {#- LANGUAGE UnboxedTuples -#} at the top of the module source file.

comment:2 Changed 8 years ago by simonpj

  • difficulty set to Unknown
  • Resolution set to invalid
  • Status changed from new to closed

Indeed Duncan is right. Specifically, -fglasgow-exts sets the following flags, and that is its only effect

           , Opt_ForeignFunctionInterface
           , Opt_UnliftedFFITypes
           , Opt_GADTs
           , Opt_ImplicitParams
           , Opt_ScopedTypeVariables
           , Opt_UnboxedTuples
           , Opt_TypeSynonymInstances
           , Opt_StandaloneDeriving
           , Opt_DeriveDataTypeable
           , Opt_FlexibleContexts
           , Opt_FlexibleInstances
           , Opt_ConstrainedClassMethods
           , Opt_MultiParamTypeClasses
           , Opt_FunctionalDependencies
           , Opt_MagicHash
           , Opt_PolymorphicComponents
           , Opt_ExistentialQuantification
           , Opt_UnicodeSyntax
           , Opt_PostfixOperators
           , Opt_PatternGuards
           , Opt_LiberalTypeSynonyms
           , Opt_RankNTypes
           , Opt_ImpredicativeTypes
           , Opt_TypeOperators
           , Opt_RecursiveDo
           , Opt_ParallelListComp
           , Opt_EmptyDataDecls
           , Opt_KindSignatures
           , Opt_PatternSignatures
           , Opt_GeneralizedNewtypeDeriving
           , Opt_TypeFamilies ]

So I'll close this ticket. Fergus if some of these flags are too coarse-grained, open another ticket.


comment:3 Changed 8 years ago by simonmar

  • Architecture changed from Multiple to Unknown/Multiple

comment:4 Changed 8 years ago by simonmar

  • Operating System changed from Multiple to Unknown/Multiple
Note: See TracTickets for help on using tickets.