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
06babe95
Commit
06babe95
authored
25 years ago
by
Julian Seward
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1999-07-16 15:03:40 by sewardj]
cpp-ify some H98isms with PSEQ and SAPPLY to placate ghc-3.0X
parent
116cdfdd
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ghc/compiler/HsVersions.h
+10
-6
10 additions, 6 deletions
ghc/compiler/HsVersions.h
ghc/compiler/basicTypes/IdInfo.lhs
+1
-1
1 addition, 1 deletion
ghc/compiler/basicTypes/IdInfo.lhs
ghc/compiler/types/Type.lhs
+9
-9
9 additions, 9 deletions
ghc/compiler/types/Type.lhs
with
20 additions
and
16 deletions
ghc/compiler/HsVersions.h
+
10
−
6
View file @
06babe95
...
...
@@ -179,13 +179,17 @@ import qualified FastString
#endif
#if __HASKELL1__ > 4
#define FMAP fmap
#define ISALPHANUM isAlphaNum
#define IOERROR ioError
# define FMAP fmap
# define ISALPHANUM isAlphaNum
# define IOERROR ioError
# define PSEQ seq
# define SAPPLY $!
#else
#define FMAP map
#define ISALPHANUM isAlphanum
#define IOERROR fail
# define FMAP map
# define ISALPHANUM isAlphanum
# define IOERROR fail
# define PSEQ (\x y -> y)
# define SAPPLY $
#endif
#endif
This diff is collapsed.
Click to expand it.
ghc/compiler/basicTypes/IdInfo.lhs
+
1
−
1
View file @
06babe95
...
...
@@ -150,7 +150,7 @@ Setters
\begin{code}
setWorkerInfo info wk = wk `seq` info { workerInfo = wk }
setSpecInfo info sp =
sp `seq`
info { specInfo = sp }
setSpecInfo info sp =
PSEQ sp (
info { specInfo = sp }
)
setInlinePragInfo info pr = pr `seq` info { inlinePragInfo = pr }
setStrictnessInfo info st = st `seq` info { strictnessInfo = st }
-- Try to avoid spack leaks by seq'ing
...
...
This diff is collapsed.
Click to expand it.
ghc/compiler/types/Type.lhs
+
9
−
9
View file @
06babe95
...
...
@@ -18,7 +18,7 @@ module Type (
boxedTypeKind, unboxedTypeKind, openTypeKind, -- Kind :: superKind
mkArrowKind, mkArrowKinds, hasMoreBoxityInfo,
mkArrowKind, mkArrowKinds,
-- mentioned below:
hasMoreBoxityInfo,
funTyCon,
...
...
@@ -789,14 +789,14 @@ tidyType env@(tidy_env, subst) ty
Just tv' -> TyVarTy tv'
go (TyConApp tycon tys) = let args = map go tys
in args `seqList` TyConApp tycon args
go (NoteTy note ty) = (NoteTy
$!
(go_note note))
$!
(go ty)
go (AppTy fun arg) = (AppTy
$!
(go fun))
$!
(go arg)
go (FunTy fun arg) = (FunTy
$!
(go fun))
$!
(go arg)
go (ForAllTy tv ty) = ForAllTy tv
' $!
(tidyType env
'
ty)
where
(env
'
, tv
'
) = tidyTyVar env tv
go (NoteTy note ty) = (NoteTy
SAPPLY
(go_note note))
SAPPLY
(go ty)
go (AppTy fun arg) = (AppTy
SAPPLY
(go fun))
SAPPLY
(go arg)
go (FunTy fun arg) = (FunTy
SAPPLY
(go fun))
SAPPLY
(go arg)
go (ForAllTy tv ty) = ForAllTy tv
p SAPPLY
(tidyType env
p
ty)
where
(env
p
, tv
p
) = tidyTyVar env tv
go_note (SynNote ty) = SynNote
$!
(go ty)
go_note (SynNote ty) = SynNote
SAPPLY
(go ty)
go_note note@(FTVNote ftvs) = note -- No need to tidy the free tyvars
go_note note@(UsgNote _) = note -- Usage annotation is already tidy
go_note note@(UsgForAll _) = note -- Uvar binder is already tidy
...
...
@@ -805,7 +805,7 @@ tidyTypes env tys = map (tidyType env) tys
\end{code}
@tidyOpenType@ grabs the free type varibles, tidies them
@tidyOpenType@ grabs the free type vari
a
bles, tidies them
and then uses @tidyType@ to work over the type itself
\begin{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