diff --git a/compiler/load/src/file.rs b/compiler/load/src/file.rs index 7611f8c94e..45a1154495 100644 --- a/compiler/load/src/file.rs +++ b/compiler/load/src/file.rs @@ -23,13 +23,14 @@ use roc_mono::ir::{ UpdateModeIds, }; use roc_mono::layout::{Layout, LayoutCache, LayoutProblem}; -use roc_parse::ast::{self, StrLiteral, TypeAnnotation}; +use roc_parse::ast::{self, ExtractSpaces, StrLiteral, TypeAnnotation}; use roc_parse::header::{ ExposesEntry, ImportsEntry, PackageEntry, PackageOrPath, PlatformHeader, To, TypedIdent, }; use roc_parse::module::module_defs; use roc_parse::parser::{self, ParseProblem, Parser, SyntaxError}; use roc_region::all::{Located, Region}; +use roc_reporting::internal_error; use roc_solve::module::SolvedModule; use roc_solve::solve; use roc_types::solved_types::Solved; @@ -2605,9 +2606,9 @@ fn parse_header<'a>( let opt_base_package = packages.iter().find(|loc_package_entry| { let Located { value, .. } = loc_package_entry; - match value { - PackageEntry::Entry { shorthand, .. } => shorthand == &existing_package, - _ => false, + match value.extract_spaces().item { + PackageEntry::Entry { shorthand, .. } => shorthand == existing_package, + _ => internal_error!(), } });