
#14581: coerce String type in annotations with OverloadedStrings enabled -------------------------------------+------------------------------------- Reporter: mgmeier | Owner: (none) Type: feature | Status: new request | Priority: low | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Compiling the following snippet fails with the error message for not being able to resolve the constraint IsString for the given annotation (I've chosen some random HLint annotation here): {{{#!hs {-# LANGUAGE OverloadedStrings #-} module Foo where {-# ANN module "HLint: ignore Use <$>" #-} }}} Stating the type explicitly works fine, changing the annotation like this: {{{#!hs {-# ANN module ("HLint: ignore Use <$>" :: String) #-} }}} Note: this is actually only a minor annoyance which may or may not be confusing to newcomers. However since annotations use the String type, wouldn't it be possible to resolve the constraint in this case / coerce the value when inside an annotation? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14581 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler