# Ticket #3259: imported.simpl

File imported.simpl, 10.2 KB (added by , 8 years ago) |
---|

Line | |
---|---|

1 | [1 of 2] Compiling Parallelizable ( Parallelizable.hs, Parallelizable.o ) |

2 | |

3 | ==================== Tidy Core ==================== |

4 | Parallelizable.parallelize :: forall a_agk a1_agq. |

5 | a_agk -> a1_agq -> (a_agk, a1_agq) |

6 | GblId |

7 | [Arity 2 |

8 | NoCafRefs |

9 | Str: DmdType LL] |

10 | Parallelizable.parallelize = |

11 | \ (@ a_agk) (@ a1_agq) (a_ag6 :: a_agk) (b_ag8 :: a1_agq) -> |

12 | case GHC.Prim.par# @ a_agk a_ag6 of _ { __DEFAULT -> |

13 | case b_ag8 of x1_apw { __DEFAULT -> (a_ag6, x1_apw) } |

14 | } |

15 | |

16 | |

17 | |

18 | |

19 | ==================== Tidy Core Rules ==================== |

20 | |

21 | |

22 | [2 of 2] Compiling Main ( primes-test.hs, primes-test.o ) |

23 | |

24 | ==================== Tidy Core ==================== |

25 | Main.lvl :: GHC.Integer.Internals.Integer |

26 | GblId |

27 | [NoCafRefs |

28 | Str: DmdType] |

29 | Main.lvl = GHC.Integer.Internals.S# 1 |

30 | |

31 | lvl1_r1tm :: GHC.Integer.Internals.Integer |

32 | GblId |

33 | [NoCafRefs |

34 | Str: DmdType] |

35 | lvl1_r1tm = GHC.Integer.Internals.S# 0 |

36 | |

37 | lvl2_r1to :: GHC.Integer.Internals.Integer |

38 | GblId |

39 | [NoCafRefs |

40 | Str: DmdType] |

41 | lvl2_r1to = GHC.Integer.Internals.S# 2 |

42 | |

43 | Rec { |

44 | Main.factors1 :: GHC.Integer.Internals.Integer |

45 | -> [GHC.Integer.Internals.Integer] |

46 | GblId |

47 | [Arity 1 |

48 | Str: DmdType S] |

49 | Main.factors1 = |

50 | \ (n_aww :: GHC.Integer.Internals.Integer) -> |

51 | let { |

52 | lim_s1sI [ALWAYS Just S] :: GHC.Integer.Internals.Integer |

53 | LclId |

54 | [Str: DmdType] |

55 | lim_s1sI = GHC.Integer.minusInteger n_aww Main.lvl } in |

56 | letrec { |

57 | go_s1sK :: GHC.Integer.Internals.Integer |

58 | -> [GHC.Integer.Internals.Integer] |

59 | LclId |

60 | [Arity 1 |

61 | Str: DmdType S] |

62 | go_s1sK = |

63 | \ (x_a1rZ :: GHC.Integer.Internals.Integer) -> |

64 | case GHC.Integer.gtInteger x_a1rZ lim_s1sI of _ { |

65 | GHC.Bool.False -> |

66 | case GHC.Real.$wdivMod n_aww x_a1rZ of _ { (# _, ww2_aV8 #) -> |

67 | case ww2_aV8 of _ { |

68 | GHC.Integer.Internals.S# i_dUE -> |

69 | case i_dUE of _ { |

70 | __DEFAULT -> go_s1sK (GHC.Integer.plusInteger x_a1rZ Main.lvl); |

71 | 0 -> |

72 | GHC.Types.: |

73 | @ GHC.Integer.Internals.Integer |

74 | x_a1rZ |

75 | (go_s1sK (GHC.Integer.plusInteger x_a1rZ Main.lvl)) |

76 | }; |

77 | GHC.Integer.Internals.J# s_dUQ d_dUR -> |

78 | case GHC.Prim.cmpIntegerInt# s_dUQ d_dUR 0 of _ { |

79 | __DEFAULT -> go_s1sK (GHC.Integer.plusInteger x_a1rZ Main.lvl); |

80 | 0 -> |

81 | GHC.Types.: |

82 | @ GHC.Integer.Internals.Integer |

83 | x_a1rZ |

84 | (go_s1sK (GHC.Integer.plusInteger x_a1rZ Main.lvl)) |

85 | } |

86 | } |

87 | }; |

88 | GHC.Bool.True -> GHC.Types.[] @ GHC.Integer.Internals.Integer |

89 | }; } in |

90 | case go_s1sK lvl2_r1to of _ { |

91 | [] -> |

92 | GHC.Types.: |

93 | @ GHC.Integer.Internals.Integer |

94 | n_aww |

95 | (GHC.Types.[] @ GHC.Integer.Internals.Integer); |

96 | : a1_aRT _ -> |

97 | GHC.Types.: |

98 | @ GHC.Integer.Internals.Integer |

99 | a1_aRT |

100 | (Main.factors1 (GHC.Real.$s$dmdiv n_aww a1_aRT)) |

101 | } |

102 | end Rec } |

