Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No module named ‘T’ is imported---but I just imported it

Tags:

import

haskell

This seems as simple as possible:

import Data.Text as T

let x = "test"
T.putStrLn x

But I get:

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

Why is T not imported? Why is Data.Text not imported as T?

like image 276
Mittenchops Avatar asked Apr 25 '19 05:04

Mittenchops


1 Answers

putStrLn is not provided by Data.Text, but Data.Text.IO.
The error message is actually confusing.
I'll check if the problem is reported.

like image 169
YAMAMOTO Yuji Avatar answered Dec 08 '22 03:12

YAMAMOTO Yuji