新的GHC功能 - 我想象它吗? [英] New GHC feature - did I imagine it?

查看:165
本文介绍了新的GHC功能 - 我想象它吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发誓我在最近一套GHC发行说明中看到了一个新功能 - 但现在我找不到它的参考。我妄想,还是这个功能实际存在?

I swear I saw a new feature in a recent set of GHC release notes - but now I can find no reference to it. Am I delusional, or does this feature actually exist?

这是关于加载不完整的模块。尽我所能记得,它允许您关闭由于未定义的变量而导致的编译错误。 (自然地,在运行时,如果你试图实际使用未定义的变量作为任何事情,这会引发异常。)听起来很熟悉吗?或者我的想法是这样做的?

It was to do with loading incomplete modules. As best as I can remember, it allows you to turn off compilation errors due to undefined variables. (Naturally, at run-time this causes an exception to be thrown if you try to actually use the undefined variables for anything.) Does that sound familiar? Or is my mind making this up?

推荐答案

您正在寻找一个编译时选项, a href =http://hackage.haskell.org/trac/ghc/wiki/DeferErrorsToRuntime =noreferrer>将错误推迟到运行时间。也就是说,用 -fdefer-type-errors 进行编译。

You are looking for a compile time option, vs a language extension, of "defer errors to runtime". That is, compile with -fdefer-type-errors.

这篇关于新的GHC功能 - 我想象它吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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