您如何调试类型级别的代码? [英] How do you debug typelevel code?

查看:90
本文介绍了您如何调试类型级别的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大多数时候,您得到的只是一个隐式的未找到错误.您不知道它在隐式构造链中的什么地方失败了.显然,您不能使用运行时调试或打印语句.那么,除了真正盯着您的代码之外,您如何调试类型级别的程序?

Most of the time, all you get is an implicit not found error. You don't know where in the chain of implicit construction it failed. Apparently you can't use runtime debug or print statement. So how do you debug type-level program other than staring at your code really hard?

推荐答案

我希望我能得到一个更好的答案,但是要解决这个问题:开始显式传递参数,一次传递一次,直到给您一个更有用的错误为止. (添加-prinlns-等效于隐式参数)

I wish I had a better answer, but here it goes: Start passing the parameters explicitly, one at a time until it gives you a more useful error. (adding-prinlns-equivalent for implicits params)

这篇关于您如何调试类型级别的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