#4949: TH typechecking regression ----------------------------------------+----------------------------------- Reporter: igloo | Owner: Type: bug | Status: new Priority: highest | Milestone: 7.0.2 Component: Compiler (Type checker) | Version: 7.0.1 Keywords: | Testcase: Blockedby: | Difficulty: Os: Unknown/Multiple | Blocking: Architecture: Unknown/Multiple | Failure: None/Unknown ----------------------------------------+----------------------------------- The 7.0 branch (and HEAD) behaves differently to 7.0.1 on this modules: {{{ {-# LANGUAGE TemplateHaskell #-} module Foo where
import Language.Haskell.TH x :: Int x = let args = [| show $(varE (mkName "x")) |] in undefined }}} 7.0.1 accepted it, while we now get: {{{ Foo.hs:7:19: Ambiguous type variable `a0' in the constraint: (Show a0) arising from a use of `show' Probable fix: add a type signature that fixes these type variable(s) In the Template Haskell quotation [| show ($(varE (mkName "x"))) |] In the expression: [| show ($(varE (mkName "x"))) |] In an equation for `args': args = [| show ($(varE (mkName "x"))) |] }}} This affects these packages: {{{ CCA Printf-TH grammar-combinators hacanon-light hamlet rowrecord th-lift web-routes-quasi }}} -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4949> 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