103 | |

104 | Main.factors [NEVER Nothing] :: forall a_ax1. |

105 | (GHC.Real.Integral a_ax1) => |

106 | a_ax1 -> [a_ax1] |

107 | GblId |

108 | [Arity 1 |

109 | NoCafRefs |

110 | Str: DmdType L] |

111 | Main.factors = |

112 | \ (@ a_ax1) ($dIntegral_aCF :: GHC.Real.Integral a_ax1) -> |

113 | let { |

114 | lit_s1sQ [ALWAYS Just L] :: a_ax1 |

115 | LclId |

116 | [Str: DmdType] |

117 | lit_s1sQ = |

118 | case $dIntegral_aCF |

119 | of _ { GHC.Real.D:Integral tpl1_B2 _ _ _ _ _ _ _ _ -> |

120 | case tpl1_B2 of _ { GHC.Real.D:Real tpl11_XV _ _ -> |

121 | case tpl11_XV of _ { GHC.Num.D:Num _ _ _ _ _ _ _ _ tpl23_X1i -> |

122 | tpl23_X1i Main.lvl |

123 | } |

124 | } |

125 | } } in |

126 | let { |

127 | lit1_s1sO [ALWAYS Just L] :: a_ax1 |

128 | LclId |

129 | [Str: DmdType] |

130 | lit1_s1sO = |

131 | case $dIntegral_aCF |

132 | of _ { GHC.Real.D:Integral tpl1_B2 _ _ _ _ _ _ _ _ -> |

133 | case tpl1_B2 of _ { GHC.Real.D:Real tpl11_XV _ _ -> |

134 | case tpl11_XV of _ { GHC.Num.D:Num _ _ _ _ _ _ _ _ tpl23_X1i -> |

135 | tpl23_X1i lvl2_r1to |

136 | } |

137 | } |

138 | } } in |

139 | let { |

140 | lit2_s1sM [ALWAYS Just L] :: a_ax1 |

141 | LclId |

142 | [Str: DmdType] |

143 | lit2_s1sM = |

144 | case $dIntegral_aCF |

145 | of _ { GHC.Real.D:Integral tpl1_B2 _ _ _ _ _ _ _ _ -> |

146 | case tpl1_B2 of _ { GHC.Real.D:Real tpl11_XV _ _ -> |

147 | case tpl11_XV of _ { GHC.Num.D:Num _ _ _ _ _ _ _ _ tpl23_X1i -> |

148 | tpl23_X1i lvl1_r1tm |

149 | } |

150 | } |

151 | } } in |

152 | \ (n_aww :: a_ax1) -> |

153 | case $dIntegral_aCF |

154 | of _ |

155 | { GHC.Real.D:Integral tpl1_B2 tpl2_B3 _ _ tpl5_B6 tpl6_B7 _ _ _ -> |

156 | case tpl2_B3 of _ { GHC.Enum.D:Enum _ _ _ _ _ _ tpl17_X1p _ -> |

157 | case GHC.List.filter |

158 | @ a_ax1 |

159 | (\ (k_awD :: a_ax1) -> |

160 | case tpl1_B2 of _ { GHC.Real.D:Real _ tpl21_X19 _ -> |

161 | case tpl21_X19 of _ { GHC.Classes.D:Ord tpl24_X3E _ _ _ _ _ _ _ -> |

162 | case tpl24_X3E of _ { GHC.Classes.D:Eq tpl33_X1t _ -> |

163 | tpl33_X1t (tpl6_B7 n_aww k_awD) lit2_s1sM |

164 | } |

165 | } |

166 | }) |

167 | (tpl17_X1p |

168 | lit1_s1sO |

169 | (case tpl1_B2 of _ { GHC.Real.D:Real tpl20_XV _ _ -> |

170 | case tpl20_XV of _ { GHC.Num.D:Num _ _ _ _ tpl28_X1L _ _ _ _ -> |

171 | tpl28_X1L n_aww lit_s1sQ |

172 | } |

173 | })) |

174 | of _ { |

175 | [] -> GHC.Types.: @ a_ax1 n_aww (GHC.Types.[] @ a_ax1); |

176 | : a1_aRT _ -> |

177 | GHC.Types.: |

178 | @ a_ax1 |

179 | a1_aRT |

180 | (letrec { |

181 | factors2_s1sS :: a_ax1 -> [a_ax1] |

182 | LclId |

183 | [Arity 1 |

184 | Str: DmdType L] |

185 | factors2_s1sS = |

186 | \ (n1_Xxt :: a_ax1) -> |

187 | case GHC.List.filter |

188 | @ a_ax1 |

189 | (\ (k_awD :: a_ax1) -> |

190 | case tpl1_B2 of _ { GHC.Real.D:Real _ tpl21_X19 _ -> |

191 | case tpl21_X19 of _ { GHC.Classes.D:Ord tpl24_X3E _ _ _ _ _ _ _ -> |

192 | case tpl24_X3E of _ { GHC.Classes.D:Eq tpl33_X1t _ -> |

193 | tpl33_X1t (tpl6_B7 n1_Xxt k_awD) lit2_s1sM |

194 | } |

195 | } |

196 | }) |

197 | (tpl17_X1p |

198 | lit1_s1sO |

199 | (case tpl1_B2 of _ { GHC.Real.D:Real tpl20_XV _ _ -> |

200 | case tpl20_XV of _ { GHC.Num.D:Num _ _ _ _ tpl28_X1L _ _ _ _ -> |

201 | tpl28_X1L n1_Xxt lit_s1sQ |

202 | } |

203 | })) |

204 | of _ { |

205 | [] -> GHC.Types.: @ a_ax1 n1_Xxt (GHC.Types.[] @ a_ax1); |

206 | : a11_XT6 _ -> |

207 | GHC.Types.: |

208 | @ a_ax1 a11_XT6 (factors2_s1sS (tpl5_B6 n1_Xxt a11_XT6)) |

209 | }; } in |

210 | factors2_s1sS (tpl5_B6 n_aww a1_aRT)) |

211 | } |

212 | } |

213 | } |

214 | |

215 | Main.factors2 :: GHC.Integer.Internals.Integer |

216 | -> [GHC.Integer.Internals.Integer] |

217 | GblId |

218 | [Str: DmdType] |

219 | Main.factors2 = |

220 | Main.factors @ GHC.Integer.Internals.Integer GHC.Real.$f8 |

221 | |

222 | Main.test :: GHC.Integer.Internals.Integer |

223 | -> GHC.Integer.Internals.Integer |

224 | -> GHC.Integer.Internals.Integer |

225 | GblId |

226 | [Arity 2 |

227 | Str: DmdType LL] |

228 | Main.test = |

229 | \ (n1_asR :: GHC.Integer.Internals.Integer) |

230 | (n2_asT :: GHC.Integer.Internals.Integer) -> |

231 | let { |

232 | a_s1sV [ALWAYS Just S] :: GHC.Integer.Internals.Integer |

233 | LclId |

234 | [Str: DmdType] |

235 | a_s1sV = |

236 | Data.List.prod1 |

237 | (Main.factors2 |

238 | (Data.List.prod1 |

239 | (GHC.Num.up_list Main.lvl Main.lvl n1_asR) Data.List.lvl1)) |

240 | Data.List.lvl1 } in |

