Skip to content

Add instance names #69

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Breaking changes:
New features:

Bugfixes:
- Added missing type class instance names for `DataTransferItemKind` (#69 by @ptrfrncsmrph)
Comment on lines 11 to +12
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seemed like Bugfixes was the most appropriate category, let me know if I should move it somewhere else


Other improvements:

Expand Down
6 changes: 3 additions & 3 deletions src/Web/HTML/Event/DataTransfer/DataTransferItem.purs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import Data.Nullable as Nullable

data DataTransferItemKind = Text | File

derive instance Eq DataTransferItemKind
derive instance Ord DataTransferItemKind
derive instance eqDataTransferItemKind :: Eq DataTransferItemKind
derive instance ordDataTransferItemKind :: Ord DataTransferItemKind

instance Show DataTransferItemKind where
instance showDataTransferItemKind :: Show DataTransferItemKind where
Comment on lines +21 to +24
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this locally by:

  • installing PureScript npm i purescript@0.14.0 & Spago npm i spago
  • confirming npx run spago build failed
  • adding these changes
  • confirming npx run spago build succeeded

show = case _ of
Text -> "Text"
File -> "File"
Expand Down