Mercury Bugs - mercury | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000316 | mercury | Bug | public | 2014-02-05 18:11 | 2014-02-05 18:33 |
Reporter | lpimmes | ||||
---|---|---|---|---|---|
Assigned To | juliensf | ||||
Priority | high | Severity | major | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Platform | OS | OSx 10.9.1 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0000316: Declared `det', inferred `semidet'. --- [H|T] first argument input | ||||
Description | This function compiles, except for det error. In this case, I really need det, not semidet, otherwise callers including main will not work. :- pred charToStrLst(list(char), list(string), list(string)). :- mode charToStrLst(in, in, out) is det. charToStrLst([H | T], Accum, LstStr) :- % [H|T] can fail (if list.is_empty([H|T]) then LstStr = Accum else format("%c", [c(H)], Str), charToStrLst(T, [Str | Accum], LstStr) ). All I needed to accomplish is convert, e.g., "foo" to ["f", "o", "o"]. longCommSubseq.m:097: In `charToStrLst'(in, in, out): longCommSubseq.m:097: error: determinism declaration not satisfied. longCommSubseq.m:097: Declared `det', inferred `semidet'. longCommSubseq.m:098: In argument 1 of clause head: longCommSubseq.m:098: unification of `HeadVar__1' and `list.[H | T]' can longCommSubseq.m:098: fail. % Program contains determinism error(s). | ||||
Steps To Reproduce | mmc --make --fully-strict -E -v -O 0 --use-subdirs longCommSubseq | ||||
Additional Information | See attached file. Thanks. | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | longCommSubseq.m (4,585) 2014-02-05 18:11 https://bugs.mercurylang.org/file_download.php?file_id=200&type=bug |
Notes | |||||
|
|||||
|
|
Issue History | |||||
Date Modified | Username | Field | Change | ||
---|---|---|---|---|---|
2014-02-05 18:11 | lpimmes | New Issue | |||
2014-02-05 18:11 | lpimmes | File Added: longCommSubseq.m | |||
2014-02-05 18:32 | juliensf | Note Added: 0000639 | |||
2014-02-05 18:33 | juliensf | Status | new => resolved | ||
2014-02-05 18:33 | juliensf | Resolution | open => no change required | ||
2014-02-05 18:33 | juliensf | Assigned To | => juliensf |