[GHC] #12947: Core lint error

GHC ghc-devs at haskell.org
Mon Dec 19 16:23:38 UTC 2016


#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 at 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 at 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


More information about the ghc-tickets mailing list