Skip to content
Snippets Groups Projects
Commit 59a91586 authored by lennart@augustsson.net's avatar lennart@augustsson.net
Browse files

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

parent f56db204
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment