#4459: Polymorphic Data.Dynamic
-----------------------------------------------------+----------------------
    Reporter:  vivian                                |        Owner:  vivian    
  
        Type:  feature request                       |       Status:  new       
  
    Priority:  normal                                |    Milestone:  7.4.1     
  
   Component:  GHC API                               |      Version:  7.1       
  
    Keywords:  polymorphic, dynamic, class, linking  |     Testcase:            
  
   Blockedby:                                        |   Difficulty:            
  
          Os:  Unknown/Multiple                      |     Blocking:  4316      
  
Architecture:  Unknown/Multiple                      |      Failure:  
None/Unknown
-----------------------------------------------------+----------------------

Comment(by vivian):

 Replying to [comment:23 vivian]:
 > Replying to [comment:21 simonpj]:
 > > The way to generate dictionaries is to call the type checker.  As
 described in the Commentary
 http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/HscMain, and
 http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler, the type
 checker takes a `(HsExpr Name)`, with no `HsWrap` constructors, and
 returns an `(HsExpr Id)`, replete with `HsWrap` constructors that do the
 dictionary application.

 Is
 {{{
 tcRnStmt :: HscEnv -> InteractiveContext
             -> LStmt RdrName -> IO (Messages, Maybe ([Id], LHsExpr Id))
 }}}
 the correct function to use?  It takes `RdrName` but you say the type-
 checker takes `Name`s.  I already have `Name`s for the class type and when
 attempting to use an `RdrName` based expression I get an error that, e.g.
 `Ord` is not in scope.

 Also, is it possible to use essentially a `PredType` as the argument of an
 application?

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to