我是haskell的初学者。我有一个.txt
格式如下的文件:
Company A, 100, 1000
我需要将每一行导入到一种类型的列表中:
type GerCred = [(String, Int, Int)]
我怎么做?
更新
这是我到目前为止所尝试的:
type GerCred = [(String,Int,Int)]
type GerCarb = [(String,Int)]
readGerCredList :: File -> IO GerCred
readGerCredList fname = do contents <- readFile fname return(read contents)