#5412: dataTypeConstrs gives unhelpful error message
---------------------------------+------------------------------------------
    Reporter:  NeilMitchell      |       Owner:                
        Type:  bug               |      Status:  new           
    Priority:  normal            |   Component:  libraries/base
     Version:  7.1               |    Keywords:                
    Testcase:                    |   Blockedby:                
          Os:  Unknown/Multiple  |    Blocking:                
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown  
---------------------------------+------------------------------------------
 Take the following program:

 {{{
 import Data.Data
 foo = dataTypeConstrs (dataTypeOf (0 :: Int))
 -- raises: *** Exception: Data.Data.dataTypeConstrs
 }}}

 The implementation of {{{dataTypeConstrs}}} has the type available as a
 string at this point, so could easily say:

 {{{Exception: Data.Data.dataTypeConstrs is not supported for Int, as it is
 not an algebraic data type}}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5412>
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