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

parent f56db204
......@@ -15,6 +15,7 @@ module RnEnv (
lookupLocatedInstDeclBndr,
lookupSyntaxName, lookupSyntaxTable, lookupImportedName,
lookupGreRn, lookupGreRn_maybe,
getLookupOccRn,
newLocalsRn, newIPNameRn,
bindLocalNames, bindLocalNamesFV,
......@@ -255,6 +256,11 @@ lookupFamInstDeclBndr mod lrdr_name@(L _ rdr_name)
-- Occurrences
--------------------------------------------------
getLookupOccRn :: RnM (Name -> Maybe Name)
getLookupOccRn
= getLocalRdrEnv `thenM` \ local_env ->
return (lookupLocalRdrEnv local_env . mkRdrUnqual . nameOccName)
lookupLocatedOccRn :: Located RdrName -> RnM (Located Name)
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