Skip to content

Cannot instantiate literals using TypeApplications

Relevant reddit post.


GHCi, version 8.0.1.20160110: http://www.haskell.org/ghc/  :? for help
Prelude> :set -XTypeApplications -fprint-explicit-foralls 
Prelude> :t 42
42 :: forall {a}. Num a => a
Prelude> 42 @Int

<interactive>:3:1: error:
    • Cannot not apply expression of type ‘a0’
      to a visible type argument ‘Int’
    • In the expression: 42 @Int
      In an equation for ‘it’: it = 42 @Int

(Also, "cannot not" looks like a typo.)

Edited by Icelandjack
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information