
#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): Replying to [comment:1 goldfire]:
-1 from me, sorry.
I understand your -1. I will write examples that come to mind without pushing my point. I feel this has pedagogic value: {{{#!hs instance Eq a => Eq [a] where (==) :: [a] -> [a] -> Bool [] == [] = True (x:xs) == (y:ys) = x == y && xs == ys _ == _ = False }}} in the second equation `==` is called at two different types, wouldn't this be a beautiful way of showing that? {{{#!hs instance Eq a => Eq [a] where ... (x:xs) == (y:ys) = x == @a y && xs == @[a] ys }}} I'm no fan of the `foldMap` example. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12363#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler