[Opa] Is this a complete program

Adam Koprowski Adam.Koprowski at mlstate.com
Mon Jan 9 20:07:38 UTC 2012


   Hi Victor,

  Yes, it's a complete program, however it's a program in the new syntax of
Opa that will be introduced in the upcoming S4 release -- its preview is
already available in current packages but you'll need to use a command line
option '*--parser js-like*' while executing the Opa compiler.
  I suppose you found this example in the new documentation, doc.opalang.org,
which is for the S4 release, the one for current S3 release is at:
doc.s3.opalang.org. We used to have a better explanation of the S3/S4
distinction on the homepage of Opa but it seems to be gone; we'll try to
see what we can do to make all this more clear.

  Best,
  Adam

On Mon, Jan 9, 2012 at 20:40, Victor Reyes <victor.reyes at gmail.com> wrote:

> Hello Opa World,
>
> I am reading the Opa tour and came across the following:
>
> Server.start(
>    Server.http,
> { page: function() { <h1>Hello, world</h1> },
>   title: “Hello, world” }
> )
>
>
> Is that supposed to be a full program? If so, I get the following errors
> when attempting to compile it:
>
> opa svr.opa
> In svr.opa [1:6-1:6 | global chars=6-6]
> Syntax error at line 1, column 6
> The error may be in the following citation, usually in the red part
> (starting at ⚐) or just before:
> <<Server⚐.start(
>    Server.http,
> { page: function() { <h1>Hello, world</h1> },
>   title: “Hello, world” }
> )
> >>
> Hint: expected ":" or "=" or "as" or <spacing>
> (while parsing <function parameters> starting at line 1, column 6)
> Error
> Syntax error
>
> Thank you
>
> --
> Victor
>
> _______________________________________________
> Opa mailing list
> Opa at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/opa
>
>


-- 
*Adam Koprowski                [http://adam-koprowski.net]
Opa Tech Evangelist @ MLstate [http://opalang.org | http://mlstate.com]*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.owasp.org/pipermail/opa/attachments/20120109/726853aa/attachment.html>


More information about the Opa mailing list