From 32400bdd4e338304428f367f2a5844038e5f12e9 Mon Sep 17 00:00:00 2001 From: Steve Dunham Date: Wed, 18 Feb 2026 21:45:26 -0800 Subject: [PATCH] slight performance tweak --- src/Lib/TopContext.newt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Lib/TopContext.newt b/src/Lib/TopContext.newt index 358f96d..c91dd01 100644 --- a/src/Lib/TopContext.newt +++ b/src/Lib/TopContext.newt @@ -13,9 +13,9 @@ import Lib.Types lookup : QName -> TopContext -> Maybe TopEntry lookup qn@(QN ns nm) top = - case lookupMap' qn top.defs of - Just entry => Just entry - Nothing => case lookupMap' ns top.modules of + if ns == top.ns + then lookupMap' qn top.defs + else case lookupMap' ns top.modules of Just mod => lookupMap' qn mod.modDefs Nothing => Nothing