haskell - 没有导入名为 ‘T’ 的模块——但我刚刚导入了它

标签 haskell import

这看起来尽可能简单:

import Data.Text as T

let x = "test"
T.putStrLn x

但我得到:

<interactive>:1:1: error:
    Not in scope: ‘T.putStrLn’
    No module named ‘T’ is imported.

为什么T没有导入?为什么 Data.Text 没有导入为 T?

最佳答案

Data.Text 未提供

putStrLn ,但是Data.Text.IO .
错误消息实际上很困惑。
我会检查是否报告了该问题。

关于haskell - 没有导入名为 ‘T’ 的模块——但我刚刚导入了它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55842205/

相关文章:

haskell - 选择哪种 FRP 包?

python - PyCharm - 作者在导入之前出现了吗?

haskell - 禁用 SqlError 报告生产应用程序的 500 错误

haskell - 使用 RecordDotSyntax 更新记录会导致错误

haskell - 同态中的森林砍伐

haskell - Hasql的session和IO

c# - 从 C# 导入 C++ 类方法

python 循环导入并检查变量

python - 为什么python 3.5找不到文件中导入的模块

python - 我在使用 Uber Python API 时遇到问题