agentm / project-m36

Project: M36 Relational Algebra Engine
The Unlicense
876 stars 47 forks source link

separate data structures for unresolved/resolved types #213

Open agentm opened 6 years ago

agentm commented 6 years ago

A large source of type-system bugs relates to using AtomType to represent both unresolved (with type variables) and fully-resolved types together. It would reduce the bug potential to separate them into two, perhaps as:

data UnresolvedAtomType = TypeVariableType TypeVariableName | ResolvedAtomType
data ResolvedAtomType = IntegerAtomType | ...