tricu

An interpreted language for exploring Tree Calculus
Log | Files | Refs | README | LICENSE

consumer_base_failures.tri (608B)


      1 !import "consumers.base-source" B
      2 !import "parser" P
      3 !import "prelude" !Local
      4 failureCode input wanted = matchResult (diagnostic _ : equal? (P.parserDiagnosticCode diagnostic) wanted) (_ _ : false) (B.compileBaseSource input)
      5 main = matchBool "scp-base-diagnostics-ok" "scp-base-diagnostics-DIFFER" (foldl and? true [(failureCode "consumer bad [x | x] @ _ => x" 21)
      6    (failureCode "consumer bad x @ _ => missing" 22)
      7    (failureCode "consumer bad x @ worker => call worker x as x in x" 21)
      8    (failureCode "consumer bad x @ _ => call x x as result in unknown" 22)
      9    (failureCode "consumer bad $" 4)])
     10 main