Skip to content

Commit

Permalink
Fix the prop_show_read test (#117)
Browse files Browse the repository at this point in the history
This test used the 'NonEmpty' instances of 'Read' and 'Show' instead of the 
'DNonEmpty' instances.
  • Loading branch information
414owen authored Feb 17, 2024
1 parent cf89951 commit 1aa96db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/DNonEmptyProperties.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ prop_map :: (Int -> Int) -> NonEmpty Int -> Bool
prop_map f = eqWith (NonEmpty.map f) (toNonEmpty . map f . fromNonEmpty)

prop_show_read :: NonEmpty Int -> Bool
prop_show_read = eqWith id (read . show)
prop_show_read = eqWith id (read . show) . fromNonEmpty

prop_read_show :: NonEmpty Int -> Bool
prop_read_show x = eqWith id (show . f . read) $ "fromNonEmpty (" ++ show x ++ ")"
Expand Down

0 comments on commit 1aa96db

Please sign in to comment.