Pregunta

*Main> :t putStrn

<interactive>:1:1:
Not in scope: `putStrn'
Perhaps you meant one of these:  
  `putStr' (imported from Prelude),  
  `putStrLn' (imported from Prelude)

Tenga en cuenta que estoy practicando la programación de Haskell en Emacs con el modo Haskell.

Incluso mientras usa el terminal, estoy recibiendo un error siguiente:

optimight@optimight:~$ ghci  
GHCi, version 7.4.1: http://www.haskell.org/ghc/  :? for help  
Loading package ghc-prim ... linking ... done. 
Loading package integer-gmp ... linking ... done.  
Loading package base ... linking ... done.  
Prelude> :set prompt ghci>  
ghci>:t putStrln   

<interactive>:1:1:  
    Not in scope: `putStrln'  
    Perhaps you meant one of these:  
      `putStrLn' (imported from Prelude),  
      `putStr' (imported from Prelude)

¿Fue útil?

Solución

La acción de E / S que está buscando es putStrLn .Nota Los símbolos CAPITAL L - Haskell están sensibles a mayúsculas y minúsculas, justo antes de la F última hora, como en "Ponga una cadena en una línea propia".

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top