[GHC] #12363: Type application for infix

GHC ghc-devs at haskell.org
Fri Aug 26 10:49:23 UTC 2016


#12363: Type application for infix
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  lowest            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
  (Parser)                           |             Keywords:
      Resolution:                    |  TypeApplications
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):

 An extended version of the `Eq` example,

 {{{#!hs
 class Eq a where
   type Logic a
   (==) :: a -> a -> Logic a

 instance Eq b => Eq (a -> b) where
   type Logic (a -> b) = a -> Logic b

   (==) :: (a -> b) -> (a -> b) -> (a -> Logic b)
   (f == @(a->b) g) x = f x == @b g x
 }}}

 Yuck ugly

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


More information about the ghc-tickets mailing list