[GHC] #393: functions without implementations

GHC ghc-devs at haskell.org
Tue Jul 12 01:13:37 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):

 Useful when inferring types in GHCi. (ticket:2256#comment:25) I want to be
 able to write

 {{{
 >>> data A; data B a; data D a; data S a; data Z

 >>> k1 :: (A -> B x) -> D (S x)
 >>> k2 :: A -> D x -> B (S x)
 >>> k3 :: D Z
 }}}

 {{{
 >>> :t k1 (\a1 -> k2 a1 (k1 (\a2 -> k2 a1 k3)))
 k1 (\a1 -> k2 a1 (k1 (\a2 -> k2 a1 k3))) :: D (S (S (S (S Z))))

 >>> :t k1 (\a1 -> k2 a1 (k1 (\a2 -> k2 a2 k3)))
 k1 (\a1 -> k2 a1 (k1 (\a2 -> k2 a2 k3))) :: D (S (S (S (S Z))))
 }}}

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


More information about the ghc-tickets mailing list