[GHC] #14990: "Valid refinement suggestions" have the wrong types

GHC ghc-devs at haskell.org
Sun Apr 1 17:41:11 UTC 2018


#14990: "Valid refinement suggestions" have the wrong types
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:  Tritlo
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.5
      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 Tritlo):

 How does the following look (ignore the double mention of `f` in the valid
 substitution list)?

 {{{
 tref.hs:4:5: error:
     • Found hole: _ :: [Integer] -> Integer
     • In the expression: _
       In an equation for ‘f’: f = _
     • Relevant bindings include
         f :: [Integer] -> Integer (bound at tref.hs:4:1)
       Valid substitutions include
         f :: [Integer] -> Integer (bound at tref.hs:4:1)
         main :: forall a. a (bound at tref.hs:7:1)
         f :: [Integer] -> Integer (defined at tref.hs:4:1)
       Valid refinement substitutions include
         foldl1 (_ :: Integer -> Integer -> Integer)
           where foldl1 :: forall (t :: * -> *).
                           Data.Foldable.Foldable t =>
                           forall a. (a -> a -> a) -> t a -> a
           (imported from ‘Prelude’ at tref.hs:1:17-22
            (and originally defined in ‘Data.Foldable’))
         foldr1 (_ :: Integer -> Integer -> Integer)
           where foldr1 :: forall (t :: * -> *).
                           Data.Foldable.Foldable t =>
                           forall a. (a -> a -> a) -> t a -> a
           (imported from ‘Prelude’ at tref.hs:1:47-52
            (and originally defined in ‘Data.Foldable’))
         foldl (_ :: Integer -> Integer -> Integer) (_ :: Integer)
           where foldl :: forall (t :: * -> *).
                          Data.Foldable.Foldable t =>
                          forall b a. (b -> a -> b) -> b -> t a -> b
           (imported from ‘Prelude’ at tref.hs:1:33-37
            (and originally defined in ‘Data.Foldable’))
         foldr (_ :: Integer -> Integer -> Integer) (_ :: Integer)
           where foldr :: forall (t :: * -> *).
                          Data.Foldable.Foldable t =>
                          forall a b. (a -> b -> b) -> b -> t a -> b
           (imported from ‘Prelude’ at tref.hs:1:40-44
            (and originally defined in ‘Data.Foldable’))
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14990#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list