summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-08-31 09:22:24 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-08-31 09:22:24 +0000
commitc9a8811e407ea25e271d850468839935d0cf5e4f (patch)
treedf67934f75306364b15296b3c7aa37dc54cf7363
parent6fa4feaf2979419a6f6153ffa80c22a28f2f654f (diff)
downloadhaskell-c9a8811e407ea25e271d850468839935d0cf5e4f.tar.gz
comments only
I had planned to do findEnclosingDecl a different way, so add a ToDo as a reminder.
-rw-r--r--compiler/main/InteractiveEval.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs
index be7aa0a85b..8579901afc 100644
--- a/compiler/main/InteractiveEval.hs
+++ b/compiler/main/InteractiveEval.hs
@@ -161,7 +161,10 @@ getHistorySpan hsc_env hist =
Just hmi -> modBreaks_locs (md_modBreaks (hm_details hmi)) ! num
_ -> panic "getHistorySpan"
--- | Finds the enclosing top level function name
+{- | Finds the enclosing top level function name -}
+-- ToDo: a better way to do this would be to keep hold of the decl_path computed
+-- by the coverage pass, which gives the list of lexically-enclosing bindings
+-- for each tick.
findEnclosingDecl :: HscEnv -> Module -> SrcSpan -> Id
findEnclosingDecl hsc_env mod span =
case lookupUFM (hsc_HPT hsc_env) (moduleName mod) of