Commit Graph

11 Commits

Author SHA1 Message Date
Anupam Jain
f3dd0c0fb1 Reduce dependence on the internal dictionary passing mechanism
Part of this work was done by @the-dr-lazy in
https://github.com/ajnsit/purescript-typeable/pull/3.

GOOD:
Now there is no more dependence on dictionaries being passed as function
arguments at runtime.

BAD:
1. However, we still depend on the dictionaries being stable at runtime.
2. We now also assume that the output of the new function `makeTag` will
never be cached.
2023-07-06 20:51:50 +05:30
Anupam Jain
11e596fd26 Remove constraints that use TagT. Add records back. 2023-07-06 18:52:41 +05:30
Anupam Jain
ff06b1f240 Move the definition of Person to a different module to show that the typerep comparison is stable 2023-07-06 11:50:53 +05:30
Anupam Jain
7a785fccb5 Get code compiling again
Changes due to PureScript 0.15
1. Remove constraints from foreign imports.
2. Remove support for records due to the new apartness check.
3. Convert CommonJS to ESmodules

Others:
Format all files.

TODO:
Records are currently not supported because of the new apartness check
in PureScript 0.15. The instance (Typeable (f a)) then partially
overlaps with (Typeable (Record r)). Even though (a::Type) and (r::Row
Type), that still isn't enough for the compiler to disambiguate. There
is no way that I can see to specify an instance for all (f a) where f is
NOT Record.
2023-07-05 15:14:05 +05:30
Anupam Jain
836a3e10da Add tests 2021-04-22 17:59:15 +05:30
Anupam Jain
1eabe79427 Use polykinds in Purescript 0.14 2021-04-22 16:10:00 +05:30
Anupam Jain
7de57ccbc6 Add Typeable instances for records 2021-01-12 01:34:12 +05:30
Anupam Jain
b390f684c7 A rewrite that's safer. Also add Dynamics. 2021-01-11 03:18:02 +05:30
Anupam Jain
88b07988eb Minor fix 2021-01-06 21:42:20 +05:30
Anupam Jain
6b6258f632 Initial working implementation 2021-01-06 11:46:54 +05:30
Anupam Jain
4f9fa2e3b4 Init 2021-01-06 10:34:30 +05:30