remove debug prints

This commit is contained in:
Folkert 2020-11-06 21:51:32 +01:00
parent 7e6724262d
commit 7faab5d857
3 changed files with 2 additions and 15 deletions

View file

@ -2671,7 +2671,6 @@ fn fabricate_effects_module<'a>(
// } // }
let constraint = constrain_module(&module_output, module_id, mode, &mut var_store); let constraint = constrain_module(&module_output, module_id, mode, &mut var_store);
dbg!(&module_output.aliases);
let module = Module { let module = Module {
module_id, module_id,
@ -3037,8 +3036,6 @@ fn add_def_to_module<'a>(
// this is a top-level definition, it should not capture anything // this is a top-level definition, it should not capture anything
debug_assert!(captured_symbols.is_empty()); debug_assert!(captured_symbols.is_empty());
dbg!(symbol, &loc_body.value);
// If this is an exposed symbol, we need to // If this is an exposed symbol, we need to
// register it as such. Otherwise, since it // register it as such. Otherwise, since it
// never gets called by Roc code, it will never // never gets called by Roc code, it will never

View file

@ -419,7 +419,6 @@ impl<'a> Procs<'a> {
match patterns_to_when(env, layout_cache, loc_args, ret_var, loc_body) { match patterns_to_when(env, layout_cache, loc_args, ret_var, loc_body) {
Ok((_, pattern_symbols, body)) => { Ok((_, pattern_symbols, body)) => {
dbg!(symbol, &pattern_symbols, &body);
// an anonymous closure. These will always be specialized already // an anonymous closure. These will always be specialized already
// by the surrounding context, so we can add pending specializations // by the surrounding context, so we can add pending specializations
// for them immediately. // for them immediately.
@ -588,7 +587,6 @@ impl<'a> Procs<'a> {
self.specialized self.specialized
.insert((symbol, layout.clone()), InProgress); .insert((symbol, layout.clone()), InProgress);
dbg!(symbol, &pending);
match specialize(env, self, symbol, layout_cache, pending, partial_proc) { match specialize(env, self, symbol, layout_cache, pending, partial_proc) {
Ok((proc, _ignore_layout)) => { Ok((proc, _ignore_layout)) => {
// the `layout` is a function pointer, while `_ignore_layout` can be a // the `layout` is a function pointer, while `_ignore_layout` can be a
@ -615,7 +613,6 @@ fn add_pending<'a>(
layout: Layout<'a>, layout: Layout<'a>,
pending: PendingSpecialization, pending: PendingSpecialization,
) { ) {
// dbg!(symbol, &layout, &pending);
let all_pending = pending_specializations let all_pending = pending_specializations
.entry(symbol) .entry(symbol)
.or_insert_with(|| HashMap::with_capacity_and_hasher(1, default_hasher())); .or_insert_with(|| HashMap::with_capacity_and_hasher(1, default_hasher()));
@ -1339,7 +1336,6 @@ pub fn specialize_all<'a>(
mut procs: Procs<'a>, mut procs: Procs<'a>,
layout_cache: &mut LayoutCache<'a>, layout_cache: &mut LayoutCache<'a>,
) -> Procs<'a> { ) -> Procs<'a> {
dbg!(&procs.externals_others_need);
let it = procs.externals_others_need.specs.clone(); let it = procs.externals_others_need.specs.clone();
let it = it let it = it
.into_iter() .into_iter()
@ -1408,7 +1404,6 @@ pub fn specialize_all<'a>(
procs procs
.specialized .specialized
.insert((name, outside_layout.clone()), InProgress); .insert((name, outside_layout.clone()), InProgress);
dbg!(name);
match specialize( match specialize(
env, env,
&mut procs, &mut procs,
@ -1456,8 +1451,6 @@ fn specialize_external<'a>(
host_exposed_variables: &[(Symbol, Variable)], host_exposed_variables: &[(Symbol, Variable)],
partial_proc: PartialProc<'a>, partial_proc: PartialProc<'a>,
) -> Result<Proc<'a>, LayoutProblem> { ) -> Result<Proc<'a>, LayoutProblem> {
println!("------- SPECIALIZE EXTERNAL {:?}", proc_name);
let PartialProc { let PartialProc {
annotation, annotation,
pattern_symbols, pattern_symbols,
@ -1466,8 +1459,6 @@ fn specialize_external<'a>(
is_self_recursive, is_self_recursive,
} = partial_proc; } = partial_proc;
dbg!(&body);
// unify the called function with the specialized signature, then specialize the function body // unify the called function with the specialized signature, then specialize the function body
let snapshot = env.subs.snapshot(); let snapshot = env.subs.snapshot();
let cache_snapshot = layout_cache.snapshot(); let cache_snapshot = layout_cache.snapshot();
@ -1561,8 +1552,6 @@ fn specialize_external<'a>(
None => None, None => None,
}; };
println!("Done for {:?}\n\n", proc_name);
let proc = Proc { let proc = Proc {
name: proc_name, name: proc_name,
args: proc_args, args: proc_args,

View file

@ -4,6 +4,7 @@ app Main provides [ main ] imports [ Effect ]
main : Effect.Effect {} as Fx main : Effect.Effect {} as Fx
main = main =
e = Effect.putChar 68 d = Effect.putChar 68
e = Effect.putChar 69
e |> Effect.after \{} -> e e |> Effect.after \{} -> e