blob: 157f3960c1a109131cb2bbfd07c4f696ea124609 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
[1 of 3] Compiling HasFieldFail01_A ( HasFieldFail01_A.hs, HasFieldFail01_A.o )
[2 of 3] Compiling Main ( hasfieldfail01.hs, hasfieldfail01.o )
hasfieldfail01.hs:9:15: error:
• No instance for ‘HasField "foo" T Int’
arising from a use of ‘getField’
• In the first argument of ‘print’, namely
‘(getField @"foo" (MkT 42) :: Int)’
In the expression: print (getField @"foo" (MkT 42) :: Int)
In an equation for ‘main’:
main = print (getField @"foo" (MkT 42) :: Int)
|