[GHC] #10814: Eliminate some ambiguity for IsString [a]
#10814: Eliminate some ambiguity for IsString [a] -------------------------------------+------------------------------------- Reporter: dolio | Owner: ekmett Type: task | Status: new Priority: normal | Milestone: 7.12.1 Component: Core | Version: 7.10.2 Libraries | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- The libraries list resolved to make a modification to the `String` instance for `IsString` to resolve certain ambiguous cases. One example is: {{{#!hs "hello" ++ " world" }}} This case can be resolved by making the instance: {{{#!hs instance (a ~ Char) => IsString [a] where ... }}} rather than: {{{#!hs instance IsString [Char] where ... }}} as the former matches only based on the head being `[a]`, and subsequently determines `a ~ Char`, rather than only matching when other factors cause the head to be fully resolved to `[Char]`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10814> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10814: Eliminate some ambiguity for IsString [a] -------------------------------------+------------------------------------- Reporter: dolio | Owner: dolio Type: task | Status: new Priority: normal | Milestone: 7.12.1 Component: Core Libraries | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by dolio): * owner: ekmett => dolio -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10814#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10814: Eliminate some ambiguity for IsString [a] -------------------------------------+------------------------------------- Reporter: dolio | Owner: dolio Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: Core Libraries | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1572 Wiki Page: | -------------------------------------+------------------------------------- Changes (by dolio): * cc: ekmett (added) * differential: => Phab:D1572 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10814#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10814: Eliminate some ambiguity for IsString [a] -------------------------------------+------------------------------------- Reporter: dolio | Owner: dolio Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: Core Libraries | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1572 Wiki Page: | -------------------------------------+------------------------------------- Comment (by thomie): Discussed in this thread: https://mail.haskell.org/pipermail/libraries/2015-May/025741.html -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10814#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10814: Eliminate some ambiguity for IsString [a] -------------------------------------+------------------------------------- Reporter: dolio | Owner: dolio Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: Core Libraries | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1572 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"b225b234a6b11e42fef433dcd5d2a38bb4b466bf/ghc" b225b234/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="b225b234a6b11e42fef433dcd5d2a38bb4b466bf" Modify IsString String instance (fixes #10814) The new instance resolves to `s ~ [Char]` as soon as we know that `s ~ [a]`, to avoid certain functions (like (++)) causing a situation where `a` is ambiguous and (currently) unable to be defaulted. Reviewers: #core_libraries_committee, hvr, austin, bgamari Reviewed By: hvr, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1572 GHC Trac Issues: #10814 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10814#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10814: Eliminate some ambiguity for IsString [a] -------------------------------------+------------------------------------- Reporter: dolio | Owner: dolio Type: task | Status: closed Priority: normal | Milestone: 8.0.1 Component: Core Libraries | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1572 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10814#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC