Changes between Initial Version and Version 1 of Ticket #7927


Ignore:
Timestamp:
May 24, 2013 8:04:49 AM (11 months ago)
Author:
simonpj
Comment:

Yes I think it's a dup of some combination of #7920, #7905, #7696, #7513. (There are some more; search Trac for "kindFunResult".)

Works in HEAD:

T7927.hs:7:7:
    Couldn't match type ‛(->) String’ with ‛[Char]’
    Expected type: [Char] -> MaybeT IO ()
      Actual type: t0 ((->) String) (MaybeT IO ())
    The function ‛lift’ is applied to two arguments,
    but its type ‛(String -> MaybeT IO ())
                  -> t0 ((->) String) (MaybeT IO ())’
    has only one
    In the expression: lift putStrLn "foo"
    In an equation for ‛foo’: foo = lift putStrLn "foo"

T7927.hs:7:12:
    Couldn't match type ‛IO ()’ with ‛MaybeT IO ()’
    Expected type: String -> MaybeT IO ()
      Actual type: String -> IO ()
    In the first argument of ‛lift’, namely ‛putStrLn’
    In the expression: lift putStrLn "foo"

Simon

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7927

    • Property Status changed from new to closed
    • Property Difficulty changed from to Unknown
    • Property Resolution changed from to duplicate
  • Ticket #7927 – Description

    initial v1  
     1{{{ 
    12import Control.Monad.Trans.Class (lift) 
    23import Control.Monad.Trans.Maybe (MaybeT) 
     
    45foo :: MaybeT IO () 
    56foo = lift putStrLn "foo" 
    6  
    7 -------- 
     7}}} 
    88 
    99This code caused the following output from GHC: 
    10  
     10{{{ 
    1111Couldn't match kind `* -> *' with `*' 
    1212    Expected type: [Char] -> MaybeT IO () 
     
    1919        kindFunResult 
    2020<<details unavailable>> 
     21}}} 
    2122 
    22 -------- 
    23  
    24 The line should of course be 'lift $ putStrLn "foo"'. Apologies if this is a duplicate bug. 
     23The line should of course be `lift $ putStrLn "foo"`. Apologies if this is a duplicate bug.