
#13060: Visible type application doesn't work for functions with inferred types -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 (Type checker) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: GHC rejects Unknown/Multiple | valid program Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{ GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/feuerbach/.ghci Prelude> :set -XTypeApplications -fprint-explicit-kinds -fprint-explicit- foralls Prelude> :t id id :: forall {a}. a -> a Prelude> :t id @Int id @Int :: Int -> Int Prelude> let foo :: a -> a; foo = id Prelude> :t foo foo :: forall {a}. a -> a Prelude> :t foo @Int foo @Int :: Int -> Int Prelude> let bar = id Prelude> :t bar bar :: forall {a}. a -> a Prelude> :t bar @Int <interactive>:1:1: error: • Cannot apply expression of type ‘a0 -> a0’ to a visible type argument ‘Int’ • In the expression: bar @Int }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13060 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler