Mercury Bugs - mercury | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000149 | mercury | Bug | public | 2010-05-25 13:36 | 2010-05-25 13:36 |
Reporter | juliensf | ||||
---|---|---|---|---|---|
Assigned To | |||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | new | Resolution | open | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0000149: inter-module optimization and abstract exported equivalence types. | ||||
Description | From the BUGS file ------------------- Subject: inter-module optimization and abstract exported equivalence types. Date: Thu, 19 February 1998 In some cases the compiler reports spurious ambiguity errors when compiling with `--intermodule-optimization'. This is due to the definition of abstract exported equivalence types being made visible by inter-module optimization. In this example, with `--intermodule-optimization' the compiler sees the declaration `:- type var == int' from term.m and then cannot determine whether `Elem' has type `int' or `pair(int)'. The work-around is to add an explicit type qualification. :- module foo. :- interface. :- import_module list, term. :- pred test(list(var)::in) is det. :- implementation. :- import_module int, std_util. test(Args0) :- MakeIndex = (pred(Elem0::in, Elem::out, Index0::in, Index::out) is det :- Elem = Elem0 - Index0, Index is Index0 + 1 ), list.map_foldl(MakeIndex, Args0, _, 0, _). | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files |
There are no notes attached to this issue. |
Issue History | |||||
Date Modified | Username | Field | Change | ||
---|---|---|---|---|---|
2010-05-25 13:36 | juliensf | New Issue |