Commit d6b91ea6 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

Add test for T11122

Test Plan: validate

Reviewers: austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1655

GHC Trac Issues: #11122
parent 987426c0
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE PartialTypeSignatures #-}
module T11122 where
data Parser a
instance Functor Parser where
fmap = undefined
many p = undefined
digit = undefined
parseTest = undefined
--------------------------------------------
parser :: Parser _
--parser :: Parser Int
parser = read <$> many digit
data Wrapper = Wrapper Int deriving Show
wrapperParser = Wrapper <$> parser
main :: IO ()
main = parseTest wrapperParser "0"
T11122.hs:19:18: warning:
• Found type wildcard ‘_’ standing for ‘Int’
• In the type signature:
parser :: Parser _
• Relevant bindings include
parser :: Parser Int (bound at T11122.hs:21:1)
......@@ -60,4 +60,4 @@ test('WildcardInTypeSynonymRHS', normal, compile_fail, [''])
test('T10615', normal, compile_fail, [''])
test('T10045', normal, compile_fail, [''])
test('T10999', normal, compile_fail, [''])
test('T11122', normal, compile, [''])
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment