+-- minuswRemovesOpts should be every warning option
+minuswRemovesOpts
+ = minusWallOpts ++
+ [Opt_WarnImplicitPrelude,
+ Opt_WarnIncompletePatternsRecUpd,
+ Opt_WarnSimplePatterns,
+ Opt_WarnMonomorphism,
+ Opt_WarnTabs
+ ]
+
-- -----------------------------------------------------------------------------
-- CoreToDo: abstraction of core-to-core passes to run.
-- -----------------------------------------------------------------------------
-- CoreToDo: abstraction of core-to-core passes to run.
spec_constr = dopt Opt_SpecConstr dflags
liberate_case = dopt Opt_LiberateCase dflags
rule_check = ruleCheck dflags
spec_constr = dopt Opt_SpecConstr dflags
liberate_case = dopt Opt_LiberateCase dflags
rule_check = ruleCheck dflags
+
+ -- 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,
-- Specialisation is best done before full laziness
-- so that overloaded functions have all their dictionary lambdas manifest
CoreDoSpecialising,
, ( "Werror" , NoArg (setDynFlag Opt_WarnIsError) )
, ( "Wall" , NoArg (mapM_ setDynFlag minusWallOpts) )
, ( "Wnot" , NoArg (mapM_ unSetDynFlag minusWallOpts) ) /* DEPREC */
, ( "Werror" , NoArg (setDynFlag Opt_WarnIsError) )
, ( "Wall" , NoArg (mapM_ setDynFlag minusWallOpts) )
, ( "Wnot" , NoArg (mapM_ unSetDynFlag minusWallOpts) ) /* DEPREC */
------ Optimisation flags ------------------------------------------
, ( "O" , NoArg (upd (setOptLevel 1)))
------ Optimisation flags ------------------------------------------
, ( "O" , NoArg (upd (setOptLevel 1)))
( "warn-duplicate-exports", Opt_WarnDuplicateExports ),
( "warn-hi-shadowing", Opt_WarnHiShadows ),
( "warn-implicit-prelude", Opt_WarnImplicitPrelude ),
( "warn-duplicate-exports", Opt_WarnDuplicateExports ),
( "warn-hi-shadowing", Opt_WarnHiShadows ),
( "warn-implicit-prelude", Opt_WarnImplicitPrelude ),
( "PolymorphicComponents", Opt_PolymorphicComponents ),
( "ExistentialQuantification", Opt_ExistentialQuantification ),
( "KindSignatures", Opt_KindSignatures ),
( "PolymorphicComponents", Opt_PolymorphicComponents ),
( "ExistentialQuantification", Opt_ExistentialQuantification ),
( "KindSignatures", Opt_KindSignatures ),
( "EmptyDataDecls", Opt_EmptyDataDecls ),
( "ParallelListComp", Opt_ParallelListComp ),
( "FI", Opt_FFI ), -- support `-ffi'...
( "FFI", Opt_FFI ), -- ...and also `-fffi'
( "ForeignFunctionInterface", Opt_FFI ),
( "EmptyDataDecls", Opt_EmptyDataDecls ),
( "ParallelListComp", Opt_ParallelListComp ),
( "FI", Opt_FFI ), -- support `-ffi'...
( "FFI", Opt_FFI ), -- ...and also `-fffi'
( "ForeignFunctionInterface", Opt_FFI ),
( "Rank2Types", Opt_Rank2Types ),
( "RankNTypes", Opt_RankNTypes ),
( "Rank2Types", Opt_Rank2Types ),
( "RankNTypes", Opt_RankNTypes ),
( "RecursiveDo", Opt_RecursiveDo ),
( "Arrows", Opt_Arrows ), -- arrow syntax
( "Parr", Opt_PArr ),
( "RecursiveDo", Opt_RecursiveDo ),
( "Arrows", Opt_Arrows ), -- arrow syntax
( "Parr", Opt_PArr ),
( "ExtendedDefaultRules", Opt_ExtendedDefaultRules ),
( "ImplicitParams", Opt_ImplicitParams ),
( "ScopedTypeVariables", Opt_ScopedTypeVariables ),
( "ExtendedDefaultRules", Opt_ExtendedDefaultRules ),
( "ImplicitParams", Opt_ImplicitParams ),
( "ScopedTypeVariables", Opt_ScopedTypeVariables ),
+ ( "UnboxedTuples", Opt_UnboxedTuples ),
+ ( "StandaloneDeriving", Opt_StandaloneDeriving ),
+ ( "DeriveDataTypeable", Opt_DeriveDataTypeable ),
( "TypeSynonymInstances", Opt_TypeSynonymInstances ),
( "FlexibleContexts", Opt_FlexibleContexts ),
( "FlexibleInstances", Opt_FlexibleInstances ),
( "TypeSynonymInstances", Opt_TypeSynonymInstances ),
( "FlexibleContexts", Opt_FlexibleContexts ),
( "FlexibleInstances", Opt_FlexibleInstances ),
( "MultiParamTypeClasses", Opt_MultiParamTypeClasses ),
( "FunctionalDependencies", Opt_FunctionalDependencies ),
( "GeneralizedNewtypeDeriving", Opt_GeneralizedNewtypeDeriving ),
( "MultiParamTypeClasses", Opt_MultiParamTypeClasses ),
( "FunctionalDependencies", Opt_FunctionalDependencies ),
( "GeneralizedNewtypeDeriving", Opt_GeneralizedNewtypeDeriving ),
, Opt_MultiParamTypeClasses
, Opt_FunctionalDependencies
, Opt_MagicHash
, Opt_MultiParamTypeClasses
, Opt_FunctionalDependencies
, Opt_MagicHash