feat: Template types #45

Merged
glen merged 10 commits from template_types into main 2022-08-05 12:48:57 +00:00

10 Commits

Author SHA1 Message Date
Glen Whitney 7ec9686019 feat: Homogeneous typed Tuple class using templates 2022-08-05 05:44:28 -07:00
Glen Whitney b0fb004224 feat: Template types for Pocomath
Tuple<T> and a couple of functions on it are now working according to
  the target spec. As desired, no instantiations of a template type
  are made until some function that takes an instantiation is called.
2022-08-04 08:23:14 -07:00
Glen Whitney a743337134 refactor: fill in stub for instantiating template type 2022-08-03 19:57:11 -07:00
Glen Whitney e82bcf5a9c refactor: Include more code that should work for instantiating type templates
In particular, there is now an empty stub for the function that actually
  installs the instantiations into the PocomathInstance
2022-08-03 17:55:53 -07:00
Glen Whitney 27bf23db54 feat(Tuple): Stub for a template type
This adds the target initial definition of a homogeneous Tuple<T>
  type, and just enough processing that the type can be defined and
  non-template methods that deal with the generic base type Tuple can
  be called. Still has no actual template instantiation.
2022-08-03 11:27:40 -07:00
Glen Whitney 21ce098f98 test(templates): Check that unjoinable types are detected 2022-08-03 10:22:17 -07:00
Glen Whitney 01658b13c2 test(templates): Add one more (unfortunate) test case 2022-08-03 09:42:13 -07:00
Glen Whitney 5dab7d64e7 fix(templates): Enhance the catchall to call the correct specialization
Also enhances type inference in preparation for template types.
2022-08-03 09:35:11 -07:00
Glen Whitney 880efac15b feat(gcd,lcm): Allow arbitrarily many arguments
And add an 'associate' predicate for two complex numbers to check the results
2022-08-02 10:32:06 -07:00
Glen Whitney 1b8314c0cc refactor: Tighten definition of complex gcd to just GaussianInteger 2022-08-02 09:52:39 -07:00