Skip to content

Commit

Permalink
test/*: use newtypes
Browse files Browse the repository at this point in the history
  • Loading branch information
rudymatela committed Jan 25, 2024
1 parent 38309a1 commit bff5400
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/derive.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Test.LeanCheck.Utils
import Data.List (sort)

data D0 = D0 deriving Show
data D1 a = D1 a deriving Show
newtype D1 a = D1 a deriving Show
data D2 a b = D2 a b deriving Show
data D3 a b c = D3 a b c deriving Show
data C1 a = C11 a | C10 deriving Show
Expand Down Expand Up @@ -37,7 +37,7 @@ deriveListable ''Tree
-- Nested datatype cascade
data Nested = Nested N0 (N1 Int) (N2 Int Int)
data N0 = R0 Int
data N1 a = R1 a
newtype N1 a = R1 a
data N2 a b = R2 a b
deriveListableCascading ''Nested

Expand Down
2 changes: 1 addition & 1 deletion test/generic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Data.List (sort)
import GHC.Generics (Generic)

data D0 = D0 deriving (Eq, Show, Generic)
data D1 a = D1 a deriving (Eq, Show, Generic)
newtype D1 a = D1 a deriving (Eq, Show, Generic)
data D2 a b = D2 a b deriving (Eq, Show, Generic)
data D3 a b c = D3 a b c deriving (Eq, Show, Generic)
data C1 a = C11 a | C10 deriving (Eq, Show, Generic)
Expand Down

0 comments on commit bff5400

Please sign in to comment.