
#10130: Rigid/Skolum produced by unassociated values. -------------------------------------+------------------------------------- Reporter: dukerutledge | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 Resolution: invalid | Keywords: rigid, Operating System: Linux | skolum, existentialquantification, Type of failure: GHC rejects | gadts, nomonolocalbinds valid program | Architecture: x86_64 Blocked By: | (amd64) Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by goldfire): Ah, yes. I advised this being posted as a bug report, but I somehow forgot that `d` and `c` would be monomorphic here. To the original poster, who may not be aware of the intricacies of !OutsideIn: The extensions `GADTs` and `TypeFamilies` both enable `MonoLocalBinds`, which makes local definitions that refer to a variable in an outer scope (like `n`) be monomorphic. Thus, `d` and `c` are monomorphic, but there is no monomorphic type to assign to them. I agree with Simon that GHC's behavior here is correct. You could, of course, specify `NoMonoLocalBinds`, but this a bad idea: the `MonoLocalBinds` story is necessary to keep sane type inference in the presence of the hypothetical equality conditions that can be introduced by type families and GADTs. The good news is that all can be fixed by using type signatures on local definitions. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10130#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler