
#13345: GHC 8 type checker regression -------------------------------------+------------------------------------- Reporter: andreas.abel | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.2 checker) | Keywords: type Resolution: invalid | annotation 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 andreas.abel): Well, I also tried {{{#!hs import qualified Data.List as List }}} and then use `List.foldl`, but it did not help. If this is "just a library design choice", maybe something went wrong there, but `base` is an integral part of `ghc`, thus, it is still a regression in that respect. What does work is to use `FunctionalDependencies` for the `Tr` class. But since this feature is still underdeveloped, not knowing about injectivity of type constructors, I also have to turn on the sledgehammer `UndecidableInstances`. If not a bug, at least the situation is unpleasant. There is no nice workaround. Except breaking up the code to smaller pieces and insert type annotations. (The original code was monadic, like:) {{{#!hs List.fold App Var <$> tr es }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13345#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler