Skip to content

deriving Show for infix constructors forgets backquotes

When compiling and running the following module:

module Main where

data Foo = Int `Bar` Int
 deriving ( Show )

main = print (3 `Bar` 4)

The expected output is:

3 `Bar` 4

Or even just;

Bar 3 4

Instead, I get:

3 Bar 4
Edited by Simon Marlow
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information