]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Effects1.scl
Merge commit '31664b6'
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Effects1.scl
1 import "JavaBuiltin" as Java\r
2 \r
3 importJava "java.util.regex.Pattern" where\r
4     data Pattern\r
5 \r
6     compile :: String -> Pattern\r
7     matcher :: Pattern -> String -> <Proc> Matcher\r
8 \r
9 importJava "java.util.regex.Matcher" where\r
10     data Matcher\r
11 \r
12     matches :: Matcher -> <Proc> Boolean\r
13 \r
14 doMatch pattern text = matches (matcher pattern text)\r
15 \r
16 main = doMatch (compile ".*xxx.*") "fffxxooxxxlll"\r
17 --\r
18 true