Skip to content

Conversation

@garyb
Copy link
Member

@garyb garyb commented Feb 20, 2024

Resolves #823

The other way to resolve this would be to use foreign import data rather than nullary data, but the disadvantage of that is there's no way to name the type parameters for documentation purposes.

@acple
Copy link
Contributor

acple commented Feb 22, 2024

IIRC, type role annotations are definitely needed even if using foreign import data .
Type parameters of nullary data would be phantom but of foreign import data seems to be nominal.
It makes those data types too much restrictive I think.

@acple
Copy link
Contributor

acple commented Feb 22, 2024

How about other nullary data in halogen: Halogen.Aff.Driver.State.RenderStateX, Halogen.Query.ChildQuery.ChildQueryBox
These are very internal but the below code is still valid:

test :: forall a b. RenderStateX a -> RenderStateX b
test = coerce

@garyb
Copy link
Member Author

garyb commented Feb 22, 2024

Ah thanks, I had a feeling there was at least one other type I was missing, but my search wasn't bringing it up.

I also need to figure out how to fix this build 😐

@acple
Copy link
Contributor

acple commented Feb 23, 2024

I had hit similar issues in some private project about an year ago.
I think this is spago's internal bug regarding to the git integration or something like that.
I personally investigated it but there was no solution, so I switched to spago@next 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Component type should have role annotations

2 participants