bugfix: Path.toText rendered an empty path as ".", not ""

This commit is contained in:
Mitchell Rosen 2024-02-02 11:55:35 -05:00
parent 3f3860fba3
commit 609c47b0bf

View File

@ -350,10 +350,8 @@ instance Show Path where
-- | Note: This treats the path as relative.
toText :: Path -> Text
toText path =
case toName path of
Nothing -> "."
Just name -> Name.toText name
toText =
maybe Text.empty Name.toText . toName
unsafeParseText :: Text -> Path
unsafeParseText = \case