jitCompile :: (MonadBaseControl IO m)
              => ModuleBuilder -> (ExecutableModule -> L b m a) -> L b m a
jitCompile mb f =
  do maybeSettings <- getSettingsMaybe
     context <- getContext
     let (optLevel, model, noFpe, enableFis) =
           case maybeSettings of
             Just settings ->
               (Just $ optNum $ settingsOptimizationLevel settings,
                Just $ settingsCodeModel settings,
                Just $ noFramePointerElimination $ settingsOptions settings,
                Just $ enableFastInstructionSelection $
                settingsOptions settings)
             Nothing -> (Nothing, Nothing, Nothing, Nothing)
     withModule mb
       (\mod1 ->
         liftBaseOp
         (catchCaller 'LL.withMCJIT $
          LL.withMCJIT context optLevel model noFpe enableFis)
         (\mcjit ->
           liftBaseOp
           (catchCaller 'LL.withModuleInEngine $
            LL.withModuleInEngine mcjit mod1)
           (f . ExecutableModule)))
jitCompile :: (MonadBaseControl IO m)
              => ModuleBuilder -> (ExecutableModule -> L b m a) -> L b m a
jitCompile mb f =
  do maybeSettings <- getSettingsMaybe
     context <- getContext
     let (optLevel, model, noFpe, enableFis) =
           case maybeSettings of
             Just settings ->
               (Just $ optNum $ settingsOptimizationLevel settings,
                Just $ settingsCodeModel settings,
                Just $ noFramePointerElimination $ settingsOptions settings,
                Just $ enableFastInstructionSelection $
                settingsOptions settings)
             Nothing -> (Nothing, Nothing, Nothing, Nothing)
     withModule mb
       (\mod1 ->
         liftBaseOp
         (catchCaller 'LL.withMCJIT $
          LL.withMCJIT context optLevel model noFpe enableFis)
         (\mcjit ->
           liftBaseOp
           (catchCaller 'LL.withModuleInEngine $
            LL.withModuleInEngine mcjit mod1)
           (f . ExecutableModule)))
jitCompile mb f =
  do maybeSettings <- getSettingsMaybe
     context <- getContext
     let (optLevel, model, noFpe, enableFis) =
           case maybeSettings of
             Just settings ->
               (Just $ optNum $ settingsOptimizationLevel settings,
                Just $ settingsCodeModel settings,
                Just $ noFramePointerElimination $ settingsOptions settings,
                Just $ enableFastInstructionSelection $
                settingsOptions settings)
             Nothing -> (Nothing, Nothing, Nothing, Nothing)
     withModule mb
       (\mod1 ->
         liftBaseOp
         (catchCaller 'LL.withMCJIT $
          LL.withMCJIT context optLevel model noFpe enableFis)
         (\mcjit ->
           liftBaseOp
           (catchCaller 'LL.withModuleInEngine $
            LL.withModuleInEngine mcjit mod1)
           (f . ExecutableModule)))