hoogle 4.2.4 → 4.2.5
raw patch · 2 files changed
+15/−5 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- hoogle.cabal +5/−1
- src/Hoogle/Language/Haskell.hs +10/−4
hoogle.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.6 build-type: Simple name: hoogle-version: 4.2.4+version: 4.2.5 license: GPL license-file: docs/LICENSE category: Development@@ -28,6 +28,10 @@ -- Cabal doesn't find files with . in them, Cabal bug #794 resources/jquery-1.4.2.js resources/jquery.cookie.js++source-repository head+ type: darcs+ location: http://community.haskell.org/~ndm/darcs/hoogle/ library hs-source-dirs: src
src/Hoogle/Language/Haskell.hs view
@@ -125,7 +125,7 @@ transDecl x (HSE.TypeSig _ [name] tyy) = Just $ fact (ctr++kinds False typ) $ textItem{itemName=nam,itemKey=nam, itemType=Just typ,- itemURL="#v:" ++ nam,+ itemURL="#v:" ++ esc nam, itemDisp=formatTags x $ (cols snam,TagBold) : zipWith (\i a -> (cols a,TagColor i)) [1..] as ++ [(cols b,TagColor 0)]} where (snam,nam) = findName name (as,b) = initLast $ typeArgsPos tyy@@ -136,13 +136,13 @@ transDecl x (ClassDecl s ctxt hd _ _) = Just $ fact (kinds True $ transDeclHead ctxt hd) $ textItem {itemName=nam, itemKey=nam- ,itemURL="#t:" ++ nam+ ,itemURL="#t:" ++ esc nam ,itemDisp=x `formatTags` [(cols $ head $ srcInfoPoints s, TagEmph),(cols snam,TagBold)]} where (snam,nam) = findName hd transDecl x (TypeDecl s hd ty) = Just $ fact (FactAlias from to:kinds False from++kinds False to) $ textItem {itemName=nam, itemKey=nam- ,itemURL="#t:" ++ nam+ ,itemURL="#t:" ++ esc nam ,itemDisp=x `formatTags` [(cols $ head $ srcInfoPoints s, TagEmph),(cols snam,TagBold)]} where (snam,nam) = findName hd from = transDeclHead Nothing hd@@ -150,7 +150,7 @@ transDecl x (DataDecl _ dat ctxt hd _ _) = Just $ fact (kinds False $ transDeclHead ctxt hd) $ textItem {itemName=nam, itemKey=nam- ,itemURL="#t:" ++ nam+ ,itemURL="#t:" ++ esc nam ,itemDisp=x `formatTags` [(cols $ srcInfoSpan $ ann dat, TagEmph),(cols snam,TagBold)]} where (snam,nam) = findName hd @@ -158,6 +158,12 @@ where t = transInstHead ctxt hd transDecl _ _ = Nothing+++esc = concatMap f+ where+ f x | isAlphaNum x = [x]+ | otherwise = "-" ++ show (ord x) ++ "-" typeArgsPos :: HSE.Type S -> [SrcSpan]