import - Idris:隐藏标准库中的数据类型,或不导入标准库

标签 import idris information-hiding

我知道有一种方法可以使用 %hide 隐藏导入库中的函数。但它似乎不适用于数据类型名称,例如 Nat 和 Vect。有没有办法隐藏数据类型名称,或者只是不导入标准库?

最佳答案

有几个相关的命令行选项:

$ man idris
...
   --nobasepkgs             Do not use the given base package
   --noprelude              Do not use the given prelude
   --nobuiltins             Do not use the builtin functions
...

例如:

$ idris
Idris> :t Nat
Nat : Type

$ idris --noprelude
Idris> :t Nat
No such variable Nat

关于import - Idris:隐藏标准库中的数据类型,或不导入标准库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43937149/

相关文章:

javascript - 如何在另一个JavaScript文件中包含一个JavaScript文件?

haskell - 如果在 'safe language' 中实现了经过验证的 SSL/TLS,它是否仍然容易受到心脏出血攻击?

idris - 编译器能否在 Idris 中隐式地找到证明?

jquery - 在 FullCalendar + Google 日历中隐藏没有描述的事件

javascript - 如何在不使用 'require' 或 'import' 的情况下导入 NPM 模块?

javascript - Cypress 可以运行从 Cypress 文件夹外部导入的测试文件吗?

import - Rollup 在捆绑时将绝对路径的导入更改为相对路径

parsing - 在 Idris 中使用类型谓词生成运行时证明

css - 搜索引擎如何对待:target?显示的内容

java - 信息隐藏。什么时候是安全,什么时候是软件加权?