@@ -42,12 +42,12 @@ import Streamly.Benchmark.Data.Serialize.RecNonCompatible
43#ifdef USE_UNBOX
43#ifdef USE_UNBOX
44#define SERIALIZE_CLASS Unbox
44#define SERIALIZE_CLASS Unbox
45−#define DERIVE_CLASS deriveUnbox
45+#define DERIVE_CLASS(typ) $(deriveUnbox ''typ)
46#define SERIALIZE_OP pokeByteIndex
46#define SERIALIZE_OP pokeByteIndex
47#define DESERIALIZE_OP peekByteIndex
47#define DESERIALIZE_OP peekByteIndex
49#define SERIALIZE_CLASS Serialize
49#define SERIALIZE_CLASS Serialize
50−#define DERIVE_CLASS deriveSerialize
50+#define DERIVE_CLASS(typ) $(deriveSerialize [d|instance Serialize typ|])
51#define SERIALIZE_OP serialize
51#define SERIALIZE_OP serialize
52#define DESERIALIZE_OP deserialize
52#define DESERIALIZE_OP deserialize
@@ -62,7 +62,7 @@ data Unit = Unit
62#ifndef USE_TH
62#ifndef USE_TH
63instance SERIALIZE_CLASS Unit
63instance SERIALIZE_CLASS Unit
65−$(DERIVE_CLASS ''Unit)
65+DERIVE_CLASS(Unit)
68instance NFData Unit where
68instance NFData Unit where
@@ -77,7 +77,7 @@ data Sum2
77#ifndef USE_TH
77#ifndef USE_TH
78instance SERIALIZE_CLASS Sum2
78instance SERIALIZE_CLASS Sum2
80−$(DERIVE_CLASS ''Sum2)
80+DERIVE_CLASS(Sum2)
83instance NFData Sum2 where
83instance NFData Sum2 where
@@ -115,7 +115,7 @@ data Sum25
115#ifndef USE_TH
115#ifndef USE_TH
116instance SERIALIZE_CLASS Sum25
116instance SERIALIZE_CLASS Sum25
118−$(DERIVE_CLASS ''Sum25)
118+DERIVE_CLASS(Sum25)
121instance NFData Sum25 where
121instance NFData Sum25 where
@@ -154,7 +154,7 @@ data Product25
154#ifndef USE_TH
154#ifndef USE_TH
155instance SERIALIZE_CLASS Product25
155instance SERIALIZE_CLASS Product25
157−$(DERIVE_CLASS ''Product25)
157+DERIVE_CLASS(Product25)
160instance NFData Product25 where
160instance NFData Product25 where
@@ -234,7 +234,7 @@ data CustomDT1
234#ifndef USE_TH
234#ifndef USE_TH
235instance SERIALIZE_CLASS CustomDT1
235instance SERIALIZE_CLASS CustomDT1
237−$(DERIVE_CLASS ''CustomDT1)
237+DERIVE_CLASS(CustomDT1)
240instance NFData CustomDT1 where
240instance NFData CustomDT1 where
@@ -257,7 +257,7 @@ data BinTree a
257#ifndef USE_TH
257#ifndef USE_TH
258instance Serialize (BinTree a)
258instance Serialize (BinTree a)
260−$(deriveSerialize ''BinTree)
260+$(deriveSerialize [d|instance Serialize a => Serialize (BinTree a)|])
263instance NFData a => NFData (BinTree a) where
263instance NFData a => NFData (BinTree a) where