Skip to content

Commit 37eeab5

Browse files
committed
Relax some constraints issue #8
1 parent c72c9e0 commit 37eeab5

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/Data/ArrayBuffer/Builder.purs

+19-19
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type PutM = WriterT Builder
5959
type Put = PutM Effect
6060

6161
-- | Build an `ArrayBuffer` with do-notation in any `MonadEffect`. *O(n)*
62-
execPutM :: forall m. (MonadEffect m) => PutM m Unit -> m ArrayBuffer
62+
execPutM :: forall m. MonadEffect m => PutM m Unit -> m ArrayBuffer
6363
execPutM = Internal.execBuilder <=< execWriterT
6464

6565
-- | Build an `ArrayBuffer` with do-notation in `Effect`. *O(n)*
@@ -84,73 +84,73 @@ execPut = execPutM
8484
-- | putInt32be $ length messageBuilder
8585
-- | tell messageBuilder
8686
-- | ```
87-
subBuilder :: forall m. (MonadEffect m) => PutM m Unit -> PutM m Builder
87+
subBuilder :: forall m. Monad m => PutM m Unit -> PutM m Builder
8888
subBuilder = lift <<< execWriterT
8989

9090
-- | Append an `ArrayBuffer` to the builder.
91-
putArrayBuffer :: forall m. (MonadEffect m) => ArrayBuffer -> PutM m Unit
91+
putArrayBuffer :: forall m. Monad m => ArrayBuffer -> PutM m Unit
9292
putArrayBuffer = tell <<< Internal.singleton <<< Internal.Buff
9393

9494
-- | Append a `DataView` to the builder.
95-
putDataView :: forall m. (MonadEffect m) => DataView -> PutM m Unit
95+
putDataView :: forall m. Monad m => DataView -> PutM m Unit
9696
putDataView = tell <<< Internal.singleton <<< Internal.View
9797

9898
-- | Append either an `ArrayBuffer` or a `DataView` to the builder.
99-
putDataBuff :: forall m. (MonadEffect m) => DataBuff -> PutM m Unit
99+
putDataBuff :: forall m. Monad m => DataBuff -> PutM m Unit
100100
putDataBuff = tell <<< Internal.singleton
101101

102102
-- | Append an 8-bit unsigned integer (byte) to the builder.
103-
putUint8 :: forall m. (MonadEffect m) => UInt -> PutM m Unit
103+
putUint8 :: forall m. MonadEffect m => UInt -> PutM m Unit
104104
putUint8 = putArrayBuffer <=< Internal.encodeUint8
105105

106106
-- | Append an 8-bit two’s-complement signed integer (char) to the builder.
107-
putInt8 :: forall m. (MonadEffect m) => Int -> PutM m Unit
107+
putInt8 :: forall m. MonadEffect m => Int -> PutM m Unit
108108
putInt8 = putArrayBuffer <=< Internal.encodeInt8
109109

110110
-- | Append a 16-bit big-endian unsigned integer to the builder.
111-
putUint16be :: forall m. (MonadEffect m) => UInt -> PutM m Unit
111+
putUint16be :: forall m. MonadEffect m => UInt -> PutM m Unit
112112
putUint16be = putArrayBuffer <=< Internal.encodeUint16be
113113

114114
-- | Append a 16-bit little-endian unsigned integer to the builder.
115-
putUint16le :: forall m. (MonadEffect m) => UInt -> PutM m Unit
115+
putUint16le :: forall m. MonadEffect m => UInt -> PutM m Unit
116116
putUint16le = putArrayBuffer <=< Internal.encodeUint16le
117117

118118
-- | Append a 16-bit big-endian two’s-complement signed integer to the builder.
119-
putInt16be :: forall m. (MonadEffect m) => Int -> PutM m Unit
119+
putInt16be :: forall m. MonadEffect m => Int -> PutM m Unit
120120
putInt16be = putArrayBuffer <=< Internal.encodeInt16be
121121

122122
-- | Append a 16-bit little-endian two’s-complement signed integer to the builder.
123-
putInt16le :: forall m. (MonadEffect m) => Int -> PutM m Unit
123+
putInt16le :: forall m. MonadEffect m => Int -> PutM m Unit
124124
putInt16le = putArrayBuffer <=< Internal.encodeInt16le
125125

126126
-- | Append a 32-bit big-endian unsigned integer to the builder.
127-
putUint32be :: forall m. (MonadEffect m) => UInt -> PutM m Unit
127+
putUint32be :: forall m. MonadEffect m => UInt -> PutM m Unit
128128
putUint32be = putArrayBuffer <=< Internal.encodeUint32be
129129

130130
-- | Append a 32-bit little-endian unsigned integer to the builder.
131-
putUint32le :: forall m. (MonadEffect m) => UInt -> PutM m Unit
131+
putUint32le :: forall m. MonadEffect m => UInt -> PutM m Unit
132132
putUint32le = putArrayBuffer <=< Internal.encodeUint32le
133133

134134
-- | Append a 32-bit big-endian two’s-complement signed integer to the builder.
135-
putInt32be :: forall m. (MonadEffect m) => Int -> PutM m Unit
135+
putInt32be :: forall m. MonadEffect m => Int -> PutM m Unit
136136
putInt32be = putArrayBuffer <=< Internal.encodeInt32be
137137

138138
-- | Append a 32-bit little-endian two’s-complement signed integer to the builder.
139-
putInt32le :: forall m. (MonadEffect m) => Int -> PutM m Unit
139+
putInt32le :: forall m. MonadEffect m => Int -> PutM m Unit
140140
putInt32le = putArrayBuffer <=< Internal.encodeInt32le
141141

142142
-- | Append a 32-bit big-endian IEEE single-precision float to the builder.
143-
putFloat32be :: forall m. (MonadEffect m) => Float32 -> PutM m Unit
143+
putFloat32be :: forall m. MonadEffect m => Float32 -> PutM m Unit
144144
putFloat32be = putArrayBuffer <=< Internal.encodeFloat32be
145145

146146
-- | Append a 32-bit little-endian IEEE single-precision float to the builder.
147-
putFloat32le :: forall m. (MonadEffect m) => Float32 -> PutM m Unit
147+
putFloat32le :: forall m. MonadEffect m => Float32 -> PutM m Unit
148148
putFloat32le = putArrayBuffer <=< Internal.encodeFloat32le
149149

150150
-- | Append a 64-bit big-endian IEEE double-precision float to the builder.
151-
putFloat64be :: forall m. (MonadEffect m) => Number -> PutM m Unit
151+
putFloat64be :: forall m. MonadEffect m => Number -> PutM m Unit
152152
putFloat64be = putArrayBuffer <=< Internal.encodeFloat64be
153153

154154
-- | Append a 64-bit little-endian IEEE double-precision float to the builder.
155-
putFloat64le :: forall m. (MonadEffect m) => Number -> PutM m Unit
155+
putFloat64le :: forall m. MonadEffect m => Number -> PutM m Unit
156156
putFloat64le = putArrayBuffer <=< Internal.encodeFloat64le

0 commit comments

Comments
 (0)