Files
tldr/pages.zh/common/ghci.md

24 lines
634 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ghci
> 格拉斯哥哈斯克尔编译器的交互环境。
> 更多信息:<https://downloads.haskell.org/ghc/latest/docs/html/users_guide/ghci.html>。
- 启动一个 REPL交互式 shell
`ghci`
- 启动一个 REPL 并加载指定的 Haskell 源文件:
`ghci {{source_file.hs}}`
- 启动一个 REPL 并启用语言选项:
`ghci -X{{language_option}}`
- 启动一个 REPL 并启用某种级别的编译器警告(例如 `all``compact`
`ghci -W{{warning_level}}`
- 启动一个 REPL并使用冒号分隔的目录列表来查找源文件
`ghci -i{{path/to/directory1:path/to/directory2:...}}`