Skip to content

Commit 979aac4

Browse files
committed
OverloadedStrings or OverloadedLists are ok without RebindableSyntax
1 parent 4a7d494 commit 979aac4

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

Cabal/Distribution/Simple/Build/PathsModule.hs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ generate :: PackageDescription -> LocalBuildInfo -> ComponentLocalBuildInfo -> S
4141
generate pkg_descr lbi clbi =
4242
let pragmas =
4343
cpp_pragma
44-
++ no_overloaded_strings_pragma
4544
++ no_rebindable_syntax_pragma
4645
++ ffi_pragmas
4746
++ warning_pragmas
@@ -50,14 +49,10 @@ generate pkg_descr lbi clbi =
5049
| supports_cpp = "{-# LANGUAGE CPP #-}\n"
5150
| otherwise = ""
5251

53-
-- -XOverloadedStrings is problematic because 'fromString' is not
54-
-- in scope, so disable it.
55-
no_overloaded_strings_pragma
56-
| supports_overloaded_strings = "{-# LANGUAGE NoOverloadedStrings #-}\n"
57-
| otherwise = ""
58-
5952
-- -XRebindableSyntax is problematic because when paired with
60-
-- -XOverloadedLists, 'fromListN' is not in scope, so disable it.
53+
-- -XOverloadedLists, 'fromListN' is not in scope,
54+
-- or -XOverloadedStrings 'fromString' is not in scope,
55+
-- so we disable 'RebindableSyntax'.
6156
no_rebindable_syntax_pragma
6257
| supports_rebindable_syntax = "{-# LANGUAGE NoRebindableSyntax #-}\n"
6358
| otherwise = ""

0 commit comments

Comments
 (0)