diff options
author | Dan Doel <dan.doel@gmail.com> | 2015-12-21 12:28:16 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-12-21 12:28:52 +0100 |
commit | b225b234a6b11e42fef433dcd5d2a38bb4b466bf (patch) | |
tree | 2e89460ea5f9560543498a8042d92d5603c33014 /testsuite/tests/overloadedstrings | |
parent | d8ed20c8772bee5eb83719c804121374157cf9b6 (diff) | |
download | haskell-b225b234a6b11e42fef433dcd5d2a38bb4b466bf.tar.gz |
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
Diffstat (limited to 'testsuite/tests/overloadedstrings')
5 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/overloadedstrings/Makefile b/testsuite/tests/overloadedstrings/Makefile new file mode 100644 index 0000000000..9a36a1c5fe --- /dev/null +++ b/testsuite/tests/overloadedstrings/Makefile @@ -0,0 +1,3 @@ +TOP=../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/overloadedstrings/should_run/Makefile b/testsuite/tests/overloadedstrings/should_run/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/overloadedstrings/should_run/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/overloadedstrings/should_run/all.T b/testsuite/tests/overloadedstrings/should_run/all.T new file mode 100644 index 0000000000..8248302e2b --- /dev/null +++ b/testsuite/tests/overloadedstrings/should_run/all.T @@ -0,0 +1 @@ +test('overloadedstringsrun01', normal, compile_and_run, ['']) diff --git a/testsuite/tests/overloadedstrings/should_run/overloadedstringsrun01.hs b/testsuite/tests/overloadedstrings/should_run/overloadedstringsrun01.hs new file mode 100644 index 0000000000..87b4303885 --- /dev/null +++ b/testsuite/tests/overloadedstrings/should_run/overloadedstringsrun01.hs @@ -0,0 +1,3 @@ +{-# LANGUAGE OverloadedStrings #-} + +main = print $ "hello" ++ " world." diff --git a/testsuite/tests/overloadedstrings/should_run/overloadedstringsrun01.stdout b/testsuite/tests/overloadedstrings/should_run/overloadedstringsrun01.stdout new file mode 100644 index 0000000000..ff3e71d98b --- /dev/null +++ b/testsuite/tests/overloadedstrings/should_run/overloadedstringsrun01.stdout @@ -0,0 +1 @@ +"hello world." |