
#15518: -ddump-splices pretty-prints LambdaCase nonsensically -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Template | Version: 8.4.3 Haskell | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{#!hs {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -ddump-splices #-} module Bug where $([d| f :: Bool -> () f = \case True -> () False -> () |]) }}} {{{ $ /opt/ghc/8.4.3/bin/ghci Bug.hs GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/ryanglscott/.ghci [1 of 1] Compiling Bug ( Bug.hs, interpreted ) Bug.hs:(6,3)-(9,6): Splicing declarations [d| f_a1xr :: Bool -> () f_a1xr = \case True -> () False -> () |] ======> f_a48E :: Bool -> () f_a48E = \case \ True -> GHC.Tuple.() \ False -> GHC.Tuple.() Ok, one module loaded. }}} Notice the use of `\ True` and `\ False`. Those patterns should not be preceded with backslashes. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15518 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler