mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
wip canonicalize case
This commit is contained in:
parent
d8e0e77110
commit
09c7d75f0d
3 changed files with 145 additions and 62 deletions
|
@ -111,6 +111,7 @@ pub struct OperatorType {
|
|||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum Expected<T> {
|
||||
NoExpectation(T),
|
||||
FromAnnotation(String, usize, AnnotationSource, T),
|
||||
ForReason(Reason, T, Region),
|
||||
}
|
||||
|
||||
|
@ -123,6 +124,13 @@ impl<T> Expected<T> {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum AnnotationSource {
|
||||
TypedIfBranch(usize /* index */),
|
||||
TypedCaseBranch(usize /* index */),
|
||||
TypedBody,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum Reason {
|
||||
AnonymousFnArg(u8 /* arg index */),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue