[GHC] #12947: Core lint error
#12947: Core lint error -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{#!hs import qualified Control.Monad.Fail as Fail newtype P m a = P { unP :: (a -> IO (m ())) -> IO (m ()) } instance Functor (P m) where instance Applicative (P m) where instance Monad (P m) where instance (Fail.MonadFail m) => Fail.MonadFail (P m) where fail msg = ContT $ \ _ -> Fail.fail msg }}} fails when run with `$ ghci -ignore-dot-ghci -fdefer-typed-holes -dcore- lint /tmp/tQZR.hs`, log is attached -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12947> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12947: Core lint error -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 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: | -------------------------------------+------------------------------------- Changes (by Iceland_jack): * Attachment "log" added. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12947> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12947: Core lint error -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 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 simonpj): Are you sure? I get {{{ simonpj@cam-05-unx:~/tmp$ ~/5builds/ghc-8.0-branch/inplace/bin/ghc-stage1 -c -dcore-lint T12947.hs -fdefer-typed-holes T12947.hs:16:14: error: • Couldn't match expected type ‘P m a’ with actual type ‘ContT r0 m0 a0’ • In the expression: ContT $ \ _ -> Fail.fail msg In an equation for ‘fail’: fail msg = ContT $ \ _ -> Fail.fail msg In the instance declaration for ‘Fail.MonadFail (P m)’ • Relevant bindings include fail :: String -> P m a (bound at T12947.hs:16:3) }}} Perhaps you meant `-fdefer-type-errors`? But then I get {{{ simonpj@cam-05-unx:~/tmp$ ~/5builds/ghc-8.0-branch/inplace/bin/ghc-stage1 -c -dcore-lint T12947.hs -fdefer-type-errors T12947.hs:9:10: warning: [-Wmissing-methods] • No explicit implementation for ‘fmap’ • In the instance declaration for ‘Functor (P m)’ T12947.hs:11:10: warning: [-Wmissing-methods] • No explicit implementation for ‘pure’ and ‘<*>’ • In the instance declaration for ‘Applicative (P m)’ T12947.hs:13:10: warning: [-Wmissing-methods] • No explicit implementation for ‘>>=’ • In the instance declaration for ‘Monad (P m)’ T12947.hs:16:14: warning: [-Wdeferred-type-errors] • Couldn't match expected type ‘P m a’ with actual type ‘ContT r0 m0 a0’ • In the expression: ContT $ \ _ -> Fail.fail msg In an equation for ‘fail’: fail msg = ContT $ \ _ -> Fail.fail msg In the instance declaration for ‘Fail.MonadFail (P m)’ • Relevant bindings include fail :: String -> P m a (bound at T12947.hs:16:3) }}} All of which looks fine to me. Maybe it's been fixed? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12947#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12947: Core lint error -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13640 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * related: => #13640 Comment: It looks like this is the same problem as reported in #13640, which was fixed in commit b4bdbe4957ae8b82c4cda5584203b44d3c4f004f (Don't omit any evidence bindings), the fix for #12156. I'll whip up a regression test. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12947#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12947: Core lint error -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13640 | Differential Rev(s): Phab:D3528 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => Phab:D3528 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12947#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12947: Core lint error -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13640 | Differential Rev(s): Phab:D3528 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ryan Scott <ryan.gl.scott@…>): In [changeset:"38a381912f67c0f6f3fba8de1026d7464826b851/ghc" 38a38191/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="38a381912f67c0f6f3fba8de1026d7464826b851" Add regression tests for #12947, #13640 Summary: Commit b4bdbe4957ae8b82c4cda5584203b44d3c4f004f (the fix for #12156) wound up being the fix for #12947 and #13640 as well. This adds regression tests for the latter two tickets to keep them fixed. Test Plan: make test TEST="T12947 T13640" Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #12947, #13640 Differential Revision: https://phabricator.haskell.org/D3528 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12947#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12947: Core lint error -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_fail/T12947 Blocked By: | Blocking: Related Tickets: #13640 | Differential Rev(s): Phab:D3528 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * testcase: => typecheck/should_fail/T12947 * status: patch => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12947#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC