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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
alexbiehl-gc
GHC
Commits
47556217
Commit
47556217
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1998-03-05 20:20:04 by sof]
Default ambiguous _ccall_ results to (), not the arguments
parent
2777f56b
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ghc/compiler/prelude/PrelInfo.lhs
+9
-7
9 additions, 7 deletions
ghc/compiler/prelude/PrelInfo.lhs
ghc/compiler/typecheck/TcSimplify.lhs
+3
-3
3 additions, 3 deletions
ghc/compiler/typecheck/TcSimplify.lhs
with
12 additions
and
10 deletions
ghc/compiler/prelude/PrelInfo.lhs
+
9
−
7
View file @
47556217
...
@@ -33,7 +33,7 @@ module PrelInfo (
...
@@ -33,7 +33,7 @@ module PrelInfo (
main_NAME, allClass_NAME, ioTyCon_NAME,
main_NAME, allClass_NAME, ioTyCon_NAME,
needsDataDeclCtxtClassKeys, cCallishClassKeys, cCallishTyKeys, isNoDictClass,
needsDataDeclCtxtClassKeys, cCallishClassKeys, cCallishTyKeys, isNoDictClass,
isNumericClass, isStandardClass, isCcallishClass
isNumericClass, isStandardClass, isCcallishClass
, isCreturnableClass
) where
) where
#include "HsVersions.h"
#include "HsVersions.h"
...
@@ -499,12 +499,14 @@ even though every numeric class has these two as a superclass,
...
@@ -499,12 +499,14 @@ even though every numeric class has these two as a superclass,
because the list of ambiguous dictionaries hasn't been simplified.
because the list of ambiguous dictionaries hasn't been simplified.
\begin{code}
\begin{code}
isCcallishClass, isNoDictClass, isNumericClass, isStandardClass :: Class -> Bool
isCcallishClass, isCreturnableClass, isNoDictClass,
isNumericClass, isStandardClass :: Class -> Bool
isNumericClass clas = classKey clas `is_elem` numericClassKeys
isStandardClass clas = classKey clas `is_elem` standardClassKeys
isNumericClass clas = classKey clas `is_elem` numericClassKeys
isCcallishClass clas = classKey clas `is_elem` cCallishClassKeys
isStandardClass clas = classKey clas `is_elem` standardClassKeys
isNoDictClass clas = classKey clas `is_elem` noDictClassKeys
isCcallishClass clas = classKey clas `is_elem` cCallishClassKeys
isCreturnableClass clas = classKey clas == cReturnableClassKey
isNoDictClass clas = classKey clas `is_elem` noDictClassKeys
is_elem = isIn "is_X_Class"
is_elem = isIn "is_X_Class"
numericClassKeys
numericClassKeys
...
...
This diff is collapsed.
Click to expand it.
ghc/compiler/typecheck/TcSimplify.lhs
+
3
−
3
View file @
47556217
...
@@ -146,7 +146,7 @@ import Id ( mkIdSet )
...
@@ -146,7 +146,7 @@ import Id ( mkIdSet )
import Bag ( Bag, bagToList, snocBag )
import Bag ( Bag, bagToList, snocBag )
import Class ( Class, ClassInstEnv, classBigSig, classInstEnv )
import Class ( Class, ClassInstEnv, classBigSig, classInstEnv )
import PrelInfo ( isNumericClass, isC
callish
Class )
import PrelInfo ( isNumericClass, isC
returnable
Class )
import Maybes ( maybeToBool )
import Maybes ( maybeToBool )
import Type ( Type, ThetaType, TauType, mkTyVarTy, getTyVar,
import Type ( Type, ThetaType, TauType, mkTyVarTy, getTyVar,
...
@@ -925,9 +925,9 @@ disambigGroup dicts
...
@@ -925,9 +925,9 @@ disambigGroup dicts
ASSERT( null frees && null ambigs )
ASSERT( null frees && null ambigs )
returnTc binds
returnTc binds
| all isC
callish
Class classes
| all isC
returnable
Class classes
= -- Default CCall stuff to (); we don't even both to check that () is an
= -- Default CCall stuff to (); we don't even both to check that () is an
-- instance of
CCallable/
CReturnable, because we know it is.
-- instance of CReturnable, because we know it is.
unifyTauTy (mkTyVarTy tyvar) unitTy `thenTc_`
unifyTauTy (mkTyVarTy tyvar) unitTy `thenTc_`
returnTc EmptyMonoBinds
returnTc EmptyMonoBinds
...
...
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