X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FsimplCore%2FSimplMonad.lhs;h=4ad6d53e8d0a0d30fab0f583c7fc611f28ae039e;hp=7126883169a936fda610c366198c1ddfc8be6133;hb=f4c9109d7f1deb6f79c2c141f69ec24b7022776b;hpb=18ad1f84fc1d5d2695a64f503b4905fc5d5059e3 diff --git a/compiler/simplCore/SimplMonad.lhs b/compiler/simplCore/SimplMonad.lhs index 7126883..4ad6d53 100644 --- a/compiler/simplCore/SimplMonad.lhs +++ b/compiler/simplCore/SimplMonad.lhs @@ -45,9 +45,8 @@ import FastTypes import GHC.Exts ( indexArray# ) -import GHC.Arr ( Array(..) ) - -import Array ( array, (//) ) +import Data.Array +import Data.Array.Base (unsafeAt) infixr 0 `thenSmpl`, `thenSmpl_` \end{code} @@ -469,11 +468,7 @@ isAmongSimpl on_switches -- Switches mentioned later occur *earlier* defined_elems = map mk_assoc_elem tidied_on_switches in -- (avoid some unboxing, bounds checking, and other horrible things:) - case sw_tbl of { Array _ _ stuff -> - \ switch -> - case (indexArray# stuff (tagOf_SimplSwitch switch)) of - (# v #) -> v - } + \ switch -> unsafeAt sw_tbl $ iBox (tagOf_SimplSwitch switch) where mk_assoc_elem k@(MaxSimplifierIterations lvl) = (iBox (tagOf_SimplSwitch k), SwInt lvl)