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

时间:2017-05-12 11:52:51

标签: import idris information-hiding

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

1 个答案:

答案 0 :(得分:3)

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

$ 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
相关问题