[GHC] #13687: GHC internal error: associated type not in scope during typechecking

#13687: GHC internal error: associated type not in scope during typechecking -------------------------------------+------------------------------------- Reporter: mrkgnao | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 (Type checker) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time Unknown/Multiple | crash or panic Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- From a larger snippet of code: {{{#!hs type family Strategy' a b n where Strategy' a b Zero = St a b -- this is where the error occurs Strategy' a b (Succ n) = Strategy' a b n <| ReverseArgs (Strategy' b a n) <| Combine (Strategy' a a n) (Strategy' b b n) class DefinedStrategy a b where type St }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13687 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13687: GHC internal error: associated type not in scope during typechecking -------------------------------------+------------------------------------- Reporter: mrkgnao | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by mrkgnao: @@ -1,1 +1,1 @@ - From a larger snippet of code: + Trying to add a really bad associated type to a class as follows @@ -14,0 +14,22 @@ + + triggers + + {{{ + + /home/mrkgnao/code/haskell/noether/library/Algebra/DeOverlap.hs:126:24: + error: + • GHC internal error: ‘St’ is not in scope during type checking, but + it passed the renamer + tcl_env of environment: [amtJ :-> Type variable ‘a’ = a, + amtK :-> Type variable ‘b’ = b, roW :-> + ATcTyCon Strategy'] + • In the type ‘St a b’ + In the type family declaration for ‘Strategy'’ + + /home/mrkgnao/code/haskell/noether/library/Algebra/DeOverlap.hs:132:1: + error: + • The associated type ‘St’ + mentions none of the type or kind variables of the class + ‘DefinedStrategy a b’ + • In the class declaration for ‘DefinedStrategy’ + }}} New description: Trying to add a really bad associated type to a class as follows {{{#!hs type family Strategy' a b n where Strategy' a b Zero = St a b -- this is where the error occurs Strategy' a b (Succ n) = Strategy' a b n <| ReverseArgs (Strategy' b a n) <| Combine (Strategy' a a n) (Strategy' b b n) class DefinedStrategy a b where type St }}} triggers {{{ /home/mrkgnao/code/haskell/noether/library/Algebra/DeOverlap.hs:126:24: error: • GHC internal error: ‘St’ is not in scope during type checking, but it passed the renamer tcl_env of environment: [amtJ :-> Type variable ‘a’ = a, amtK :-> Type variable ‘b’ = b, roW :-> ATcTyCon Strategy'] • In the type ‘St a b’ In the type family declaration for ‘Strategy'’ /home/mrkgnao/code/haskell/noether/library/Algebra/DeOverlap.hs:132:1: error: • The associated type ‘St’ mentions none of the type or kind variables of the class ‘DefinedStrategy a b’ • In the class declaration for ‘DefinedStrategy’ }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13687#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13687: GHC internal error: associated type not in scope during typechecking -------------------------------------+------------------------------------- Reporter: mrkgnao | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.1 checker) | Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: #12867 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => duplicate * related: => #12867 Comment: Thanks for the bug report. This is a duplicate of #12867, which has been fixed in GHC 8.2.1. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13687#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC