[GHC] #15471: Polymorphism, typed splices and type inference don't mix
GHC
ghc-devs at haskell.org
Thu Sep 6 07:17:09 UTC 2018
#15471: Polymorphism, typed splices and type inference don't mix
-------------------------------------+-------------------------------------
Reporter: mpickering | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.8.1
Component: Template Haskell | Version: 8.4.3
Resolution: | 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: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
But that doesn't scale well
{{{
foo2 :: Num a => a -> a
foo2 x = x+1
test_foo2 :: ???
test_foo2 = [|| foo2 |]]
}}}
If you give it the type `test_foo2 :: forall a. Num a => Q (TExp (a->a))`
then you'll need to decide what dictionary to pass to it when you invoke
it in `$$(test_foo2)`.
Only erasure is allowing MetaOCaml to squeeze by, and we don't have that
luxury.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15471#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list