diff --git a/src/ast.rs b/src/ast.rs index c9b1a6c..b0798a4 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -114,6 +114,17 @@ pub enum PatOp { Alt, } +/// A record-type definition +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Typedef(pub TypedefKind, pub Pat); + +/// The type of type being defined +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum TypedefKind { + Struct, + Enum, +} + /// A pattern binding /// ```ignore /// let Pat (= Expr (else Expr)?)? @@ -162,17 +173,6 @@ pub struct Make(pub Anno, A>, pub Vec>) #[derive(Clone, Debug, PartialEq, Eq)] pub struct MakeArm(pub String, pub Option, A>>); -/// A record-type definition -#[derive(Clone, Debug, PartialEq, Eq)] -pub struct Typedef(pub TypedefKind, pub Pat); - -/// The type of type being defined -#[derive(Clone, Debug, PartialEq, Eq)] -pub enum TypedefKind { - Struct, - Enum, -} - /// Expressions: The beating heart of Dough #[derive(Clone, Debug, PartialEq, Eq)] pub enum Expr {