Fixes https://gitlab.com/yorickpeterse/inko/issues/98
TODO
-
Start by defining the individual type structures and write tests, instead of immediately hooking these up into the compiler. -
Remove memoizing from the type database as this won't translate well to Inko (it's also not really necessary). -
Get rid of Type::Boolean
(somehow) in favour of just usingType::Object
-
Remove Type::Nil
in favour of usingType::Object
and thestd::marker::Optional
trait. This requires that types have access to the type database so they can look up types in other modules. -
Split Type::TypeParameterTable
into two separate structures: one for storing type parameters and one for mapping these to their instances -
Spec out how type compatibility with regular objects is actually supposed to work -
Return Type::Error
instead ofType::Dynamic
when producing errors -
Don't produce errors when sending messages to Type::Error
to prevent cascading type errors -
Determine how we should initialise generic types -
Stop using the horrible Inspect
module -
Change type parameter syntax from!(X, Y, Z)
to[X, Y, Z]
. This is easier to type (on a QWERTY keyboard it doesn't require the use of shift).