Skip to content
This repository was archived by the owner on Jan 9, 2024. It is now read-only.

Commit 04ddb55

Browse files
committed
refactor(string): simpler GADT syntax
Use a simpler GADT syntax (without 'where') for 'String' definition.
1 parent f892285 commit 04ddb55

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/MCSP/Data/String.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,12 @@ import MCSP.Data.String.Text (ReadString (..), ShowString (..), readCharsPrec)
191191
-- | An unboxed string of characters @a@.
192192
--
193193
-- Implemented as a contiguous vector of unboxed characters.
194-
data String a where
195-
-- | Construct a string from a unboxed vector.
196-
--
197-
-- Note that `Unbox` is only required for constructing the string. All other operations should
198-
-- be possible without that constraint.
199-
String :: Unbox a => !(Vector a) -> String a
194+
data String a
195+
= -- | Construct a string from a unboxed vector.
196+
--
197+
-- Note that `Unbox` is only required for constructing the string. All other operations should
198+
-- be possible without that constraint.
199+
Unbox a => String !(Vector a)
200200
deriving newtype (Typeable)
201201

202202
{-# COMPLETE Unboxed #-}

0 commit comments

Comments
 (0)