Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-snezhko committed Mar 2, 2024
1 parent 9b9a619 commit 590422c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions compiler/src/typed/env.re
Expand Up @@ -2632,9 +2632,9 @@ let report_error = ppf =>
alt,
)
| Unbound_module(_, modname) => fprintf(ppf, "Unbound module %s", modname)
| No_module_file(m, None) => fprintf(ppf, "Missing file for module %s", m)
| No_module_file(m, None) => fprintf(ppf, "Missing file for module \"%s\"", m)
| No_module_file(m, Some(msg)) =>
fprintf(ppf, "Missing file for module %s: %s", m, msg)
fprintf(ppf, "Missing file for module \"%s\": %s", m, msg)
| Value_not_found_in_module(_, name, path) =>
fprintf(ppf, "Unbound value %s in module %s", name, path)
| Module_not_found_in_module(_, name, path, None) =>
Expand Down
8 changes: 4 additions & 4 deletions compiler/src/typed/module_resolution.re
Expand Up @@ -240,7 +240,7 @@ let try_locate_module =
No_module_file(
loc,
name,
Some("did you forget to remove the .gr extension?"),
Some("did you mean \"" ++ no_extension ++ "\"?"),
),
);
};
Expand All @@ -252,7 +252,7 @@ let try_locate_module =
No_module_file(
loc,
name,
Some("did you forget to add the .gr extension?"),
Some("did you mean \"" ++ name ++ ".gr\"?"),
),
)
};
Expand Down Expand Up @@ -569,9 +569,9 @@ let report_error = ppf =>
);
}
| No_module_file(_, m, None) =>
fprintf(ppf, "Missing file for module %s", m)
fprintf(ppf, "Missing file for module \"%s\"", m)
| No_module_file(_, m, Some(msg)) =>
fprintf(ppf, "Missing file for module %s: %s", m, msg);
fprintf(ppf, "Missing file for module \"%s\": %s", m, msg);

let () =
Location.register_error_of_exn(
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/input/reprovideTypeUnifyA.gr
@@ -1,5 +1,5 @@
module ReprovideTypeUnifyA

from "./reprovideTypeUnifyB" include ReprovideTypeUnifyB
from "./reprovideTypeUnifyB.gr" include ReprovideTypeUnifyB
use ReprovideTypeUnifyB.{ type T, a }
print(a == { x: 1, })
2 changes: 1 addition & 1 deletion compiler/test/input/reprovideTypeUnifyB.gr
@@ -1,6 +1,6 @@
module ReprovideTypeUnifyB

from "./reprovideTypeUnifyC" include ReprovideTypeUnifyC
from "./reprovideTypeUnifyC.gr" include ReprovideTypeUnifyC
use ReprovideTypeUnifyC.{ type T }
let a = { x: 1, }
provide { type T, a }
6 changes: 3 additions & 3 deletions compiler/test/suites/includes.re
Expand Up @@ -153,7 +153,7 @@ describe("includes", ({test, testSkip}) => {
assertCompileError(
"include_missing_file",
"from \"foo\" include Foo; 2",
"Missing file for module foo",
"Missing file for module \"foo.gr\"",
);
/* Unbound module tests */
assertCompileError(
Expand Down Expand Up @@ -185,12 +185,12 @@ describe("includes", ({test, testSkip}) => {
assertCompileError(
"include_extension1",
"from \"list.gr\" include List",
"Missing file for module list.gr: did you forget to remove the .gr extension?",
"Missing file for module \"list.gr\": did you mean \"list\"?",
);
assertCompileError(
"include_extension2",
"from \"brokenRelativeInclude\" include BrokenRelativeInclude",
"Missing file for module ./data: did you forget to add the .gr extension?",
"Missing file for module \"./data\": did you mean \"./data.gr\"?",
);
assertRun(
"reprovide_values",
Expand Down

0 comments on commit 590422c

Please sign in to comment.