X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDynFlags.hs;h=7b06a48dd0646f499df48eab5d15a6b33f3920ca;hb=d7230e532eb485db85d4e446d7fba4192507b3ba;hp=a0882f26f72589ab0ca630748ab828ffafaa7b96;hpb=bec55bc5799e7579391a257f2e489b8e427d1aa8;p=ghc-hetmet.git diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index a0882f2..7b06a48 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -177,6 +177,9 @@ data DynFlag | Opt_BangPatterns | Opt_TypeFamilies | Opt_OverloadedStrings + | Opt_DisambiguateRecordFields + | Opt_RecordDotDot + | Opt_RecordPuns | Opt_GADTs | Opt_RelaxedPolyRec -- -X=RelaxedPolyRec @@ -558,13 +561,14 @@ data Option updOptLevel :: Int -> DynFlags -> DynFlags -- Set dynflags appropriate to the optimisation level updOptLevel n dfs - = dfs2{ optLevel = n } + = dfs2{ optLevel = final_n } where + final_n = max 0 (min 2 n) -- Clamp to 0 <= n <= 2 dfs1 = foldr (flip dopt_unset) dfs remove_dopts dfs2 = foldr (flip dopt_set) dfs1 extra_dopts - extra_dopts = [ f | (ns,f) <- optLevelFlags, n `elem` ns ] - remove_dopts = [ f | (ns,f) <- optLevelFlags, n `notElem` ns ] + extra_dopts = [ f | (ns,f) <- optLevelFlags, final_n `elem` ns ] + remove_dopts = [ f | (ns,f) <- optLevelFlags, final_n `notElem` ns ] optLevelFlags :: [([Int], DynFlag)] optLevelFlags @@ -1118,6 +1122,7 @@ impliedFlags = [ glasgowExtsFlags = [ Opt_GlasgowExts , Opt_FFI + , Opt_GADTs , Opt_ImplicitParams , Opt_ScopedTypeVariables , Opt_TypeFamilies ]