Mercury Bugs - mercury | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0000564 | mercury | Bug | public | 2022-09-08 14:27 | 2022-09-08 15:35 |
| Reporter | wangp | ||||
|---|---|---|---|---|---|
| Assigned To | |||||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| Platform | OS | OS Version | |||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Summary | 0000564: unnecessary use_module in .opt files | ||||
| Description | I was trying to figure out why a seemingly small change to one module causes a project-wide recompilation when developing with intermodule module optimisation enabled. For the attached test case, mmc --make-opt-int fib.m produces: :- module fib. :- use_module builtin. :- use_module int. :- use_module io. :- use_module map. :- use_module private_builtin. :- func fib.fib(int) = int. :- mode fib((builtin.in)) = (builtin.out) is det. :- pragma inline(func((fib.checked_fib)/1)). fib.checked_fib(V_3) = V_4 :- ( if V_5 = 40 : int, int.(V_3 >= V_5) then V_4 = -1 : int else V_4 = fib.fib(V_3) ). I don't see the need for: :- use_module io. :- use_module map. The io module is only used by a predicate not exported or opt-exported from fib.m. The map module is not used at all. Not sure about private_builtin either. | ||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | https://bugs.mercurylang.org/file_download.php?file_id=323&type=bug | ||||
| Notes | |||||
|
|
|||||
|
|
||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
|---|---|---|---|---|---|
| 2022-09-08 14:27 | wangp | New Issue | |||
| 2022-09-08 14:27 | wangp | File Added: fib.m | |||
| 2022-09-08 15:35 | zs | Note Added: 0001203 | |||