IsString StringContainingQuotedPath optimisation
This causes an encodeBS thunk, and the first evaluation of the string forces it. From then on, further uses operate on a ByteString. This avoids converting repeatedly.
This commit is contained in:
parent
afa5b883dc
commit
4a5f18a8ec
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ instance Quoteable StringContainingQuotedPath where
|
||||||
noquote (a :+: b) = noquote a <> noquote b
|
noquote (a :+: b) = noquote a <> noquote b
|
||||||
|
|
||||||
instance IsString StringContainingQuotedPath where
|
instance IsString StringContainingQuotedPath where
|
||||||
fromString = UnquotedString
|
fromString = UnquotedByteString . encodeBS
|
||||||
|
|
||||||
instance Sem.Semigroup StringContainingQuotedPath where
|
instance Sem.Semigroup StringContainingQuotedPath where
|
||||||
UnquotedString a <> UnquotedString b = UnquotedString (a <> b)
|
UnquotedString a <> UnquotedString b = UnquotedString (a <> b)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue