aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/Xhtml/Specialize.hs
diff options
context:
space:
mode:
authorƁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-07-10 16:30:11 +0200
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2015-08-21 18:22:29 +0100
commit79f475a93be3de376bc264c53d2ba8eb61ffea42 (patch)
tree2bd12e32b70534c16684c5eadfa0035a60a94984 /haddock-api/src/Haddock/Backends/Xhtml/Specialize.hs
parente4740dd872d1110247557eb7b20124c22e427789 (diff)
Make type of type specialization function more general.
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Xhtml/Specialize.hs')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Specialize.hs6
1 files changed, 3 insertions, 3 deletions
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