Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Over/underapplication errors #235

Open
thumphries opened this issue Apr 21, 2017 · 1 comment
Open

Over/underapplication errors #235

thumphries opened this issue Apr 21, 2017 · 1 comment

Comments

@thumphries
Copy link
Contributor

would be good to resolve these to something like "1 too many arguments to 'text'" "not enough arguments for 'text'".

can be done by pattern-matching on type errors when pretty-printing. if the Arrow's on the left, it's probably overapplication; if the Arrow's on the right, it's probably underapplication.

this could only ever be a suggestion/heuristic rather than a precise thing.

overapplication:

Type error. The differing types are:
  components/global/favicon-verbose/template.prj:51:5-51:14 in a function application:
    (e12 -> f12)
  In the standard library function 'text':
    Html

underapplication:

Type error. The differing types are:
  components/global/favicon-verbose/template.prj:51:3-51:11 in a HTML expression:
    Html
  In the standard library function 'text':
    (String -> Html)
@thumphries
Copy link
Contributor Author

here's a pretty brutal example of underapplication via a refactor: http://boris.ambiata.com/build/239459/log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant