[GHC] #14917: Allow levity polymorhism in binding position
GHC
ghc-devs at haskell.org
Tue Mar 13 21:46:33 UTC 2018
#14917: Allow levity polymorhism in binding position
-------------------------------------+-------------------------------------
Reporter: andrewthad | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.2
Resolution: | Keywords:
| LevityPolymorphism
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
I'm very cautious about this.
Sometimes you can't inline. For example a recursive function. And
{{{
f :: Int -> Int
{-# INLINE f #-}
f x = blah
g xs = map f xs
}}}
I can't inline `f` here; or if I do I'll get a `\x`.
In our paper we prove that, in our system, you never get a situation where
you don't know the runtime reprsentation of a value you have to
manipulate. I don't see how to produce a similar proof with weaker
restrictions.
Runtime code cloining, like .NET, is a good path. But it comes at a
price!
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14917#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list