Skip to content

Commit

Permalink
remove Show constraint; there are issues to be fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbecich committed Feb 25, 2024
1 parent 5c86b32 commit aabc5d4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example/src/Argonaut/Types.purs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ instance (DecodeJson a, DecodeJsonField a) => DecodeJson (Bar a) where



instance (Show a) => Show (Bar a) where
instance Show (Bar a) where
show a = genericShow a

derive instance Generic (Bar a) _
Expand Down
2 changes: 1 addition & 1 deletion example/src/JsonHelpers/Types.purs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ instance (DecodeJson a, DecodeJsonField a) => DecodeJson (Bar a) where



instance (Show a) => Show (Bar a) where
instance Show (Bar a) where
show a = genericShow a

derive instance Generic (Bar a) _
Expand Down
3 changes: 2 additions & 1 deletion src/Language/PureScript/Bridge/Printer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,9 @@ eqConstraints = constrainWith "Eq"
ordConstraints :: PSType -> [PSType]
ordConstraints = constrainWith "Ord"

-- https://github.com/eskimor/purescript-bridge/pull/89#issuecomment-1890994859
showConstraints :: PSType -> [PSType]
showConstraints = constrainWith "Show"
showConstraints _ = mempty -- constrainWith "Show"

decodeJsonConstraints :: PSType -> [PSType]
decodeJsonConstraints psType =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ derive instance (Eq a) => Eq (TestRecord a)

derive instance (Ord a) => Ord (TestRecord a)

instance (Show a) => Show (TestRecord a) where
instance Show (TestRecord a) where
show a = genericShow a

instance (EncodeJson a) => EncodeJson (TestRecord a) where
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ derive instance (Eq a) => Eq (TestRecord a)

derive instance (Ord a) => Ord (TestRecord a)

instance (Show a) => Show (TestRecord a) where
instance Show (TestRecord a) where
show a = genericShow a

instance (EncodeJson a) => EncodeJson (TestRecord a) where
Expand Down

0 comments on commit aabc5d4

Please sign in to comment.