考虑 (inshell "echo A line of text."empty)
具有类型 Shell Line
。
问题:如何将这种类型的值转换为文本
?
最佳答案
strict
函数来救援:
strict::MonadIO io => Shell Line -> io Text
所以,你可以
strict $ inshell“回显一行文本。”空
并在 IO Text monad 中获取 shell 命令的输出。
关于haskell - 如何在 Haskell Turtle 库中将 `Shell Line` 转换为 `Text`?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44020154/