diff options
| author | Alec Theriault <alec.theriault@gmail.com> | 2018-12-17 09:25:10 -0500 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-17 09:25:10 -0500 | 
| commit | ed43757aa371f9a532665783e27cff1703b4ac90 (patch) | |
| tree | d797068322124edcd022ebb1a2873a8b7157f0bf /haddock-api/src/Haddock/Interface/AttachInstances.hs | |
| parent | 1380f7fa048ba26f79944452722dff0800b49038 (diff) | |
Refactor names + unused functions (#982)
This commit should not introduce any change in functionality!
  * consistently use `getOccString` to convert `Name`s to strings
  * compare names directly when possible (instead of comparing strings)
  * get rid of unused utility functions
Diffstat (limited to 'haddock-api/src/Haddock/Interface/AttachInstances.hs')
| -rw-r--r-- | haddock-api/src/Haddock/Interface/AttachInstances.hs | 14 | 
1 files changed, 2 insertions, 12 deletions
| diff --git a/haddock-api/src/Haddock/Interface/AttachInstances.hs b/haddock-api/src/Haddock/Interface/AttachInstances.hs index 8f7abd16..dd6c70a5 100644 --- a/haddock-api/src/Haddock/Interface/AttachInstances.hs +++ b/haddock-api/src/Haddock/Interface/AttachInstances.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE CPP, MagicHash, BangPatterns #-} +{-# LANGUAGE MagicHash, BangPatterns #-}  {-# LANGUAGE TypeFamilies #-}  -----------------------------------------------------------------------------  -- | @@ -32,7 +32,6 @@ import DynFlags  import CoreSyn (isOrphan)  import ErrUtils  import FamInstEnv -import FastString  import GHC  import InstEnv  import Module ( ModuleSet, moduleSetElts ) @@ -40,13 +39,11 @@ import MonadUtils (liftIO)  import Name  import NameEnv  import Outputable (text, sep, (<+>)) -import PrelNames  import SrcLoc  import TyCon  import TyCoRep -import TysPrim( funTyCon ) +import TysPrim( funTyConName )  import Var hiding (varName) -#define FSLIT(x) (mkFastString# (x#))  type ExportedNames = Set.Set Name  type Modules = Set.Set Module @@ -224,13 +221,6 @@ instFam FamInst { fi_fam = n, fi_tys = ts, fi_rhs = t }    = (map argCount ts, n, map simplify ts, argCount t, simplify t) -funTyConName :: Name -funTyConName = mkWiredInName gHC_PRIM -                        (mkOccNameFS tcName FSLIT("(->)")) -                        funTyConKey -                        (ATyCon funTyCon)       -- Relevant TyCon -                        BuiltInSyntax -  --------------------------------------------------------------------------------  -- Filtering hidden instances  -------------------------------------------------------------------------------- | 
