Skip to content

Commit

Permalink
Test Trac #7851
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Peyton Jones committed Apr 29, 2013
1 parent ae8959f commit aee9b17
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/typecheck/should_fail/T7851.hs
@@ -0,0 +1,6 @@
module T7851 where

import Control.Monad.Trans.State

bar = do print
print "Hello"
8 changes: 8 additions & 0 deletions tests/typecheck/should_fail/T7851.stderr
@@ -0,0 +1,8 @@

T7851.hs:5:10:
Couldn't match expected type ‛IO a0’ with actual type ‛a1 -> IO ()’
Probable cause: ‛print’ is applied to too few arguments
In a stmt of a 'do' block: print
In the expression:
do { print;
print "Hello" }
1 change: 1 addition & 0 deletions tests/typecheck/should_fail/all.T
Expand Up @@ -305,3 +305,4 @@ test('TcNoNullaryTC', when(compiler_lt('ghc', '7.7'), skip), compile_fail, [''])
test('TcNullaryTCFail', when(compiler_lt('ghc', '7.7'), skip), compile_fail, [''])
test('T7857', normal, compile_fail, [''])
test('T7778', normal, compile_fail, [''])
test('T7851', normal, compile_fail, [''])

0 comments on commit aee9b17

Please sign in to comment.