Skip to content

Commit

Permalink
Change data to newtype
Browse files Browse the repository at this point in the history
  • Loading branch information
vikraman committed Oct 7, 2016
1 parent d1ba755 commit f8c6121
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Data/VerifiedEq.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ data VerifiedEq a = VerifiedEq {
}

instance VerifiableConstraint Eq where
data Verified Eq a = VEq { veq :: VerifiedEq a }
newtype Verified Eq a = VEq { veq :: VerifiedEq a }
reifiedIns = Sub Dict

instance Reifies s (Verified Eq a) => Eq (Lift Eq a s) where
Expand Down
2 changes: 1 addition & 1 deletion src/Data/VerifiedMonoid.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ data VerifiedMonoid a = VerifiedMonoid {
@-}

instance VerifiableConstraint Monoid where
data Verified Monoid a = VMonoid { vmonoid :: VerifiedMonoid a }
newtype Verified Monoid a = VMonoid { vmonoid :: VerifiedMonoid a }
reifiedIns = Sub Dict

instance Reifies s (Verified Monoid a) => Semigroup (Lift Monoid a s) where
Expand Down
2 changes: 1 addition & 1 deletion src/Data/VerifiedOrd.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ data VerifiedOrd a = VerifiedOrd {
}

instance VerifiableConstraint Ord where
data Verified Ord a = VOrd { vord :: VerifiedOrd a }
newtype Verified Ord a = VOrd { vord :: VerifiedOrd a }
reifiedIns = Sub Dict

instance Reifies s (Verified Ord a) => Eq (Lift Ord a s) where
Expand Down
2 changes: 1 addition & 1 deletion src/Data/VerifiedSemigroup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ data VerifiedSemigroup a = VerifiedSemigroup {
}

instance VerifiableConstraint Semigroup where
data Verified Semigroup a = VSemigrp { vsemigrp :: VerifiedSemigroup a }
newtype Verified Semigroup a = VSemigrp { vsemigrp :: VerifiedSemigroup a }
reifiedIns = Sub Dict

instance Reifies s (Verified Semigroup a) => Semigroup (Lift Semigroup a s) where
Expand Down

0 comments on commit f8c6121

Please sign in to comment.