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