سؤال

*Main> :t putStrn

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

يرجى ملاحظة أنني أمارس برمجة haskell في emacs باستخدام وضع haskell.

حتى أثناء استخدام المحطة، أتلقى الخطأ التالي:

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)
هل كانت مفيدة؟

المحلول

إجراء الإدخال/الإخراج الذي تبحث عنه هو putStrLn.لاحظ الحرف الكبير L — رموز هاسكل حساسة لحالة الأحرف — مباشرة قبل الحرف n الأخير، كما في "وضع سلسلة على a" خط من تلقاء نفسها."

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top