Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Import Idris:从标准库隐藏数据类型,或不导入标准库_Import_Idris_Information Hiding - Fatal编程技术网

Import Idris:从标准库隐藏数据类型,或不导入标准库

Import Idris:从标准库隐藏数据类型,或不导入标准库,import,idris,information-hiding,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

我知道有一种方法可以通过%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

idris--noprelude
阻止导入标准库。谢谢,这就是我要找的。