Have Either derive Clone and Copy

This commit is contained in:
Richard Feldman 2022-11-20 16:20:24 -05:00
parent 4139b4ddb1
commit 13bed30411
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B

View file

@ -4,12 +4,14 @@ use bumpalo::Bump;
use roc_region::all::{Loc, Position, Region};
use Progress::*;
#[derive(Debug, PartialEq, Eq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Either<First, Second> {
First(First),
Second(Second),
}
impl<F: Copy, S: Copy> Copy for Either<F, S> {}
pub type ParseResult<'a, Output, Error> =
Result<(Progress, Output, State<'a>), (Progress, Error, State<'a>)>;