Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
9a0dbd72
Commit
9a0dbd72
authored
26 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1998-11-13 19:34:33 by sof]
Allow 'foreign import' calling conv. to be optional
parent
bee867fe
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ghc/compiler/parser/hsparser.y
+2
-0
2 additions, 0 deletions
ghc/compiler/parser/hsparser.y
ghc/compiler/reader/ReadPrefix.lhs
+4
-3
4 additions, 3 deletions
ghc/compiler/reader/ReadPrefix.lhs
with
6 additions
and
3 deletions
ghc/compiler/parser/hsparser.y
+
2
−
0
View file @
9a0dbd72
...
...
@@ -555,6 +555,8 @@ callconv: STDCALL { $$ = CALLCONV_STDCALL; }
| C_CALL { $$ = CALLCONV_CCALL; }
| PASCAL { $$ = CALLCONV_PASCAL; }
| FASTCALL { $$ = CALLCONV_FASTCALL; }
/* If you leave out the specification of a calling convention, you'll get C's. */
| /*empty*/ { $$ = CALLCONV_CCALL; }
;
ext_name: STRING { $$ = mkjust(lsing($1)); }
...
...
This diff is collapsed.
Click to expand it.
ghc/compiler/reader/ReadPrefix.lhs
+
4
−
3
View file @
9a0dbd72
...
...
@@ -608,7 +608,7 @@ wlkBinding binding
wlkHsType ty `thenUgn` \ h_ty ->
wlkExtName ext_name `thenUgn` \ h_ext_name ->
rdCallConv cconv `thenUgn` \ h_cconv ->
rd
ImpExp
imp_exp (cvFlag unsafe_flag) `thenUgn` \ h_imp_exp ->
rd
ForKind
imp_exp (cvFlag unsafe_flag) `thenUgn` \ h_imp_exp ->
returnUgn (RdrForeignDecl (ForeignDecl h_id h_imp_exp h_ty h_ext_name h_cconv src_loc))
a_sig_we_hope ->
...
...
@@ -967,8 +967,9 @@ rdCallConv x = returnUgn x
rdForKind :: Int -> Bool -> UgnM ForKind
rdForKind 0 isUnsafe = -- foreign import
returnUgn (FoImport isUnsafe)
rd
ImpExp
1 _ = -- foreign export
rd
ForKind
1 _ = -- foreign export
returnUgn FoExport
rd
ImpExp
2 _ = -- foreign label
rd
ForKind
2 _ = -- foreign label
returnUgn FoLabel
\end{code}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment