--default is 98 mode

-- | The flags for the supported extensions
hugsLanguageExtensions :: [(Extension, Flag)]
hugsLanguageExtensions =
    let doFlag (f, (enable, disable)) = [(EnableExtension  f, enable),
                                         (DisableExtension f, disable)]
        alwaysOn = ("", ""{- wrong -})
        ext98 = ("-98", ""{- wrong -})
    in concatMap doFlag
    [(OverlappingInstances       , ("+o",  "-o"))
    ,(IncoherentInstances        , ("+oO", "-O"))
    ,(HereDocuments              , ("+H",  "-H"))
    ,(TypeSynonymInstances       , ext98)
    ,(RecursiveDo                , ext98)
    ,(ParallelListComp           , ext98)
    ,(MultiParamTypeClasses      , ext98)
    ,(FunctionalDependencies     , ext98)
    ,(Rank2Types                 , ext98)
    ,(PolymorphicComponents      , ext98)
    ,(ExistentialQuantification  , ext98)
    ,(ScopedTypeVariables        , ext98)
    ,(ImplicitParams             , ext98)
    ,(ExtensibleRecords          , ext98)
    ,(RestrictedTypeSynonyms     , ext98)
    ,(FlexibleContexts           , ext98)
    ,(FlexibleInstances          , ext98)
    ,(ForeignFunctionInterface   , alwaysOn)
    ,(EmptyDataDecls             , alwaysOn)
    ,(CPP                        , alwaysOn)
    ]
hugsLanguageExtensions :: [(Extension, Flag)]
hugsLanguageExtensions =
    let doFlag (f, (enable, disable)) = [(EnableExtension  f, enable),
                                         (DisableExtension f, disable)]
        alwaysOn = ("", ""{- wrong -})
        ext98 = ("-98", ""{- wrong -})
    in concatMap doFlag
    [(OverlappingInstances       , ("+o",  "-o"))
    ,(IncoherentInstances        , ("+oO", "-O"))
    ,(HereDocuments              , ("+H",  "-H"))
    ,(TypeSynonymInstances       , ext98)
    ,(RecursiveDo                , ext98)
    ,(ParallelListComp           , ext98)
    ,(MultiParamTypeClasses      , ext98)
    ,(FunctionalDependencies     , ext98)
    ,(Rank2Types                 , ext98)
    ,(PolymorphicComponents      , ext98)
    ,(ExistentialQuantification  , ext98)
    ,(ScopedTypeVariables        , ext98)
    ,(ImplicitParams             , ext98)
    ,(ExtensibleRecords          , ext98)
    ,(RestrictedTypeSynonyms     , ext98)
    ,(FlexibleContexts           , ext98)
    ,(FlexibleInstances          , ext98)
    ,(ForeignFunctionInterface   , alwaysOn)
    ,(EmptyDataDecls             , alwaysOn)
    ,(CPP                        , alwaysOn)
    ]
hugsLanguageExtensions =
    let doFlag (f, (enable, disable)) = [(EnableExtension  f, enable),
                                         (DisableExtension f, disable)]
        alwaysOn = ("", ""{- wrong -})
        ext98 = ("-98", ""{- wrong -})
    in concatMap doFlag
    [(OverlappingInstances       , ("+o",  "-o"))
    ,(IncoherentInstances        , ("+oO", "-O"))
    ,(HereDocuments              , ("+H",  "-H"))
    ,(TypeSynonymInstances       , ext98)
    ,(RecursiveDo                , ext98)
    ,(ParallelListComp           , ext98)
    ,(MultiParamTypeClasses      , ext98)
    ,(FunctionalDependencies     , ext98)
    ,(Rank2Types                 , ext98)
    ,(PolymorphicComponents      , ext98)
    ,(ExistentialQuantification  , ext98)
    ,(ScopedTypeVariables        , ext98)
    ,(ImplicitParams             , ext98)
    ,(ExtensibleRecords          , ext98)
    ,(RestrictedTypeSynonyms     , ext98)
    ,(FlexibleContexts           , ext98)
    ,(FlexibleInstances          , ext98)
    ,(ForeignFunctionInterface   , alwaysOn)
    ,(EmptyDataDecls             , alwaysOn)
    ,(CPP                        , alwaysOn)
    ]