#4127: Template haskell instance declaration quotations with members don't work 
in
ghci
---------------------------------+------------------------------------------
  Reporter:  lilac               |          Owner:                  
      Type:  bug                 |         Status:  closed          
  Priority:  normal              |      Milestone:  6.14.1          
 Component:  Template Haskell    |        Version:  6.12.1          
Resolution:  fixed               |       Keywords:                  
Difficulty:                      |             Os:  Unknown/Multiple
  Testcase:  ghci/scripts/T4127  |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown        |  
---------------------------------+------------------------------------------

Comment(by lilac):

 I don't have a GHC 6.13 checkout to test with; is this the same bug?

 {{{
 Prelude Language.Haskell.TH> runQ $ [d| f = undefined; class Foo x where {
 f :: x -> x }; instance Foo Int where { f = id } |]

 <interactive>:1:70:
     Warning: No explicit method nor default method for `f'
     In the instance declaration for `Foo Int'
     In the Template Haskell quotation
       [d| f = undefined

           class Foo x where { f :: x -> x; }

           instance Foo Int where
               { f = id } |]
     In the second argument of `($)', namely
         `[d| f = undefined

              class Foo x where { f :: x -> x; }

              instance Foo Int where
                  { f = id } |]'
 }}}

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