kyledewey / typed-prolog

A basic type system on top of Prolog, along with higher-order clauses. Translates to normal Prolog.
27 stars 1 forks source link

Make relation a Reserved Word #16

Open kyledewey opened 8 years ago

kyledewey commented 8 years ago

Currently, relation isn't treated as a reserved word. This means that both relation([A, B]) and relation(A, B) are possible types, where the first refers to a higher-order relation and the second refers to a user-defined type. The effect of this is that if a user accidentally uses relation(A, B) when they instead meant relation([A, B]) in a type signature, the compiler complains that something of type relation was expected, which is distinct from a higher-order relation. This is confusing to say the least.