summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilFreeman <>2014-01-08 02:17:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2014-01-08 02:17:00 (GMT)
commit19b538d42bd5af7f8d4979b752ce3101da19740d (patch)
treee809e8f58c0c6c23266bc559d2b448ef2cdfd1df
parentfc8d4c3d5d95b1c3b13b307fce2d5a0bb1b2bd67 (diff)
version 0.2.70.2.7
-rw-r--r--purescript.cabal2
-rw-r--r--src/Language/PureScript/CodeGen/JS.hs1
-rw-r--r--src/Language/PureScript/Parser/Values.hs4
-rw-r--r--src/Language/PureScript/Pretty/Values.hs1
-rw-r--r--src/Language/PureScript/TypeChecker/Types.hs3
-rw-r--r--src/Language/PureScript/Values.hs1
6 files changed, 1 insertions, 11 deletions
diff --git a/purescript.cabal b/purescript.cabal
index 1262a55..7c2327c 100644
--- a/purescript.cabal
+++ b/purescript.cabal
@@ -1,5 +1,5 @@
name: purescript
-version: 0.2.6
+version: 0.2.7
cabal-version: >=1.8
build-type: Simple
license: MIT
diff --git a/src/Language/PureScript/CodeGen/JS.hs b/src/Language/PureScript/CodeGen/JS.hs
index 89ac0e8..596e2b8 100644
--- a/src/Language/PureScript/CodeGen/JS.hs
+++ b/src/Language/PureScript/CodeGen/JS.hs
@@ -187,5 +187,4 @@ statementToJs m e (If ifst) = ifToJs ifst
elseToJs :: ElseStatement -> JS
elseToJs (Else sts) = JSBlock (map (statementToJs m e) sts)
elseToJs (ElseIf elif) = ifToJs elif
-statementToJs m e (ValueStatement val) = valueToJs m e val
statementToJs m e (Return value) = JSReturn (valueToJs m e value)
diff --git a/src/Language/PureScript/Parser/Values.hs b/src/Language/PureScript/Parser/Values.hs
index 24dcecb..4f269af 100644
--- a/src/Language/PureScript/Parser/Values.hs
+++ b/src/Language/PureScript/Parser/Values.hs
@@ -211,9 +211,6 @@ parseElseStatement :: P.Parsec String ParseState ElseStatement
parseElseStatement = C.reserved "else" >> (ElseIf <$> parseIfStatement
<|> Else <$> parseManyStatements)
-parseValueStatement :: P.Parsec String ParseState Statement
-parseValueStatement = ValueStatement <$> (parseValue <* C.semi)
-
parseReturn :: P.Parsec String ParseState Statement
parseReturn = Return <$> (C.reserved "return" *> parseValue <* C.indented <* C.semi)
@@ -224,7 +221,6 @@ parseStatement = P.choice
, parseWhile
, parseFor
, parseIf
- , parseValueStatement
, parseReturn ] P.<?> "statement"
parseStringBinder :: P.Parsec String ParseState Binder
diff --git a/src/Language/PureScript/Pretty/Values.hs b/src/Language/PureScript/Pretty/Values.hs
index 7db75a2..b904901 100644
--- a/src/Language/PureScript/Pretty/Values.hs
+++ b/src/Language/PureScript/Pretty/Values.hs
@@ -205,7 +205,6 @@ prettyPrintStatement (For ident start end sts) = "for " ++ show ident
++ " until " ++ prettyPrintValue end ++ ": {"
++ intercalate "; " (map prettyPrintStatement sts) ++ " }"
prettyPrintStatement (If ifst) = prettyPrintIfStatement ifst
-prettyPrintStatement (ValueStatement val) = prettyPrintValue val
prettyPrintStatement (Return value) = "return " ++ prettyPrintValue value
prettyPrintIfStatement :: IfStatement -> String
diff --git a/src/Language/PureScript/TypeChecker/Types.hs b/src/Language/PureScript/TypeChecker/Types.hs
index bbaad81..8701f2c 100644
--- a/src/Language/PureScript/TypeChecker/Types.hs
+++ b/src/Language/PureScript/TypeChecker/Types.hs
@@ -540,9 +540,6 @@ checkStatement mass ret (For ident start end inner) = do
check end Number
(allCodePathsReturn, _) <- bindLocalVariables moduleName [(ident, Number)] $ checkBlock mass ret inner
return (allCodePathsReturn, mass)
-checkStatement mass _ (ValueStatement val) = do
- check val unit
- return (False, mass)
checkStatement mass ret (Return val) = do
check val ret
return (True, mass)
diff --git a/src/Language/PureScript/Values.hs b/src/Language/PureScript/Values.hs
index a91231a..26902aa 100644
--- a/src/Language/PureScript/Values.hs
+++ b/src/Language/PureScript/Values.hs
@@ -85,7 +85,6 @@ data Statement
| While Value [Statement]
| For Ident Value Value [Statement]
| If IfStatement
- | ValueStatement Value
| Return Value deriving (Show, Data, Typeable)
data IfStatement = IfStatement Value [Statement] (Maybe ElseStatement) deriving (Show, Data, Typeable)