
#13942: Pretty-printer butchers function arrow fixity on GHC HEAD -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Incorrect result Unknown/Multiple | at runtime Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This code: {{{#!hs {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -ddump-splices #-} module Bug where $([d| f :: Either Int (Int -> Int) f = undefined |]) }}} Pretty-prints incorrectly on GHC HEAD: {{{ $ /opt/ghc/head/bin/ghci Bug.hs GHCi, version 8.3.20170706: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci [1 of 1] Compiling Bug ( Bug.hs, interpreted ) Bug.hs:(5,3)-(7,6): Splicing declarations [d| f_a1sG :: Either Int (Int -> Int) f_a1sG = undefined |] ======> f_a4bj :: Either Int Int -> Int f_a4bj = undefined }}} But not on GHC 8.2.1-rc3: {{{ $ /opt/ghc/8.2.1/bin/ghci Bug.hs GHCi, version 8.2.0.20170704: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci [1 of 1] Compiling Bug ( Bug.hs, interpreted ) Bug.hs:(5,3)-(7,6): Splicing declarations [d| f_a1su :: Either Int (Int -> Int) f_a1su = undefined |] ======> f_a4aV :: Either Int (Int -> Int) f_a4aV = undefined }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13942 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler