From f8c6121363d448001467d6e96abcbcce526231e0 Mon Sep 17 00:00:00 2001 From: Vikraman Choudhury Date: Fri, 7 Oct 2016 14:14:51 -0400 Subject: [PATCH] Change data to newtype https://github.com/iu-parfunc/verified-instances/issues/2#issuecomment-251212096 --- src/Data/VerifiedEq.hs | 2 +- src/Data/VerifiedMonoid.hs | 2 +- src/Data/VerifiedOrd.hs | 2 +- src/Data/VerifiedSemigroup.hs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Data/VerifiedEq.hs b/src/Data/VerifiedEq.hs index e4ef52b..7f45a52 100644 --- a/src/Data/VerifiedEq.hs +++ b/src/Data/VerifiedEq.hs @@ -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 diff --git a/src/Data/VerifiedMonoid.hs b/src/Data/VerifiedMonoid.hs index b7aa4d7..e53a891 100644 --- a/src/Data/VerifiedMonoid.hs +++ b/src/Data/VerifiedMonoid.hs @@ -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 diff --git a/src/Data/VerifiedOrd.hs b/src/Data/VerifiedOrd.hs index a884bf7..f0a1251 100644 --- a/src/Data/VerifiedOrd.hs +++ b/src/Data/VerifiedOrd.hs @@ -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 diff --git a/src/Data/VerifiedSemigroup.hs b/src/Data/VerifiedSemigroup.hs index 06e1c04..a809e48 100644 --- a/src/Data/VerifiedSemigroup.hs +++ b/src/Data/VerifiedSemigroup.hs @@ -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