summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T13292.stderr
blob: a3a7ba3baef2f7fcd7a927326b9483037eca042c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

T13292a.hs:4:12: warning: [-Wdeferred-type-errors (in -Wdefault)]
    • Ambiguous type variable ‘m0’ arising from a use of ‘return’
      prevents the constraint ‘(Monad m0)’ from being solved.
      Relevant bindings include
        someFunc :: m0 () (bound at T13292a.hs:4:1)
      Probable fix: use a type annotation to specify what ‘m0’ should be.
      These potential instances exist:
        instance Monad IO -- Defined in ‘GHC.Base’
        instance Monad Maybe -- Defined in ‘GHC.Base’
        instance Monoid a => Monad ((,) a) -- Defined in ‘GHC.Base’
        ...plus four others
        ...plus two instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    • In the expression: return ()
      In an equation for ‘someFunc’: someFunc = return ()

T13292.hs:6:1: warning: [-Wdeferred-type-errors (in -Wdefault)]
    • Couldn't match type ‘GHC.Types.Any’ with ‘IO’
      Expected: IO ()
        Actual: GHC.Types.Any ()
    • When checking the type of the IO action ‘main’

T13292.hs:6:1: warning: [-Wdeferred-type-errors (in -Wdefault)]
    • Couldn't match type ‘GHC.Types.Any’ with ‘IO’
      Expected: IO ()
        Actual: GHC.Types.Any ()
    • In the expression: main
      When checking the type of the IO action ‘main’