
This all begs a question I've wondered several times: Flattening in the solver is great when we have bits of a type that are unknown, like `F (Int, a)`. But, it seems like an awful lot of work to do when a type is fully known, such as `F Bool`. In the latter case, is there a reason we don't use `normaliseType`? It would seem to me that this all would get more efficient if we just called `normaliseType` as an early step in the
#9872: Runing type functions is too slow -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by simonpj): Replying to [comment:3 goldfire]: process, say in `flattenFamApp`. Reasonable question. But if we had {{{ Eq (F (P Q R) (G (H (F (G (H a Int)))))) }}} there's a risk of trying to normalise at the outer level, and then at every inner level, which would not be very clever. I'll think about this a bit more. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9872#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler