X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=tests%2Forg.simantics.scl.compiler.tests%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftests%2Fscl%2FBug4450.scl;h=31e0249e7510f729dda28a7120baeaab0931cf9b;hp=54e65c2e925897b41a86d4dfa5ee0c9725a9d8e1;hb=HEAD;hpb=c125a1755cc7c4a6241c3c5bf841c3db0ff2d658 diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Bug4450.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Bug4450.scl index 54e65c2e9..31e0249e7 100644 --- a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Bug4450.scl +++ b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Bug4450.scl @@ -1,15 +1,15 @@ -import "Prelude" - -csvWrite :: String -> [[String]] -> () -csvWrite fname rows = () - -/// Like writeEntries but with a transformer function also for values. -/// kfun key + vfun value should have the length of header. -writeEntries' :: (k -> [String]) -> (v -> [String]) - -> String -> [String] -> [(k, v)] -> () -writeEntries' kfun vfun fname header rows = - csvWrite fname $ [header] + [kfun k + vfun v | (k, v) <- rows] - -main = "OK" --- +import "Prelude" + +csvWrite :: String -> [[String]] -> () +csvWrite fname rows = () + +/// Like writeEntries but with a transformer function also for values. +/// kfun key + vfun value should have the length of header. +writeEntries' :: (k -> [String]) -> (v -> [String]) + -> String -> [String] -> [(k, v)] -> () +writeEntries' kfun vfun fname header rows = + csvWrite fname $ [header] + [kfun k + vfun v | (k, v) <- rows] + +main = "OK" +-- OK \ No newline at end of file