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
580a1e57
Commit
580a1e57
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-08-25 22:25:50 by sof]
Removed use of COMPILING_GHC
parent
b6595910
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ghc/compiler/utils/Bag.lhs
+0
-13
0 additions, 13 deletions
ghc/compiler/utils/Bag.lhs
ghc/compiler/utils/BitSet.lhs
+3
-6
3 additions, 6 deletions
ghc/compiler/utils/BitSet.lhs
ghc/compiler/utils/Digraph.lhs
+0
-2
0 additions, 2 deletions
ghc/compiler/utils/Digraph.lhs
with
3 additions
and
21 deletions
ghc/compiler/utils/Bag.lhs
+
0
−
13
View file @
580a1e57
...
...
@@ -4,32 +4,24 @@
\section[Bags]{@Bag@: an unordered collection with duplicates}
\begin{code}
#ifdef COMPILING_GHC
#include "HsVersions.h"
#endif
module Bag (
Bag, -- abstract type
emptyBag, unitBag, unionBags, unionManyBags,
mapBag,
#ifndef COMPILING_GHC
elemBag,
#endif
filterBag, partitionBag, concatBag, foldBag, foldrBag,
isEmptyBag, consBag, snocBag,
listToBag, bagToList
) where
#ifdef COMPILING_GHC
IMP_Ubiq(){-uitous-}
IMPORT_1_3(List(partition))
import Outputable --( interpp'SP )
import Pretty
#else
import List(partition)
#endif
data Bag a
= EmptyBag
...
...
@@ -42,7 +34,6 @@ data Bag a
emptyBag = EmptyBag
unitBag = UnitBag
#ifndef COMPILING_GHC
elemBag :: Eq a => a -> Bag a -> Bool
elemBag x EmptyBag = False
...
...
@@ -50,7 +41,6 @@ elemBag x (UnitBag y) = x==y
elemBag x (TwoBags b1 b2) = x `elemBag` b1 || x `elemBag` b2
elemBag x (ListBag ys) = any (x ==) ys
elemBag x (ListOfBags bs) = any (x `elemBag`) bs
#endif
unionManyBags [] = EmptyBag
unionManyBags xs = ListOfBags xs
...
...
@@ -158,8 +148,6 @@ bagToList b = foldrBag (:) [] b
\end{code}
\begin{code}
#ifdef COMPILING_GHC
instance (Outputable a) => Outputable (Bag a) where
ppr sty EmptyBag = ptext SLIT("emptyBag")
ppr sty (UnitBag a) = ppr sty a
...
...
@@ -167,5 +155,4 @@ instance (Outputable a) => Outputable (Bag a) where
ppr sty (ListBag as) = interpp'SP sty as
ppr sty (ListOfBags bs) = brackets (interpp'SP sty bs)
#endif {- COMPILING_GHC -}
\end{code}
This diff is collapsed.
Click to expand it.
ghc/compiler/utils/BitSet.lhs
+
3
−
6
View file @
580a1e57
...
...
@@ -20,9 +20,6 @@ module BitSet (
BitSet, -- abstract type
mkBS, listBS, emptyBS, unitBS,
unionBS, minusBS
#if ! defined(COMPILING_GHC)
, elementBS, intersectBS, isEmptyBS
#endif
) where
#ifdef __GLASGOW_HASKELL__
...
...
@@ -60,7 +57,7 @@ unionBS (MkBS x#) (MkBS y#) = MkBS (x# `or#` y#)
minusBS :: BitSet -> BitSet -> BitSet
minusBS (MkBS x#) (MkBS y#) = MkBS (x# `and#` (not# y#))
#if
! defined(COMPILING_GHC)
#if
0
-- not used in GHC
isEmptyBS :: BitSet -> Bool
isEmptyBS (MkBS s#)
...
...
@@ -106,7 +103,7 @@ unitBS x = MkBS (1 `ashInt` x)
unionBS :: BitSet -> BitSet -> BitSet
unionBS (MkBS x) (MkBS y) = MkBS (x `logiorInt` y)
#if
! defined(COMPILING_GHC)
#if
0
-- not used in GHC
isEmptyBS :: BitSet -> Bool
isEmptyBS (MkBS s)
...
...
@@ -155,7 +152,7 @@ unitBS x = MkBS (1 `bitLsh` x)
unionBS :: BitSet -> BitSet -> BitSet
unionBS (MkBS x) (MkBS y) = MkBS (x `bitOr` y)
#if
! defined(COMPILING_GHC)
#if
0
-- not used in GHC
isEmptyBS :: BitSet -> Bool
isEmptyBS (MkBS s)
...
...
This diff is collapsed.
Click to expand it.
ghc/compiler/utils/Digraph.lhs
+
0
−
2
View file @
580a1e57
\begin{code}
#if defined(COMPILING_GHC)
# include "HsVersions.h"
#endif
module Digraph(
...
...
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