Fusing a pipeline
total xs = sum (map (*2) xs) names two traversals; the compiled code contains one loop and no intermediate list. These two traces are the transformation happening, rule by rule and pass by pass.
What you wrote.
-- The smallest pipeline that fusion collapses: watch the rule firings, then
-- the simplifier iterations that clean up after them.
module Fuse where
total :: [Int] -> Int
total xs = sum (map (* 2) xs)Every rewrite rule that fired, in order.-ddump-rule-firings
Rule fired: Class op sum (BUILTIN)
Rule fired: Class op + (BUILTIN)
Rule fired: Class op fromInteger (BUILTIN)
Rule fired: Int# -> Integer -> Int# (GHC.Internal.Bignum.Integer)
Rule fired: Class op * (BUILTIN)
Rule fired: map (GHC.Internal.Base)
Rule fired: fold/build (GHC.Internal.Base)
The whole program after each simplifier iteration. The same banner repeating means separate passes, each running to its own fixed point.-ddump-simpl-iterations
Simplifier iteration=186 lines
---- Simplifier counts for Simplifier iteration=1
Total ticks: 53
---- End of simplifier counts for Simplifier iteration=1
Result size of Simplifier iteration=1
= {terms: 46, types: 30, coercions: 0, joins: 0/1}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 20 0}]
$trModule = "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
$trModule = GHC.Internal.Types.TrNameS $trModule
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 20 0}]
$trModule = "Fuse"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
$trModule = GHC.Internal.Types.TrNameS $trModule
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Fuse.$trModule :: GHC.Internal.Types.Module
[LclIdX,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
Fuse.$trModule = GHC.Internal.Types.Module $trModule $trModule
-- RHS size: {terms: 31, types: 22, coercions: 0, joins: 0/1}
total :: [Int] -> Int
[LclIdX,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [0] 212 0}]
total
= \ (xs :: [Int]) ->
let {
z0 :: Int
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=False,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
z0 = GHC.Internal.Types.I# 0# } in
GHC.Internal.Base.foldr
@Int
@(Int -> Int)
(GHC.Internal.Base.mapFB
@Int
@(Int -> Int)
@Int
(\ (ds :: Int)
(ds1 [OS=OneShot] :: Int -> Int)
(v [OS=OneShot] :: Int) ->
case v of z { GHC.Internal.Types.I# ipv ->
ds1
(case ds of { GHC.Internal.Types.I# y ->
GHC.Internal.Types.I# (GHC.Internal.Prim.+# ipv y)
})
})
(\ (v :: Int) ->
case v of { GHC.Internal.Types.I# x ->
GHC.Internal.Types.I# (GHC.Internal.Prim.*# x 2#)
}))
(GHC.Internal.Base.breakpoint @Int)
xs
z0Simplifier iteration=279 lines
---- Simplifier counts for Simplifier iteration=2
Total ticks: 1
---- End of simplifier counts for Simplifier iteration=2
Result size of Simplifier iteration=2
= {terms: 44, types: 29, coercions: 0, joins: 0/0}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 20 0}]
$trModule = "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
$trModule = GHC.Internal.Types.TrNameS $trModule
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 20 0}]
$trModule = "Fuse"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
$trModule = GHC.Internal.Types.TrNameS $trModule
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Fuse.$trModule :: GHC.Internal.Types.Module
[LclIdX,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
Fuse.$trModule = GHC.Internal.Types.Module $trModule $trModule
-- RHS size: {terms: 29, types: 21, coercions: 0, joins: 0/0}
total :: [Int] -> Int
[LclIdX,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [0] 202 0}]
total
= \ (xs :: [Int]) ->
GHC.Internal.Base.foldr
@Int
@(Int -> Int)
(GHC.Internal.Base.mapFB
@Int
@(Int -> Int)
@Int
(\ (ds :: Int)
(ds1 [OS=OneShot] :: Int -> Int)
(v [OS=OneShot] :: Int) ->
case v of { GHC.Internal.Types.I# ipv ->
ds1
(case ds of { GHC.Internal.Types.I# y ->
GHC.Internal.Types.I# (GHC.Internal.Prim.+# ipv y)
})
})
(\ (v :: Int) ->
case v of { GHC.Internal.Types.I# x ->
GHC.Internal.Types.I# (GHC.Internal.Prim.*# x 2#)
}))
(GHC.Internal.Base.breakpoint @Int)
xs
(GHC.Internal.Types.I# 0#)Simplifier iteration=1134 lines
---- Simplifier counts for Simplifier iteration=1
Total ticks: 32
---- End of simplifier counts for Simplifier iteration=1
Result size of Simplifier iteration=1
= {terms: 86, types: 59, coercions: 0, joins: 0/1}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 20 0}]
$trModule = "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
$trModule = GHC.Internal.Types.TrNameS $trModule
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 20 0}]
$trModule = "Fuse"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
$trModule = GHC.Internal.Types.TrNameS $trModule
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Fuse.$trModule :: GHC.Internal.Types.Module
[LclIdX,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
Fuse.$trModule = GHC.Internal.Types.Module $trModule $trModule
-- RHS size: {terms: 14, types: 8, coercions: 0, joins: 0/0}
lvl :: Int -> (Int -> Int) -> Int -> Int
[LclId,
Arity=3,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [20 60 20] 51 0}]
lvl
= \ (ds :: Int)
(ds1 [OS=OneShot] :: Int -> Int)
(v [OS=OneShot] :: Int) ->
case v of { GHC.Internal.Types.I# ipv ->
ds1
(case ds of { GHC.Internal.Types.I# y ->
GHC.Internal.Types.I# (GHC.Internal.Prim.+# ipv y)
})
}
-- RHS size: {terms: 8, types: 3, coercions: 0, joins: 0/0}
lvl :: Int -> Int
[LclId,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [20] 21 10}]
lvl
= \ (v :: Int) ->
case v of { GHC.Internal.Types.I# x ->
GHC.Internal.Types.I# (GHC.Internal.Prim.*# x 2#)
}
-- RHS size: {terms: 16, types: 8, coercions: 0, joins: 0/0}
lvl :: Int -> (Int -> Int) -> Int -> Int
[LclId,
Arity=3,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [20 60 20] 52 0}]
lvl
= \ (x :: Int) (ys :: Int -> Int) (v [OS=OneShot] :: Int) ->
case v of { GHC.Internal.Types.I# ipv ->
ys
(case x of { GHC.Internal.Types.I# x ->
GHC.Internal.Types.I#
(GHC.Internal.Prim.+# ipv (GHC.Internal.Prim.*# x 2#))
})
}
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
lvl :: Int
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
lvl = GHC.Internal.Types.I# 0#
-- RHS size: {terms: 27, types: 19, coercions: 0, joins: 0/1}
total :: [Int] -> Int
[LclIdX,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [0] 162 0}]
total
= \ (xs :: [Int]) ->
letrec {
go1 [Occ=LoopBreaker] :: [Int] -> Int -> Int
[LclId,
Arity=2,
Unf=Unf{Src=<vanilla>, TopLvl=False,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [50 20] 102 0}]
go1
= \ (ds :: [Int]) (eta [OS=OneShot] :: Int) ->
case ds of {
[] -> GHC.Internal.Base.breakpoint @Int eta;
: y ys ->
case eta of { GHC.Internal.Types.I# ipv ->
go1
ys
(case y of { GHC.Internal.Types.I# x ->
GHC.Internal.Types.I#
(GHC.Internal.Prim.+# ipv (GHC.Internal.Prim.*# x 2#))
})
}
}; } in
go1 xs lvlSimplifier iteration=286 lines
---- Simplifier counts for Simplifier iteration=2
Total ticks: 4
---- End of simplifier counts for Simplifier iteration=2
Result size of Simplifier iteration=2
= {terms: 44, types: 27, coercions: 0, joins: 1/1}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 20 0}]
$trModule = "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
$trModule = GHC.Internal.Types.TrNameS $trModule
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 20 0}]
$trModule = "Fuse"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
$trModule = GHC.Internal.Types.TrNameS $trModule
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Fuse.$trModule :: GHC.Internal.Types.Module
[LclIdX,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
Fuse.$trModule = GHC.Internal.Types.Module $trModule $trModule
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
lvl :: Int
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
lvl = GHC.Internal.Types.I# 0#
-- RHS size: {terms: 26, types: 18, coercions: 0, joins: 1/1}
total :: [Int] -> Int
[LclIdX,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [0] 52 0}]
total
= \ (xs :: [Int]) ->
joinrec {
go1 [Occ=LoopBreaker] :: [Int] -> Int -> Int
[LclId[JoinId(2)(Nothing)],
Arity=2,
Str=<L><L>,
Unf=Unf{Src=<vanilla>, TopLvl=False,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [30 20] 52 0}]
go1 (ds :: [Int]) (eta [OS=OneShot] :: Int)
= case ds of {
[] -> eta;
: y ys ->
case eta of { GHC.Internal.Types.I# ipv ->
jump go1
ys
(case y of { GHC.Internal.Types.I# x ->
GHC.Internal.Types.I#
(GHC.Internal.Prim.+# ipv (GHC.Internal.Prim.*# x 2#))
})
}
}; } in
jump go1 xs lvlSimplifier iteration=1139 lines
---- Simplifier counts for Simplifier iteration=1
Total ticks: 17
---- End of simplifier counts for Simplifier iteration=1
Result size of Simplifier iteration=1
= {terms: 50, types: 34, coercions: 0, joins: 2/2}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 20 0}]
$trModule = "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
$trModule = GHC.Internal.Types.TrNameS $trModule
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 20 0}]
$trModule = "Fuse"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule :: GHC.Internal.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
$trModule = GHC.Internal.Types.TrNameS $trModule
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Fuse.$trModule :: GHC.Internal.Types.Module
[LclIdX,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
Fuse.$trModule = GHC.Internal.Types.Module $trModule $trModule
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
lvl :: Int
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 10}]
lvl = GHC.Internal.Types.I# 0#
-- RHS size: {terms: 32, types: 25, coercions: 0, joins: 2/2}
total :: [Int] -> Int
[LclIdX,
Arity=1,
Str=<SL>,
Cpr=1,
Unf=Unf{Src=StableSystem, TopLvl=True,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (xs [Occ=Once1, Dmd=SL] :: [Int]) ->
joinrec {
go1 [InlPrag=[2], Occ=T[2], Dmd=LC(S,C(1,!P(L)))]
:: [Int] -> Int -> Int
[LclId[JoinId(2)(Nothing)],
Arity=2,
Str=<SL><S!P(L)>,
Unf=Unf{Src=StableSystem, TopLvl=False,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False)
Tmpl= \ (ds [Occ=Once1, Dmd=SL] :: [Int])
(eta [Occ=Once1!, Dmd=S!P(L), OS=OneShot] :: Int) ->
case eta of { GHC.Internal.Types.I# ww [Occ=Once1] ->
jump $wgo1 ds ww
}}]
go1 (ds [Occ=Once1, Dmd=SL] :: [Int])
(eta [Occ=Once1!, Dmd=S!P(L), OS=OneShot] :: Int)
= case eta of { GHC.Internal.Types.I# ww [Occ=Once1] ->
jump $wgo1 ds ww
};
$wgo1 [InlPrag=[2], Occ=LoopBreakerT[2]]
:: [Int] -> GHC.Internal.Prim.Int# -> Int
[LclId[JoinId(2)(Just [])],
Arity=2,
Str=<SL><L>,
Unf=Unf{Src=<vanilla>, TopLvl=False,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [40 0] 52 10}]
$wgo1 (ds [Occ=Once1!, Dmd=SL] :: [Int])
(ww [Occ=Once2] :: GHC.Internal.Prim.Int#)
= case ds of {
[] -> GHC.Internal.Types.I# ww;
: y [Occ=Once1!, Dmd=S!P(S)] ys [Occ=Once1, Dmd=S] ->
case y of { GHC.Internal.Types.I# x [Occ=Once1] ->
jump go1
ys
(GHC.Internal.Types.I#
(GHC.Internal.Prim.+# ww (GHC.Internal.Prim.*# x 2#)))
}
}; } in
jump go1 xs lvl}]
total
= \ (xs [Dmd=SL] :: [Int]) ->
joinrec {
go1 [InlPrag=[2], Dmd=LC(S,C(1,!P(L)))] :: [Int] -> Int -> Int
[LclId[JoinId(2)(Nothing)],
Arity=2,
Str=<SL><S!P(L)>,
Unf=Unf{Src=StableSystem, TopLvl=False,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False)
Tmpl= \ (ds [Occ=Once1, Dmd=SL] :: [Int])
(eta [Occ=Once1!, Dmd=S!P(L), OS=OneShot] :: Int) ->
case eta of { GHC.Internal.Types.I# ww [Occ=Once1] ->
jump $wgo1 ds ww
}}]
go1 (ds [Dmd=SL] :: [Int]) (eta [Dmd=S!P(L), OS=OneShot] :: Int)
= case eta of { GHC.Internal.Types.I# ww -> jump $wgo1 ds ww };
$wgo1 [InlPrag=[2], Occ=LoopBreaker]
:: [Int] -> GHC.Internal.Prim.Int# -> Int
[LclId[JoinId(2)(Just [])],
Arity=2,
Str=<SL><L>,
Unf=Unf{Src=<vanilla>, TopLvl=False,
Value=True, ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [40 0] 42 10}]
$wgo1 (ds [Dmd=SL] :: [Int]) (ww :: GHC.Internal.Prim.Int#)
= case ds of {
[] -> GHC.Internal.Types.I# ww;
: y [Dmd=S!P(S)] ys [Dmd=S] ->
case y of { GHC.Internal.Types.I# x ->
jump $wgo1 ys (GHC.Internal.Prim.+# ww (GHC.Internal.Prim.*# x 2#))
}
}; } in
jump $wgo1 xs 0#The typechecker and constraint solver, step by step: unifications, the work list, the inert set. Open a section to descend.-ddump-tc-trace
Adding diagnostic:3 lines
examples/traces/Fuse.hs:1:1:: [GHC-20540]
Module ‘Prelude’ implicitly imported.checkFamInstConsistency [Prelude]
init_consistent_set [(Prelude, 7)]
checkManySize5 lines
mod: Prelude m1: 7 m2: 0 product: 0
Tc2 (src)
Tc3
tcExtendKindEnvList []
tcExtendKindEnvList []
tcDeriving []
rnd
Adding instances:
Tc4
Tc5
tcExtendKindEnvList []
tcHsSigType1414 lines
[Int] -> Int
Residual: WC {}
Level: 1
final wc = WC {wc_impl =
Implic {
TcLevel = 1
Skolems =
Given-eqs = NoGivenEqs
Status = Solved {Dead givens = []}
Given =
Wanted = WC {}
Binds = CoEvBindsVar<aKp>
need = ENS{ens_dms = {} ens_fvs = {}}
need_implic = ENS{ens_dms = {} ens_fvs = {}}
the type signature for ‘total’ }}
ev_binds_var = CoEvBindsVar<aKq>
current evbinds = {}
simples: {}
errs: {}pushLevelAndSolveEqualitiesX163 lines
Called from tc_lhs_sig_type
newAnonMetaTyVar t[tau:1] :: GHC.Internal.Types.RuntimeRep
tc_fun_type3 lines
[Int] Int
newAnonMetaTyVar t[tau:1] :: GHC.Internal.Types.RuntimeRep
newAnonMetaTyVar t[tau:1] :: GHC.Internal.Types.RuntimeRep
lk1 Int
tcInferTyApps153 lines
Int []
tcInferTyApps } Int :: *
checkExpectedKind3 lines
Int *
checkExpectedKindX4 lines
Int act_kind': * exp_kind: *
checkExpectedKind3 lines
[Int] *
checkExpectedKindX4 lines
[Int] act_kind': * exp_kind: TYPE t[tau:1]
u_tys3 lines
tclvl 1 * ~nominal TYPE t[tau:1]
go-tycon6 lines
TYPE [GHC.Internal.Types.LiftedRep] [t[tau:1]] [nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal]
u_tc_arg4 lines
nominal GHC.Internal.Types.LiftedRep t[tau:1]
u_tys3 lines
tclvl 1 GHC.Internal.Types.LiftedRep ~nominal t[tau:1]
u_tys5 lines
tclvl 1 GHC.Internal.Types.RuntimeRep ~nominal GHC.Internal.Types.RuntimeRep
u_tys yields no coercion
uUnfilledVar2 ok5 lines
t[tau:1] :: GHC.Internal.Types.RuntimeRep GHC.Internal.Types.LiftedRep :: GHC.Internal.Types.RuntimeRep True <GHC.Internal.Types.RuntimeRep>_N
writeMetaTyVar2 lines
t[tau:1] :: GHC.Internal.Types.RuntimeRep := GHC.Internal.Types.LiftedRep
u_tys yields no coercion
u_tys yields no coercion
checkExpectedKind4 lines
* TYPE t[tau:1] <*>_N
lk1 Int
tcInferTyApps99 lines
Int
[]
final wc = WC {}
ev_binds_var = CoEvBindsVar<aKo>
current evbinds = {}tcInferTyApps } Int :: *
checkExpectedKind3 lines
Int *
checkExpectedKindX4 lines
Int act_kind': * exp_kind: TYPE t[tau:1]
u_tys3 lines
tclvl 1 * ~nominal TYPE t[tau:1]
go-tycon6 lines
TYPE [GHC.Internal.Types.LiftedRep] [t[tau:1]] [nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal]
u_tc_arg4 lines
nominal GHC.Internal.Types.LiftedRep t[tau:1]
u_tys3 lines
tclvl 1 GHC.Internal.Types.LiftedRep ~nominal t[tau:1]
u_tys5 lines
tclvl 1 GHC.Internal.Types.RuntimeRep ~nominal GHC.Internal.Types.RuntimeRep
u_tys yields no coercion
uUnfilledVar2 ok5 lines
t[tau:1] :: GHC.Internal.Types.RuntimeRep GHC.Internal.Types.LiftedRep :: GHC.Internal.Types.RuntimeRep True <GHC.Internal.Types.RuntimeRep>_N
writeMetaTyVar2 lines
t[tau:1] :: GHC.Internal.Types.RuntimeRep := GHC.Internal.Types.LiftedRep
u_tys yields no coercion
u_tys yields no coercion
checkExpectedKind4 lines
* TYPE t[tau:1] <*>_N
checkExpectedKind3 lines
[Int] -> Int *
checkExpectedKindX4 lines
[Int] -> Int act_kind': * exp_kind: TYPE t[tau:1]
u_tys3 lines
tclvl 1 * ~nominal TYPE t[tau:1]
go-tycon6 lines
TYPE [GHC.Internal.Types.LiftedRep] [t[tau:1]] [nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal]
u_tc_arg4 lines
nominal GHC.Internal.Types.LiftedRep t[tau:1]
u_tys3 lines
tclvl 1 GHC.Internal.Types.LiftedRep ~nominal t[tau:1]
u_tys5 lines
tclvl 1 GHC.Internal.Types.RuntimeRep ~nominal GHC.Internal.Types.RuntimeRep
u_tys yields no coercion
uUnfilledVar2 ok5 lines
t[tau:1] :: GHC.Internal.Types.RuntimeRep GHC.Internal.Types.LiftedRep :: GHC.Internal.Types.RuntimeRep True <GHC.Internal.Types.RuntimeRep>_N
writeMetaTyVar2 lines
t[tau:1] :: GHC.Internal.Types.RuntimeRep := GHC.Internal.Types.LiftedRep
u_tys yields no coercion
u_tys yields no coercion
checkExpectedKind4 lines
* TYPE t[tau:1] <*>_N
newNoTcEvBinds unique = aKo
solveWanteds4 lines
Level = 1
WC {}solveWanteds
tryDefaulting3 lines
WC {}tryDefaulting } WC {}
pushLevelAndSolveEqualities
doNotQuantifyTyVars has nothing to error on
tc_lhs_sig_type3 lines
HsOuterImplicit: [] HsOuterImplicit: []
kindGeneralizeSome4 lines
type: [Int] -> Int
dvs: DV {dv_kvs = {}, dv_tvs = {}, dv_cvs = {}}
filtered_dvs: DV {dv_kvs = {}, dv_tvs = {}, dv_cvs = {}}quantifyTyVars has nothing to quantify
newNoTcEvBinds unique = aKp
tcHsSigType 212 lines
Implic {
TcLevel = 1
Skolems =
Given-eqs = NoGivenEqs
Status = Unsolved
Given =
Wanted = WC {}
Binds = CoEvBindsVar<aKp>
need = ENS{ens_dms = {} ens_fvs = {}}
need_implic = ENS{ens_dms = {} ens_fvs = {}}
the type signature for ‘total’ }newNoTcEvBinds unique = aKq
solveWanteds136 lines
Level = 0
WC {wc_impl =
Implic {
TcLevel = 1
Skolems =
Given-eqs = NoGivenEqs
Status = Unsolved
Given =
Wanted = WC {}
Binds = CoEvBindsVar<aKp>
need = ENS{ens_dms = {} ens_fvs = {}}
need_implic = ENS{ens_dms = {} ens_fvs = {}}
the type signature for ‘total’ }}
iterations = 1
residual = WC {}
unsolved_implics = {Implic {
TcLevel = 1
Skolems =
Given-eqs = NoGivenEqs
Status = Solved {Dead givens = []}
Given =
Wanted = WC {}
Binds = CoEvBindsVar<aKp>
need = ENS{ens_dms = {} ens_fvs = {}}
need_implic = ENS{ens_dms = {} ens_fvs = {}}
the type signature for ‘total’ }}simplify_loop iteration=0 (definitely_redo = True, 0 simples to solve)
simplify_loop: wc =13 lines
WC {wc_impl =
Implic {
TcLevel = 1
Skolems =
Given-eqs = NoGivenEqs
Status = Unsolved
Given =
Wanted = WC {}
Binds = CoEvBindsVar<aKp>
need = ENS{ens_dms = {} ens_fvs = {}}
need_implic = ENS{ens_dms = {} ens_fvs = {}}
the type signature for ‘total’ }}solveSimpleWanteds6 lines
Mode: TcSMode{}
Inerts: {Innermost given equalities = 0
Given eqs at this level = False}
Wanteds to solve: {}solveSimpleWanteds end
solveNestedImplications starting84 lines
has_given_eqs = NoGivenEqs
res_implic = Implic {
TcLevel = 1
Skolems =
Given-eqs = NoGivenEqs
Status = Solved {Dead givens = []}
Given =
Wanted = WC {}
Binds = CoEvBindsVar<aKp>
need = ENS{ens_dms = {} ens_fvs = {}}
need_implic = ENS{ens_dms = {} ens_fvs = {}}
the type signature for ‘total’ }
implication evbinds = {}
implication tvcs = []solveImplication68 lines
Implic {
TcLevel = 1
Skolems =
Given-eqs = NoGivenEqs
Status = Unsolved
Given =
Wanted = WC {}
Binds = CoEvBindsVar<aKp>
need = ENS{ens_dms = {} ens_fvs = {}}
need_implic = ENS{ens_dms = {} ens_fvs = {}}
the type signature for ‘total’ }
Inerts {Innermost given equalities = 0
Given eqs at this level = False}
final wc = WC {}
ev_binds_var = CoEvBindsVar<aKp>
current evbinds = {}
Implic {
TcLevel = 1
Skolems =
Given-eqs = NoGivenEqs
Status = Solved {Dead givens = []}
Given =
Wanted = WC {}
Binds = CoEvBindsVar<aKp>
need = ENS{ens_dms = {} ens_fvs = {}}
need_implic = ENS{ens_dms = {} ens_fvs = {}}
the type signature for ‘total’ }solveWanteds4 lines
Level = 1
WC {}solveWanteds
getHasGivenEqs7 lines
given_eqs: False
ge_lvl: 0
ambient level: 1
Inerts: {Innermost given equalities = 0
Given eqs at this level = False}
Insols: {}solveImplication 23 lines
{}
WC {}solveImplication 33 lines
ev_binds_var CoEvBindsVar<aKp>
implication evbinds = {}setImplicationStatus22 lines
Implic {
TcLevel = 1
Skolems =
Given-eqs = NoGivenEqs
Status = Unsolved
Given =
Wanted = WC {}
Binds = CoEvBindsVar<aKp>
need = ENS{ens_dms = {} ens_fvs = {}}
need_implic = ENS{ens_dms = {} ens_fvs = {}}
the type signature for ‘total’ }neededEvVars9 lines
old_need_implic: ENS{ens_dms = {} ens_fvs = {}}
new_need_implic: ENS{ens_dms = {} ens_fvs = {}}
used_covars: {}
need_ignoring_dms: {}
need_from_dms: {}
need: ENS{ens_dms = {} ens_fvs = {}}
ev_binds: []
live_ev_binds: []setImplicationStatus
solveImplication end
solveNestedImplications end
resetUnificationFlag3 lines
ambient: 0 unif_lvl: Nothing
unif_happened False
solveWanteds
zonkSimples done: {}
zonkSimples done: {}
emitFlatConstraints14 lines
WC {wc_impl =
Implic {
TcLevel = 1
Skolems =
Given-eqs = NoGivenEqs
Status = Solved {Dead givens = []}
Given =
Wanted = WC {}
Binds = CoEvBindsVar<aKp>
need = ENS{ens_dms = {} ens_fvs = {}}
need_implic = ENS{ens_dms = {} ens_fvs = {}}
the type signature for ‘total’ }}emitFlatConstraints
emitDelayedErrors {}
checkValidType [Int] -> Int :: *
done ct [Int] -> Int
Ambiguity check for1053 lines
[Int] -> Int
tc_sub_type (general case)3 lines
ty_actual = [Int] -> Int ty_expected = [Int] -> Int
u_tys3 lines
tclvl 0 [Int] -> Int ~nominal [Int] -> Int
u_tys3 lines
tclvl 0 Many ~nominal Many
u_tys yields no coercion
u_tys3 lines
tclvl 0 [Int] ~nominal [Int]
go-tycon6 lines
[] [Int] [Int] [nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal]
u_tc_arg4 lines
nominal Int Int
u_tys3 lines
tclvl 0 Int ~nominal Int
u_tys yields no coercion
u_tys yields no coercion
u_tys3 lines
tclvl 0 Int ~nominal Int
u_tys yields no coercion
u_tys yields no coercion
simplifyAmbiguityCheck16 lines
type = [Int] -> Int
wanted = WC {}
final wc = WC {}
ev_binds_var = EvBindsVar<aKr>
current evbinds = {}newTcEvBinds unique = aKr
solveWanteds4 lines
Level = 0
WC {}solveWanteds
tryDefaulting for ambiguity4 lines
WC {}tryDefaulting } WC {}
newTcEvBinds unique = aKs
End simplifyAmbiguityCheck
} Done ambiguity check for [Int] -> Int
checkValidType done [Int] -> Int :: *
end tcHsSigType } [Int] -> Int
tcuser [Int] -> Int
tc_extend_local_env2 lines
[(total, Identifier[total::[Int] -> Int, TopLevelLet {} True])]------------------------------------------------
Bindings for995 lines
[total]
Generalisation plan CheckGen total :: [Int] -> Int
tcPolyCheck total :: [Int] -> Int
newAnonMetaTyVar t[tau:0] :: GHC.Internal.Types.Multiplicity
tc_extend_local_env []
tcExtendBinderStack []
tcExtendBinderStack [total[<NotTopLevel>]]
tcFunBindMatches 15 lines
total
t[tau:0]
Check{[Int] -> Int}
1tcFunBindMatches 26 lines
ctxt: the type signature for ‘total’
arity: 1
invis_pat_tys: []
pat_tys: [Check{[Int]}]
rhs_ty: Check{Int}tcPatBndr(not let)3 lines
xs [Int]
tcExtendBinderStack [xs[<NotTopLevel>]]
tc_extend_local_env [(xs, Identifier[xs::[Int], NotLetBound])]
tcBody Check{Int}
tcApp970 lines
rn_expr: sum (map (* 2) xs)
rn_fun: sum
fun_ctxt: VACall 0 sum examples/traces/Fuse.hs:6:12-14
rn_args: [EValArg{VACall 1 sum <no location info>} (map (* 2) xs)]tcInferId2 lines
sum :: forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a
tcInstFun6 lines
tc_fun sum
fun_sigma forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a
fun_ctxt VACall 0 sum examples/traces/Fuse.hs:6:12-14
args: [EValArg{VACall 1 sum <no location info>} (map (* 2) xs)]
do_ql NoQLcloneAnonMetaTyVar t[tau:0] :: * -> *
instCallConstraints [$dFoldable]
Instantiating7 lines
origin arising from a use of ‘sum’ tvs [t] theta [Foldable t] type forall a. Num a => t a -> a with t[tau:0] theta: [Foldable t[tau:0]]
cloneAnonMetaTyVar a[tau:0] :: *
instCallConstraints [$dNum]
Instantiating7 lines
origin arising from a use of ‘sum’ tvs [a] theta [Num a] type t[tau:0] a -> a with a[tau:0] theta: [Num a[tau:0]]
tcInstFun:ret a[tau:0]
tcApp:NoQL3 lines
sum a[tau:0]
newAnonMetaTyVar t[tau:0] :: *
checkResultTy934 lines
tc_fun: sum app_res_rho: a[tau:0] res_ty: Int ds_flag: Shallow
u_tys3 lines
tclvl 0 a[tau:0] ~nominal Int
u_tys3 lines
tclvl 0 * ~nominal *
u_tys yields no coercion
uUnfilledVar2 ok5 lines
a[tau:0] :: * Int :: * True <*>_N
writeMetaTyVar a[tau:0] :: * := Int
u_tys yields no coercion
checkResultTy 1 } <Int>_N
tcValArg4 lines
VACall 1 sum <no location info> arg type: t[tau:0] a[tau:0] arg: (map (* 2) xs)
tcApp910 lines
rn_expr: map (* 2) xs
rn_fun: map
fun_ctxt: VACall 0 map examples/traces/Fuse.hs:6:17-19
rn_args: [EValArg{VACall 1 map examples/traces/Fuse.hs:6:17-25} (*
2),
EValArg{VACall 2 map <no location info>} xs]tcInferId map :: forall a b. (a -> b) -> [a] -> [b]
tcInstFun7 lines
tc_fun map
fun_sigma forall a b. (a -> b) -> [a] -> [b]
fun_ctxt VACall 0 map examples/traces/Fuse.hs:6:17-19
args: [EValArg{VACall 1 map examples/traces/Fuse.hs:6:17-25} (* 2),
EValArg{VACall 2 map <no location info>} xs]
do_ql NoQLcloneAnonMetaTyVar a[tau:0] :: *
cloneAnonMetaTyVar b[tau:0] :: *
Instantiating8 lines
origin arising from a use of ‘map’
tvs [a, b]
theta []
type (a -> b) -> [] a -> [] b
with a[tau:0]
b[tau:0]
theta: []tcInstFun:ret [b[tau:0]]
tcApp:NoQL3 lines
map [b[tau:0]]
newAnonMetaTyVar t[tau:0] :: *
checkResultTy880 lines
tc_fun: map app_res_rho: [b[tau:0]] res_ty: t[tau:0] a[tau:0] ds_flag: Shallow
u_tys3 lines
tclvl 0 [b[tau:0]] ~nominal t[tau:0] a[tau:0]
u_tys3 lines
tclvl 0 b[tau:0] ~nominal a[tau:0]
u_tys3 lines
tclvl 0 * ~nominal *
u_tys yields no coercion
uUnfilledVar2 ok5 lines
b[tau:0] :: * Int :: * True <*>_N
writeMetaTyVar b[tau:0] :: * := Int
u_tys yields no coercion
u_tys3 lines
tclvl 0 [] ~nominal t[tau:0]
u_tys3 lines
tclvl 0 * -> * ~nominal * -> *
u_tys3 lines
tclvl 0 Many ~nominal Many
u_tys yields no coercion
u_tys3 lines
tclvl 0 * ~nominal *
u_tys yields no coercion
u_tys3 lines
tclvl 0 * ~nominal *
u_tys yields no coercion
u_tys yields no coercion
uUnfilledVar2 ok5 lines
t[tau:0] :: * -> * [] :: * -> * True <* -> *>_N
writeMetaTyVar t[tau:0] :: * -> * := []
u_tys yields no coercion
u_tys yields no coercion
checkResultTy 1 } <[Int]>_N
tcValArg4 lines
VACall 1 map examples/traces/Fuse.hs:6:17-25 arg type: a[tau:0] -> b[tau:0] arg: (* 2)
tcApp826 lines
rn_expr: * 2
rn_fun: GHC.Internal.Prim.rightSection
fun_ctxt: VAExpansion * 2 <no location info>
rn_args: [EValArg{VAExpansion * 2 <no location info>} (*),
EValArg{VAExpansion * 2 <no location info>} 2, EExpand * 2]tcInferId8 lines
GHC.Internal.Prim.rightSection :: forall {q :: GHC.Internal.Types.RuntimeRep}
{r :: GHC.Internal.Types.RuntimeRep}
{s :: GHC.Internal.Types.RuntimeRep}
{n :: GHC.Internal.Types.Multiplicity}
{o :: GHC.Internal.Types.Multiplicity} (a :: TYPE q)
(b :: TYPE r) (c :: TYPE s).
(a %n -> b %o -> c) -> b %o -> a %n -> ctcInstFun13 lines
tc_fun GHC.Internal.Prim.rightSection
fun_sigma forall {q :: GHC.Internal.Types.RuntimeRep}
{r :: GHC.Internal.Types.RuntimeRep}
{s :: GHC.Internal.Types.RuntimeRep}
{n :: GHC.Internal.Types.Multiplicity}
{o :: GHC.Internal.Types.Multiplicity} (a :: TYPE q) (b :: TYPE r)
(c :: TYPE s).
(a %n -> b %o -> c) -> b %o -> a %n -> c
fun_ctxt VAExpansion * 2 <no location info>
args: [EValArg{VAExpansion * 2 <no location info>} (*),
EValArg{VAExpansion * 2 <no location info>} 2, EExpand * 2]
do_ql DoQLcloneAnonMetaTyVar q[conc:qlinst] :: GHC.Internal.Types.RuntimeRep
cloneAnonMetaTyVar r[conc:qlinst] :: GHC.Internal.Types.RuntimeRep
cloneAnonMetaTyVar s[tau:qlinst] :: GHC.Internal.Types.RuntimeRep
cloneAnonMetaTyVar n[tau:qlinst] :: GHC.Internal.Types.Multiplicity
cloneAnonMetaTyVar o[tau:qlinst] :: GHC.Internal.Types.Multiplicity
cloneAnonMetaTyVar a[tau:qlinst] :: TYPE q[conc:qlinst]
cloneAnonMetaTyVar b[tau:qlinst] :: TYPE r[conc:qlinst]
cloneAnonMetaTyVar c[tau:qlinst] :: TYPE s[tau:qlinst]
Instantiating14 lines
origin arising from an operator section
tvs [q, r, s, n, o, a, b, c]
theta []
type (a %n -> (b %o -> c)) -> b %o -> a %n -> c
with q[conc:qlinst]
r[conc:qlinst]
s[tau:qlinst]
n[tau:qlinst]
o[tau:qlinst]
a[tau:qlinst]
b[tau:qlinst]
c[tau:qlinst]
theta: []qla4 lines
a[tau:qlinst] %n[tau:qlinst] -> b[tau:qlinst] %o[tau:qlinst] -> c[tau:qlinst] True
tcInferId * :: forall a. Num a => a -> a -> a
quickLookArg772 lines
arg: (*)
orig_arg_rho: a[tau:qlinst]
%n[tau:qlinst] -> b[tau:qlinst] %o[tau:qlinst] -> c[tau:qlinst]
head: (*) :: Just ((*), forall a. Num a => a -> a -> a)
args: []
ty : TYPE r[conc:qlinst] :: *
ty': * :: *
final_co: <*>_N :: (* :: *) ~# (* :: *)tcInstFun6 lines
tc_fun (*) fun_sigma forall a. Num a => a -> a -> a fun_ctxt VACall 0 (*) <no location info> args: [] do_ql NoQL
cloneAnonMetaTyVar a[tau:qlinst] :: *
instCallConstraints [$dNum]
Instantiating7 lines
origin arising from a use of ‘*’ tvs [a] theta [Num a] type a -> a -> a with a[tau:qlinst] theta: [Num a[tau:qlinst]]
tcInstFun:ret a[tau:qlinst] -> a[tau:qlinst] -> a[tau:qlinst]
quickLookArg 25 lines
arg: (*)
orig_arg_rho: a[tau:qlinst]
%n[tau:qlinst] -> b[tau:qlinst] %o[tau:qlinst] -> c[tau:qlinst]
app_res_rho: a[tau:qlinst] -> a[tau:qlinst] -> a[tau:qlinst]qlUnify4 lines
a[tau:qlinst] -> a[tau:qlinst] -> a[tau:qlinst] a[tau:qlinst] %n[tau:qlinst] -> b[tau:qlinst] %o[tau:qlinst] -> c[tau:qlinst]
u_tys3 lines
tclvl qlinst TYPE q[conc:qlinst] ~nominal *
go-tycon6 lines
TYPE [q[conc:qlinst]] [GHC.Internal.Types.LiftedRep] [nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal]
u_tc_arg4 lines
nominal q[conc:qlinst] GHC.Internal.Types.LiftedRep
u_tys3 lines
tclvl qlinst q[conc:qlinst] ~nominal GHC.Internal.Types.LiftedRep
u_tys5 lines
tclvl qlinst GHC.Internal.Types.RuntimeRep ~nominal GHC.Internal.Types.RuntimeRep
u_tys yields no coercion
uUnfilledVar2 ok5 lines
q[conc:qlinst] :: GHC.Internal.Types.RuntimeRep GHC.Internal.Types.LiftedRep :: GHC.Internal.Types.RuntimeRep True <GHC.Internal.Types.RuntimeRep>_N
writeMetaTyVar2 lines
q[conc:qlinst] :: GHC.Internal.Types.RuntimeRep := GHC.Internal.Types.LiftedRep
u_tys yields no coercion
u_tys yields no coercion
qlUnify:update a[tau:qlinst] := a[tau:qlinst]
writeMetaTyVar a[tau:qlinst] :: * := a[tau:qlinst]
u_tys5 lines
tclvl qlinst GHC.Internal.Types.Multiplicity ~nominal GHC.Internal.Types.Multiplicity
u_tys yields no coercion
qlUnify:update n[tau:qlinst] := Many
writeMetaTyVar2 lines
n[tau:qlinst] :: GHC.Internal.Types.Multiplicity := Many
u_tys3 lines
tclvl qlinst TYPE r[conc:qlinst] ~nominal TYPE q[conc:qlinst]
go-tycon6 lines
TYPE [r[conc:qlinst]] [q[conc:qlinst]] [nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal]
u_tc_arg4 lines
nominal r[conc:qlinst] q[conc:qlinst]
u_tys3 lines
tclvl qlinst r[conc:qlinst] ~nominal q[conc:qlinst]
u_tys5 lines
tclvl qlinst GHC.Internal.Types.RuntimeRep ~nominal GHC.Internal.Types.RuntimeRep
u_tys yields no coercion
uUnfilledVar2 ok5 lines
r[conc:qlinst] :: GHC.Internal.Types.RuntimeRep GHC.Internal.Types.LiftedRep :: GHC.Internal.Types.RuntimeRep True <GHC.Internal.Types.RuntimeRep>_N
writeMetaTyVar2 lines
r[conc:qlinst] :: GHC.Internal.Types.RuntimeRep := GHC.Internal.Types.LiftedRep
u_tys yields no coercion
u_tys yields no coercion
qlUnify:update a[tau:qlinst] := b[tau:qlinst]
writeMetaTyVar2 lines
a[tau:qlinst] :: TYPE q[conc:qlinst] := b[tau:qlinst]
u_tys5 lines
tclvl qlinst GHC.Internal.Types.Multiplicity ~nominal GHC.Internal.Types.Multiplicity
u_tys yields no coercion
qlUnify:update o[tau:qlinst] := Many
writeMetaTyVar2 lines
o[tau:qlinst] :: GHC.Internal.Types.Multiplicity := Many
u_tys3 lines
tclvl qlinst TYPE s[tau:qlinst] ~nominal TYPE r[conc:qlinst]
go-tycon6 lines
TYPE [s[tau:qlinst]] [r[conc:qlinst]] [nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal]
u_tc_arg4 lines
nominal s[tau:qlinst] r[conc:qlinst]
u_tys3 lines
tclvl qlinst s[tau:qlinst] ~nominal r[conc:qlinst]
u_tys5 lines
tclvl qlinst GHC.Internal.Types.RuntimeRep ~nominal GHC.Internal.Types.RuntimeRep
u_tys yields no coercion
uUnfilledVar2 ok5 lines
s[tau:qlinst] :: GHC.Internal.Types.RuntimeRep GHC.Internal.Types.LiftedRep :: GHC.Internal.Types.RuntimeRep True <GHC.Internal.Types.RuntimeRep>_N
writeMetaTyVar2 lines
s[tau:qlinst] :: GHC.Internal.Types.RuntimeRep := GHC.Internal.Types.LiftedRep
u_tys yields no coercion
u_tys yields no coercion
qlUnify:update b[tau:qlinst] := c[tau:qlinst]
writeMetaTyVar2 lines
b[tau:qlinst] :: TYPE r[conc:qlinst] := c[tau:qlinst]
quickLookArg done } (*)
makeTypeConcrete8 lines
ty: TYPE r[conc:qlinst]
makeTypeConcrete: unifier success5 lines
ty: TYPE r[conc:qlinst] :: *
redn: {reductionOriginalType: *
reductionReducedType: *
reductionCoercion: <*>_N}makeTypeConcrete
ensureConcrete } success3 lines
ty: TYPE r[conc:qlinst] co: <*>_N
qla3 lines
b[tau:qlinst] True
cloneAnonMetaTyVar a[tau:qlinst] :: *
instCallConstraints [$dNum]
Instantiating7 lines
origin arising from the literal ‘2’ tvs [a] theta [Num a] type Integer -> a with a[tau:qlinst] theta: [Num a[tau:qlinst]]
u_tys3 lines
tclvl qlinst Integer ~nominal Integer
u_tys yields no coercion
quickLookArg591 lines
arg: 2 orig_arg_rho: b[tau:qlinst] head: 2 :: Just (2, a[tau:qlinst]) args: [] app_res_rho: a[tau:qlinst] -> a[tau:qlinst] -> a[tau:qlinst]
tcInstFun6 lines
tc_fun 2 fun_sigma a[tau:qlinst] fun_ctxt VACall 0 2 <no location info> args: [] do_ql NoQL
tcInstFun:ret a[tau:qlinst]
quickLookArg 24 lines
arg: 2 orig_arg_rho: b[tau:qlinst] app_res_rho: a[tau:qlinst]
quickLookArg done } 2
tcInstFun:ret a[tau:qlinst] %n[tau:qlinst] -> c[tau:qlinst]
tcApp:DoQL3 lines
GHC.Internal.Prim.rightSection a[tau:qlinst] %n[tau:qlinst] -> c[tau:qlinst]
qlUnify3 lines
a[tau:qlinst] %n[tau:qlinst] -> c[tau:qlinst] a[tau:0] -> b[tau:0]
u_tys3 lines
tclvl 0 * ~nominal TYPE s[tau:qlinst]
go-tycon6 lines
TYPE [GHC.Internal.Types.LiftedRep] [s[tau:qlinst]] [nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal]
u_tc_arg4 lines
nominal GHC.Internal.Types.LiftedRep s[tau:qlinst]
u_tys3 lines
tclvl 0 GHC.Internal.Types.LiftedRep ~nominal s[tau:qlinst]
found filled tyvar s[tau:qlinst] :-> GHC.Internal.Types.LiftedRep
u_tys3 lines
tclvl 0 GHC.Internal.Types.LiftedRep ~nominal GHC.Internal.Types.LiftedRep
u_tys yields no coercion
u_tys yields no coercion
u_tys yields no coercion
qlUnify:update c[tau:qlinst] := a[tau:0]
writeMetaTyVar c[tau:qlinst] :: TYPE s[tau:qlinst] := a[tau:0]
u_tys3 lines
tclvl 0 * ~nominal *
u_tys yields no coercion
qlUnify:update a[tau:0] := Int
writeMetaTyVar a[tau:0] :: * := Int
monomorphiseQLInstVars4 lines
c[tau:qlinst]
qlMonoTcType c[tau:qlinst]
monomorphiseQLInstVars
monomorphiseQLInstVars5 lines
b[tau:qlinst]
qlMonoTcType b[tau:qlinst]
qlMonoTcType c[tau:qlinst]
monomorphiseQLInstVars
monomorphiseQLInstVars6 lines
a[tau:qlinst]
qlMonoTcType a[tau:qlinst]
qlMonoTcType b[tau:qlinst]
qlMonoTcType c[tau:qlinst]
monomorphiseQLInstVars
monomorphiseQLInstVars4 lines
o[tau:qlinst]
qlMonoTcType o[tau:qlinst]
monomorphiseQLInstVars
monomorphiseQLInstVars4 lines
n[tau:qlinst]
qlMonoTcType n[tau:qlinst]
monomorphiseQLInstVars
monomorphiseQLInstVars4 lines
s[tau:qlinst]
qlMonoTcType s[tau:qlinst]
monomorphiseQLInstVars
monomorphiseQLInstVars4 lines
r[conc:qlinst]
qlMonoTcType r[conc:qlinst]
monomorphiseQLInstVars
monomorphiseQLInstVars4 lines
q[conc:qlinst]
qlMonoTcType q[conc:qlinst]
monomorphiseQLInstVars
tcEValArgQL50 lines
app_res_rho: a[tau:qlinst] -> a[tau:qlinst] -> a[tau:qlinst] exp_arg_ty: Int -> Int -> Int args: [EHsWrap <>] mult: Many
monomorphiseQLInstVars5 lines
a[tau:qlinst]
qlMonoTcType a[tau:qlinst]
qlMonoTcType a[tau:qlinst]
monomorphiseQLInstVars
newAnonMetaTyVar t[tau:0] :: *
checkResultTy38 lines
tc_fun: (*) app_res_rho: Int -> Int -> Int res_ty: Int -> Int -> Int ds_flag: Shallow
u_tys3 lines
tclvl 0 Int -> Int -> Int ~nominal Int -> Int -> Int
u_tys3 lines
tclvl 0 Many ~nominal Many
u_tys yields no coercion
u_tys3 lines
tclvl 0 Int ~nominal Int
u_tys yields no coercion
u_tys3 lines
tclvl 0 Int -> Int ~nominal Int -> Int
u_tys3 lines
tclvl 0 Many ~nominal Many
u_tys yields no coercion
u_tys3 lines
tclvl 0 Int ~nominal Int
u_tys yields no coercion
u_tys3 lines
tclvl 0 Int ~nominal Int
u_tys yields no coercion
u_tys yields no coercion
u_tys yields no coercion
checkResultTy 1 } <Int -> Int -> Int>_N
End tcApp } (*)
tcScalingUsage3 lines
Many UsageEnv: [] False
tcEValArgQL
tcEValArgQL450 lines
app_res_rho: a[tau:qlinst] exp_arg_ty: Int args: [] mult: Many
qlUnify3 lines
a[tau:qlinst] Int
u_tys3 lines
tclvl 0 * ~nominal *
u_tys yields no coercion
qlUnify:update a[tau:qlinst] := Int
writeMetaTyVar a[tau:qlinst] :: * := Int
newAnonMetaTyVar t[tau:0] :: *
checkResultTy435 lines
tc_fun: 2 app_res_rho: Int res_ty: Int ds_flag: Shallow
u_tys3 lines
tclvl 0 Int ~nominal Int
u_tys yields no coercion
checkResultTy 1 } <Int>_N
End tcApp } 2
tcScalingUsage3 lines
Many UsageEnv: [] False
tcEValArgQL } app_res_rho: a[tau:qlinst]
checkResultTy420 lines
tc_fun: GHC.Internal.Prim.rightSection app_res_rho: Int -> Int res_ty: a[tau:0] -> b[tau:0] ds_flag: Shallow
u_tys3 lines
tclvl 0 Int -> Int ~nominal a[tau:0] -> b[tau:0]
u_tys3 lines
tclvl 0 Many ~nominal Many
u_tys yields no coercion
u_tys3 lines
tclvl 0 Int ~nominal a[tau:0]
found filled tyvar a[tau:0] :-> Int
u_tys3 lines
tclvl 0 Int ~nominal Int
u_tys yields no coercion
u_tys yields no coercion
u_tys3 lines
tclvl 0 Int ~nominal b[tau:0]
found filled tyvar b[tau:0] :-> Int
u_tys3 lines
tclvl 0 Int ~nominal Int
u_tys yields no coercion
u_tys yields no coercion
u_tys yields no coercion
checkResultTy 1 } <Int -> Int>_N
End tcApp } GHC.Internal.Prim.rightSection
tcScalingUsage3 lines
Many UsageEnv: [] False
tcValArg4 lines
VACall 2 map <no location info> arg type: [a[tau:0]] arg: xs
tcApp380 lines
rn_expr: xs rn_fun: xs fun_ctxt: VACall 0 xs <no location info> rn_args: []
tcInferId xs :: [Int]
tcInstFun6 lines
tc_fun xs fun_sigma [Int] fun_ctxt VACall 0 xs <no location info> args: [] do_ql NoQL
tcInstFun:ret [Int]
tcApp:NoQL3 lines
xs [Int]
newAnonMetaTyVar t[tau:0] :: *
checkResultTy363 lines
tc_fun: xs app_res_rho: [Int] res_ty: [a[tau:0]] ds_flag: Shallow
u_tys3 lines
tclvl 0 [Int] ~nominal [a[tau:0]]
go-tycon6 lines
[] [Int] [a[tau:0]] [nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal, nominal]
u_tc_arg4 lines
nominal Int a[tau:0]
u_tys3 lines
tclvl 0 Int ~nominal a[tau:0]
found filled tyvar a[tau:0] :-> Int
u_tys3 lines
tclvl 0 Int ~nominal Int
u_tys yields no coercion
u_tys yields no coercion
u_tys yields no coercion
checkResultTy 1 } <[Int]>_N
End tcApp } xs
tcScalingUsage3 lines
Many UsageEnv: [awH :-> One] False
End tcApp } map
tcScalingUsage3 lines
Many UsageEnv: [awH :-> Many] False
End tcApp } sum
check_usage3 lines
Many Many
tcMatches4 lines
[total xs = sum (map (* 2) xs)] [[Int]] Int
tcScalingUsage3 lines
t[tau:0] UsageEnv: [] False
tcSpecPrags total []
} End of bindings for4 lines
[total] NonRecursive total [Int] -> Int
tcExtendBinderStack [total[<TopLevel>]]
tc_extend_local_env2 lines
[(total, Identifier[total::[Int] -> Int, TopLevelLet])]
check_usage3 lines
t[tau:0] 0
u_tys3 lines
tclvl 0 Many ~nominal t[tau:0]
u_tys5 lines
tclvl 0 GHC.Internal.Types.Multiplicity ~nominal GHC.Internal.Types.Multiplicity
u_tys yields no coercion
uUnfilledVar2 ok5 lines
t[tau:0] :: GHC.Internal.Types.Multiplicity Many :: GHC.Internal.Types.Multiplicity True <GHC.Internal.Types.Multiplicity>_N
writeMetaTyVar t[tau:0] :: GHC.Internal.Types.Multiplicity := Many
u_tys yields no coercion
ensureReflMultiplicityCo <Many>_N
tcImpPrags1 [total :: [Int] -> Int]
tcExtendKindEnvList []
tc_extend_local_env []
tcImpPrags1 []
Tc6
Tc7
Tc7a
simplifyTop254 lines
wanted = WC {wc_simple =
[W] $dFoldable {0} :: Foldable t[tau:0] (CNonCanonical)
[W] $dNum {0} :: Num a[tau:0] (CNonCanonical)
[W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical)
[W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical)}
final wc = WC {}
ev_binds_var = EvBindsVar<aLC>
current evbinds = {[W] $dFoldable
= GHC.Internal.Data.Foldable.$fFoldableList,
[W] $dNum = GHC.Internal.Num.$fNumInt, [W] $dNum = $dNum,
[W] $dNum = $dNum}newTcEvBinds unique = aLC
solveWanteds236 lines
Level = 0
WC {wc_simple =
[W] $dFoldable {0} :: Foldable t[tau:0] (CNonCanonical)
[W] $dNum {0} :: Num a[tau:0] (CNonCanonical)
[W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical)
[W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical)}
iterations = 1
residual = WC {}simplify_loop iteration=0 (definitely_redo = True, 4 simples to solve)
simplify_loop: wc =6 lines
WC {wc_simple =
[W] $dFoldable {0} :: Foldable t[tau:0] (CNonCanonical)
[W] $dNum {0} :: Num a[tau:0] (CNonCanonical)
[W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical)
[W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical)}solveSimpleWanteds215 lines
Mode: TcSMode{}
Inerts: {Innermost given equalities = 0
Given eqs at this level = False}
Wanteds to solve: {[W] $dFoldable {0}
:: Foldable t[tau:0] (CNonCanonical),
[W] $dNum {0} :: Num a[tau:0] (CNonCanonical),
[W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical),
[W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical)}Emitting fresh work5 lines
{[W] $dFoldable {0} :: Foldable t[tau:0] (CNonCanonical),
[W] $dNum {0} :: Num a[tau:0] (CNonCanonical),
[W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical),
[W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical)}-----------------------------
Start solver pipeline58 lines
tclevel = 0
work item = [W] $dFoldable {0} :: Foldable t[tau:0] (CNonCanonical)
inerts = {Innermost given equalities = 0
Given eqs at this level = False}
rest of worklist = WL {Non-eqs = [W] $dNum {0}
:: Num a[tau:0] (CNonCanonical)
[W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical)
[W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical)}
Stop(Dict/Top (solved wanted)
ev: [W] $dFoldable {0} :: Foldable [])solve44 lines
workitem = [W] $dFoldable {0} :: Foldable t[tau:0] (CNonCanonical)rewriteEvidence [W] $dFoldable {0} :: Foldable t[tau:0]
rewrite40 lines
Foldable t[tau:0]
Following filled tyvar t[tau:0] = []
rewrite } Foldable []
solveDictNC3 lines
Foldable []
[W] $dFoldable {0} :: Foldable []solveDict [W] $dFoldable {0} :: Foldable [] (CDictCan)
tryInertDicts:no3 lines
[W] $dFoldable {0} :: Foldable [] (CDictCan)
Foldable [[]]matchClassInst pred = Foldable []29 lines
No local instance for Foldable []
matchInstEnv6 lines
goal: Foldable [[]]
matches: [(instance Foldable []
-- Defined in ‘GHC.Internal.Data.Foldable’,
[])]
unify: NoUnifiers canonicalmatchClass success3 lines
dict Foldable [] canonical witness GHC.Internal.Data.Foldable.$fFoldableList Foldable []
match_one3 lines
GHC.Internal.Data.Foldable.$fFoldableList []
match_one 24 lines
GHC.Internal.Data.Foldable.$fFoldableList [] []
} matchClassInst global result3 lines
OneInst []
instance Foldable [] -- Defined in ‘GHC.Internal.Data.Foldable’updSolvedDicts: [W] $dFoldable {0} :: Foldable [] (CDictCan)
doTopReact/found instance for [W] $dFoldable {0} :: Foldable []
addTcEvBind6 lines
EvBindsVar: aLC
ev_bind: [W] $dFoldable = GHC.Internal.Data.Foldable.$fFoldableList
bnds: []
bnds': [aKx :-> [W] $dFoldable
= GHC.Internal.Data.Foldable.$fFoldableList]end solve
Step 1[l:0,d:0] Dict/Top (solved wanted):2 lines
[W] $dFoldable {0} :: Foldable []End solver pipeline
-----------------------------
Start solver pipeline57 lines
tclevel = 0
work item = [W] $dNum {0} :: Num a[tau:0] (CNonCanonical)
inerts = {Innermost given equalities = 0
Given eqs at this level = False}
Solved dicts = [W] $dFoldable {0} :: Foldable [] (CDictCan)
rest of worklist = WL {Non-eqs = [W] $dNum {0}
:: Num a[tau:qlinst] (CNonCanonical)
[W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical)}
Stop(Dict/Top (solved wanted)
ev: [W] $dNum {0} :: Num Int)solve44 lines
workitem = [W] $dNum {0} :: Num a[tau:0] (CNonCanonical)rewriteEvidence [W] $dNum {0} :: Num a[tau:0]
rewrite40 lines
Num a[tau:0]
Following filled tyvar a[tau:0] = Int
rewrite } Num Int
solveDictNC3 lines
Num Int
[W] $dNum {0} :: Num IntsolveDict [W] $dNum {0} :: Num Int (CDictCan)
tryInertDicts:no3 lines
[W] $dNum {0} :: Num Int (CDictCan)
Num [Int]matchClassInst pred = Num Int29 lines
No local instance for Num Int
matchInstEnv4 lines
goal: Num [Int] matches: [(instance Num Int -- Defined in ‘GHC.Internal.Num’, [])] unify: NoUnifiers canonical
matchClass success3 lines
dict Num Int canonical witness GHC.Internal.Num.$fNumInt Num Int
match_one3 lines
GHC.Internal.Num.$fNumInt []
match_one 24 lines
GHC.Internal.Num.$fNumInt [] []
} matchClassInst global result3 lines
OneInst []
instance Num Int -- Defined in ‘GHC.Internal.Num’updSolvedDicts: [W] $dNum {0} :: Num Int (CDictCan)
doTopReact/found instance for [W] $dNum {0} :: Num Int
addTcEvBind8 lines
EvBindsVar: aLC
ev_bind: [W] $dNum = GHC.Internal.Num.$fNumInt
bnds: [aKx :-> [W] $dFoldable
= GHC.Internal.Data.Foldable.$fFoldableList]
bnds': [aKx :-> [W] $dFoldable
= GHC.Internal.Data.Foldable.$fFoldableList,
aKz :-> [W] $dNum = GHC.Internal.Num.$fNumInt]end solve
Step 2[l:0,d:0] Dict/Top (solved wanted): [W] $dNum {0} :: Num Int
End solver pipeline
-----------------------------
Start solver pipeline38 lines
tclevel = 0
work item = [W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical)
inerts = {Innermost given equalities = 0
Given eqs at this level = False}
Solved dicts = [W] $dFoldable {0} :: Foldable [] (CDictCan)
[W] $dNum {0} :: Num Int (CDictCan)
rest of worklist = WL {Non-eqs = [W] $dNum {0}
:: Num a[tau:qlinst] (CNonCanonical)}
Stop(Dict/Top (cached)
ev: [W] $dNum {0} :: Num Int)solve25 lines
workitem = [W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical)rewriteEvidence [W] $dNum {0} :: Num a[tau:qlinst]
rewrite21 lines
Num a[tau:qlinst]
Following filled tyvar a[tau:qlinst] = Int
rewrite } Num Int
solveDictNC3 lines
Num Int
[W] $dNum {0} :: Num IntsolveDict [W] $dNum {0} :: Num Int (CDictCan)
tryInertDicts:no3 lines
[W] $dNum {0} :: Num Int (CDictCan)
Num [Int]addTcEvBind10 lines
EvBindsVar: aLC
ev_bind: [W] $dNum = $dNum
bnds: [aKx :-> [W] $dFoldable
= GHC.Internal.Data.Foldable.$fFoldableList,
aKz :-> [W] $dNum = GHC.Internal.Num.$fNumInt]
bnds': [aKx :-> [W] $dFoldable
= GHC.Internal.Data.Foldable.$fFoldableList,
aKz :-> [W] $dNum = GHC.Internal.Num.$fNumInt,
aLy :-> [W] $dNum = $dNum]end solve
Step 3[l:0,d:0] Dict/Top (cached): [W] $dNum {0} :: Num Int
End solver pipeline
-----------------------------
Start solver pipeline38 lines
tclevel = 0
work item = [W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical)
inerts = {Innermost given equalities = 0
Given eqs at this level = False}
Solved dicts = [W] $dFoldable {0} :: Foldable [] (CDictCan)
[W] $dNum {0} :: Num Int (CDictCan)
rest of worklist = WL {}
Stop(Dict/Top (cached)
ev: [W] $dNum {0} :: Num Int)solve26 lines
workitem = [W] $dNum {0} :: Num a[tau:qlinst] (CNonCanonical)rewriteEvidence [W] $dNum {0} :: Num a[tau:qlinst]
rewrite22 lines
Num a[tau:qlinst]
Following filled tyvar a[tau:qlinst] = Int
rewrite } Num Int
solveDictNC3 lines
Num Int
[W] $dNum {0} :: Num IntsolveDict [W] $dNum {0} :: Num Int (CDictCan)
tryInertDicts:no3 lines
[W] $dNum {0} :: Num Int (CDictCan)
Num [Int]addTcEvBind11 lines
EvBindsVar: aLC
ev_bind: [W] $dNum = $dNum
bnds: [aKx :-> [W] $dFoldable
= GHC.Internal.Data.Foldable.$fFoldableList,
aKz :-> [W] $dNum = GHC.Internal.Num.$fNumInt,
aLy :-> [W] $dNum = $dNum]
bnds': [aKx :-> [W] $dFoldable
= GHC.Internal.Data.Foldable.$fFoldableList,
aKz :-> [W] $dNum = GHC.Internal.Num.$fNumInt,
aLy :-> [W] $dNum = $dNum, aKN :-> [W] $dNum = $dNum]end solve
Step 4[l:0,d:0] Dict/Top (cached): [W] $dNum {0} :: Num Int
End solver pipeline
getUnsolvedInerts5 lines
tv eqs = {}
fun eqs = {}
dicts = {}
irreds = {}solveSimpleWanteds end
resetUnificationFlag3 lines
ambient: 0 unif_lvl: Nothing
unif_happened False
solveWanteds
tryDefaulting4 lines
WC {}tryDefaulting } WC {}
Constraint solver steps = 4
End simplifyTop
newTcEvBinds unique = aNt
reportUnsolved (unsafe overlapping)2 lines
reportUnsolved (unsafe overlapping)
mkTypeableBinds []
Tc9
Tc11
Adding diagnostic:3 lines
examples/traces/Fuse.hs:1:1:: [GHC-85401]
The export item ‘module Fuse’ is missing an export listsimplifyTop14 lines
wanted = WC {}
final wc = WC {}
ev_binds_var = EvBindsVar<aNX>
current evbinds = {}newTcEvBinds unique = aNX
solveWanteds4 lines
Level = 0
WC {}solveWanteds
tryDefaulting3 lines
WC {}tryDefaulting } WC {}
End simplifyTop
newTcEvBinds unique = aNY
reportUnsolved (unsafe overlapping)2 lines
reportUnsolved (unsafe overlapping)
What to look for
- Rule firings
- Seven lines, and the story is complete: map rewritten to build form, then fold/build, the fusion rule itself, collapsing producer into consumer.
- Simplifier iterations, first vs last
- The first listing still mentions list machinery; by the last, the loop runs on unboxed values. The iteration count restarting at 1 marks a new pass; a pass reaching iteration=2 needed a second round to converge.
- Simplifier iterations → the final worker
- A recursive function over Int# with no cons cells anywhere in it. That is the "no intermediate list" claim from the simplifier chapter, checkable by reading.