[m-users.] "this is not allowed in a type constructor's argument"

Volker Wysk post at volker-wysk.de
Wed Jan 19 17:37:36 AEDT 2022


Hi!

When I do this:

:- func actions = assoc_list(string, 
                             (pred(string::in, string::out) is det)).

I get this:

test2.m:009: In `:- func' declaration:
test2.m:009:   in the return value
test2.m:009:   error: the type `(pred((string :: in), (string :: out)) is
det)'
test2.m:009:   contains higher order inst information, but this is not
allowed
test2.m:009:   in a type constructor's argument.

Why doesn't this work? How should it be done ...?

Bye, Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20220119/372dafc8/attachment.sig>


More information about the users mailing list