Giter Club home page Giter Club logo

Comments (1)

brprice avatar brprice commented on May 25, 2024

I think we could at the least have the rule: when checking T ∋ S : e, delete the annotation S if it is equal to T. This would fix this case - they are both ? here.

Potentially we could relax "equal" to "consistent -- up to holes", but I'd need to think more about that. The two key questions are

  • soundness: if T ∋ S : e with T ~ S, do we also have T ∋ e. We have T ∋ S : e iff S ∋ e and S ~ T, so this reduces to whether consistent types always accept the same terms. My next point shows that this is not true, so any relaxation would have to be more subtle.
  • usability: will it always/usually be a good idea (whatever that means). e.g.
    • How do consistent types act the same wrt smart holes for checking non-accepted terms: Bool ∋ 1 fails, but ? ∋ 1 succeeds. Removing the annotation from Bool ∋ ? : 1 would give Bool ∋ {? 1 ?} -- nb: this mostly shows that this transformation is not sound. If we did something smarter we may not have this weird Ann-transforms-into-Hole issue.
    • Will we remove information a human may find useful
    • Probably other concerns that slip my mind at the moment.

from primer.

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.