#4116: Type supplement for constructor specific uses of sum types
---------------------------------+------------------------------------------
    Reporter:  gabrielrf         |       Owner:              
        Type:  proposal          |      Status:  new         
    Priority:  normal            |   Component:  Compiler    
     Version:  6.13              |    Keywords:              
          Os:  Unknown/Multiple  |    Testcase:              
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by gabrielrf):

 Correction. No need for type info within the supplement.

 {{{
 hd :: (List2 a) @ { Cons _ _ | Cons2 _ _ _ } -> a
 hd (Cons x _) = x
 hd (Cons2 x _ _) = x
 }}}


 {{{
 headFromJust :: (Maybe a) @ {Just (_:_)} -> a
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4116#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to