Util/sequence type error?

I am still quite new to Alloy.
I wanted to use util/sequence, but I get a type error:

open util/sequence[Elem]
sig Elem {}

results in

A type error occurred:.(see the stacktrace.)
Name cannot be resolved; possible incorrect
function/predicate call; perhaps you used ( ) when you
should have used [ ]

This cannot be a correct call to pred sequence/add.
The parameters are
s: {sequence/Seq}
e: {this/Elem}
added: {sequence/Seq}
so the arguments cannot be
sequence/inds[s] (type = {sequence/SeqIdx})
Int[1] (type = {Int})

This cannot be a correct call to fun integer/add.
The parameters are
n1: {Int}
n2: {Int}
so the arguments cannot be
sequence/inds[s] (type = {sequence/SeqIdx})
Int[1] (type = {Int})

I think to fix it occurrences of expressions in util/sequence like #s.inds.add[1] would have to be changed to (#s.inds).add[1], but as I said I’m still new to Alloy…

I agree with your diagnosis. The way integers are dealt with changed in a previous version of Alloy, so an error may have been introduced at that time. I guess it hasn’t been found earlier because it’s likely no one uses util/sequence for lists. Either people succeed in abstracting a list into a set; or they rely on the keyword seq (which automatically opens util/sequniv, which is the advised module to handle lists).

Thanks! I’ll look into that link.