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
f26b161b
Commit
f26b161b
authored
Aug 07, 2007
by
rl@cse.unsw.edu.au
Browse files
Add built-in PA dictionaries for boxed tuples
parent
346516b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/vectorise/Vectorise.hs
View file @
f26b161b
...
...
@@ -46,11 +46,22 @@ import Outputable
import
FastString
import
Control.Monad
(
liftM
,
liftM2
,
zipWithM
,
mapAndUnzipM
)
mkNDPVar
::
FastString
->
RdrName
mkNDPVar
fs
=
mkRdrQual
nDP_BUILTIN
(
mkVarOccFS
fs
)
mkNDPVar
::
String
->
RdrName
mkNDPVar
s
=
mkRdrQual
nDP_BUILTIN
(
mkVarOcc
s
)
mkNDPVarFS
::
FastString
->
RdrName
mkNDPVarFS
fs
=
mkRdrQual
nDP_BUILTIN
(
mkVarOccFS
fs
)
builtin_PAs
::
[(
Name
,
RdrName
)]
builtin_PAs
=
[(
intTyConName
,
mkNDPVar
FSLIT
(
"dPA_Int"
))]
builtin_PAs
=
[
mk
intTyConName
FSLIT
(
"dPA_Int"
)
]
++
tups
where
mk
name
fs
=
(
name
,
mkNDPVarFS
fs
)
tups
=
mk_tup
0
:
map
mk_tup
[
2
..
3
]
mk_tup
n
=
(
getName
$
tupleTyCon
Boxed
n
,
mkNDPVar
$
"dPA_"
++
show
n
)
vectorise
::
HscEnv
->
UniqSupply
->
RuleBase
->
ModGuts
->
IO
(
SimplCount
,
ModGuts
)
...
...
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