opt_NumbersStrict,
opt_Parallel,
opt_SMP,
+ opt_NoMonomorphismRestriction,
-- optimisation opts
opt_DoSemiTagging,
-- language opts
opt_AllStrict = lookUp SLIT("-fall-strict")
+opt_NoMonomorphismRestriction = lookUp SLIT("-fno-monomorphism-restriction")
opt_DictsStrict = lookUp SLIT("-fdicts-strict")
opt_IrrefutableTuples = lookUp SLIT("-firrefutable-tuples")
opt_MaxContextReductionDepth = lookup_def_int "-fcontext-stack" mAX_CONTEXT_REDUCTION_DEPTH
import {-# SOURCE #-} TcMatches ( tcGRHSs, tcMatchesFun )
import {-# SOURCE #-} TcExpr ( tcExpr )
+import CmdLineOpts ( opt_NoMonomorphismRestriction )
import HsSyn ( HsExpr(..), HsBinds(..), MonoBinds(..), Sig(..), StmtCtxt(..),
Match(..), collectMonoBinders, andMonoBinds
)
)
where
tysig_names = [name | (TySigInfo name _ _ _ _ _ _ _) <- tc_ty_sigs]
- is_unrestricted = isUnRestrictedGroup tysig_names mbind
+ is_unrestricted | opt_NoMonomorphismRestriction = True
+ | otherwise = isUnRestrictedGroup tysig_names mbind
justPatBindings bind@(PatMonoBind _ _ _) binds = bind `andMonoBinds` binds
justPatBindings (AndMonoBinds b1 b2) binds =