#1841: Data.Typeable: Instances of basic types don't provide qualified strings 
to
mkTyCon
----------------------------+-----------------------------------------------
 Reporter:  guest           |          Owner:         
     Type:  bug             |         Status:  new    
 Priority:  normal          |      Milestone:         
Component:  libraries/base  |        Version:  6.8.1  
 Severity:  normal          |     Resolution:         
 Keywords:                  |     Difficulty:  Unknown
 Testcase:                  |   Architecture:  Unknown
       Os:  Unknown         |  
----------------------------+-----------------------------------------------
Comment (by guest):

 {{{
 can you explain in a bit more detail why making it all consistent would
 help you?
 }}}

 Well, It would help to the point of making the translation to Type
 absolutely trivial . I would then just need to call mkName to obtain a
 valid TH Name (and probably that's how it should be since checking the
 name set for all the basisc types is a bit hackish. IMHO Data.Typeable is
 reponsible of making them consistent in first instance)


 But, leaving how easy will make things apart and talking just about
 consistency; for most of the types (Maybe, Tuple .... ) the qualified name
 is unique regardless of the Haskell implementation used.

 In the case of Int, Float and friends, "Prelude" could be used as the
 preceeding module name or, otherwise, conditional compilation cold be
 appplied to cover the exact module used by each implementation. (I'm not
 sure if that would work for "[]" though)

 Assuming I'm not missing something, the only wierd case left would be
 (->), which has to be treated specially anyway. Again, conditional
 compilation could be used, providing "GHC.Prim.(->)" in the case of GHC.

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