mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Check suffixes of all pattern identifiers
This commit is contained in:
parent
a31a35100b
commit
e75b1cf7a0
7 changed files with 210 additions and 60 deletions
|
@ -1,6 +1,7 @@
|
|||
//! Provides types to describe problems that can occur during solving.
|
||||
use std::{path::PathBuf, str::Utf8Error};
|
||||
|
||||
use roc_can::constraint::FxSuffixKind;
|
||||
use roc_can::{
|
||||
constraint::FxCallKind,
|
||||
expected::{Expected, PExpected},
|
||||
|
@ -45,14 +46,8 @@ pub enum TypeError {
|
|||
FxInPureFunction(Region, FxCallKind, Option<Region>),
|
||||
FxInTopLevel(Region, FxCallKind),
|
||||
PureStmt(Region),
|
||||
UnsuffixedEffectfulFunction(Region, SuffixErrorKind),
|
||||
SuffixedPureFunction(Region, SuffixErrorKind),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum SuffixErrorKind {
|
||||
Let(Symbol),
|
||||
RecordField,
|
||||
UnsuffixedEffectfulFunction(Region, FxSuffixKind),
|
||||
SuffixedPureFunction(Region, FxSuffixKind),
|
||||
}
|
||||
|
||||
impl TypeError {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue