git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #103 from utkarshkukreti/dont-add-trailing-whitespace

Don't add trailing spaces in PureScript.Pretty.JS.

commit2405fb626d4bff8ff7535b47fab6af5fd555a220 authorPhil Freeman <paf31@cantab.net> dateSat 11 Jan 2014, 09:42 (13 years ago) parentfc4743130a2617
1 file changed+2−2
src/Language/PureScript/Pretty/JS.hs+2−2
src/Language/PureScript/Pretty/JS.hs+2−2
@@ -73,7 +73,7 @@ literals = mkPattern' match
7373 , withIndent $ do
7474 jss <- forM sts prettyPrintJS'
7575 indentString <- currentIndent
76− return $ intercalate "\n" $ map (++ "; ") $ map (indentString ++) jss
76+ return $ intercalate "\n" $ map (++ ";") $ map (indentString ++) jss
7777 , return "\n"
7878 , currentIndent
7979 , return "}"
@@ -194,7 +194,7 @@ prettyPrintJS :: [JS] -> String
194194prettyPrintJS sts = fromMaybe (error "Incomplete pattern") . flip evalStateT (PrinterState 0) $ do
195195 jss <- forM sts prettyPrintJS'
196196 indentString <- currentIndent
197− return $ intercalate "\n" $ map (++ "; ") $ map (indentString ++) jss
197+ return $ intercalate "\n" $ map (++ ";") $ map (indentString ++) jss
198198
199199prettyPrintJS' :: JS -> StateT PrinterState Maybe String
200200prettyPrintJS' = A.runKleisli $ runPattern matchValue