#12595: Linker failure: multiple definition of -------------------------------------+------------------------------------- Reporter: MikolajKonarski | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: GHC rejects | (amd64) valid program | Test Case: Blocked By: | Blocking: Related Tickets: #10531 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"2fbfbca2d12a8e9a09627529cf4f8284b19023ff/ghc" 2fbfbca2/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="2fbfbca2d12a8e9a09627529cf4f8284b19023ff" Fix desugaring of pattern bindings (again) This patch fixes Trac #12595. The problem was with a pattern binding like !x = e For a start it's silly to match that pattern and build a unit tuple (the General Case of mkSelectorBinds); but that's what was happening because the bang fell through to the general case. But for a variable pattern building any auxiliary bindings is stupid. So the patch introduces a new case in mkSelectorBinds for variable patterns. Then it turned out that if 'e' was a plain variable, and moreover was imported GlobalId, then matchSinglePat made it a /bound/ variable, which should never happen. That ultimately caused a linker error, but the original bug was much earlier. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12595#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler