@@ -357,8 +357,7 @@ type Digit23 a = Node a
357
357
-- class, but as it is we have to build up 'map23' explicitly through the
358
358
-- recursion.
359
359
aptyMiddle
360
- :: Sized c =>
361
- (c -> d )
360
+ :: (c -> d )
362
361
-> (c -> d )
363
362
-> ((a -> b ) -> c -> d )
364
363
-> FingerTree (Elem (a -> b ))
@@ -405,36 +404,17 @@ aptyMiddle firstf
405
404
(Two (fmap lastf pr) (fmap lastf q))
406
405
where converted = node3 pr q sf
407
406
408
- {-# SPECIALIZE
409
- aptyMiddle
410
- :: (Node c -> d)
411
- -> (Node c -> d)
412
- -> ((a -> b) -> Node c -> d)
413
- -> FingerTree (Elem (a -> b))
414
- -> Rigid (Node c)
415
- -> FingerTree (Node d)
416
- #-}
417
- {-# SPECIALIZE
418
- aptyMiddle
419
- :: (Elem c -> d)
420
- -> (Elem c -> d)
421
- -> ((a -> b) -> Elem c -> d)
422
- -> FingerTree (Elem (a -> b))
423
- -> Rigid (Elem c)
424
- -> FingerTree (Node d)
425
- #-}
426
-
427
407
digit12ToDigit :: Digit12 a -> Digit a
428
408
digit12ToDigit (One12 a) = One a
429
409
digit12ToDigit (Two12 a b) = Two a b
430
410
431
411
-- Squash the first argument down onto the left side of the second.
432
- squashL :: Sized a => Digit23 a -> Digit12 (Node a ) -> Digit23 (Node a )
412
+ squashL :: Digit23 a -> Digit12 (Node a ) -> Digit23 (Node a )
433
413
squashL m (One12 n) = node2 m n
434
414
squashL m (Two12 n1 n2) = node3 m n1 n2
435
415
436
416
-- Squash the second argument down onto the right side of the first
437
- squashR :: Sized a => Digit12 (Node a ) -> Digit23 a -> Digit23 (Node a )
417
+ squashR :: Digit12 (Node a ) -> Digit23 a -> Digit23 (Node a )
438
418
squashR (One12 n) m = node2 n m
439
419
squashR (Two12 n1 n2) m = node3 n1 n2 m
440
420
@@ -965,7 +945,7 @@ cycleN n (Seq xsFT) = case rigidify xsFT of
965
945
(nodeToDigit sf)
966
946
967
947
cycleNMiddle
968
- :: Sized c => Int
948
+ :: Int
969
949
-> Rigid c
970
950
-> FingerTree (Node c )
971
951
@@ -999,19 +979,6 @@ cycleNMiddle n
999
979
(Two pr q)
1000
980
where converted = node3 pr q sf
1001
981
1002
- {-# SPECIALIZE
1003
- cycleNMiddle
1004
- :: Int
1005
- -> Rigid (Node c)
1006
- -> FingerTree (Node (Node c))
1007
- #-}
1008
- {-# SPECIALIZE
1009
- cycleNMiddle
1010
- :: Int
1011
- -> Rigid (Elem c)
1012
- -> FingerTree (Node (Elem c))
1013
- #-}
1014
-
1015
982
1016
983
-- | /O(1)/. Add an element to the left end of a sequence.
1017
984
-- Mnemonic: a triangle with the single element at the pointy end.
0 commit comments