Commit Graph

3 Commits

Author SHA1 Message Date
Glen Whitney 8dcf74c5d1 refactor: Demonstrate macro generating a generic implementations interface
I swapped in the new macro in source files numbers/predicate.ts,
  Complex/arithmetic.ts, and Complex/predicate.ts. Note that you have
  to specify whether you are reflecting the generic or concrete
  implementations, which in some cases will mean two separate macro calls
  (as in Complex/predicate.ts).

  Also tried out the $$typeMetadata macro in Complex/all.ts; you can see the
  result by building and looking at build/Complex/all.js. It splits things
  up somewhat but we would still need to do a bunch of parsing, so probably
  not worth switching.
2023-10-20 09:05:02 -07:00
Glen Whitney 40146c2f48 feat: Runtime type reflection (#17)
Now each behavior specification "knows" its type information.
  Also bumps version number and sets up so that the scripts will run on Windows as well as Unix (thanks to Jos).
  Resolves #5.
  Resolves #16.

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
Reviewed-on: #17
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
2023-10-17 22:02:18 +00:00
Glen Whitney cc1e66c054 Declare implementations and dependencies via standard interfaces for operations (#8)
Adds a new subdirectory `interfaces` where standard interfaces
  are defined. Additional interfaces for a given operation can
  be added with an `AliasOf` type operator. Provides type
  operators that give the return type, full function type, and
  the type of a dependency on, a given operator.

  Resolves #6.

Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
Reviewed-on: #8
2023-01-22 01:34:57 +00:00