Re: [m-users.] Higher order type with existential quanitfication
"Zoltan Somogyi" <[email protected]>
| Newsgroups | gmane.comp.lang.mercury.general |
|---|---|
| Message-ID | <[email protected]> |
On 2023-10-22 22:54 +11:00 AEDT, "Volker Wysk" <[email protected]> wrote: > I have a predicate which takes an existentially quantified type as one of > its arguments. By this, I presume you mean a predicate that *returns* a value of an existentially quantified type. > This predicate I want to pass to another predicate. I'm > puzzled about how to declare this. You can't; Mercury does not support this. What you can do instead is wrap up the existentially typed output value in a function symbol, using a type like this: :- type het ---> some [T] het(T) => att(T). You should be able to use a predicate that returns a value of this type to construct a hetlist. Zoltan. _______________________________________________ users mailing list [email protected] https://lists.mercurylang.org/listinfo/users