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
4f6e613a
Commit
4f6e613a
authored
Jul 09, 2007
by
rl@cse.unsw.edu.au
Browse files
Construction of PA dictionaries for vectorisation
parent
d4017d78
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/vectorise/Vectorise.hs
View file @
4f6e613a
...
...
@@ -247,6 +247,33 @@ paArgType' ty k
Just
ty'
->
return
ty'
Nothing
->
pprPanic
"paArgType'"
(
ppr
ty
)
paOfTyCon
::
TyCon
->
VM
CoreExpr
-- FIXME: just for now
paOfTyCon
tc
=
maybeV
(
readEnv
$
\
env
->
lookupNameEnv
(
vect_tycon_pa
env
)
(
tyConName
tc
))
paOfType
::
Type
->
VM
CoreExpr
paOfType
ty
|
Just
ty'
<-
coreView
ty
=
paOfType
ty'
paOfType
(
TyVarTy
tv
)
=
maybeV
(
readEnv
$
\
env
->
lookupVarEnv
(
vect_tyvar_pa
env
)
tv
)
paOfType
(
AppTy
ty1
ty2
)
=
do
e1
<-
paOfType
ty1
e2
<-
paOfType
ty2
return
$
mkApps
e1
[
Type
ty2
,
e2
]
paOfType
(
TyConApp
tc
tys
)
=
do
e
<-
paOfTyCon
tc
es
<-
mapM
paOfType
tys
return
$
mkApps
e
[
arg
|
(
t
,
e
)
<-
zip
tys
es
,
arg
<-
[
Type
t
,
e
]]
paOfType
(
FunTy
ty1
ty2
)
=
paOfType
(
TyConApp
funTyCon
[
ty1
,
ty2
])
paOfType
t
@
(
ForAllTy
tv
ty
)
=
pprPanic
"paOfType:"
(
ppr
t
)
paOfType
ty
=
pprPanic
"paOfType:"
(
ppr
ty
)
-- ----------------------------------------------------------------------------
-- Types
vectTyCon
::
TyCon
->
VM
TyCon
vectTyCon
tc
|
isFunTyCon
tc
=
builtin
closureTyCon
...
...
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