Skip to content

Commit

Permalink
Don't put quotes around the packageName of PackageImports
Browse files Browse the repository at this point in the history
  • Loading branch information
shane-circuithub committed Apr 9, 2021
1 parent 9191b07 commit efaeed3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,7 @@ parseImport = (<?> "parseImport") $ do
(<?> "maybePackageName") $
try
(Just <$> do
packageName <- char '"' >> (Text.pack <$> someTill printChar (char '"'))
pure (Text.cons '"' packageName `Text.snoc` '"')
char '"' >> (Text.pack <$> someTill printChar (char '"'))
) <|> pure Nothing

spacesFollowingPackage <-
Expand Down Expand Up @@ -428,7 +427,7 @@ parseImport = (<?> "parseImport") $ do
, spacesFollowingImport
, fromMaybe "" maybeQualified
, spacesFollowingQualified
, fromMaybe "" maybePackageName
, maybe "" (\packageName -> "\"" <> packageName <> "\"") maybePackageName
, spacesFollowingPackage
, moduleNameText
, restOfLine
Expand Down

0 comments on commit efaeed3

Please sign in to comment.