Advertisement
Guest User

GHC Compilation problems

a guest
Apr 9th, 2014
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 2.51 KB | None | 0 0
  1. madrid.hs:5:3:
  2.     Couldn't match type `m0 b0' with `Int'
  3.    Expected type: m0 a0 -> m0 b0 -> Int
  4.      Actual type: m0 a0 -> m0 b0 -> m0 b0
  5.    In a stmt of a 'do' block: (count > 0) && hPutStr stdout string
  6.    In the expression:
  7.      do { (count > 0) && hPutStr stdout string;
  8.           (count > 0) && displayD string (count - 1) }
  9.    In an equation for `displayD':
  10.         displayD string count
  11.           = do { (count > 0) && hPutStr stdout string;
  12.                  (count > 0) && displayD string (count - 1) }
  13.  
  14. madrid.hs:5:18:
  15.     Couldn't match expected type `Bool' with actual type `IO ()'
  16.    In the return type of a call of `hPutStr'
  17.     In the second argument of `(&&)', namely `hPutStr stdout string'
  18.     In a stmt of a 'do' block: (count > 0) && hPutStr stdout string
  19.  
  20. madrid.hs:5:33:
  21.     Couldn't match type `IO ()' with `[Char]'
  22.    Expected type: String
  23.      Actual type: IO ()
  24.    In the second argument of `hPutStr', namely `string'
  25.    In the second argument of `(&&)', namely `hPutStr stdout string'
  26.    In a stmt of a 'do' block: (count > 0) && hPutStr stdout string
  27.  
  28. madrid.hs:6:3:
  29.    Couldn't match expected type `m0 b0' with actual type `Bool'
  30.     In a stmt of a 'do' block:
  31.       (count > 0) && displayD string (count - 1)
  32.     In the expression:
  33.       do { (count > 0) && hPutStr stdout string;
  34.            (count > 0) && displayD string (count - 1) }
  35.     In an equation for `displayD':
  36.        displayD string count
  37.          = do { (count > 0) && hPutStr stdout string;
  38.                 (count > 0) && displayD string (count - 1) }
  39.  
  40. madrid.hs:6:18:
  41.    Couldn't match expected type `Bool' with actual type `Int'
  42.     In the return type of a call of `displayD'
  43.    In the second argument of `(&&)', namely
  44.       `displayD string (count - 1)'
  45.    In a stmt of a 'do' block:
  46.      (count > 0) && displayD string (count - 1)
  47.  
  48. madrid.hs:11:3:
  49.    Couldn't match expected type `IO a1' with actual type `Int'
  50.     In the return type of a call of `displayD'
  51.    In a stmt of a 'do' block: displayD "hello" 5
  52.    In the expression:
  53.      do { hSetBuffering stdout LineBuffering;
  54.           displayD "hello" 5;
  55.           hClose stdout }
  56.  
  57. madrid.hs:11:12:
  58.    Couldn't match expected type `IO ()' with actual type `[Char]'
  59.     In the first argument of `displayD', namely `"hello"'
  60.     In a stmt of a 'do' block: displayD "hello" 5
  61.     In the expression:
  62.       do { hSetBuffering stdout LineBuffering;
  63.            displayD "hello" 5;
  64.            hClose stdout }
  65. make: *** [madrid.o] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement