Skip to content

Commit a4f3d58

Browse files
committed
OverloadedStrings or OverloadedLists are ok without RebindableSyntax
1 parent 790f4fb commit a4f3d58

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

Cabal/Distribution/Simple/Build/PathsModule.hs

+3-9
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 = ""
@@ -253,7 +248,6 @@ generate pkg_descr lbi clbi =
253248
path_sep = show [pathSeparator]
254249

255250
supports_cpp = supports_language_pragma
256-
supports_overloaded_strings = supports_language_pragma
257251
supports_rebindable_syntax= ghc_newer_than (mkVersion [7,0,1])
258252
supports_language_pragma = ghc_newer_than (mkVersion [6,6,1])
259253

0 commit comments

Comments
 (0)