[GHC] #8137: Permited mega-polymorphic type

GHC ghc-devs at haskell.org
Thu Aug 15 20:51:11 CEST 2013


#8137: Permited  mega-polymorphic type
-------------------------------------+-------------------------------------
       Reporter:  wvv                |             Owner:
           Type:  bug                |            Status:  new
       Priority:  normal             |         Milestone:
      Component:  Compiler (Type     |           Version:  7.6.3
  checker)                           |  Operating System:  Unknown/Multiple
       Keywords:                     |   Type of failure:  GHC accepts
   Architecture:  Unknown/Multiple   |  invalid program
     Difficulty:  Unknown            |         Test Case:
     Blocked By:                     |          Blocking:
Related Tickets:                     |
-------------------------------------+-------------------------------------
 Mega-polymorphic type!
 This looks like a bug, but may be it is a feature

 {{{
 u = u

 b = u 2 + u "extra" "poly" "arguments" True

 b' = u ++ u True

 eq' = (u :: Bool) == (u 3.14 :: Bool)

 eq'' = (u 1 :: Num t => t) == (u "strings" "a lot" :: Num z => z)

 eq = u == u 2  -- ghci only

 > :t u
    u :: t
 }}}

 This code is valid for TypeChecker

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




More information about the ghc-tickets mailing list