Skip to content
  1. Apr 02, 2015
  2. Apr 01, 2015
  3. Mar 31, 2015
  4. Mar 30, 2015
  5. Feb 21, 2015
  6. Feb 20, 2015
  7. Feb 19, 2015
  8. Feb 18, 2015
    • Kim Nguyễn's avatar
      Implement a safety-check to guarantee that recursive parametric types · 3aab1b01
      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.
      3aab1b01
  9. Feb 16, 2015
    • Kim Nguyễn's avatar
      Remove the a workaround the AST for patterns that was used to · 4f49a2af
      Kim Nguyễn authored
      correctly handle insantiated types in regular expressions.
      4f49a2af
    • Kim Nguyễn's avatar
      Add a warning when the lexer encounters the ambiguous ``[ 'a'a ]'' and · bcf40231
      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
      bcf40231
    • Kim Nguyễn's avatar
    • Kim Nguyễn's avatar
      Implement the syntax ``t (t1, …, tn)'' for type instantiation, without · 07bc7bc1
      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).
      07bc7bc1
  10. Dec 06, 2014
  11. Dec 04, 2014
  12. Dec 01, 2014
  13. Oct 27, 2014
  14. Oct 03, 2014
  15. Sep 19, 2014
  16. Sep 16, 2014
    • Pietro Abate's avatar
      Make fresh variables really fresh · c9ad3e5c
      Pietro Abate authored
      Add a global variable table, so when we call "Var.mk id" twice, the
      same variable is returned and when we call "Var.fresh v" we always
      return a truly globally fresh variable.
      c9ad3e5c
  17. Sep 12, 2014
  18. Sep 10, 2014
  19. Sep 09, 2014
    • Pietro Abate's avatar
      New syntax for parametric types · f1235de1
      Pietro Abate authored
      now we can write types as
      type t( 'a) = <a>'a
      
      and patterns can contain type instantiations
      let f = fun (t('a) -> [ t('a)* ]) x -> [ x ];;
      let id = fun (t(Int) -> [ t(Int)* ]) x -> [ x ];;
      
      Note: parametric types must be written as "IDENT(" without space.
      f1235de1
  20. Sep 08, 2014
  21. Sep 03, 2014
  22. Aug 28, 2014
    • Pietro Abate's avatar
      More var.ml cleanup · 737730a2
      Pietro Abate authored
      - Var identifiers are now of type U.t instead of string
      - Remove TVar from ast. Polymorphic variables are just types
      737730a2
  23. Aug 26, 2014
  24. Aug 21, 2014
  25. Aug 20, 2014
  26. Aug 19, 2014
Loading