当我dhall repl
在 Powershell 中工作时,我遇到了很多奇怪的输出/编码问题。我正在使用来自https://github.com/dhall-lang/dhall-haskell/releases的 Windows 预编译二进制文件。
一个例子:
Welcome to the Dhall v1.40.1 REPL! Type :help for more information.
|- let makeSnippet = ./makeSnippet.dhall in makeSnippet "" []
Ôå│ ./makeSnippet.dhall
Ôå│ ./Snippet.dhall
Error: Invalid type for ÔØ░ListÔØ▒
2Ôöé [Text]
C:\xxx\Snippet.dhall:2:10
1Ôöé ./Snippet.dhall
C:\xxx\makeSnippet.dhall:1:15
|- let makeSnippet = ./makeSnippet.dhall in makeSnippet "test" [ "test" ]
Ôå│ ./makeSnippet.dhall
Ôå│ ./Snippet.dhall
我也有这个dhall repl
问题dhall repl --ascii
。在其中运行 Repl 时,Git Bash
它可以工作:
(input):2:1:
|
2 | <empty line>
| ^
unexpected end of input
expecting #!, expression, or whitespace
⊢ :let greeting = "hello"
greeting : Text
⊢ ./makeSnippet.dhall
↳ ./makeSnippet.dhall
↳ ./Snippet.dhall
Error: Invalid type for ❰List❱
看到--ascii
调用 repl 时的错误诊断似乎也使用 unicode 字符,我真的很惊讶——这是故意的吗?
到目前为止我尝试了什么(没有成功):
- 将字体更改为 Lucidca
- 将字体更改为
DejaVu Sans Mono
- 通过更改代码页
chcp 65001
我真的很想将 dhall 与 powershell 一起使用。因此,非常欢迎任何如何解决这个问题的想法!
提前谢谢了!
朱利安