Commit Graph

15 Commits

Author SHA1 Message Date
Andreas Reuleaux
d0a9beb12e adjust tests with --consolewidth for use with -f curses 2015-03-19 14:42:12 +00:00
Edwin Brady
40f6534cf0 Better typecase check
Only allow matching on polymorphic arguments if they have been refined
to something concrete due to some other argument by the time they're
elaborated.
2014-12-22 11:22:42 +00:00
Edwin Brady
0d8a153cb0 New way of dealing with unmatchable patterns
Any term which is not matchable, i.e. a function application or a
repeated variable on the left hand side, is automatically put in a
PHidden. The effect of elaborating PHidden t is to:

1. Delay the elaboration of 't' to the end of elaboration
2. When elaborating t, ensure that its value is already known due to
solving some other unification problem.

If something is PHidden, but not solvable by unification, elaboration
fails.
This finally fixes #323, and probably several other things.
2014-12-20 20:52:46 +00:00
Ben Sherman
ed8198032c Update expected error messages for tests 2014-12-03 15:36:22 -05:00
Edwin Brady
a1fb7a3144 Inline with blocks 2014-08-19 16:21:00 +01:00
David Raymond Christiansen
9eb64f4462 Rewrite error printing to use the pretty-printer
This allows semantic annotations for errors. Potential features include
clicking source locations to jump to them, and showing "specifically"
sections collapsed at first.
2014-01-28 13:57:11 +01:00
Markus Pfeiffer
b36dfcd62b Reset test runscripts to mode 0755 2013-11-18 22:36:55 +00:00
Markus Pfeiffer
3558c7c29f Change from shebangs with absolute references to using /usr/bin/env 2013-11-18 17:10:00 +00:00
Ahmad Salim Al-Sibahi
57c8657372 Added column name to source 2013-10-19 20:10:41 +02:00
Ignas Vyšniauskas
ccee056530 Indent terms printed in typechecking errors
This should make errors more readable, i.e. instead of printing:

    Can't unify <SOME_LONG_TYPE> with <SOME_OTHER_VERY_LONG_TYPE>

this change makes it print

    Can't unify
        <SOME_LONG_TYPE>
    with
        <SOME_OTHER_LONG_TYPE>

and similarly for other errors.
2013-09-14 15:30:39 +02:00
Edwin Brady
df41e3d397 Give a bit more context for error messages
That is, say what part of what is being elaborated at the time. Still todo,
better rendering of generated names like decorated names in where blocks,
generated function types in classes and instances etc.
2013-09-10 14:54:36 +01:00
David Christiansen
ddc137ebdb Colourise some error messages
Some error messages are now colourised as well. We assume that all unbound
names are implicit arguments, as the error message doesn't have sufficient
context otherwise.
2013-09-04 18:54:35 +02:00
Edwin Brady
02367f97f8 Unification fix
If f x = g y fails to unify due to f and g failing to unify, record the
whole application as failed, otherwise we might accidentally unify x
and y.
Fixes #409
2013-07-28 16:37:53 +01:00
raichoo
2311d55013 rename O into Z 2013-07-26 21:05:47 +02:00
Edwin Brady
3fc67a2f0e Fix error with linearity checking in patterns 2013-03-13 12:16:21 +01:00