Export a function to grab the local environment as a function.

parent f56db204
...@@ -15,6 +15,7 @@ module RnEnv ( ...@@ -15,6 +15,7 @@ module RnEnv (
lookupLocatedInstDeclBndr, lookupLocatedInstDeclBndr,
lookupSyntaxName, lookupSyntaxTable, lookupImportedName, lookupSyntaxName, lookupSyntaxTable, lookupImportedName,
lookupGreRn, lookupGreRn_maybe, lookupGreRn, lookupGreRn_maybe,
getLookupOccRn,
newLocalsRn, newIPNameRn, newLocalsRn, newIPNameRn,
bindLocalNames, bindLocalNamesFV, bindLocalNames, bindLocalNamesFV,
...@@ -255,6 +256,11 @@ lookupFamInstDeclBndr mod lrdr_name@(L _ rdr_name) ...@@ -255,6 +256,11 @@ lookupFamInstDeclBndr mod lrdr_name@(L _ rdr_name)
-- Occurrences -- Occurrences
-------------------------------------------------- --------------------------------------------------
getLookupOccRn :: RnM (Name -> Maybe Name)
getLookupOccRn
= getLocalRdrEnv `thenM` \ local_env ->
return (lookupLocalRdrEnv local_env . mkRdrUnqual . nameOccName)
lookupLocatedOccRn :: Located RdrName -> RnM (Located Name) lookupLocatedOccRn :: Located RdrName -> RnM (Located Name)
lookupLocatedOccRn = wrapLocM lookupOccRn lookupLocatedOccRn = wrapLocM lookupOccRn
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment