首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >有没有办法让GHC提供类型孔的类型类约束?

有没有办法让GHC提供类型孔的类型类约束?
EN

Stack Overflow用户
提问于 2014-04-12 16:35:38
回答 3查看 2K关注 0票数 103

当前行为

Prelude> show _

<interactive>:7:6:
    Found hole ‘_’ with type: a0
    Where: ‘a0’ is an ambiguous type variable
    Relevant bindings include it :: String (bound at <interactive>:7:1)
    In the first argument of ‘show’, namely ‘_’
    In the expression: show _
    In an equation for ‘it’: it = show _

期望的行为

如果GHC还能告诉我类型化的洞有Show类型的类约束,那就太好了。

其他

GHC版本7.8.1

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23028124

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档