[Haskell-cafe] Strange type error with -XTypeApplications

Mitchell Rosen mitchellwrosen at gmail.com
Sat Jun 4 20:32:08 UTC 2016

This program:

*    {-# LANGUAGE TypeApplications #-}*
*    main = print (fromDynamic @Int undefined)*

produces this error message:

*    foo.hs:3:15: error:*
*    • Cannot apply expression of type ‘t0’*
*      to a visible type argument ‘Int’*
*    • In the first argument of ‘print’, namely*
*        ‘(fromDynamic @Int undefined)’*
*      In the expression: print (fromDynamic @Int undefined)*
*      In an equation for ‘main’:*
*          main = print (fromDynamic @Int undefined)*

However, I'd expect it to be "Not in scope: fromDynamic"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160604/41c93a4e/attachment.html>

More information about the Haskell-Cafe mailing list