| Opt_MonomorphismRestriction
| Opt_MonoPatBinds
| Opt_ExtendedDefaultRules -- Use GHC's extended rules for defaulting
- | Opt_GlasgowExts
| Opt_FFI
+ | Opt_UnliftedFFITypes
| Opt_PArr -- Syntactic support for parallel arrays
| Opt_Arrows -- Arrow-notation syntax
| Opt_TH
| Opt_ImplicitPrelude
| Opt_ScopedTypeVariables
| Opt_UnboxedTuples
- | Opt_ExpressionSignaturesUnboxedTuples
- | Opt_TypeSynonymUnboxedTuples
| Opt_BangPatterns
| Opt_TypeFamilies
| Opt_OverloadedStrings
| Opt_RecordPuns
| Opt_GADTs
| Opt_RelaxedPolyRec -- -X=RelaxedPolyRec
+ | Opt_StandaloneDeriving
+ | Opt_DeriveDataTypeable
| Opt_TypeSynonymInstances
| Opt_FlexibleContexts
| Opt_FlexibleInstances
+ | Opt_ConstrainedClassMethods
| Opt_MultiParamTypeClasses
| Opt_FunctionalDependencies
| Opt_UnicodeSyntax
| CoreCSE
| CoreDoRuleCheck Int{-CompilerPhase-} String -- Check for non-application of rules
-- matching this string
+ | CoreDoVectorisation
| CoreDoNothing -- Useful when building up
| CoreDoPasses [CoreToDo] -- lists of these things
spec_constr = dopt Opt_SpecConstr dflags
liberate_case = dopt Opt_LiberateCase dflags
rule_check = ruleCheck dflags
+ vectorisation = dopt Opt_Vectorise dflags
core_todo =
if opt_level == 0 then
MaxSimplifierIterations max_iter
],
+
+ -- We run vectorisation here for now, but we might also try to run
+ -- it later
+ runWhen vectorisation (CoreDoPasses [
+ CoreDoVectorisation,
+ CoreDoSimplify SimplGently
+ [NoCaseOfCase,
+ MaxSimplifierIterations max_iter]]),
+
-- Specialisation is best done before full laziness
-- so that overloaded functions have all their dictionary lambdas manifest
CoreDoSpecialising,
( "FI", Opt_FFI ), -- support `-ffi'...
( "FFI", Opt_FFI ), -- ...and also `-fffi'
( "ForeignFunctionInterface", Opt_FFI ),
+ ( "UnliftedFFITypes", Opt_UnliftedFFITypes ),
( "PartiallyAppliedClosedTypeSynonyms", Opt_PartiallyAppliedClosedTypeSynonyms ),
( "Rank2Types", Opt_Rank2Types ),
( "ImplicitParams", Opt_ImplicitParams ),
( "ScopedTypeVariables", Opt_ScopedTypeVariables ),
( "UnboxedTuples", Opt_UnboxedTuples ),
- ( "ExpressionSignaturesUnboxedTuples", Opt_ExpressionSignaturesUnboxedTuples ),
- ( "TypeSynonymUnboxedTuples", Opt_TypeSynonymUnboxedTuples ),
+ ( "StandaloneDeriving", Opt_StandaloneDeriving ),
+ ( "DeriveDataTypeable", Opt_DeriveDataTypeable ),
( "TypeSynonymInstances", Opt_TypeSynonymInstances ),
( "FlexibleContexts", Opt_FlexibleContexts ),
( "FlexibleInstances", Opt_FlexibleInstances ),
+ ( "ConstrainedClassMethods", Opt_ConstrainedClassMethods ),
( "MultiParamTypeClasses", Opt_MultiParamTypeClasses ),
( "FunctionalDependencies", Opt_FunctionalDependencies ),
( "GeneralizedNewtypeDeriving", Opt_GeneralizedNewtypeDeriving ),
( Opt_GADTs, [Opt_RelaxedPolyRec] ) -- We want type-sig variables to be completely rigid for GADTs
]
-glasgowExtsFlags = [ Opt_GlasgowExts
- , Opt_PrintExplicitForalls
+glasgowExtsFlags = [
+ Opt_PrintExplicitForalls
, Opt_FFI
+ , Opt_UnliftedFFITypes
, Opt_GADTs
, Opt_ImplicitParams
, Opt_ScopedTypeVariables
, Opt_UnboxedTuples
- , Opt_ExpressionSignaturesUnboxedTuples
- , Opt_TypeSynonymUnboxedTuples
, Opt_TypeSynonymInstances
+ , Opt_StandaloneDeriving
+ , Opt_DeriveDataTypeable
, Opt_FlexibleContexts
, Opt_FlexibleInstances
+ , Opt_ConstrainedClassMethods
, Opt_MultiParamTypeClasses
, Opt_FunctionalDependencies
, Opt_MagicHash