Commit 195af2d5 authored by Jan Stolarek's avatar Jan Stolarek

Dead code removal, export cleanup

parent 18759cc4
......@@ -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
......
......@@ -11,9 +11,7 @@ module FamInst (
newFamInst,
-- * Injectivity
makeInjectivityErrors,
tfHeadedErr, bareVariableInRHSErr
makeInjectivityErrors
) where
import HscTypes
......
......@@ -12,7 +12,6 @@ module TcValidity (
checkValidInstance, validDerivPred,
checkInstTermination,
checkValidCoAxiom, checkValidCoAxBranch,
checkTyFamFreeness,
checkConsistentFamInst,
arityErr, badATErr
) where
......
......@@ -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")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment