mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Parse opaque types
This commit is contained in:
parent
ab6019d402
commit
fa24e51593
13 changed files with 201 additions and 113 deletions
|
@ -257,6 +257,12 @@ pub enum Def<'a> {
|
|||
ann: Loc<TypeAnnotation<'a>>,
|
||||
},
|
||||
|
||||
/// An opaque type, wrapping its inner type. E.g. Age := U64.
|
||||
Opaque {
|
||||
header: TypeHeader<'a>,
|
||||
typ: Loc<TypeAnnotation<'a>>,
|
||||
},
|
||||
|
||||
// TODO in canonicalization, check to see if there are any newlines after the
|
||||
// annotation; if not, and if it's followed by a Body, then the annotation
|
||||
// applies to that expr! (TODO: verify that the pattern for both annotation and body match.)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue