Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler error #1

Open
derDieDasJojo opened this issue Jul 4, 2012 · 0 comments
Open

compiler error #1

derDieDasJojo opened this issue Jul 4, 2012 · 0 comments

Comments

@derDieDasJojo
Copy link

by executing the command:

opa --parser js-like demo_resizable.opa -o resizable.exe

i get the following error message:

Error
    File "demo_resizable.opa", line 15, characters 0-249, (15:0-23:1 | 356-605)
    Function was found of type Server.conf, Server.handler -> void but
    application expects it to be of type
    Server.conf,
    { hd:
      { resources: ordered_map(string, Resource.resource, String.order) } / 'c.b;
      tl: list
      ({ register: { hd: string; tl: list(string) } / 'c.d } /
       { page:  -> xhtml; title: string } / 'c.c) } /
    'c.a -> 'a.
    Types string and
    { css: list(string) } / { doctype: Resource.doctype } /
    { favicon: list(Favicon.t) } /
    { hd: Server.registrable_resource; tl: list(Server.registrable_resource) } /
    { js: list(string) } / { nil } are not compatible
    Hint:
      Error occurred through field hd.

i use version 0.9.4 of opa compiler.

i solved this issue by editing the file demo_resizable.opa

from:

Server.start(Server.http,
  [ { resources: @static_resource_directory("resources") }
  , { register: [ "resources/jquery-ui-1.8.16.custom.css"
                , "resources/style.css"
                ]
    }
  , {title: "jQuery-UI demo", ~page}
  ]
)

to:

Server.start(Server.http,
  [ { resources: @static_resource_directory("resources") }
  , { register:{css: [ "resources/jquery-ui-1.8.16.custom.css"
                , "resources/style.css"
                ]}
    }
  , {title: "jQuery-UI demo", ~page}
  ]
)

i think the syntax has changed and so the additional {css: ... } is necessary.

jojo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant