[GHC] #9891: Fixity declarations for pattern synonyms not persisted

#9891: Fixity declarations for pattern synonyms not persisted -------------------------------------+------------------------------------- Reporter: klkblake | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Incorrect Blocked By: | result at runtime Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- It appears fixity declarations for pattern synonyms only affect modules being compiled in the same run as the module the definition is in. For example, take the following files: Foo.hs: {{{#!hs {-# LANGUAGE PatternSynonyms #-} module Foo where data Type = Type Int RawType data RawType = Product Type Type | Num pattern a :*: b <- Type _ (Product a b) infixr 7 :*: }}} Bar.hs: {{{#!hs {-# LANGUAGE PatternSynonyms #-} module Main where import Foo value = Type 0 $ Product (Type 1 Num) $ Type 2 $ Product (Type 3 Num) $ Type 4 Num somethingElse = 23 main = case value of _ :*: _ :*: _ -> putStrLn "Success" _ -> putStrLn "Fail" }}} On the first compile, the executable will print "Success". Modifying Bar and recompiling will result in it printing "Fail". Modifying both and recompiling results in "Success" again. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9891 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9891: Fixity declarations for pattern synonyms not persisted -------------------------------------+------------------------------------- Reporter: klkblake | Owner: cactus Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: Incorrect | Blocked By: result at runtime | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by simonpj): * owner: => cactus -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9891#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9891: Fixity declarations for pattern synonyms not persisted -------------------------------------+------------------------------------- Reporter: klkblake | Owner: cactus Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: pattern synonyms Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: Incorrect | Blocked By: result at runtime | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by cactus): * keywords: => pattern synonyms -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9891#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9891: Fixity declarations for pattern synonyms not persisted -------------------------------------+------------------------------------- Reporter: klkblake | Owner: cactus Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: PatternSynonyms Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: Incorrect | Blocked By: result at runtime | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by cactus): * keywords: pattern synonyms => PatternSynonyms -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9891#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9891: Fixity declarations for pattern synonyms not persisted -------------------------------------+------------------------------------- Reporter: klkblake | Owner: cactus Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: PatternSynonyms Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: Incorrect | Blocked By: result at runtime | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by cactus): I can't reproduce it on either GHC 7.8.3 or `0ac059`: {{{ $ ghc --make Bar.hs [1 of 2] Compiling Foo ( Foo.hs, Foo.o ) [2 of 2] Compiling Main ( Bar.hs, Bar.o ) Linking Bar ... $ ./Bar Success $ touch Bar.hs $ ghc --make Bar.hs [2 of 2] Compiling Main ( Bar.hs, Bar.o ) Linking Bar ... $ ./Bar Success }}} {{{ $ ~/prog/haskell/ghc/ghc-build/inplace/bin/ghc-stage2 --make Bar.hs [1 of 2] Compiling Foo ( Foo.hs, Foo.o ) [2 of 2] Compiling Main ( Bar.hs, Bar.o ) WARNING: file compiler/stgSyn/CoreToStg.hs, line 270 somethingElse True False Linking Bar ... $ ./Bar Success $ touch Bar.hs $ ~/prog/haskell/ghc/ghc-build/inplace/bin/ghc-stage2 --make Bar.hs [2 of 2] Compiling Main ( Bar.hs, Bar.o ) WARNING: file compiler/stgSyn/CoreToStg.hs, line 270 somethingElse True False Linking Bar ... $ ./Bar Success }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9891#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9891: Fixity declarations for pattern synonyms not persisted -------------------------------------+------------------------------------- Reporter: klkblake | Owner: cactus Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: PatternSynonyms Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: Incorrect | Blocked By: result at runtime | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by cactus): * status: new => infoneeded -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9891#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9891: Fixity declarations for pattern synonyms not persisted -------------------------------------+------------------------------------- Reporter: klkblake | Owner: cactus Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: PatternSynonyms Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: Incorrect | Blocked By: result at runtime | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by klkblake): This is odd. I could reliably reproduce the issue using the testcase three days ago, but now I can no longer reproduce it in both the testcase and the actual program that I was working on when I discovered it. I haven't updated any software or anything. I guess it depended on files left behind from previous incomplete builds, so a clean from scratch build solves it? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9891#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9891: Fixity declarations for pattern synonyms not persisted -------------------------------------+------------------------------------- Reporter: klkblake | Owner: cactus Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: worksforme | Keywords: Operating System: Unknown/Multiple | PatternSynonyms Type of failure: Incorrect result | Architecture: at runtime | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by cactus): * status: infoneeded => closed * resolution: => worksforme -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9891#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC