summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreyChudnov <>2015-03-04 23:43:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2015-03-04 23:43:00 (GMT)
commit8b48d72b62ed453541da70f155e062969bdfaf56 (patch)
tree9a1302e50cea1bc3ed5de5385d33220511029239
parente068d591fc6df3d82090d2b1fe2e08909663033b (diff)
version 0.9.10.9.1
-rw-r--r--CHANGELOG2
-rw-r--r--LICENSE2
-rw-r--r--language-ecmascript-analysis.cabal31
-rw-r--r--src/Language/ECMAScript3/Analysis/LabelSet.hs16
-rw-r--r--test/TestMain.hs3
5 files changed, 24 insertions, 30 deletions
diff --git a/CHANGELOG b/CHANGELOG
new file mode 100644
index 0000000..257bae1
--- /dev/null
+++ b/CHANGELOG
@@ -0,0 +1,2 @@
+=0.9.1=
+Fixed documentation for Language.ECMAScript3.Analysis.LabelSet, removed the (now obsolete) test-suite.
diff --git a/LICENSE b/LICENSE
index ac6e4ee..7369370 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,5 +1,5 @@
Copyright (c) 2007--2012, Brown University, 2008-2012 Claudiu Saftoiu,
-2012 Stevens Institute of Technology.
+2012-2015 Stevens Institute of Technology.
All Rights Reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/language-ecmascript-analysis.cabal b/language-ecmascript-analysis.cabal
index 232e5c8..69a6595 100644
--- a/language-ecmascript-analysis.cabal
+++ b/language-ecmascript-analysis.cabal
@@ -2,12 +2,12 @@
-- further documentation, see http://haskell.org/cabal/users-guide/
name: language-ecmascript-analysis
-version: 0.9
+version: 0.9.1
cabal-version: >= 1.10
copyright: (c) 2007-2012 Brown University, (c) 2008-2010 Claudiu Saftoiu,
- (c) 2012-2013 Stevens Institute of Technology
-synopsis: JavaScript analysis library
-description: Includes a label set analysis and a lexical environment analysis
+ (c) 2012-2015 Stevens Institute of Technology
+synopsis: JavaScript static analysis library.
+description: JavaScript static analysis library. Includes label set and lexical environment analyses. The package versions follow Semantic Versioning model (semver.org).
license: BSD3
license-file: LICENSE
author: Andrey Chudnov, Arjun Guha, Spiridon Aristides Eliopoulos,
@@ -18,7 +18,9 @@ bug-reports: http://github.com/jswebtools/language-ecmascript-analysis/i
category: Language
build-type: Simple
stability: experimental
-Tested-with: GHC==7.6.3
+Tested-with: GHC==7.4.2, GHC==7.6.3, GHC==7.8.3
+Extra-Source-Files: CHANGELOG
+
source-repository head
type: git
@@ -27,7 +29,7 @@ source-repository head
source-repository this
type: git
location: git://github.com/jswebtools/language-ecmascript-analysis.git
- tag: 0.9
+ tag: 0.9.1
Library
Build-Depends: base >= 4 && < 5
@@ -43,19 +45,4 @@ Library
Default-Extensions: DeriveDataTypeable, ScopedTypeVariables, DeriveFunctor, DeriveFoldable, DeriveTraversable, FlexibleContexts
ghc-options:
-fwarn-incomplete-patterns
- default-language: Haskell2010
-
-Test-Suite test
- hs-source-dirs: test
- Type: exitcode-stdio-1.0
- Main-Is: TestMain.hs
- Build-Depends: base >= 4 && < 5,
- uniplate >= 1.6 && <1.7,
- language-ecmascript >= 0.15 && < 1.0,
- HUnit,
- test-framework >= 0.8 && < 0.9,
- test-framework-hunit >= 0.3.0 && < 0.4,
- mtl
- Default-Extensions: DeriveDataTypeable, ScopedTypeVariables, DeriveFunctor, DeriveFoldable, DeriveTraversable, FlexibleContexts
- Default-Language: Haskell2010
- ghc-options: -fwarn-incomplete-patterns
+ default-language: Haskell2010 \ No newline at end of file
diff --git a/src/Language/ECMAScript3/Analysis/LabelSet.hs b/src/Language/ECMAScript3/Analysis/LabelSet.hs
index a7b437a..2686999 100644
--- a/src/Language/ECMAScript3/Analysis/LabelSet.hs
+++ b/src/Language/ECMAScript3/Analysis/LabelSet.hs
@@ -19,12 +19,20 @@ import Data.Typeable (Typeable)
-- the spec)
data Label = Label String
| EmptyLabel
- deriving (Ord, Eq, Show, Data, Typeable)
+ deriving (Ord, Eq, Data, Typeable)
--- | Annotates statements with their label sets; example use:
+instance Show Label where
+ show (Label s) = s
+ show EmptyLabel = ""
+
+-- | Annotates statements with their label sets. Assuming you've also imported
+-- 'Language.ECMAScript3.Syntax.Annotations', 'Control.Arrow' and
+-- 'Data.Set', the example use would be:
--
--- >>> let jsa = reannotate (\a -> (a, Set.empty))
--- >>> in annotateLabelSets jsa snd (\labs (a, ls) -> (a, labs `Set.union` ls))
+-- @
+-- lsAnalysis :: 'JavaScript' a -> 'JavaScript' (a, 'Set' 'Label')
+-- lsAnalysis = annotateLabelSets snd (\\labs -> second $ union labs) . reannotate (\a -> (a, empty))
+-- @
annotateLabelSets :: Data a =>
(a -> Set Label) -- ^ annotation read function
-> (Set Label -> a -> a) -- ^ annotation write function
diff --git a/test/TestMain.hs b/test/TestMain.hs
deleted file mode 100644
index de106fe..0000000
--- a/test/TestMain.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-module Main where
-
-main = return ()