Skip to content

Commit 1f6859b

Browse files
committed
Clenaup
1 parent 553868f commit 1f6859b

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/Data/ArrayBuffer/Serializer.purs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,29 @@ import Control.Monad.Eff
1010

1111
type Serializer = Advancer
1212

13+
type SE = Eff (writer :: DV.Writer) Serializer
14+
1315
putter :: forall a. Number -> DV.Setter a -> a -> Serializer -> Eff (writer :: DV.Writer) Serializer
1416
putter n f v s = do
1517
o <- advance n s
1618
f s.dv v o
1719
return s
1820

19-
putInt8 :: Int8 -> Serializer -> Eff (writer :: DV.Writer) Serializer
21+
putInt8 :: Int8 -> Serializer -> SE
2022
putInt8 = putter 1 DV.setInt8
21-
putInt16 :: Int16 -> Serializer -> Eff (writer :: DV.Writer) Serializer
23+
putInt16 :: Int16 -> Serializer -> SE
2224
putInt16 = putter 2 DV.setInt16
23-
putInt32 :: Int32 -> Serializer -> Eff (writer :: DV.Writer) Serializer
25+
putInt32 :: Int32 -> Serializer -> SE
2426
putInt32 = putter 4 DV.setInt32
25-
putUint8 :: Uint8 -> Serializer -> Eff (writer :: DV.Writer) Serializer
27+
putUint8 :: Uint8 -> Serializer -> SE
2628
putUint8 = putter 1 DV.setUint8
27-
putUint16 :: Uint16 -> Serializer -> Eff (writer :: DV.Writer) Serializer
29+
putUint16 :: Uint16 -> Serializer -> SE
2830
putUint16 = putter 2 DV.setUint16
29-
putUint32 :: Uint32 -> Serializer -> Eff (writer :: DV.Writer) Serializer
31+
putUint32 :: Uint32 -> Serializer -> SE
3032
putUint32 = putter 4 DV.setUint32
31-
putFloat32 :: Float32 -> Serializer -> Eff (writer :: DV.Writer) Serializer
33+
putFloat32 :: Float32 -> Serializer -> SE
3234
putFloat32 = putter 4 DV.setFloat32
33-
putFloat64 :: Float64 -> Serializer -> Eff (writer :: DV.Writer) Serializer
35+
putFloat64 :: Float64 -> Serializer -> SE
3436
putFloat64 = putter 8 DV.setFloat64
3537

3638
mapDataView :: forall e. ByteLength -> Serializer -> Eff (writer :: DV.Writer | e) (Maybe DV.DataView)

0 commit comments

Comments
 (0)