[GHC] #393: functions without implementations

GHC ghc-devs at haskell.org
Sun Jul 3 22:26:36 UTC 2016


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

 Here is a use case: Rank-N types

 {{{#!hs
 f :: (forall a. a -> a) -> (Int, Char) -> (Int, Char)
 f = undefined
 }}}

 does not compile. You'd have to write

 {{{#!hs
 f :: (forall a. a -> a) -> (Int, Char) -> (Int, Char)
 f _ = undefined
 }}}

 It would be cool if omitting the function body worked

 {{{#!hs
 f :: (forall a. a -> a) -> (Int, Char) -> (Int, Char)
 }}}

 ----

 It would also be nice if this worked in local definitions

 {{{#!hs
 g = h 'a' where
   h :: Char -> Int
 }}}

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


More information about the ghc-tickets mailing list