You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on changing Iterable to have an associated Elm type rather than being Iterable[t: Type -> Type].
At the moment I'm not able to assert that Iterable's Elm associated type is an instance of Order. Have I got the syntax wrong or is this not implemented yet?
enqueueAll from MutQueue shows what I'm trying to do:
///
/// Enqueues each element in `l` into `mq`.
///
pub def enqueueAll(mq: MutQueue[Iterable.Elm[m], r], m: m): Unit \ r with Iterable[m], Order[Iterable.Elm[m]] =
foreach(x <- m) {
enqueue(mq, x)
}
-- Syntax Error -------------------------------------------------- MutQueue.flix
>> Illegal type constraint parameter.
113 | pub def enqueueAll(mq: MutQueue[Iterable.Elm[m], r], m: m): Unit \ r with Iterable[m], Order[Iterable.Elm[m]] =
^^^^^^^^^^^^^^^^^^^^^^
illegal type constraint parameter
Thanks
The text was updated successfully, but these errors were encountered:
I'm working on changing
Iterable
to have an associated Elm type rather than beingIterable[t: Type -> Type]
.At the moment I'm not able to assert that
Iterable
'sElm
associated type is an instance ofOrder
. Have I got the syntax wrong or is this not implemented yet?enqueueAll
from MutQueue shows what I'm trying to do:Thanks
The text was updated successfully, but these errors were encountered: