
#10116: Closed type families: Warn if it doesn't handle all cases -------------------------------------+------------------------------------- Reporter: andrewthad | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by goldfire): I conjecture that getting this completely right for closed type families is a research project of its own, because closed type families allow for repeated variables. For example: {{{ type family F (a :: Bool) (b :: Maybe Bool) :: Nat where F True (Just False) = 0 F False (Just True) = 1 F x (Just x) = 2 F y Nothing = 3 }}} Is that total? I do believe it is. But it's a little hard to figure it out! But we could certainly do ''something'' in this area. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10116#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler