aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface/AttachInstances.hs
diff options
context:
space:
mode:
Diffstat (limited to 'haddock-api/src/Haddock/Interface/AttachInstances.hs')
-rw-r--r--haddock-api/src/Haddock/Interface/AttachInstances.hs40
1 files changed, 20 insertions, 20 deletions
diff --git a/haddock-api/src/Haddock/Interface/AttachInstances.hs b/haddock-api/src/Haddock/Interface/AttachInstances.hs
index ce987b76..6ef0ed19 100644
--- a/haddock-api/src/Haddock/Interface/AttachInstances.hs
+++ b/haddock-api/src/Haddock/Interface/AttachInstances.hs
@@ -19,7 +19,6 @@ module Haddock.Interface.AttachInstances (attachInstances) where
import Haddock.Types
import Haddock.Convert
-import Haddock.GhcUtils
import Control.Applicative ((<|>))
import Control.Arrow hiding ((<+>))
@@ -29,23 +28,24 @@ import Data.Maybe ( maybeToList, mapMaybe, fromMaybe )
import qualified Data.Map as Map
import qualified Data.Set as Set
-import Class
-import DynFlags
-import CoreSyn (isOrphan)
-import ErrUtils
-import FamInstEnv
+import GHC.Core.Class
+import GHC.Driver.Session
+import GHC.Core (isOrphan)
+import GHC.Utils.Error
+import GHC.Core.FamInstEnv
import GHC
-import InstEnv
-import Module ( ModuleSet, moduleSetElts )
-import MonadUtils (liftIO)
-import Name
-import NameEnv
-import Outputable (text, sep, (<+>))
-import SrcLoc
-import TyCon
-import TyCoRep
-import TysPrim( funTyConName )
-import Var hiding (varName)
+import GHC.Core.InstEnv
+import GHC.Unit.Module.Env ( ModuleSet, moduleSetElts )
+import GHC.Utils.Monad (liftIO)
+import GHC.Types.Name
+import GHC.Types.Name.Env
+import GHC.Utils.Outputable (text, sep, (<+>))
+import GHC.Types.SrcLoc
+import GHC.Core.TyCon
+import GHC.Core.TyCo.Rep
+import GHC.Builtin.Types.Prim( funTyConName )
+import GHC.Types.Var hiding (varName)
+import GHC.HsToCore.Docs
type ExportedNames = Set.Set Name
type Modules = Set.Set Module
@@ -196,13 +196,13 @@ instHead (_, _, cls, args)
argCount :: Type -> Int
argCount (AppTy t _) = argCount t + 1
argCount (TyConApp _ ts) = length ts
-argCount (FunTy _ _ _) = 2
+argCount (FunTy _ _ _ _) = 2
argCount (ForAllTy _ t) = argCount t
argCount (CastTy t _) = argCount t
argCount _ = 0
simplify :: Type -> SimpleType
-simplify (FunTy _ t1 t2) = SimpleType funTyConName [simplify t1, simplify t2]
+simplify (FunTy _ _ t1 t2) = SimpleType funTyConName [simplify t1, simplify t2]
simplify (ForAllTy _ t) = simplify t
simplify (AppTy t1 t2) = SimpleType s (ts ++ maybeToList (simplify_maybe t2))
where (SimpleType s ts) = simplify t1
@@ -257,7 +257,7 @@ isTypeHidden expInfo = typeHidden
case t of
TyVarTy {} -> False
AppTy t1 t2 -> typeHidden t1 || typeHidden t2
- FunTy _ t1 t2 -> typeHidden t1 || typeHidden t2
+ FunTy _ _ t1 t2 -> typeHidden t1 || typeHidden t2
TyConApp tcon args -> nameHidden (getName tcon) || any typeHidden args
ForAllTy bndr ty -> typeHidden (tyVarKind (binderVar bndr)) || typeHidden ty
LitTy _ -> False