Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
d361262b
Commit
d361262b
authored
Jun 18, 2012
by
Ian Lynagh
Browse files
Make -firrefutable-tuples a dynamic flag
parent
ee7c4f43
Changes
4
Hide whitespace changes
Inline
Side-by-side
compiler/iface/BinIface.hs
View file @
d361262b
...
...
@@ -38,7 +38,6 @@ import DynFlags
import
UniqFM
import
UniqSupply
import
CostCentre
import
StaticFlags
import
Panic
import
Binary
import
SrcLoc
...
...
compiler/main/DynFlags.hs
View file @
d361262b
...
...
@@ -269,6 +269,7 @@ data DynFlag
|
Opt_PedanticBottoms
-- Be picky about how we treat bottom
|
Opt_LlvmTBAA
-- Use LLVM TBAA infastructure for improving AA (hidden flag)
|
Opt_RegLiveness
-- Use the STG Reg liveness information (hidden flag)
|
Opt_IrrefutableTuples
-- Interface files
|
Opt_IgnoreInterfacePragmas
...
...
@@ -1975,6 +1976,7 @@ fFlags = [
(
"regs-iterative"
,
Opt_RegsIterative
,
nop
),
(
"llvm-tbaa"
,
Opt_LlvmTBAA
,
nop
),
-- hidden flag
(
"regs-liveness"
,
Opt_RegLiveness
,
nop
),
-- hidden flag
(
"irrefutable-tuples"
,
Opt_IrrefutableTuples
,
nop
),
(
"gen-manifest"
,
Opt_GenManifest
,
nop
),
(
"embed-manifest"
,
Opt_EmbedManifest
,
nop
),
(
"ext-core"
,
Opt_EmitExternalCore
,
nop
),
...
...
compiler/main/StaticFlags.hs
View file @
d361262b
...
...
@@ -48,7 +48,6 @@ module StaticFlags (
-- language opts
opt_DictsStrict
,
opt_IrrefutableTuples
,
opt_Parallel
,
-- optimisation opts
...
...
@@ -266,9 +265,6 @@ opt_Hpc = lookUp (fsLit "-fhpc")
opt_DictsStrict
::
Bool
opt_DictsStrict
=
lookUp
(
fsLit
"-fdicts-strict"
)
opt_IrrefutableTuples
::
Bool
opt_IrrefutableTuples
=
lookUp
(
fsLit
"-firrefutable-tuples"
)
opt_Parallel
::
Bool
opt_Parallel
=
lookUp
(
fsLit
"-fparallel"
)
...
...
compiler/typecheck/TcPat.lhs
View file @
d361262b
...
...
@@ -469,6 +469,8 @@ tc_pat penv (TuplePat pats boxity _) pat_ty thing_inside
; (coi, arg_tys) <- matchExpectedPatTy (matchExpectedTyConApp tc) pat_ty
; (pats', res) <- tc_lpats penv pats arg_tys thing_inside
; dflags <- getDynFlags
-- Under flag control turn a pattern (x,y,z) into ~(x,y,z)
-- so that we can experiment with lazy tuple-matching.
-- This is a pretty odd place to make the switch, but
...
...
@@ -477,7 +479,7 @@ tc_pat penv (TuplePat pats boxity _) pat_ty thing_inside
-- pat_ty /= pat_ty iff coi /= IdCo
unmangled_result = TuplePat pats' boxity pat_ty'
possibly_mangled_result
|
o
pt_IrrefutableTuples &&
|
dopt O
pt_IrrefutableTuples
dflags
&&
isBoxed boxity = LazyPat (noLoc unmangled_result)
| otherwise = unmangled_result
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment