[GHC] #12704: Check if constraint synonym satisfies functional dependencies

#12704: Check if constraint synonym satisfies functional dependencies -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 8.1 (Type checker) | 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: -------------------------------------+------------------------------------- When we resolve #12679, it will be possible to implement an abstract type class using a constraint synonym. However, in my implementation, I didn't implement functional dependency checking: {{{ signature H where class F a b | a -> b -- This should be an invalid implementation module H where type F a b = (Eq a, Eq b) }}} The check is annoying fiddly: we have to descend into the constraint synonym, collect all the implied fundeps, and then see if we have the ones we need, so I didn't implement it. Maybe some time. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12704 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12704: Check if constraint synonym satisfies functional dependencies -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): By "I didn't implement it", do you mean that you disallow the fundep? Or just not check the implementation? The former seems better. :) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12704#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12704: Check if constraint synonym satisfies functional dependencies -------------------------------------+------------------------------------- Reporter: ezyang | Owner: (none) Type: bug | Status: new Priority: low | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: FunDeps Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * keywords: => FunDeps -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12704#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC