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

fold type issues #14

Open
thisbefruit opened this issue Jun 8, 2022 · 0 comments
Open

fold type issues #14

thisbefruit opened this issue Jun 8, 2022 · 0 comments

Comments

@thisbefruit
Copy link

melorun> for x in [[1], [2], [3]] fold accum = [] with accum ++ x
Melodeon compilation failed
/home/thisbefruit/Themelio/.melorun.melo.tmp:3: error: post-iteration type [{1}] | [{2}, {1}] | [{3}, {1}] | [{2}, {1}] fundamentally incompatible wth pre-iteration type []
	for x in [[1], [2], [3]] fold accum = [] with accum ++ x
	^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

melorun> for x in [[1],[2],[3]] fold accum=[] :: [Nat;0] with accum ++ x
Melodeon compilation failed
/home/thisbefruit/Themelio/.melorun.melo.tmp:3: error: post-iteration type [Nat; (@g20 + 1)] | [{2}, {1}] | [{3}, {1}] | [{2}, {1}] fundamentally incompatible wth pre-iteration type [Nat; @g20]
	for x in [[1],[2],[3]] fold accum=[] :: [Nat;0] with accum ++ x
	^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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