-
Notifications
You must be signed in to change notification settings - Fork 23
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
Open union encoding of Eon #319
Conversation
6109f82
to
56a3659
Compare
|
||
relaxEon :: () | ||
=> Contains as bs | ||
=> IsMember a bs -- This constraing shouldn't be needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remove this constraint, I get the following error:
internal/Cardano/Api/Eon/Core.hs:50:20: error:
• You require open sum type to contain the following element:
a
However, given list can store elements only of the following types:
bs
• In the expression: Eon (relaxOpenUnion a)
In an equation for ‘relaxEon’:
relaxEon (Eon a) = Eon (relaxOpenUnion a)
|
50 | relaxEon (Eon a) = Eon (relaxOpenUnion a)
| ^^^^^^^^^^^^^^^^^^^^^^
I know I don't need the constraint because if a ∈ as
and as ⊆ bs
then it follows that a ∈ bs
, but the constraints provided by world-peace
library aren't able to infer this.
f8e09eb
to
0d6ad1c
Compare
SubsetNil -> | ||
MemberTail MemberHead | ||
MemberTail mzz -> | ||
case mzz of {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An concrete version of a function I ultimately want to write and I think I might need:
memberSubset :: era ∈ small -> small ⊆ large -> era ∈ large
This PR is stale because it has been open 45 days with no activity. |
This issue was closed because it has been stalled for 60 days with no activity. |
Make `transaction view` emit JSON
Changelog
Context
This doesn't work.
Checklist
See Running tests for more details
.cabal
files are updatedhlint
. See.github/workflows/check-hlint.yml
to get thehlint
versionstylish-haskell
. See.github/workflows/stylish-haskell.yml
to get thestylish-haskell
versionghc-8.10.7
andghc-9.2.7