[GHC] #11700: pattern match bug
GHC
ghc-devs at haskell.org
Fri Mar 11 22:24:02 UTC 2016
#11700: pattern match bug
-------------------------------------+-------------------------------------
Reporter: TobyGoodwin | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.3
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
https://github.com/TobyGoodwin |
/odd-ghc-pattern-bug |
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
With some types built by persistent-template, I'm running into very odd
behaviour. Attempting to pull apart a tuple in one go...
{{{#!hs
let (Entity museKey muse, Entity msgKey msg, Entity fldrKey fldr) =
cluster
}}}
fails (or rather, attempting to use msg or fldr fails) with errors like
{{{
Couldn't match expected type ‘Folder’ with actual type ‘Folder’
}}}
But splitting the pattern up:
{{{#!hs
let (a, b, c) = cluster
Entity museKey muse = a
Entity msgKey msg = b
Entity fldrKey fldr = c
}}}
everything works normally
Complete test case here: https://github.com/TobyGoodwin/odd-ghc-pattern-
bug
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11700>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list