241 | case GHC.Prim.par# @ GHC.Integer.Internals.Integer a_s1sV |

242 | of _ { __DEFAULT -> |

243 | case Data.List.prod1 |

244 | (Main.factors2 |

245 | (Data.List.prod1 |

246 | (GHC.Num.up_list Main.lvl Main.lvl n2_asT) Data.List.lvl1)) |

247 | Data.List.lvl1 |

248 | of x1_apw { __DEFAULT -> |

249 | case GHC.Real.$wdivMod x1_apw a_s1sV of _ { (# ww1_aW5, _ #) -> |

250 | ww1_aW5 |

251 | } |

252 | } |

253 | } |

254 | |

255 | Main.lvl3 :: GHC.Integer.Internals.Integer |

256 | GblId |

257 | [NoCafRefs] |

258 | Main.lvl3 = GHC.Integer.Internals.S# 4000 |

259 | |

260 | Main.lvl4 :: GHC.Integer.Internals.Integer |

261 | GblId |

262 | [NoCafRefs] |

263 | Main.lvl4 = GHC.Integer.Internals.S# 4001 |

264 | |

265 | Main.lvl5 :: GHC.Integer.Internals.Integer |

266 | GblId |

267 | [] |

268 | Main.lvl5 = Main.test Main.lvl3 Main.lvl4 |

269 | |

270 | Main.lvl6 :: GHC.Base.String |

271 | GblId |

272 | [] |

273 | Main.lvl6 = |

274 | GHC.Num.$wshowsPrec 0 Main.lvl5 (GHC.Types.[] @ GHC.Types.Char) |

275 | |

276 | Main.a :: GHC.Prim.State# GHC.Prim.RealWorld |

277 | -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) |

278 | GblId |

279 | [Arity 1 |

280 | Str: DmdType L] |

281 | Main.a = |

282 | \ (eta_aWt :: GHC.Prim.State# GHC.Prim.RealWorld) -> |

283 | case GHC.IO.a23 GHC.Handle.stdout Main.lvl6 eta_aWt |

284 | of _ { (# new_s_a136, _ #) -> |

285 | GHC.IO.$wa13 GHC.Handle.stdout '\n' new_s_a136 |

286 | } |

287 | |

288 | Main.main :: GHC.IOBase.IO () |

289 | GblId |

290 | [Arity 1 |

291 | Str: DmdType L] |

292 | Main.main = |

293 | Main.a |

294 | `cast` (sym (GHC.IOBase.NTCo:IO ()) |

295 | :: GHC.Prim.State# GHC.Prim.RealWorld |

296 | -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) |

297 | ~ |

298 | GHC.IOBase.IO ()) |

299 | |

300 | Main.a1 :: GHC.Prim.State# GHC.Prim.RealWorld |

301 | -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) |

302 | GblId |

303 | [Arity 1 |

304 | Str: DmdType L] |

305 | Main.a1 = |

306 | GHC.TopHandler.a9 |

307 | @ () |

308 | (Main.a |

309 | `cast` (sym (GHC.IOBase.NTCo:IO ()) |

310 | :: GHC.Prim.State# GHC.Prim.RealWorld |

311 | -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) |

312 | ~ |

313 | GHC.IOBase.IO ())) |

314 | |

315 | :Main.main :: GHC.IOBase.IO () |

316 | GblId |

317 | [Arity 1 |

318 | Str: DmdType L] |

319 | :Main.main = |

320 | Main.a1 |

321 | `cast` (sym (GHC.IOBase.NTCo:IO ()) |

322 | :: GHC.Prim.State# GHC.Prim.RealWorld |

323 | -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) |

324 | ~ |

325 | GHC.IOBase.IO ()) |

326 | |

327 | |

328 | |

329 | |

330 | ==================== Tidy Core Rules ==================== |

331 | "SPEC Main.factors [GHC.Integer.Internals.Integer]" NEVER |

332 | forall {$dIntegral_sSw :: GHC.Real.Integral |

333 | GHC.Integer.Internals.Integer} |

334 | Main.factors @ GHC.Integer.Internals.Integer $dIntegral_sSw |

335 | = Main.factors1 |

336 | |

337 | |

338 | Linking primes-test ... |