[GHC] #14438: Using a (meaningless) generic currency sign (¤) instead of $ causes panicing

#14438: Using a (meaningless) generic currency sign (¤) instead of $ causes panicing --------------------------------------+--------------------------------- Reporter: Izmaki | Owner: (none) Type: bug | Status: new Priority: low | Milestone: Component: GHCi | Version: 8.0.2 Keywords: ¤ | Operating System: Linux Architecture: x86_64 (amd64) | Type of failure: None/Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: --------------------------------------+--------------------------------- The following two lines of HS produces the reported error. It was actually a mistype and probably not that serious, but I was told to report it. The issue is combining the "generic currency" symbol ¤ with the Integral constraint (using e.g. Integer instead as the constraint does not produce the same error). {{{#!hs Prelude> let ones x = snd $ divMod x 10 Prelude> ones ¤ (5 :: Integral) ghc: panic! (the 'impossible' happened) (GHC version 8.0.2 for x86_64-unknown-linux): initTc: unsolved constraints WC {wc_insol = [W] ¤_a2l9 :: t_a2l8[tau:1] (CHoleCan: ¤) [W] ¤_a2lJ :: t_a2lI[tau:1] (CHoleCan: ¤)} Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14438 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14438: Using a (meaningless) generic currency sign (¤) instead of $ causes panicing ---------------------------------+-------------------------------------- Reporter: Izmaki | Owner: (none) Type: bug | Status: closed Priority: low | Milestone: Component: GHCi | Version: 8.0.2 Resolution: duplicate | Keywords: ¤ Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13106 | Differential Rev(s): Wiki Page: | ---------------------------------+-------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => duplicate * related: => #13106 Comment: Thanks for the bug report. This is a duplicate of #13106, and has been fixed in GHC 8.2: {{{ GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci λ> let ones x = snd $ divMod x 10 λ> ones ¤ (5 :: Integral) <interactive>:2:6: error: Variable not in scope: (¤) :: (b0 -> b0) -> t0 -> t1 <interactive>:2:14: error: • Expecting one more argument to ‘Integral’ Expected a type, but ‘Integral’ has kind ‘* -> Constraint’ • In an expression type signature: Integral In the second argument of ‘(¤)’, namely ‘(5 :: Integral)’ In the expression: (¤) ones (5 :: Integral) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14438#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14438: Using a (meaningless) generic currency sign (¤) instead of $ causes panicing ---------------------------------+-------------------------------------- Reporter: Izmaki | Owner: (none) Type: bug | Status: closed Priority: low | Milestone: Component: GHCi | Version: 8.0.2 Resolution: duplicate | Keywords: ¤ Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13106 | Differential Rev(s): Wiki Page: | ---------------------------------+-------------------------------------- Comment (by Izmaki): Ah, apologies for the duplicate. I wasn't able to find something similar when searching. Have a great evening, and thank you for making Haskell better :-) Replying to [comment:1 RyanGlScott]:
Thanks for the bug report. This is a duplicate of #13106, and has been fixed in GHC 8.2:
{{{ GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci λ> let ones x = snd $ divMod x 10 λ> ones ¤ (5 :: Integral)
<interactive>:2:6: error: Variable not in scope: (¤) :: (b0 -> b0) -> t0 -> t1
<interactive>:2:14: error: • Expecting one more argument to ‘Integral’ Expected a type, but ‘Integral’ has kind ‘* -> Constraint’ • In an expression type signature: Integral In the second argument of ‘(¤)’, namely ‘(5 :: Integral)’ In the expression: (¤) ones (5 :: Integral) }}}
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14438#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC