- Feb 28, 2015
-
-
Kim Nguyễn authored
-
Kim Nguyễn authored
-
Kim Nguyễn authored
Make it so that the substitution function preserves as much sharing as possible from the original type.
-
- Feb 27, 2015
-
-
Kim Nguyễn authored
-
- Feb 26, 2015
-
-
Kim Nguyễn authored
-
Kim Nguyễn authored
-
- Feb 21, 2015
-
-
Kim Nguyễn authored
-
Kim Nguyễn authored
This reverts commit a8ba6ab6. This commit introduces a regression where suprious type variables are introduced in the final type.
-
- Feb 20, 2015
-
-
Kim Nguyễn authored
-
Kim Nguyễn authored
Seal the representation of SortedList.Make(X).t (by making the type private). Expose Var.Set as a SortedList.S
-
- Feb 19, 2015
-
-
Kim Nguyễn authored
Perform a more aggressive memoization of substituted types and register the name if the original type was named. Make the pretty-printer re-entrant.
-
Kim Nguyễn authored
-
- Feb 18, 2015
-
-
Kim Nguyễn authored
remain regular. Within their recursive definitions, parametric types must always be instantiated with their original parameters and all types of mutually recursive definitions must have the same parameters. We use Tarjan's strongly connected components algorithm to group type definitions accordingly.
-
- Feb 17, 2015
-
-
Kim Nguyễn authored
[ 'abc'ab ] is now parsed as [ 'abc' ab ] to maintain backward compatibility. Change the warning message accordingly.
-
Kim Nguyễn authored
-
- Feb 16, 2015
-
-
Kim Nguyễn authored
correctly handle insantiated types in regular expressions.
-
Kim Nguyễn authored
suggest to put a space before the second quote. Move the auxiliary 'warning' function from the typechecker to the Cduce_loc module. Re-indent some comments in ulexer.ml
-
Kim Nguyễn authored
"\n" after the ;; token.
-
Kim Nguyễn authored
to use two lexers (depending on whether we are between square brackets or not) is too brittle (it crudely tries to parse ``( [whitespace] 'a [whitespace] )'' as a variable, to force the user to write the variable beetween parenthesis. However this does not scale to types with two arguments (says [ t ('a, 'b) ]). We use a simpler heuristic (with look ahead) (1) try to see if the regular expression ' (anything but ', \n)* '(anything but the first letter of an identifier) can be found. If so, we put back the lexeme in the buffer and parse it as as a string. (2) if (1) failed, try to parse it as a variable (3) if (3) failed, try to parse it again as a string. We are guaranteed to fail here but it means we have a malformed string, so we parse as a string to get a proper error message. The only thing this does not cover are cases like type t = [ 'abcd'Int ] which was tokenized before as [, 'abcd', Int, ] and is now tokenized as [, 'abcd, 'Int, ] It does not seem to be a problem in practice though (since in the code I have seen thus far, people were at least putting a space). it is easy to emmit a warning in this case, suggesting the user to add a whitespace to get the old behaviour back.
-
Kim Nguyễn authored
-
Kim Nguyễn authored
requiring an abscence of whitespace between ``t'' and ``(''. Outside of regular expression contexts, ``t (t1, …, tn)'' is parsed with a higher precedence than & and \, to allow one to write ``t (Int) & Bool'' without extra parentheses (i.e. ``(t (Int)) & Bool''). Inside a regular expression, type instantiation and sequencing become ambiguous, and there is no way to distinguish syntactically: ``[ Int (Int, Int) ]'' from ``[ t (Int, Int) ]''. The former should resolve to a sequence while the latter only makes sense as an instantiation (if ``t'' is a parametric type). Both are treated as element sequencing and disambiguated during identifier resolution (more precisely during the "derecurse" phase, before typechecking). Note that due to the lower precedence of sequencing w.r.t to other regular expression constructs, a type ``[ t (Int)* ]'' will be parsed correctly, but yield an error message saying that t is not fully intantiated. One has to write ``[ (t (Int))* ]'' which is similar to function applications for expressions. Finally, we also re-order sequencing after typing to always group a potential type instantiation with its argument, i.e. we transform sequences such as ``[ t1 t2 t3 ... tn ]'' (which are parsed as ``[ (((t1 t2) t3) ... tn) ]'' because sequence concatenation is left-associative) into ``[ ... (ti tj) ... ]'' if ``ti'' is an identifier and ``tj'' is of the form ``(s1,...,sk)''. This is sound because concatenation of regular expression is associative (and the original sequence would fail, anyway).
-
- Feb 15, 2015
-
-
Kim Nguyễn authored
containing variables but no toplevel variables would not be printed as regular expressions but nested pairs.
-
Kim Nguyễn authored
Now functions such as let fun f (x:Int):Int = ... are parsed correctly (that is, its parameter is 'x' with type Int).
-
- Feb 13, 2015
-
-
Kim Nguyễn authored
-
Kim Nguyễn authored
-
- Feb 10, 2015
-
-
Kim Nguyễn authored
sequence type would not show up (e.g. 'a & [ Any *] would be displayed as [ Any * ], while the 'a would still be present internally).
-
Kim Nguyễn authored
-
Kim Nguyễn authored
-
- Dec 19, 2014
-
-
Giuseppe Castagna authored
-
Giuseppe Castagna authored
-
- Dec 18, 2014
-
-
Giuseppe Castagna authored
-
- Dec 16, 2014
-
-
Giuseppe Castagna authored
-
Giuseppe Castagna authored
-
Giuseppe Castagna authored
-
Giuseppe Castagna authored
-
- Dec 14, 2014
-
-
Kim Nguyễn authored
-
Kim Nguyễn authored
compiles with the patched camlp4 bundled with fedora 21)
-
- Dec 06, 2014
-
-
Kim Nguyễn authored
-
Kim Nguyễn authored
Positive.solve(Positive.decompose t) was not the identity but added spurious types at toplevel. Added more test cases in poly-ok.cd to cover such regressions
-
Kim Nguyễn authored
-