From 04cb46ceb5fbb4594be1f5798eba8bc421043baf Mon Sep 17 00:00:00 2001 From: normalcoder <normalcoder@gmail.com> Date: Sat, 4 Nov 2023 22:20:05 +0100 Subject: [PATCH] Fix StringInterpolation. Remove extra check --- compiler/GHC/Driver/StringInterpolation.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/GHC/Driver/StringInterpolation.hs b/compiler/GHC/Driver/StringInterpolation.hs index 8b594a713b88..54b8af394963 100644 --- a/compiler/GHC/Driver/StringInterpolation.hs +++ b/compiler/GHC/Driver/StringInterpolation.hs @@ -31,7 +31,6 @@ interpolateStrings s = go s WaitingForString "" -> error "we were collecting var name, but text ended unexpectedly" '}':'"':s -> "(\"" ++ (reverse acc) ++ "\" ++ " ++ (reverse var) ++ ")" ++ go s WaitingForString '}':s -> go s (InStringWaitingForVar True $ "\" ++ " ++ var ++ " ++ \"" ++ acc) - '"':_ -> error "we were collecting var name, but the string ended unexpectedly" c:s -> go s (InStringInVar hasInterpolations (c:var) acc) where skipSpaces "" = go "" state -- GitLab