packages feed

purescript 0.6.9.2 → 0.6.9.3

raw patch · 6 files changed

+50/−31 lines, 6 filesdep ~base

Dependency ranges changed: base

Files

− psc-docs/CTags.hs
@@ -1,13 +0,0 @@-module Ctags (dumpCtags) where--import qualified Language.PureScript as P-import Tags-import Data.List (sort)--dumpCtags :: [(String, P.Module)] -> [String]-dumpCtags = sort . concat . (map renderModCtags)--renderModCtags :: (String, P.Module) -> [String]-renderModCtags (path, mdl) = sort tagLines-  where tagLines = map tagLine $ tags mdl-        tagLine (name, line) = name ++ "\t" ++ path ++ "\t" ++ show line
+ psc-docs/Ctags.hs view
@@ -0,0 +1,13 @@+module Ctags (dumpCtags) where++import qualified Language.PureScript as P+import Tags+import Data.List (sort)++dumpCtags :: [(String, P.Module)] -> [String]+dumpCtags = sort . concat . (map renderModCtags)++renderModCtags :: (String, P.Module) -> [String]+renderModCtags (path, mdl) = sort tagLines+  where tagLines = map tagLine $ tags mdl+        tagLine (name, line) = name ++ "\t" ++ path ++ "\t" ++ show line
− psc-docs/ETags.hs
@@ -1,15 +0,0 @@-module Etags (dumpEtags) where--import qualified Language.PureScript as P-import Tags--dumpEtags :: [(String, P.Module)] -> [String]-dumpEtags = concat . (map renderModEtags)--renderModEtags :: (String, P.Module) -> [String]-renderModEtags (path, mdl) = ["\x0c", path ++ "," ++ show tagsLen] ++ tagLines-  where tagsLen = sum $ map length tagLines-        tagLines = map tagLine $ tags mdl-        tagLine (name, line) = "\x7f" ++ name ++ "\x01" ++ show line ++ ","--
+ psc-docs/Etags.hs view
@@ -0,0 +1,15 @@+module Etags (dumpEtags) where++import qualified Language.PureScript as P+import Tags++dumpEtags :: [(String, P.Module)] -> [String]+dumpEtags = concat . (map renderModEtags)++renderModEtags :: (String, P.Module) -> [String]+renderModEtags (path, mdl) = ["\x0c", path ++ "," ++ show tagsLen] ++ tagLines+  where tagsLen = sum $ map length tagLines+        tagLines = map tagLine $ tags mdl+        tagLine (name, line) = "\x7f" ++ name ++ "\x01" ++ show line ++ ","++
+ psc-docs/Tags.hs view
@@ -0,0 +1,18 @@+module Tags where++import qualified Language.PureScript as P++tags :: P.Module -> [(String, Int)]+tags = concatMap dtags . P.exportedDeclarations+  where dtags (P.PositionedDeclaration sp _ d) = map tag $ names d+          where tag name = (name, line)+                line = P.sourcePosLine $ P.spanStart sp+        dtags _ = []+        names (P.DataDeclaration _ name _ dcons) = P.runProperName name : consNames+          where consNames = map (\(cname, _) -> P.runProperName cname) dcons+        names (P.TypeDeclaration ident _) = [show ident]+        names (P.ExternDeclaration _ ident _ _) = [show ident]+        names (P.TypeSynonymDeclaration name _ _) = [P.runProperName name]+        names (P.TypeClassDeclaration name _ _ _) = [P.runProperName name]+        names (P.TypeInstanceDeclaration name _ _ _ _) = [show name]+        names _ = []
purescript.cabal view
@@ -1,5 +1,5 @@ name: purescript-version: 0.6.9.2+version: 0.6.9.3 cabal-version: >=1.8 build-type: Simple license: MIT@@ -160,8 +160,9 @@     main-is: Main.hs     buildable: True     hs-source-dirs: psc-docs-    other-modules: CTags-                   ETags+    other-modules: Ctags+                   Etags+                   Tags     ghc-options: -Wall -O2  executable psc-hierarchy