1 ==================== Typechecked ====================
3 _/\_ t_ar59 a_tr5a -> Null{-rf,x-}{i} {_@_ t_ar59 _@_ a_tr5a}
5 _/\_ t_ar59 a_tr5a -> \ tpl_B1 tpl_B2 ->
6 Cons{-re,x-}{i} {_@_ t_ar59 _@_ a_tr5a tpl_B1 tpl_B2}
7 AbsBinds [ta13Q] [d.Num_a141] [([ta13Q], out{-r4v,x-}, out_a13N)]
8 d.Eq_a143 = PrelBase.scsel_NumPrelBaseEq{-a19j,p-} ta13Q d.Num_a141
9 ==_a18Z = PrelBase.=={-8Y,p-} ta13Q d.Eq_a143
10 d.Num_a145 = d.Num_a141
11 sum_a18Y = PrelList.sum{-ro0,p-} ta13Q d.Num_a145
12 d.Num_a148 = d.Num_a141
13 fromInt_a18X = PrelBase.fromInt{-8R,p-} ta13Q d.Num_a148
14 lit_a18W = fromInt_a18X PrelBase.I#{-5b,w-}{i} 0#
16 | (sum_a18Y x_r4O) ==_a18Z lit_a18W = PrelIO.putStr{-riO,p-} "ok\n"
17 | PrelBase.otherwise{-818,p-} = PrelIO.putStr{-riO,p-} "ok\n"
18 out_a19i = out{-r4v,x-} PrelBase.Int{-3g,W-} d.Num_a18w
19 out_a19h = out{-r4v,x-} PrelBase.Double{-3a,W-} d.Num_a18x
22 [d.PriorityQueue_a14E, d.Ord_a14G]
23 [([ta14z, aa14A], insertMany{-r4x,x-}, insertMany_a14b)]
24 insert_a14B = insert{-r5d,x-} aa14A d.PriorityQueue_a14E
25 insert_a19k = insert_a14B ta14z d.Ord_a14G
26 insertMany_a14b x_r4G q_r4H
27 = PrelBase.foldr{-89,w-} [ta14z, aa14A ta14z] insert_a19k
32 [d.PriorityQueue_a15j, d.Ord_a15l]
33 [([aa15e, ta15g], toOrderedList{-r4y,x-}, toOrderedList_a14I)]
34 splitMin_a15h = splitMin{-r5b,x-} aa15e d.PriorityQueue_a15j
35 splitMin_a19l = splitMin_a15h ta15g d.Ord_a15l
36 toOrderedList_a14I q_r4A
37 = case splitMin_a19l q_r4A of
38 Null{-rf,x-}{i} -> PrelBase.[]{-5i,w-}{i} ta15g
39 (Cons{-re,x-}{i} a_r4D q_r4E)
40 -> PrelBase.:{-55,w-}{i} ta15g a_r4D (toOrderedList_a14I q_r4E)
43 [d.PriorityQueue_a15N, d.Ord_a15O]
44 [([aa15J, ta15K], pqSort{-r4w,x-}, pqSort_a15n)]
46 toOrderedList{-r4y,x-} [aa15J, ta15K]
47 [d.PriorityQueue_a15N, d.Ord_a15O]
48 d.PriorityQueue_a15Q = d.PriorityQueue_a15N
49 d.Ord_a15R = d.Ord_a15O
51 insertMany{-r4x,x-} [ta15K, aa15J]
52 [d.PriorityQueue_a15Q, d.Ord_a15R]
53 pqSort_a15n q_r4J x_r4K
54 = toOrderedList_a19n insertMany_a19m x_r4K q_r4J
57 [d.PriorityQueue_a16P]
58 [([aa164], check{-r4u,x-}, check_a160)]
59 d.PriorityQueue_a17m = d.PriorityQueue_a16P
60 d.Ord_a17n = PrelBase.$d7{-rcM,p-}
62 pqSort{-r4w,x-} [aa164, PrelBase.Int{-3g,W-}]
63 [d.PriorityQueue_a17m, d.Ord_a17n]
64 d.Ord_a16Q = d.Ord_a17n
65 d.PriorityQueue_a17u = d.PriorityQueue_a16P
66 d.Ord_a17v = PrelNum.$d17{-rwV,p-}
68 pqSort{-r4w,x-} [aa164, PrelBase.Double{-3a,W-}]
69 [d.PriorityQueue_a17u, d.Ord_a17v]
70 d.Ord_a16R = d.Ord_a17v
73 PrelIO.putStr{-riO,p-} "*** sorting\n"
74 out_a19i pqSort_a19p empty_a19r
75 [(enumFromTo_a199) lit_a19b .. lit_a19a]
76 out_a19h pqSort_a19o empty_a19q
77 [(enumFromThenTo_a192) lit_a197, lit_a195 .. lit_a193]
80 empty_a19r = empty_r4M PrelBase.Int{-3g,W-} d.Ord_a16Q
81 empty_a19q = empty_r4M PrelBase.Double{-3a,W-} d.Ord_a16R
86 [([aa18R, ta18S], $d1{-r19g,x-}, d.Eval_a17O)]
87 d.Eval_a17O = ({-dict-} [] [])
89 _/\_ t12 -> \ tpl_B1 ->
93 PrelTup.(,,,,){-65,w-}{i} tpl_B1 tpl_B2 tpl_B3 tpl_B4 tpl_B5 ->
96 _/\_ t12 -> \ tpl_B1 ->
100 PrelTup.(,,,,){-65,w-}{i} tpl_B1 tpl_B2 tpl_B3 tpl_B4 tpl_B5 ->
103 _/\_ t12 -> \ tpl_B1 ->
107 PrelTup.(,,,,){-65,w-}{i} tpl_B1 tpl_B2 tpl_B3 tpl_B4 tpl_B5 ->
110 _/\_ t12 -> \ tpl_B1 ->
114 PrelTup.(,,,,){-65,w-}{i} tpl_B1 tpl_B2 tpl_B3 tpl_B4 tpl_B5 ->
117 _/\_ t12 -> \ tpl_B1 ->
121 PrelTup.(,,,,){-65,w-}{i} tpl_B1 tpl_B2 tpl_B3 tpl_B4 tpl_B5 ->
125 [d.PriorityQueue_a18r]
126 [([aa17W], $minsert{-r19c,x-}, insert_a19s)]
127 d.PriorityQueue_a18t = d.PriorityQueue_a18r
128 meld_a18i = meld{-r5c,x-} aa17W d.PriorityQueue_a18t
129 d.PriorityQueue_a18v = d.PriorityQueue_a18r
130 single_a18h = single{-r5e,x-} aa17W d.PriorityQueue_a18v
131 AbsBinds [ta17Z] [d.Ord_a18l] [([ta17Z], insert_a19s, insert_a17U)]
132 d.Ord_a18n = d.Ord_a18l
133 meld_a19u = meld_a18i ta17Z d.Ord_a18n
134 d.Ord_a18p = d.Ord_a18l
135 single_a19t = single_a18h ta17Z d.Ord_a18p
136 insert_a17U a_r56 q_r57 = (single_a19t a_r56) meld_a19u q_r57
137 d.Num_a18w = PrelBase.$d4{-rcq,p-}
138 lit_a19b = PrelBase.I#{-5b,w-}{i} 1#
139 lit_a19a = PrelBase.I#{-5b,w-}{i} 99#
140 d.Enum_a18A = PrelBase.$d6{-rcL,p-}
142 PrelBase.enumFromTo{-8W,p-} PrelBase.Int{-3g,W-} d.Enum_a18A
143 d.Num_a18x = PrelNum.$d16{-rwU,p-}
144 d.Fractional_a18F = PrelNum.$d14{-rwS,p-}
146 PrelNum.fromRational{-8T,p-} PrelBase.Double{-3a,W-}
148 lit_a197 = fromRational_a198 1.0
149 fromRational_a196 = fromRational_a198
150 lit_a195 = fromRational_a196 1.1
151 fromRational_a194 = fromRational_a198
152 lit_a193 = fromRational_a194 99.9
153 d.Enum_a18K = PrelNum.$d8{-rxr,p-}
154 enumFromThenTo_a192 =
155 PrelBase.enumFromThenTo{-8X,p-} PrelBase.Double{-3a,W-} d.Enum_a18K
156 d.Monad_a18N = IOBase.$d3{-rm9,p-}
157 >>=_a191 = PrelBase.>>={-811,p-} IOBase.IO{-3e,p-} d.Monad_a18N
158 d.Monad_a18Q = d.Monad_a18N
160 PrelBase.return{-816,p-} IOBase.IO{-3e,p-} d.Monad_a18Q
162 ghc: module version changed to 1; reason: no old .hi file
163 _interface_ ShouldSucceed 1
167 IOBase 1 :: $d2 1 $d3 1 $d7 1 IO 1;
168 PrelBase 1 :: $d1 1 $d11 1 $d12 1 $d14 1 $d15 1 $d16 1 $d2 1 $d22 1 $d24 1 $d25 1 $d27 1 $d28 1 $d3 1 $d31 1 $d32 1 $d33 1 $d34 1 $d35 1 $d38 1 $d39 1 $d4 1 $d40 1 $d42 1 $d43 1 $d45 1 $d46 1 $d47 1 $d50 1 $d51 1 $d52 1 $d55 1 $d56 1 $d6 1 $d7 1 $d8 1 $d9 1 $m- 1 $m/= 1 $m< 1 $m<= 1 $m> 1 $m>= 1 $m>> 1 $mcompare 1 $menumFromThenTo 1 $menumFromTo 1 $mfromInt 1 $mmax 1 $mmin 1 $mshowList 1 otherwise 1 Enum 1 Eq 1 Eval 1 Monad 1 MonadZero 1 Num 1 Ord 1 Ordering 1 Show 1 String 1;
169 PrelIO 1 :: putStr 1;
171 PrelNum 1 :: $d1 1 $d10 1 $d14 1 $d15 1 $d16 1 $d17 1 $d18 1 $d2 1 $d29 1 $d30 1 $d31 1 $d32 1 $d33 1 $d34 1 $d35 1 $d36 1 $d37 1 $d38 1 $d39 1 $d4 1 $d5 1 $d6 1 $d7 1 $d8 1 $mdiv 1 $mdivMod 1 $mmod 1 $mquot 1 $mrecip 1 $mrem 1 Fractional 1 Integral 1 Ratio 1 Rational 1 Real 1;
172 PrelTup 1 :: $d13 1 $d4 1 $d49 1 $d9 1;
174 ShouldSucceed check insertMany out pqSort toOrderedList PriorityQueue(empty single insert meld splitMin) SeqView(Null Cons);
176 instance _forall_ [t :: (* -> *) a] => {PrelBase.Eval (SeqView t a)} = $d1;
178 1 $d1 _:_ _forall_ [t :: (* -> *) a] => {PrelBase.Eval (SeqView t a)} ;;
179 1 $minsert _:_ _forall_ [q :: (* -> *)] {PriorityQueue q} => _forall_ [a] {PrelBase.Ord a} => a -> q a -> q a ;;
180 1 class PriorityQueue q :: (* -> *) where {empty :: _forall_ [a] {PrelBase.Ord a} => q a; single :: _forall_ [a] {PrelBase.Ord a} => a -> q a; insert = :: _forall_ [a] {PrelBase.Ord a} => a -> q a -> q a; meld :: _forall_ [a] {PrelBase.Ord a} => q a -> q a -> q a; splitMin :: _forall_ [a] {PrelBase.Ord a} => q a -> SeqView q a} ;
181 1 data SeqView t :: (* -> *) a = Null | Cons a (t a) ;
182 1 check _:_ _forall_ [aa :: (* -> *)] {PriorityQueue aa} => (_forall_ [tb] {PrelBase.Ord tb} => aa tb) -> IOBase.IO PrelBase.() ;;
183 1 insertMany _:_ _forall_ [ta ab :: (* -> *)] {PriorityQueue ab, PrelBase.Ord ta} => [ta] -> ab ta -> ab ta ;;
184 1 out _:_ _forall_ [ta] {PrelBase.Num ta} => [ta] -> IOBase.IO PrelBase.() ;;
185 1 pqSort _:_ _forall_ [aa :: (* -> *) tb] {PriorityQueue aa, PrelBase.Ord tb} => aa tb -> [tb] -> [tb] ;;
186 1 toOrderedList _:_ _forall_ [aa :: (* -> *) tb] {PriorityQueue aa, PrelBase.Ord tb} => aa tb -> [tb] ;;