diff --git a/docs/api/index.html b/docs/api/index.html index 191b576..bba27fe 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -1,71 +1,11 @@ -Hell's API

Hell's API

Back to homepage

Types

Terms

\ No newline at end of file +Hell's API

Hell's API

Back to homepage

Types

Terms

\ No newline at end of file diff --git a/src/Hell.hs b/src/Hell.hs index d8540d9..35f8f71 100644 --- a/src/Hell.hs +++ b/src/Hell.hs @@ -44,7 +44,7 @@ import qualified Data.Vector as Vector import qualified Text.Show as Show import qualified Text.Read as Read import qualified Data.Function as Function -import qualified Data.Generics.Schemes as SYB +import qualified Data.Generics as SYB import qualified Type.Reflection as Type import qualified Data.Maybe as Maybe import qualified Language.Haskell.Exts as HSE @@ -1731,4 +1731,13 @@ polyToHtml (name, ty) = code_ do strong_ $ toHtml name em_ " :: " - toHtml $ TH.pprint ty + toHtml $ TH.pprint $ cleanUpTHType ty + +cleanUpTHType :: TH.Type -> TH.Type +cleanUpTHType = SYB.everywhere unqualify where + unqualify :: forall a. Type.Typeable a => a -> a + unqualify a = + case Type.eqTypeRep (Type.typeRep @a) (Type.typeRep @TH.Name) of + Nothing -> a + Just Type.HRefl -> + TH.mkName $ TH.nameBase a