[GHC] #11439: Request for comments: Allow duplicate type signatures

GHC ghc-devs at haskell.org
Sat Jan 16 16:24:49 UTC 2016


#11439: Request for comments: Allow duplicate type signatures
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      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 Iceland_jack):

 It would also help simplify the FTP types, as well as showing possibly
 enlightening groupings (`(a -> b) -> (F a -> F b)` versus `(a -> b) -> F a
 -> F b`):

 {{{#!hs
 >>> :types length
 length :: Foldable t => t a -> Int

 length :: [a] -> Int
 length :: Set a -> Int
 length :: Map k v -> Int
 }}}
 {{{#!hs
 >>> :types fmap
 fmap :: Functor f => (a -> b) -> f a -> f b

 fmap :: Functor f => (a -> b) -> (f a -> f b)
 fmap :: (a -> b) -> ([a] -> [b])
 fmap :: (a -> b) -> (Either e a -> Either e b)
 fmap :: (b -> c) -> (a -> b) -> (a -> c)
 }}}
 {{{#!hs
 >>> :types sequence
 sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)

 sequence :: Monad m => [m a] -> m [a]
 sequence :: [IO a] -> IO [a]
 sequence :: [Maybe a] -> Maybe [a]
 sequence :: [r -> a] -> (r -> [a])
 sequence :: [[a]] -> [[a]]
 }}}

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


More information about the ghc-tickets mailing list