Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,274
Issues
4,274
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
412
Merge Requests
412
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
195af2d5
Commit
195af2d5
authored
Sep 11, 2015
by
Jan Stolarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dead code removal, export cleanup
parent
18759cc4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
39 deletions
+3
-39
compiler/rename/RnTypes.hs
compiler/rename/RnTypes.hs
+1
-13
compiler/typecheck/FamInst.hs
compiler/typecheck/FamInst.hs
+1
-3
compiler/typecheck/TcValidity.hs
compiler/typecheck/TcValidity.hs
+0
-1
compiler/utils/Outputable.hs
compiler/utils/Outputable.hs
+1
-22
No files found.
compiler/rename/RnTypes.hs
View file @
195af2d5
...
...
@@ -22,7 +22,7 @@ module RnTypes (
-- Binding related stuff
warnContextQuantification
,
warnUnusedForAlls
,
bindSigTyVarsFV
,
bindHsTyVars
,
rnHsBndrSig
,
rnLHsTyVarBndr
,
extractHsTyRdrTyVars
,
extractHsTysRdrTyVars
,
extractTyVarBndrNames
,
extractHsTyRdrTyVars
,
extractHsTysRdrTyVars
,
extractRdrKindSigVars
,
extractDataDefnKindVars
,
filterInScope
)
where
...
...
@@ -48,7 +48,6 @@ import Outputable
import
FastString
import
Maybes
import
Data.List
(
nub
,
nubBy
,
deleteFirstsBy
)
import
qualified
Data.Set
as
Set
import
Control.Monad
(
unless
,
when
)
#
if
__GLASGOW_HASKELL__
<
709
...
...
@@ -1123,17 +1122,6 @@ extractHsTysRdrTyVars ty
=
case
extract_ltys
ty
(
[]
,
[]
)
of
(
kvs
,
tvs
)
->
(
nub
kvs
,
nub
tvs
)
-- Extracts variable names used in a type variable binder. Note that HsType
-- represents data and type constructors as type variables and so this function
-- will also return data and type constructors.
extractTyVarBndrNames
::
LHsTyVarBndr
RdrName
->
Set
.
Set
RdrName
extractTyVarBndrNames
(
L
_
(
UserTyVar
name
))
=
Set
.
singleton
name
extractTyVarBndrNames
(
L
_
(
KindedTyVar
(
L
_
name
)
k
))
=
Set
.
singleton
name
`
Set
.
union
`
(
Set
.
fromList
tvs
)
`
Set
.
union
`
(
Set
.
fromList
kvs
)
where
(
kvs
,
tvs
)
=
extractHsTyRdrTyVars
k
extractRdrKindSigVars
::
LFamilyResultSig
RdrName
->
[
RdrName
]
extractRdrKindSigVars
(
L
_
resultSig
)
|
KindSig
k
<-
resultSig
=
kindRdrNameFromSig
k
...
...
compiler/typecheck/FamInst.hs
View file @
195af2d5
...
...
@@ -11,9 +11,7 @@ module FamInst (
newFamInst
,
-- * Injectivity
makeInjectivityErrors
,
tfHeadedErr
,
bareVariableInRHSErr
makeInjectivityErrors
)
where
import
HscTypes
...
...
compiler/typecheck/TcValidity.hs
View file @
195af2d5
...
...
@@ -12,7 +12,6 @@ module TcValidity (
checkValidInstance
,
validDerivPred
,
checkInstTermination
,
checkValidCoAxiom
,
checkValidCoAxBranch
,
checkTyFamFreeness
,
checkConsistentFamInst
,
arityErr
,
badATErr
)
where
...
...
compiler/utils/Outputable.hs
View file @
195af2d5
...
...
@@ -32,8 +32,7 @@ module Outputable (
sep
,
cat
,
fsep
,
fcat
,
hang
,
punctuate
,
ppWhen
,
ppUnless
,
speakNth
,
speakNTimes
,
speakN
,
speakNOf
,
plural
,
thirdPerson
,
isOrAre
,
doOrDoes
,
speakNth
,
speakN
,
speakNOf
,
plural
,
isOrAre
,
doOrDoes
,
coloured
,
PprColour
,
colType
,
colCoerc
,
colDataCon
,
colBinder
,
bold
,
keyword
,
...
...
@@ -976,16 +975,6 @@ speakNOf 0 d = ptext (sLit "no") <+> d <> char 's'
speakNOf
1
d
=
ptext
(
sLit
"one"
)
<+>
d
-- E.g. "one argument"
speakNOf
n
d
=
speakN
n
<+>
d
<>
char
's'
-- E.g. "three arguments"
-- | Converts a strictly positive integer into a number of times:
--
-- > speakNTimes 1 = text "once"
-- > speakNTimes 2 = text "twice"
-- > speakNTimes 4 = text "4 times"
speakNTimes
::
Int
{- >=1 -}
->
SDoc
speakNTimes
t
|
t
==
1
=
ptext
(
sLit
"once"
)
|
t
==
2
=
ptext
(
sLit
"twice"
)
|
otherwise
=
speakN
t
<+>
ptext
(
sLit
"times"
)
-- | Determines the pluralisation suffix appropriate for the length of a list:
--
-- > plural [] = char 's'
...
...
@@ -995,16 +984,6 @@ plural :: [a] -> SDoc
plural
[
_
]
=
empty
-- a bit frightening, but there you are
plural
_
=
char
's'
-- | Determines the suffix to use in 3rd person singular depending on the length
-- of a list:
--
-- > thirdPerson [] = empty
-- > thirdPerson ["Hello"] = char 's'
-- > thirdPerson ["Hello", "World"] = empty
thirdPerson
::
[
a
]
->
SDoc
thirdPerson
[
_
]
=
char
's'
thirdPerson
_
=
empty
-- | Determines the form of to be appropriate for the length of a list:
--
-- > isOrAre [] = ptext (sLit "are")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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