Git Product home page Git Product logo

Comments (4)

jfdm avatar jfdm commented on June 1, 2024 1

essentially, at the type-level names that are not capitalised are treated (greedily) as implicit arguments.
This is why you saw the Idris1 error message:

error.idr:18:54-59:
   |
18 | id_elm_r : (Commutes a, Monoid' a) => (x : a) -> f x id_elm = x
   |                                                      ~~~~~~
id_elm is bound as an implicit
        Did you mean to refer to error.id_elm?

There are two approaches, in Idris1 either you ensure the thing in the type is capitalised, or that the thing is suitably qualified.
I haven't looked at your example in Idris2.

PS

Ahhhh Thank you so much!

I've been using Idris for a while, and the colouring still sometimes escapes me! We should really be a bit better with the annotations here as some people might not be readily aware of semantic highlighting (nor what the highlighting is supposed to represent). PRs on Idris1 and Idris2 are welcome ;-)

from idris-dev.

LaltonDundy avatar LaltonDundy commented on June 1, 2024

Interfaces have names, would that be related?

from idris-dev.

jfdm avatar jfdm commented on June 1, 2024

The key question here, is what are the colour of the things Idris is complaining about!

Idris' supports semantic highlighting and tells us about what things are!

If you look at the error message for line 18, Idris does explicitly give a hint to what is going on here.

But first check the colour's in Idris' output.

from idris-dev.

LaltonDundy avatar LaltonDundy commented on June 1, 2024

Ahhhh Thank you so much!

I am getting non-italic purple vs non-italic green; so its a variable against a function according to the link.

Guess I must have have named an implicit function with that variable name or something

from idris-dev.

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.