From 51aab978bda18578c15c77feb34927f52fec1d83 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Mon, 22 Feb 2021 23:21:43 +0000 Subject: [PATCH] remove GADT syntax from existential wrappers (#49) --- src/Simplex/Messaging/Agent/Transmission.hs | 3 +-- src/Simplex/Messaging/Protocol.hs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Simplex/Messaging/Agent/Transmission.hs b/src/Simplex/Messaging/Agent/Transmission.hs index 5393ea14a..4f42f41b2 100644 --- a/src/Simplex/Messaging/Agent/Transmission.hs +++ b/src/Simplex/Messaging/Agent/Transmission.hs @@ -68,8 +68,7 @@ instance TestEquality SAParty where testEquality SClient SClient = Just Refl testEquality _ _ = Nothing -data ACmd where - ACmd :: SAParty p -> ACommand p -> ACmd +data ACmd = forall p. ACmd (SAParty p) (ACommand p) deriving instance Show ACmd diff --git a/src/Simplex/Messaging/Protocol.hs b/src/Simplex/Messaging/Protocol.hs index 42849c3d6..e3148d008 100644 --- a/src/Simplex/Messaging/Protocol.hs +++ b/src/Simplex/Messaging/Protocol.hs @@ -41,8 +41,7 @@ data SParty :: Party -> Type where deriving instance Show (SParty a) -data Cmd where - Cmd :: SParty a -> Command a -> Cmd +data Cmd = forall a. Cmd (SParty a) (Command a) deriving instance Show Cmd