| 105 | | callCC $ \foundIt -> do |
| 106 | | lexSym <- fmap (findSym var . envLexical) ask |
| 107 | | when (isJust lexSym) $ foundIt lexSym |
| 108 | | -- XXX - this is bogus; we should not fallback if it's not in lex csope. |
| 109 | | glob <- liftSTM . readTVar . envGlobal =<< ask |
| 110 | | var' <- toQualified var |
| 111 | | let globSym = findSym var' glob |
| 112 | | when (isJust globSym) $ foundIt globSym |
| 113 | | -- XXX - ditto for globals |
| 114 | | let globSym = findSym (toGlobalVar var) glob |
| 115 | | when (isJust globSym) $ foundIt globSym |
| 116 | | return Nothing |
| | 105 | lexSym <- fmap (findSym var . envLexical) ask |
| | 106 | if isJust lexSym then return lexSym else do |
| | 107 | -- XXX - this is bogus; we should not fallback if it's not in lex csope. |
| | 108 | glob <- liftSTM . readTVar . envGlobal =<< ask |
| | 109 | var' <- toQualified var |
| | 110 | let globSym = findSym var' glob |
| | 111 | if isJust globSym then return globSym else do |
| | 112 | -- XXX - ditto for globals |
| | 113 | let globSym = findSym (toGlobalVar var) glob |
| | 114 | if isJust globSym then return globSym else do |
| | 115 | return Nothing |