Giter Site home page Giter Site logo

Comments (4)

disconcision avatar disconcision commented on June 3, 2024

hmm.. would need to decide what the error should be. the example shown doesn't seem fatally problematic, in that even if someone believed X gets bound by the let, it would still have the same result. but if the type had another constructor say Y of the same type, then it would be more confusing. in principle though in such cases would have refutable pattern errors, assuming it's possible to do refutability for arrow typed things

from hazel.

disconcision avatar disconcision commented on June 3, 2024

probably just an arity error for constructors in patterns would do it?

from hazel.

Negabinary avatar Negabinary commented on June 3, 2024

It's probably more problematic in a case statement:

image

An arity error would probably do it; we just need to pass some sort of "expected arity" through pattern statics

from hazel.

disconcision avatar disconcision commented on June 3, 2024

not sure we need any more information. we know constructor arities from types in ctx. so:

  1. for pattern ap statics, check if fun pos is constructor with arrow type. inline its statics (ie dont recurse on funpos)
  2. for pattern constructor statics, it must be non arrow type (since we know we didnt pass thru ap)

from hazel.

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.