Commit Graph

18 Commits

Author SHA1 Message Date
Stephen Chang
8a36c7962b revise extra-info to handle mutually recursive datatypes
- define extra-info as a separate macro whose input is the types
  in the tycon
  - extra-info in main tycon is just the name of the extra-info macro
  - extra-info macro is expanded only when extra-info is requested
  - naturally handles additional tyvar substs in the types
  - breaks the recursion to avoid inf loops for recursive and mutually recursive
    datatypes
  - enables simplification of direct recursive datatypes
    - no longer need subst-special
    - performance is much improved (okasaki: ~1min, was ~4min)
2016-04-13 14:00:20 -04:00
Stephen Chang
a0f4d9e3a9 eliminate dup expansion of some args in mlish #%app 2016-04-05 00:14:43 -04:00
Stephen Chang
8731401318 start match2 exhaustiveness checking; nested checks not quite working 2016-04-01 17:08:48 -04:00
Stephen Chang
487c8fedc5 mlish: fix define-type and match
- resolves #1
  - define-type-constructor accepts arbitrary extra "info" that is stored
    with the type
    - get-extra-info extras this info
  - define type stores extra info that is essentially a mu type
    containing all variant info
  - match must manually "unfold" this info, ie iso-recursive
- all tests passing
- mlish tests implements full nqueens example
  - no explicit instantiation of polymorphic functions
  - some polymorphic constructors require annotations when no inference possible
    - a lone nil with no other information
  - lambda params require annotations
  - top lvl fns require full signature
2016-03-02 15:34:51 -05:00
Stephen Chang
6fa962f83f all constructor type instantiations (in tests) inferred
- id type names and variant names (for 0arg constructors) supported
2016-02-24 19:02:51 -05:00
Stephen Chang
dbfd52bf0f start mlish lang 2016-02-22 19:23:14 -05:00
Stephen Chang
fbc5934675 implement list functions using infer.rkt: annotations still required for top lvl fns and unapplied lams 2015-12-16 19:39:18 -05:00
AlexKnauth
82b7ec004d add version of make-variable-like-transformer 2015-09-21 17:54:25 -04:00
Stephen Chang
efaef8b60e progress commit: stuck on fomega+define-syntax-category 2015-08-21 19:28:36 -04:00
Stephen Chang
1a831454f4 progress commit: use typechecking system to typecheck types
- ported (tests passing) up to stlc+sub.rkt
2015-08-14 19:37:09 -04:00
Stephen Chang
8656e1469d report errors in terms of surface, not expanded, type 2015-06-30 12:43:03 -04:00
Stephen Chang
d69a16ffcb add fomega2.rkt
- fomega2 is the same as fomega.rkt, except tyapp, tylam, and => are removed
- instead, #%app, \lam, and -> serve dual purpose at both term and type level
2015-06-29 19:41:05 -04:00
Stephen Chang
e39dc434b4 move eval-tau out of typecheck.rkt 2015-06-10 17:31:01 -04:00
Stephen Chang
5c058bffd6 start sysf 2015-05-27 19:25:50 -04:00
Stephen Chang
7759111cb4 add stlc+rec+sub.rkt 2015-05-27 17:31:35 -04:00
Stephen Chang
3a42569f64 add records and variants 2015-05-22 19:00:40 -04:00
Stephen Chang
bb7ed03f3c add stlc+tup 2015-05-20 19:27:19 -04:00
Stephen Chang
f317282609 tapl: reimplement stlc using rename-transformers instead of typeenv 2015-05-19 18:54:50 -04:00