[GHC] #11409: Cannot instantiate literals using TypeApplications
GHC
ghc-devs at haskell.org
Mon Jan 11 23:38:54 UTC 2016
#11409: Cannot instantiate literals using TypeApplications
-------------------------------------+-------------------------------------
Reporter: Feuerbach | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1-rc1
Resolution: | Keywords:
| TypeApplications
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by simonpj):
* owner: => goldfire
* keywords: => TypeApplications
Comment:
It'd also be possible to define
{{{
integerLit :: Integer -> forall a. Num a => a
integerLit n = fromInteger n
}}}
arrange that `3` elaborates to `integerLit 3` :: forall a. Num a => a`,
and now that will work as expected.
This is so simple to do that it might be worth doing, just to avoid
documenting the infelicity. After all, Haskell advertises that `3 ::
forall a. Num a => a`, so it's annoying if it doesn't behave like that.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11409#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list