2 % (c) The AQUA Project, Glasgow University, 1996-98
4 \section[CmdLineOpts]{Things to do with command-line options}
18 opt_AllowOverlappingInstances,
19 opt_AllowUndecidableInstances,
20 opt_AutoSccsOnAllToplevs,
21 opt_AutoSccsOnExportedToplevs,
22 opt_AutoSccsOnIndividualCafs,
30 opt_D_dump_occur_anal,
35 opt_D_dump_simpl_iterations,
42 opt_D_show_rn_imports,
43 opt_D_simplifier_stats,
45 opt_D_verbose_core2core,
46 opt_D_verbose_stg2stg,
54 opt_EnsureSplittableC,
60 opt_IgnoreIfacePragmas,
61 opt_IrrefutableTuples,
62 opt_LiberateCaseThreshold,
63 opt_MaxContextReductionDepth,
64 opt_MultiParamClasses,
66 opt_NoImplicitPrelude,
70 opt_OmitInterfacePragmas,
77 opt_ProduceExportCStubs,
78 opt_ProduceExportHStubs,
83 opt_StgDoLetNoEscapes,
86 opt_InterfaceUnfoldThreshold,
88 opt_UnfoldingCreationThreshold,
89 opt_UnfoldingConDiscount,
90 opt_UnfoldingUseThreshold,
91 opt_UnfoldingKeenessFactor,
94 opt_WarnNameShadowing,
95 opt_WarnUnusedMatches,
97 opt_WarnUnusedImports,
98 opt_WarnIncompletePatterns,
99 opt_WarnOverlappingPatterns,
100 opt_WarnSimplePatterns,
101 opt_WarnMissingMethods,
102 opt_WarnDuplicateExports,
105 opt_PruneTyDecls, opt_PruneInstDecls,
109 #include "HsVersions.h"
111 import Array ( array, (//) )
114 import Constants -- Default values for some flags
116 import Maybes ( assocMaybe, firstJust, maybeToBool )
117 import Util ( startsWith, panic, panic# )
119 #if __GLASGOW_HASKELL__ < 301
120 import ArrBase ( Array(..) )
122 import PrelArr ( Array(..) )
126 A command-line {\em switch} is (generally) either on or off; e.g., the
127 ``verbose'' (-v) switch is either on or off. (The \tr{-G<group>}
128 switch is an exception; it's set to a string, or nothing.)
130 A list of {\em ToDo}s is things to be done in a particular part of
131 processing. A (fictitious) example for the Core-to-Core simplifier
132 might be: run the simplifier, then run the strictness analyser, then
133 run the simplifier again (three ``todos'').
135 There are three ``to-do processing centers'' at the moment. In the
136 main loop (\tr{main/Main.lhs}), in the Core-to-Core processing loop
137 (\tr{simplCore/SimplCore.lhs), and in the STG-to-STG processing loop
138 (\tr{simplStg/SimplStg.lhs}).
140 %************************************************************************
142 \subsection{Datatypes associated with command-line options}
144 %************************************************************************
148 = SwBool Bool -- on/off
149 | SwString FAST_STRING -- nothing or a String
150 | SwInt Int -- nothing or an Int
154 data CoreToDo -- These are diff core-to-core passes,
155 -- which may be invoked in any order,
156 -- as many times as you like.
158 = CoreDoSimplify -- The core-to-core simplifier.
159 (SimplifierSwitch -> SwitchResult)
160 -- Each run of the simplifier can take a different
161 -- set of simplifier-specific flags.
162 | CoreDoCalcInlinings1
163 | CoreDoCalcInlinings2
171 | CoreDoFoldrBuildWorkerWrapper
172 | CoreDoFoldrBuildWWAnal
178 | StgDoUpdateAnalysis
180 | StgDoMassageForProfiling -- should be (next to) last
181 -- There's also setStgVarInfo, but its absolute "lastness"
182 -- is so critical that it is hardwired in (no flag).
187 data SimplifierSwitch
189 | SimplFloatLetsExposingWHNF
190 | SimplOkToFloatPrimOps
191 | SimplAlwaysFloatLetsFromLets
195 | SimplMayDeleteConjurableIds
196 | SimplPedanticBottoms -- see Simplifier for an explanation
197 | SimplDoArityExpand -- expand arity of bindings
198 | SimplDoFoldrBuild -- This is the per-simplification flag;
199 -- see also FoldrBuildOn, used elsewhere
201 | SimplDoInlineFoldrBuild
202 -- inline foldr/build (*after* f/b rule is used)
205 | SimplDoLambdaEtaExpansion
207 | EssentialUnfoldingsOnly -- never mind the thresholds, only
208 -- do unfoldings that *must* be done
209 -- (to saturate constructors and primitives)
211 | MaxSimplifierIterations Int
213 | SimplNoLetFromCase -- used when turning off floating entirely
214 | SimplNoLetFromApp -- (for experimentation only) WDP 95/10
215 | SimplNoLetFromStrictLet
221 %************************************************************************
223 \subsection{Classifying command-line options}
225 %************************************************************************
228 lookUp :: FAST_STRING -> Bool
229 lookup_int :: String -> Maybe Int
230 lookup_def_int :: String -> Int -> Int
231 lookup_def_float :: String -> Float -> Float
232 lookup_str :: String -> Maybe String
234 lookUp sw = maybeToBool (assoc_opts sw)
236 lookup_str sw = firstJust (map (startsWith sw) unpacked_opts)
238 lookup_int sw = case (lookup_str sw) of
240 Just xx -> Just (read xx)
242 lookup_def_int sw def = case (lookup_str sw) of
243 Nothing -> def -- Use default
246 lookup_def_float sw def = case (lookup_str sw) of
247 Nothing -> def -- Use default
250 assoc_opts = assocMaybe [ (a, True) | a <- argv ]
251 unpacked_opts = map _UNPK_ argv
254 Putting the compiler options into temporary at-files
255 may turn out to be necessary later on if we turn hsc into
256 a pure Win32 application where I think there's a command-line
257 length limit of 255. unpacked_opts understands the @ option.
259 assoc_opts = assocMaybe [ (_PK_ a, True) | a <- unpacked_opts ]
261 unpacked_opts :: [String]
267 expandAts ('@':fname) = words (unsafePerformIO (readFile fname))
273 opt_AllStrict = lookUp SLIT("-fall-strict")
274 opt_AllowOverlappingInstances = lookUp SLIT("-fallow-overlapping-instances")
275 opt_AllowUndecidableInstances = lookUp SLIT("-fallow-undecidable-instances")
276 opt_AutoSccsOnAllToplevs = lookUp SLIT("-fauto-sccs-on-all-toplevs")
277 opt_AutoSccsOnExportedToplevs = lookUp SLIT("-fauto-sccs-on-exported-toplevs")
278 opt_AutoSccsOnIndividualCafs = lookUp SLIT("-fauto-sccs-on-individual-cafs")
279 opt_D_dump_absC = lookUp SLIT("-ddump-absC")
280 opt_D_dump_asm = lookUp SLIT("-ddump-asm")
281 opt_D_dump_deriv = lookUp SLIT("-ddump-deriv")
282 opt_D_dump_ds = lookUp SLIT("-ddump-ds")
283 opt_D_dump_flatC = lookUp SLIT("-ddump-flatC")
284 opt_D_dump_inlinings = lookUp SLIT("-ddump-inlinings")
285 opt_D_dump_foreign = lookUp SLIT("-ddump-foreign-stubs")
286 opt_D_dump_occur_anal = lookUp SLIT("-ddump-occur-anal")
287 opt_D_dump_rdr = lookUp SLIT("-ddump-rdr")
288 opt_D_dump_realC = lookUp SLIT("-ddump-realC")
289 opt_D_dump_rn = lookUp SLIT("-ddump-rn")
290 opt_D_dump_simpl = lookUp SLIT("-ddump-simpl")
291 opt_D_dump_simpl_iterations = lookUp SLIT("-ddump-simpl-iterations")
292 opt_D_dump_spec = lookUp SLIT("-ddump-spec")
293 opt_D_dump_stg = lookUp SLIT("-ddump-stg")
294 opt_D_dump_stranal = lookUp SLIT("-ddump-stranal")
295 opt_D_dump_tc = lookUp SLIT("-ddump-tc")
296 opt_D_show_passes = lookUp SLIT("-dshow-passes")
297 opt_D_show_rn_trace = lookUp SLIT("-dshow-rn-trace")
298 opt_D_show_rn_imports = lookUp SLIT("-dshow-rn-imports")
299 opt_D_simplifier_stats = lookUp SLIT("-dsimplifier-stats")
300 opt_D_source_stats = lookUp SLIT("-dsource-stats")
301 opt_D_verbose_core2core = lookUp SLIT("-dverbose-simpl")
302 opt_D_verbose_stg2stg = lookUp SLIT("-dverbose-stg")
303 opt_DictsStrict = lookUp SLIT("-fdicts-strict")
304 opt_DoCoreLinting = lookUp SLIT("-dcore-lint")
305 opt_DoStgLinting = lookUp SLIT("-dstg-lint")
306 opt_DoEtaReduction = lookUp SLIT("-fdo-eta-reduction")
307 opt_DoSemiTagging = lookUp SLIT("-fsemi-tagging")
308 opt_DoTickyProfiling = lookUp SLIT("-fticky-ticky")
309 opt_EmitCExternDecls = lookUp SLIT("-femit-extern-decls")
310 opt_EnsureSplittableC = lookUp SLIT("-fglobalise-toplev-names")
311 opt_FoldrBuildOn = lookUp SLIT("-ffoldr-build-on")
312 opt_GranMacros = lookUp SLIT("-fgransim")
313 opt_GlasgowExts = lookUp SLIT("-fglasgow-exts")
314 opt_HiMap = lookup_str "-himap=" -- file saying where to look for .hi files
315 opt_HiVersion = lookup_def_int "-fhi-version=" 0 -- what version we're compiling.
316 opt_IgnoreIfacePragmas = lookUp SLIT("-fignore-interface-pragmas")
317 opt_IrrefutableTuples = lookUp SLIT("-firrefutable-tuples")
318 opt_MaxContextReductionDepth = lookup_def_int "-fcontext-stack" mAX_CONTEXT_REDUCTION_DEPTH
319 opt_MultiParamClasses = opt_GlasgowExts
320 opt_NoHiCheck = lookUp SLIT("-fno-hi-version-check")
321 opt_NoImplicitPrelude = lookUp SLIT("-fno-implicit-prelude")
322 opt_NoPreInlining = lookUp SLIT("-fno-pre-inlining")
323 opt_NumbersStrict = lookUp SLIT("-fnumbers-strict")
324 opt_OmitBlackHoling = lookUp SLIT("-dno-black-holing")
325 opt_OmitInterfacePragmas = lookUp SLIT("-fomit-interface-pragmas")
326 opt_PprStyle_NoPrags = lookUp SLIT("-dppr-noprags")
327 opt_PprStyle_Debug = lookUp SLIT("-dppr-debug")
328 opt_PprUserLength = lookup_def_int "-dppr-user-length" 5 --ToDo: give this a name
329 opt_ProduceC = lookup_str "-C="
330 opt_ProduceS = lookup_str "-S="
331 opt_ProduceExportCStubs = lookup_str "-F="
332 opt_ProduceExportHStubs = lookup_str "-FH="
333 opt_ProduceHi = lookup_str "-hifile=" -- the one to produce this time
334 opt_ReportCompile = lookUp SLIT("-freport-compile")
335 opt_SccProfilingOn = lookUp SLIT("-fscc-profiling")
336 opt_SourceUnchanged = lookUp SLIT("-fsource-unchanged")
337 opt_StgDoLetNoEscapes = lookUp SLIT("-flet-no-escape")
338 opt_Parallel = lookUp SLIT("-fparallel")
339 opt_SccGroup = lookup_str "-G="
340 opt_Verbose = lookUp SLIT("-v")
342 opt_UnfoldCasms = lookUp SLIT("-funfold-casms-in-hi-file")
343 opt_InterfaceUnfoldThreshold = lookup_def_int "-funfolding-interface-threshold" iNTERFACE_UNFOLD_THRESHOLD
344 opt_UnfoldingCreationThreshold = lookup_def_int "-funfolding-creation-threshold" uNFOLDING_CREATION_THRESHOLD
345 opt_UnfoldingUseThreshold = lookup_def_int "-funfolding-use-threshold" uNFOLDING_USE_THRESHOLD
346 opt_UnfoldingConDiscount = lookup_def_int "-funfolding-con-discount" uNFOLDING_CON_DISCOUNT_WEIGHT
348 opt_LiberateCaseThreshold = lookup_def_int "-fliberate-case-threshold" lIBERATE_CASE_THRESHOLD
349 opt_UnfoldingKeenessFactor = lookup_def_float "-funfolding-keeness-factor" uNFOLDING_KEENESS_FACTOR
350 opt_WarnNameShadowing = lookUp SLIT("-fwarn-name-shadowing")
351 opt_WarnHiShadows = lookUp SLIT("-fwarn-hi-shadowing")
352 opt_WarnIncompletePatterns = lookUp SLIT("-fwarn-incomplete-patterns")
353 opt_WarnOverlappingPatterns = lookUp SLIT("-fwarn-overlapping-patterns")
354 opt_WarnSimplePatterns = lookUp SLIT("-fwarn-simple-patterns")
355 opt_WarnUnusedMatches = lookUp SLIT("-fwarn-unused-matches")
356 opt_WarnUnusedBinds = lookUp SLIT("-fwarn-unused-binds")
357 opt_WarnUnusedImports = lookUp SLIT("-fwarn-unused-imports")
358 opt_WarnMissingMethods = lookUp SLIT("-fwarn-missing-methods")
359 opt_WarnDuplicateExports = lookUp SLIT("-fwarn-duplicate-exports")
360 opt_WarnMissingSigs = lookUp SLIT("-fwarn-missing-signatures")
361 opt_PruneTyDecls = not (lookUp SLIT("-fno-prune-tydecls"))
362 opt_PruneInstDecls = not (lookUp SLIT("-fno-prune-instdecls"))
363 opt_D_show_rn_stats = lookUp SLIT("-dshow-rn-stats")
365 -- opt_UnfoldingOverrideThreshold = lookup_int "-funfolding-override-threshold"
369 classifyOpts :: ([CoreToDo], -- Core-to-Core processing spec
370 [StgToDo]) -- STG-to-STG processing spec
372 classifyOpts = sep argv [] [] -- accumulators...
374 sep :: [FAST_STRING] -- cmd-line opts (input)
375 -> [CoreToDo] -> [StgToDo] -- to_do accumulators
376 -> ([CoreToDo], [StgToDo]) -- result
378 sep [] core_td stg_td -- all done!
379 = (reverse core_td, reverse stg_td)
381 # define CORE_TD(to_do) sep opts (to_do:core_td) stg_td
382 # define STG_TD(to_do) sep opts core_td (to_do:stg_td)
384 sep (opt1:opts) core_td stg_td
385 = case (_UNPK_ opt1) of -- the non-"just match a string" options are at the end...
386 ',' : _ -> sep opts core_td stg_td -- it is for the parser
388 "-fsimplify" -> -- gather up SimplifierSwitches specially...
389 simpl_sep opts defaultSimplSwitches core_td stg_td
391 "-fcalc-inlinings1"-> CORE_TD(CoreDoCalcInlinings1)
392 "-fcalc-inlinings2"-> CORE_TD(CoreDoCalcInlinings2)
393 "-ffloat-inwards" -> CORE_TD(CoreDoFloatInwards)
394 "-ffull-laziness" -> CORE_TD(CoreDoFullLaziness)
395 "-fliberate-case" -> CORE_TD(CoreLiberateCase)
396 "-fprint-core" -> CORE_TD(CoreDoPrintCore)
397 "-fstatic-args" -> CORE_TD(CoreDoStaticArgs)
398 "-fstrictness" -> CORE_TD(CoreDoStrictness)
399 "-fspecialise" -> CORE_TD(CoreDoSpecialising)
400 "-ffoldr-build-worker-wrapper" -> CORE_TD(CoreDoFoldrBuildWorkerWrapper)
401 "-ffoldr-build-ww-anal" -> CORE_TD(CoreDoFoldrBuildWWAnal)
403 "-fstg-static-args" -> STG_TD(StgDoStaticArgs)
404 "-fupdate-analysis" -> STG_TD(StgDoUpdateAnalysis)
405 "-dstg-stats" -> STG_TD(D_stg_stats)
406 "-flambda-lift" -> STG_TD(StgDoLambdaLift)
407 "-fmassage-stg-for-profiling" -> STG_TD(StgDoMassageForProfiling)
409 _ -> -- NB: the driver is really supposed to handle bad options
410 sep opts core_td stg_td
414 simpl_sep :: [FAST_STRING] -- cmd-line opts (input)
415 -> [SimplifierSwitch] -- simplifier-switch accumulator
416 -> [CoreToDo] -> [StgToDo] -- to_do accumulators
417 -> ([CoreToDo], [StgToDo]) -- result
419 -- "simpl_sep" tailcalls "sep" once it's seen one set
420 -- of SimplifierSwitches for a CoreDoSimplify.
423 simpl_sep input@[] simpl_sw core_td stg_td
424 = panic "simpl_sep []"
427 -- The SimplifierSwitches should be delimited by "[" and "]".
429 simpl_sep (opt1:opts) simpl_sw core_td stg_td
430 = case (_UNPK_ opt1) of
431 "[" -> simpl_sep opts simpl_sw core_td stg_td
433 this_simpl = CoreDoSimplify (isAmongSimpl simpl_sw)
435 sep opts (this_simpl : core_td) stg_td
437 # define SIMPL_SW(sw) simpl_sep opts (sw:simpl_sw) core_td stg_td
439 -- the non-"just match a string" options are at the end...
440 "-fcode-duplication-ok" -> SIMPL_SW(SimplOkToDupCode)
441 "-ffloat-lets-exposing-whnf" -> SIMPL_SW(SimplFloatLetsExposingWHNF)
442 "-ffloat-primops-ok" -> SIMPL_SW(SimplOkToFloatPrimOps)
443 "-falways-float-lets-from-lets" -> SIMPL_SW(SimplAlwaysFloatLetsFromLets)
444 "-fdo-case-elim" -> SIMPL_SW(SimplDoCaseElim)
445 "-fdo-lambda-eta-expansion" -> SIMPL_SW(SimplDoLambdaEtaExpansion)
446 "-fdo-foldr-build" -> SIMPL_SW(SimplDoFoldrBuild)
447 "-fdo-arity-expand" -> SIMPL_SW(SimplDoArityExpand)
448 "-fdo-inline-foldr-build" -> SIMPL_SW(SimplDoInlineFoldrBuild)
449 "-fcase-of-case" -> SIMPL_SW(SimplCaseOfCase)
450 "-fcase-merge" -> SIMPL_SW(SimplCaseMerge)
451 "-flet-to-case" -> SIMPL_SW(SimplLetToCase)
452 "-fpedantic-bottoms" -> SIMPL_SW(SimplPedanticBottoms)
453 "-fmay-delete-conjurable-ids" -> SIMPL_SW(SimplMayDeleteConjurableIds)
454 "-fessential-unfoldings-only" -> SIMPL_SW(EssentialUnfoldingsOnly)
455 "-fignore-inline-pragma" -> SIMPL_SW(IgnoreINLINEPragma)
456 "-fno-let-from-case" -> SIMPL_SW(SimplNoLetFromCase)
457 "-fno-let-from-app" -> SIMPL_SW(SimplNoLetFromApp)
458 "-fno-let-from-strict-let" -> SIMPL_SW(SimplNoLetFromStrictLet)
459 "-fclone-binds" -> SIMPL_SW(SimplPleaseClone)
461 o | starts_with_msi -> SIMPL_SW(MaxSimplifierIterations (read after_msi))
463 maybe_msi = startsWith "-fmax-simplifier-iterations" o
464 starts_with_msi = maybeToBool maybe_msi
465 (Just after_msi) = maybe_msi
467 _ -> -- NB: the driver is really supposed to handle bad options
468 simpl_sep opts simpl_sw core_td stg_td
471 %************************************************************************
473 \subsection{Switch ordering}
475 %************************************************************************
477 In spite of the @Produce*@ and @SccGroup@ constructors, these things
478 behave just like enumeration types.
481 instance Eq SimplifierSwitch where
482 a == b = tagOf_SimplSwitch a _EQ_ tagOf_SimplSwitch b
484 instance Ord SimplifierSwitch where
485 a < b = tagOf_SimplSwitch a _LT_ tagOf_SimplSwitch b
486 a <= b = tagOf_SimplSwitch a _LE_ tagOf_SimplSwitch b
488 tagOf_SimplSwitch SimplOkToDupCode =(ILIT(0) :: FAST_INT)
489 tagOf_SimplSwitch SimplFloatLetsExposingWHNF = ILIT(1)
490 tagOf_SimplSwitch SimplOkToFloatPrimOps = ILIT(2)
491 tagOf_SimplSwitch SimplAlwaysFloatLetsFromLets = ILIT(3)
492 tagOf_SimplSwitch SimplDoCaseElim = ILIT(4)
493 tagOf_SimplSwitch SimplCaseOfCase = ILIT(6)
494 tagOf_SimplSwitch SimplLetToCase = ILIT(7)
495 tagOf_SimplSwitch SimplMayDeleteConjurableIds = ILIT(9)
496 tagOf_SimplSwitch SimplPedanticBottoms = ILIT(10)
497 tagOf_SimplSwitch SimplDoArityExpand = ILIT(11)
498 tagOf_SimplSwitch SimplDoFoldrBuild = ILIT(12)
499 tagOf_SimplSwitch SimplDoInlineFoldrBuild = ILIT(14)
500 tagOf_SimplSwitch IgnoreINLINEPragma = ILIT(15)
501 tagOf_SimplSwitch SimplDoLambdaEtaExpansion = ILIT(16)
502 tagOf_SimplSwitch EssentialUnfoldingsOnly = ILIT(19)
503 tagOf_SimplSwitch (MaxSimplifierIterations _) = ILIT(21)
504 tagOf_SimplSwitch SimplNoLetFromCase = ILIT(27)
505 tagOf_SimplSwitch SimplNoLetFromApp = ILIT(28)
506 tagOf_SimplSwitch SimplNoLetFromStrictLet = ILIT(29)
507 tagOf_SimplSwitch SimplCaseMerge = ILIT(31)
508 tagOf_SimplSwitch SimplPleaseClone = ILIT(32)
510 -- If you add anything here, be sure to change lAST_SIMPL_SWITCH_TAG, too!
512 tagOf_SimplSwitch _ = panic# "tagOf_SimplSwitch"
514 lAST_SIMPL_SWITCH_TAG = IBOX(tagOf_SimplSwitch SimplPleaseClone)
517 %************************************************************************
519 \subsection{Switch lookup}
521 %************************************************************************
524 isAmongSimpl :: [SimplifierSwitch] -> SimplifierSwitch -> SwitchResult
526 isAmongSimpl on_switches -- Switches mentioned later occur *earlier*
527 -- in the list; defaults right at the end.
529 tidied_on_switches = foldl rm_dups [] on_switches
530 -- The fold*l* ensures that we keep the latest switches;
531 -- ie the ones that occur earliest in the list.
533 sw_tbl :: Array Int SwitchResult
535 sw_tbl = (array (0, lAST_SIMPL_SWITCH_TAG) -- bounds...
539 all_undefined = [ (i, SwBool False) | i <- [0 .. lAST_SIMPL_SWITCH_TAG ] ]
541 defined_elems = map mk_assoc_elem tidied_on_switches
543 -- (avoid some unboxing, bounds checking, and other horrible things:)
544 case sw_tbl of { Array bounds_who_needs_'em stuff ->
546 case (indexArray# stuff (tagOf_SimplSwitch switch)) of
547 #if __GLASGOW_HASKELL__ < 400
554 mk_assoc_elem k@(MaxSimplifierIterations lvl) = (IBOX(tagOf_SimplSwitch k), SwInt lvl)
556 mk_assoc_elem k = (IBOX(tagOf_SimplSwitch k), SwBool True) -- I'm here, Mom!
558 -- cannot have duplicates if we are going to use the array thing
559 rm_dups switches_so_far switch
560 = if switch `is_elem` switches_so_far
562 else switch : switches_so_far
564 sw `is_elem` [] = False
565 sw `is_elem` (s:ss) = (tagOf_SimplSwitch sw) _EQ_ (tagOf_SimplSwitch s)
569 Default settings for simplifier switches
572 defaultSimplSwitches = [MaxSimplifierIterations 1
576 %************************************************************************
578 \subsection{Misc functions for command-line options}
580 %************************************************************************
584 switchIsOn :: (switch -> SwitchResult) -> switch -> Bool
586 switchIsOn lookup_fn switch
587 = case (lookup_fn switch) of
588 SwBool False -> False
591 intSwitchSet :: (switch -> SwitchResult)
595 intSwitchSet lookup_fn switch
596 = case (lookup_fn (switch (panic "intSwitchSet"))) of
597 SwInt int -> Just int