
#11028: Refactor ConDecl -------------------------------------+------------------------------------- Reporter: simonpj | Owner: alanz Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: 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 alanz): Commit https://phabricator.haskell.org/rGHCff2978cac0cd fails with the res_ty not matching, When type checking {{{#!hs data MaybeO ex t where JustO :: t -> MaybeO O t NothingO :: MaybeO C t }}} This code generates. {{{ libraries/hoopl/src/Compiler/Hoopl/Block.hs:66:3: error: • Data constructor ‘JustO’ returns type ‘t -> MaybeO O t’ instead of an instance of its parent type ‘MaybeO ex t’ • In the definition of data constructor ‘JustO’ In the data type declaration for ‘MaybeO’ }}} I am pretty sure the `res_ty'` variable in [1] should be `MaybeO O t` but it is not clear how this happens in the original code. [1] https://github.com/ghc/ghc/blob/ff2978cac0cd133c2434480e311bed6aea72c6f1/com... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11028#comment:21 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler