Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
97b95db0
Commit
97b95db0
authored
Aug 07, 2007
by
rl@cse.unsw.edu.au
Browse files
Utility functions for accessing the RdrEnv during vectorisation
parent
2ad8a88f
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/vectorise/VectMonad.hs
View file @
97b95db0
...
...
@@ -312,6 +312,21 @@ inBind id p
=
do
updLEnv
$
\
env
->
env
{
local_bind_name
=
occNameFS
(
getOccName
id
)
}
p
lookupRdrName
::
RdrName
->
VM
Name
lookupRdrName
rdr_name
=
do
rdr_env
<-
readGEnv
global_rdr_env
case
lookupGRE_RdrName
rdr_name
rdr_env
of
[
gre
]
->
return
(
gre_name
gre
)
[]
->
pprPanic
"VectMonad.lookupRdrName: not found"
(
ppr
rdr_name
)
_
->
pprPanic
"VectMonad.lookupRdrName: ambiguous"
(
ppr
rdr_name
)
lookupRdrVar
::
RdrName
->
VM
Var
lookupRdrVar
rdr_name
=
do
name
<-
lookupRdrName
rdr_name
liftDs
(
dsLookupGlobalId
name
)
cloneName
::
(
OccName
->
OccName
)
->
Name
->
VM
Name
cloneName
mk_occ
name
=
liftM
make
(
liftDs
newUnique
)
where
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment