Skip to content

6.0.1 contains a breaking change on showRecordFields ? #303

New issue

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

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

Already on GitHub? # to your account

Open
jmatsushita opened this issue Jan 17, 2023 · 2 comments
Open

6.0.1 contains a breaking change on showRecordFields ? #303

jmatsushita opened this issue Jan 17, 2023 · 2 comments

Comments

@jmatsushita
Copy link

PR #299 seems to contain a breaking change CC @ajnsit

For instance it breaks this code:

requiredFields :: Array String
requiredFields = Data.Show.showRecordFields requiredProxy (required record')

and returns this error:

[1/1 TypesDoNotUnify] .spago/option/main/src/Option.purs:440:22

  440      requiredFields = Data.Show.showRecordFields requiredProxy (required record')
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  Could not match type

    String

  with type

    Array String
@garyb
Copy link
Member

garyb commented Jan 17, 2023

You're absolutely right, I considered ShowRecordFields to be an internal typeclass since it's a helper for the standard Show instance, forgetting that it has to be exported also, making it essentially public.

I'm not sure what the best course of action is now - to revert this, or to just fix purescript-option since it hasn't been reported anywhere else. I have to assume purescript-option is not in the registry as otherwise this would have become apparent sooner. 🤔

@JordanMartinez
Copy link
Contributor

I think I agree that ShowRecordFields is an internal type class. I think purescript-option should have defined its own type class to handle its particular use case, but maybe they didn't because they would have just reimplemented ShowRecordFields... 🤔

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

No branches or pull requests

3 participants