optimise literalOsPath

Taking a ShortByteString and using OverloadedStrings should avoid it
being converted from a String.

The reason there is no IsString instance for OsPath is presumably the
bad behavior of IsString for ByteString on unicode btw. But
literalOsPath won't be used with unicode in git-annex.

Sponsored-by: unqueued
This commit is contained in:
Joey Hess 2025-01-27 15:54:24 -04:00
parent 8bafe05500
commit 98a0a9ddff
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
10 changed files with 23 additions and 7 deletions

View file

@ -6,6 +6,7 @@
- Licensed under the GNU AGPL version 3 or higher.
-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-tabs #-}