aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Convert.hs
diff options
context:
space:
mode:
authorHécate Moonlight <hecate+github@glitchbra.in>2021-05-11 10:14:47 +0200
committerHécate Moonlight <hecate+github@glitchbra.in>2021-05-11 10:14:47 +0200
commitbbaa3dfbf6ea4e0ad1356622ce7750ba76076b7d (patch)
tree5ae34152a28115ae0540469fcb993b70815f6026 /haddock-api/src/Haddock/Convert.hs
parent72118896464f94d81f10c52f5d9261efcacc57a6 (diff)
Revert "Removal of HsVersions.h (#1388)"
This reverts commit 72118896464f94d81f10c52f5d9261efcacc57a6.
Diffstat (limited to 'haddock-api/src/Haddock/Convert.hs')
-rw-r--r--haddock-api/src/Haddock/Convert.hs14
1 files changed, 8 insertions, 6 deletions
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index f8d85f88..19630077 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -19,6 +19,8 @@ module Haddock.Convert (
PrintRuntimeReps(..),
) where
+#include "HsVersions.h"
+
import GHC.Data.Bag ( emptyBag )
import GHC.Types.Basic ( TupleSort(..), PromotionFlag(..), DefMethSpec(..), TopLevelFlag(..) )
import GHC.Types.SourceText (SourceText(..))
@@ -45,9 +47,9 @@ import GHC.Builtin.Types ( eqTyConName, listTyConName, liftedTypeKindTyConName
import GHC.Builtin.Names ( hasKey, eqTyConKey, ipClassKey, tYPETyConKey
, liftedDataConKey, boxedRepDataConKey )
import GHC.Types.Unique ( getUnique )
-import GHC.Utils.Misc ( chkAppend, dropList, equalLength
+import GHC.Utils.Misc ( chkAppend, debugIsOn, dropList, equalLength
, filterByList, filterOut )
-import GHC.Utils.Panic.Plain ( assert )
+import GHC.Utils.Panic ( assertPanic )
import GHC.Types.Var
import GHC.Types.Var.Set
import GHC.Types.SrcLoc
@@ -931,8 +933,8 @@ tcSplitForAllTysReqPreserveSynonyms :: Type -> ([ReqTVBinder], Type)
tcSplitForAllTysReqPreserveSynonyms ty =
let (all_bndrs, body) = tcSplitSomeForAllTysPreserveSynonyms isVisibleArgFlag ty
req_bndrs = mapMaybe mk_req_bndr_maybe all_bndrs in
- assert ( req_bndrs `equalLength` all_bndrs)
- (req_bndrs, body)
+ ASSERT( req_bndrs `equalLength` all_bndrs )
+ (req_bndrs, body)
where
mk_req_bndr_maybe :: TyCoVarBinder -> Maybe ReqTVBinder
mk_req_bndr_maybe (Bndr tv argf) = case argf of
@@ -944,8 +946,8 @@ tcSplitForAllTysInvisPreserveSynonyms :: Type -> ([InvisTVBinder], Type)
tcSplitForAllTysInvisPreserveSynonyms ty =
let (all_bndrs, body) = tcSplitSomeForAllTysPreserveSynonyms isInvisibleArgFlag ty
inv_bndrs = mapMaybe mk_inv_bndr_maybe all_bndrs in
- assert ( inv_bndrs `equalLength` all_bndrs)
- (inv_bndrs, body)
+ ASSERT( inv_bndrs `equalLength` all_bndrs )
+ (inv_bndrs, body)
where
mk_inv_bndr_maybe :: TyCoVarBinder -> Maybe InvisTVBinder
mk_inv_bndr_maybe (Bndr tv argf) = case argf of