Skip to content

Commit 02c4894

Browse files
committed
Check/synth record and tuple patterns
1 parent 6fd85d0 commit 02c4894

File tree

5 files changed

+424
-246
lines changed

5 files changed

+424
-246
lines changed

fathom/src/core.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use std::fmt;
44

55
use crate::env::{Index, Level};
6-
use crate::source::{Span, StringId};
6+
use crate::source::{FileRange, Span, StringId};
77

88
pub mod binary;
99
pub mod pretty;
@@ -279,6 +279,10 @@ impl<'arena> Term<'arena> {
279279
pub fn is_error(&self) -> bool {
280280
matches!(self, Term::Prim(_, Prim::ReportedError))
281281
}
282+
283+
pub fn error(range: FileRange) -> Self {
284+
Self::Prim(range.into(), Prim::ReportedError)
285+
}
282286
}
283287

284288
macro_rules! def_prims {

0 commit comments

Comments
 (0)