Good for JHC! Indeed; see http://hackage.haskell.org/trac/ghc/ticket/5059
There are two big questions: * When to specialise (a supercompiler specialises on everything) * How to make sure that the arguments are not inlined too early (see the ticket) Simon | -----Original Message----- | From: glasgow-haskell-users-boun...@haskell.org [mailto:glasgow-haskell- | users-boun...@haskell.org] On Behalf Of John Meacham | Sent: 22 March 2012 23:16 | To: Johan Tibell | Cc: glasgow-haskell-users | Subject: Re: Stealing ideas from the latest GCC release | | I support a form of this in jhc by allowing specialization of values, not | just types. | It is actually the same mechanism as type specialization since that is just | value specialization where the value being specialized on is the type | parameter. | | foo :: Bool -> Int | | {-# SPECIALIZE foo True :: Int #-} | (I think this is the current syntax, I changed it a couple times in jhc's | history) | | will create a | | foo_True :: Int | foo_True = inline foo True | | and a | | {-# RULE foo True = foo_True #-} | | John | | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users