Create TypeInfo, add type inference unit tests#142
Create TypeInfo, add type inference unit tests#142AJChapman wants to merge 1 commit intoacowley:masterfrom
Conversation
Replaces `Either (String -> Q [Dec]) Type` with a new data type: `TypeInfo`. Also adds unit tests to explore what type inference currently does.
|
I like this idea, thank you! I'm going to look at it more closely before merging. Are the tests you don't like the ones that take, e.g., |
|
No, I was ok with the For really thorough type inference I'd like to see it test each column for a fit against each candidate type, then decide which types fit, then choose the type with the smallest cardinality (the smallest number of values in that type). So |
50157fc to
aeca953
Compare
I was trying to figure out how Frames' type inference works. I have to move on to something else for now, but some of what I've done may be useful so I'm opening this pull request to contribute it.
One of my changes was to replace
Either (String -> Q [Dec]) Typewith a new data type:TypeInfo.The other change is to add some type inference unit tests. They all pass, although the behaviour they expect is not what I would like it to be. I have ideas for a more general type inference mechanism, but no time to implement it at this stage.