summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilFreeman <>2015-03-18 16:57:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2015-03-18 16:57:00 (GMT)
commite974680c28b9812407c959bbe5f16369a30e553f (patch)
treeaf370529875383e792715a8dcad1bacda4b6ba0b
parentad6f41a143ca4f20deda05bbb844f2fa330bcc94 (diff)
version 0.6.9.20.6.9.2
-rw-r--r--psc-docs/CTags.hs13
-rw-r--r--psc-docs/ETags.hs15
-rw-r--r--purescript.cabal5
3 files changed, 31 insertions, 2 deletions
diff --git a/psc-docs/CTags.hs b/psc-docs/CTags.hs
new file mode 100644
index 0000000..3635534
--- /dev/null
+++ b/psc-docs/CTags.hs
@@ -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
diff --git a/psc-docs/ETags.hs b/psc-docs/ETags.hs
new file mode 100644
index 0000000..cb3c98c
--- /dev/null
+++ b/psc-docs/ETags.hs
@@ -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 ++ ","
+
+
diff --git a/purescript.cabal b/purescript.cabal
index fb6e028..6e121ec 100644
--- a/purescript.cabal
+++ b/purescript.cabal
@@ -1,5 +1,5 @@
name: purescript
-version: 0.6.9.1
+version: 0.6.9.2
cabal-version: >=1.8
build-type: Simple
license: MIT
@@ -160,7 +160,8 @@ executable psc-docs
main-is: Main.hs
buildable: True
hs-source-dirs: psc-docs
- other-modules:
+ other-modules: CTags
+ ETags
ghc-options: -Wall -O2
executable psc-hierarchy