Giter VIP home page Giter VIP logo

Comments (7)

kit-ty-kate avatar kit-ty-kate commented on July 18, 2024

Oh no, it's not about .eliomi. It appears even without it. So it's even worst :(

from eliom.

kit-ty-kate avatar kit-ty-kate commented on July 18, 2024

Note also that the bug doesn't appears inside the same module. So the problem is probably at the level of the .type_mli

from eliom.

balat avatar balat commented on July 18, 2024

You are probably in the case described in page
http://ocsigen.org/eliom/dev/manual/clientserver-language
under section "Restrictions ..." (or something equivalent).

In that case it is not a bug, but an unimplemented feature.
The solution for this is not obvious.

Can you confirm?

While using .eliomi on Cumulus I noticed that there is a serious bug with
it. Because I'm lazy I created the interface file filling with polymorphic
types the parameter types I wasn't sure about. But to my great surprise,
the project compiled without giving much details about types. Then you can
pass whatever types you want as parameter.

See here if you want more details:
Cumulus/Cumulus@604278a
27a480b#diff-27a4074beace25a4144a64136ef2aa2aR1


Reply to this email directly or view it on GitHub:
#51

from eliom.

balat avatar balat commented on July 18, 2024

I am not sure all restrictions are described in this section.
I think thare are other cases where typechecking is not done.
Probably @chambart or @benozol have an more precise idea of where we do or do not type check.

from eliom.

kit-ty-kate avatar kit-ty-kate commented on July 18, 2024

I'm not sure to understand well the manual here but I can reproduce it in a very small test-case as follow:
In test.eliom:

{client{
   let test_c () = ()
}}

let test_s x =
  ignore {unit{
    test_c %x
  }}

In test.eliomi (not needed to reproduce the bug):

val test_s : 'a -> unit

from eliom.

kit-ty-kate avatar kit-ty-kate commented on July 18, 2024

To be clear, with the test-case you can do this in another module:

let () = test_s 1
let () = test_s ()
let () = test_s [1; 2; 3]

from eliom.

benozol avatar benozol commented on July 18, 2024

This sounds a bit familiar indeed… overly Pa_eliom_seed.suppress_underscore? Probably escaped variables with variables in their type should be disallowed completely? As we cannot distinguish between monomorphic and polymorphic variables when finding the type of the escaped value when generating the client code… IIRC!

from eliom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.