Infer function calls

This commit is contained in:
Richard Feldman 2019-08-31 21:32:14 -04:00
parent a2a9e9c022
commit 966bb60766
7 changed files with 140 additions and 58 deletions

View file

@ -36,6 +36,10 @@ impl<T> Expected<T> {
#[derive(Debug, Clone)]
pub enum Reason {
AnonymousFnArg(u8 /* arg index */),
NamedFnArg(String /* function name */, u8 /* arg index */),
AnonymousFnCall(u8 /* arity */),
NamedFnCall(String /* function name */, u8 /* arity */),
OperatorLeftArg(Operator),
OperatorRightArg(Operator),
FractionalLiteral,
@ -63,7 +67,7 @@ pub struct LetConstraint {
#[derive(PartialEq, Eq, Debug, Clone)]
pub enum Problem {
GenericMismatch(Box<Type>, Box<Type>),
GenericMismatch,
ExtraArguments,
MissingArguments,
IfConditionNotBool,