diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-03-26 09:14:37 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-03-26 09:14:37 +0100 |
commit | 0a9b99a0c916100e7087026d29253d72f1ff9057 (patch) | |
tree | dbfbb08cb497190fa60e8525b81303b216728121 /src/Haddock/Interface | |
parent | 1e6e6c01babee971420e1876cdffdfb0bf673c1e (diff) | |
parent | 925c54bbffaf90b5719b332628c7540ab13dc6c2 (diff) |
Merge branch 'master' of http://darcs.haskell.org//haddock
Diffstat (limited to 'src/Haddock/Interface')
-rw-r--r-- | src/Haddock/Interface/AttachInstances.hs | 5 | ||||
-rw-r--r-- | src/Haddock/Interface/Rename.hs | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/Haddock/Interface/AttachInstances.hs b/src/Haddock/Interface/AttachInstances.hs index 90416cd0..a4d4764e 100644 --- a/src/Haddock/Interface/AttachInstances.hs +++ b/src/Haddock/Interface/AttachInstances.hs @@ -106,7 +106,9 @@ getAllInfo name = withSession $ \hsc_env -> do -- in Haddock output) and unifying special tycons with normal ones. -- For the benefit of the user (looks nice and predictable) and the -- tests (which prefer output to be deterministic). -data SimpleType = SimpleType Name [SimpleType] deriving (Eq,Ord) +data SimpleType = SimpleType Name [SimpleType] + | SimpleTyLit TyLit + deriving (Eq,Ord) instHead :: ([TyVar], [PredType], Class, [Type]) -> ([Int], Name, [SimpleType]) @@ -126,6 +128,7 @@ instHead (_, _, cls, args) where (SimpleType s ts) = simplify t1 simplify (TyVarTy v) = SimpleType (tyVarName v) [] simplify (TyConApp tc ts) = SimpleType (tyConName tc) (map simplify ts) + simplify (LitTy l) = SimpleTyLit l -- sortImage f = sortBy (\x y -> compare (f x) (f y)) diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs index 7417d234..1c54216b 100644 --- a/src/Haddock/Interface/Rename.hs +++ b/src/Haddock/Interface/Rename.hs @@ -259,6 +259,8 @@ renameType t = case t of doc' <- renameLDocHsSyn doc return (HsDocTy ty' doc') + HsTyLit x -> return (HsTyLit x) + _ -> error "renameType" |