diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-10-09 00:27:28 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-10-09 12:32:04 +0100 |
commit | 0a768bcbe6f7238d0bcdddd85fe24c99189453a0 (patch) | |
tree | a1e75804cc73c1f88fb3deae9fa7aaf0aaa75753 /compiler/iface/BuildTyCl.lhs | |
parent | 9c6223dd780b5a41be98702a583a1b7229841305 (diff) | |
download | haskell-0a768bcbe6f7238d0bcdddd85fe24c99189453a0.tar.gz |
Make the opt_UF_* static flags dynamic
I also removed the default values from the "Discounts and thresholds"
note: most of them were no longer up-to-date.
Along the way I added FloatSuffix to the argument parser, analogous to
IntSuffix.
Diffstat (limited to 'compiler/iface/BuildTyCl.lhs')
-rw-r--r-- | compiler/iface/BuildTyCl.lhs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/iface/BuildTyCl.lhs b/compiler/iface/BuildTyCl.lhs index 5f5e8a1896..be757c62ad 100644 --- a/compiler/iface/BuildTyCl.lhs +++ b/compiler/iface/BuildTyCl.lhs @@ -37,6 +37,7 @@ import TyCon import Type import Coercion +import DynFlags import TcRnMonad import Util import Outputable @@ -205,6 +206,8 @@ buildClass :: Bool -- True <=> do not include unfoldings buildClass no_unf tycon_name tvs sc_theta fds at_items sig_stuff tc_isrec = fixM $ \ rec_clas -> -- Only name generation inside loop do { traceIf (text "buildClass") + ; dflags <- getDynFlags + ; datacon_name <- newImplicitBinder tycon_name mkClassDataConOcc -- The class name is the 'parent' for this datacon, not its tycon, -- because one should import the class to get the binding for @@ -217,7 +220,7 @@ buildClass no_unf tycon_name tvs sc_theta fds at_items sig_stuff tc_isrec -- Make selectors for the superclasses ; sc_sel_names <- mapM (newImplicitBinder tycon_name . mkSuperDictSelOcc) [1..length sc_theta] - ; let sc_sel_ids = [ mkDictSelId no_unf sc_name rec_clas + ; let sc_sel_ids = [ mkDictSelId dflags no_unf sc_name rec_clas | sc_name <- sc_sel_names] -- We number off the Dict superclass selectors, 1, 2, 3 etc so that we -- can construct names for the selectors. Thus @@ -282,13 +285,14 @@ buildClass no_unf tycon_name tvs sc_theta fds at_items sig_stuff tc_isrec where mk_op_item :: Class -> TcMethInfo -> TcRnIf n m ClassOpItem mk_op_item rec_clas (op_name, dm_spec, _) - = do { dm_info <- case dm_spec of + = do { dflags <- getDynFlags + ; dm_info <- case dm_spec of NoDM -> return NoDefMeth GenericDM -> do { dm_name <- newImplicitBinder op_name mkGenDefMethodOcc ; return (GenDefMeth dm_name) } VanillaDM -> do { dm_name <- newImplicitBinder op_name mkDefaultMethodOcc ; return (DefMeth dm_name) } - ; return (mkDictSelId no_unf op_name rec_clas, dm_info) } + ; return (mkDictSelId dflags no_unf op_name rec_clas, dm_info) } \end{code} Note [Class newtypes and equality predicates] |