git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix precedence of ternary conditional
commit642385368e78515cbae9573df5a6993bc5316a2f authorPhil Freeman <paf31@cantab.net> dateWed 11 Jun 2014, 20:11 (12 years ago) parentea38310
1 file changed+1−1
src/Language/PureScript/Pretty/JS.hs+1−1
src/Language/PureScript/Pretty/JS.hs+1−1
@@ -227,7 +227,6 @@ prettyPrintJS' = A.runKleisli $ runPattern matchValue
227227 ++ fromMaybe "" name
228228 ++ "(" ++ intercalate ", " args ++ ") "
229229 ++ ret ]
230− , [ Wrap conditional $ \(th, el) cond -> cond ++ " ? " ++ prettyPrintJS1 th ++ " : " ++ prettyPrintJS1 el ]
231230 , [ binary LessThan "<" ]
232231 , [ binary LessThanOrEqualTo "<=" ]
233232 , [ binary GreaterThan ">" ]
@@ -252,4 +251,5 @@ prettyPrintJS' = A.runKleisli $ runPattern matchValue
252251 , [ binary BitwiseOr "|" ]
253252 , [ binary And "&&" ]
254253 , [ binary Or "||" ]
254+ , [ Wrap conditional $ \(th, el) cond -> cond ++ " ? " ++ prettyPrintJS1 th ++ " : " ++ prettyPrintJS1 el ]
255255 ]