에서 입력을 사용내가 코드를 Haskeline의 getInputLine
내가 오류 얻을 그러나 과정은 타입 정의process :: [String] -> IO()
있다
main :: IO()
main = runInputT defaultSettings loop
where
--loop :: InputT IO()
loop = do
minput <- getInputLine "$ "
case minput of
Nothing -> return()
Just input -> process $ words input
loop
: 나는 궁금했다
• Couldn't match type ‘IO’ with ‘InputT m’
Expected type: InputT m()
Actual type: IO()
• In the expression: process $ words input
In a case alternative: Just input -> process $ words input
In a stmt of a 'do' block:
case minput of {
Nothing -> return()
Just input -> process $ words input }
을 아무도 내가 뭘 잘못하고 있는지 설명 할 수는 없어. 다른 것들을하기 위해 getInputLine의 원시 입력을 원한다.
감사
'liftIO (프로세스 $ 단어 입력)'을 사용해보십시오. – melpomene
그 트릭을 할 것으로 보인다. 감사합니다. 정확히 무엇을 설명 하시겠습니까? – Wolfe