From 79f475a93be3de376bc264c53d2ba8eb61ffea42 Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Fri, 10 Jul 2015 16:30:11 +0200 Subject: Make type of type specialization function more general. --- haddock-api/src/Haddock/Backends/Xhtml/Specialize.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'haddock-api/src/Haddock/Backends/Xhtml') diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Specialize.hs b/haddock-api/src/Haddock/Backends/Xhtml/Specialize.hs index a0d64c0f..e8e80da1 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Specialize.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Specialize.hs @@ -11,11 +11,11 @@ import GHC import Data.Data -specialize :: (Eq name, Data (HsType name)) - => name -> HsType name -> HsType name -> HsType name +specialize :: (Eq name, Typeable name) + => Data a + => name -> HsType name -> a -> a specialize name details = everywhere (mkT $ specialize' name details) specialize' :: Eq name => name -> HsType name -> HsType name -> HsType name specialize' name details (HsTyVar name') | name == name' = details specialize' _ _ typ = typ - \ No newline at end of file -- cgit v1.2.3