Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when attempting toMSet on list comprehension #670

Open
jwatts-maybe opened this issue Nov 28, 2024 · 0 comments
Open

Crash when attempting toMSet on list comprehension #670

jwatts-maybe opened this issue Nov 28, 2024 · 0 comments

Comments

@jwatts-maybe
Copy link

As a minimal example, running Conjure on something like

find x : mset (maxSize(5)) of int(0..5)
such that x = toMSet([i | i <- [1,2,3]])

results in the bug message.

Repo version: 03d6014e5 (2024-09-25 19:47:19 +0100)

Error message:

Not refined: x
Domain     : mset {ExplicitWithFlags} (maxSize 5) of int(0..5)
    Context #1: x = toMSet([1, 2, 3; int(1..3)])

CallStack (from HasCallStack):
  error, called at src/Conjure/Bug.hs:17:15 in conjure-cp-2.5.1-3ow97tapNr9FQhaVki9Yr3:Conjure.Bug
  bug, called at src/Conjure/UI/Model.hs:1036:26 in conjure-cp-2.5.1-3ow97tapNr9FQhaVki9Yr3:Conjure.UI.Model

It's slightly unclear whether it is supposed to be possible to do this, but the equivalent with toSet works fine, and at least it should probably be rejected as incorrect Essence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant