Code Monkey home page Code Monkey logo

Comments (7)

jstolarek avatar jstolarek commented on June 16, 2024

@SimonJF, how actively are you working on this? I am currently familiarising myself with overall structure of the source code and I could fix warnings as I go. Just wouldn't want to get in your way with this.

from links.

jstolarek avatar jstolarek commented on June 16, 2024

I watched „What's new in OCamls 4.03” video from this year's ICFP and, according to it, warnings regarding in-place modification of strings will turn into errors at some point in the future.

from links.

jstolarek avatar jstolarek commented on June 16, 2024

While eliminating warnings I found this:

    method private with_rec_env recenv =
      {< rec_env = rec_env >}

The warning is that recenv is unused. Quite rightly! I assume the intended meaning was:

    method private with_rec_env rec_env =
      {< rec_env = rec_env >}

A good example why we should pay attention to warnings.

from links.

jstolarek avatar jstolarek commented on June 16, 2024

I started to silence the warnings but it's quite a lot of work and haven't even got halfway. My work is on silence-warnings branch. It is based off the appserver2 branch, so it should be easy to merge it into sessions once the appserver branch is merged. In fact, this is just one large commit so you can just cherry-pick (but please amend the commit message!)

git cherry-pick 75ced6c16062598c2e5f579a420472d8f1efb506
git commit --amend

@slindley said he'll be aiming to have this work finished before a release, so some things to keep in mind:

  • some functions have unused parameters. Remove those parameters rather than replace them with _ - it often turns out that some value is computed and passed down through several calls only to be discarded
  • when dealing with non-exhaustive pattern matches try to enumerate all the possible values rather than add a catch-all pattern. This is a much better thing to do in case a data type gets new constructors in the future.
  • sometimes there are lambdas that do a pattern-match on some particular constructor and this generate a warning about non-exhaustive patterns. Here's an example how I decide to deal with that. And here is another
  • You will sometimes see warnings about implicit elimination of optional arguments. Here's my solution

from links.

slindley avatar slindley commented on June 16, 2024

Now that the appserver2 branch has been squash-merged into sessions the silence-warnings branch doesn't cleanly sync with it any more (lots of spurious merge conflicts). To sort this out, Garrett and I just created a silence-warnings2 branch which is in sync with sessions and includes @jstolarek's one large commit. This is where further work on silencing warning will be carried out - in the next day or two.

from links.

SimonJF avatar SimonJF commented on June 16, 2024

I'm going through a couple of these; one thing I'm finding a bit is the "unused module" warning. This is generally due to currently-unused instances exported by deriving, which may (or may not) end up being used eventually. In Haskell for example, it's not an issue not to used a derived instance.

These are benign. I'm tempted to suggest suppressing the unused module warning; do people have opinions on this?

Edit: For now, I think I'm going to comment out the spurious instances, so they're easy to add back in if needed.

from links.

jamescheney avatar jamescheney commented on June 16, 2024

from links.

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.