[GHC] #393: functions without implementations

GHC ghc-devs at haskell.org
Thu Aug 18 08:51:33 UTC 2016


#393: functions without implementations
-------------------------------------+-------------------------------------
        Reporter:  c_maeder          |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  ⊥
       Component:  Compiler (Type    |              Version:  None
  checker)                           |
      Resolution:                    |             Keywords:  newcomer
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 Iceland_jack):

 Unpolished ideas: use `djinn`, [https://mail.haskell.org/pipermail
 /haskell-cafe/2015-April/119385.html Exference] or any other
 [http://www.cis.upenn.edu/~stevez/papers/OZ15.pdf program synthesiser]) to
 supply the function body

 {{{#!hs
 {-# SYNTHESISE id #-}
 id :: forall a. a -> a
 }}}

 would be as if the user had written

 {{{#!hs
 id :: forall a. a -> a
 id x = x
 }}}

 Perhaps this could be implemented using plugin + annotations, I'm not
 familiar with the details:

 {{{#!hs
 {-# ANN f Exference #-}
 f :: Show b => (a -> b) -> [a] -> [String]
 }}}

 producing
 {{{#!hs
 f :: Show b => (a -> b) -> [a] -> [String]
 f b = fmap (\g -> show (b g))
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/393#comment:34>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list