definition:
|
replaceExtension :: FilePath -> String -> FilePath
replaceExtension x y = dropExtension x <.> y
|
demand:
|
no demanded arguments
|
deterministic:
|
deterministic operation
|
documentation:
|
-- | Set the extension of a file, overwriting one if already present.
--
-- > replaceExtension "file.txt" ".bob" == "file.bob"
-- > replaceExtension "file.txt" "bob" == "file.bob"
-- > replaceExtension "file" ".bob" == "file.bob"
-- > replaceExtension "file.txt" "" == "file"
-- > replaceExtension "file.fred.bob" "txt" == "file.fred.txt"
|
failfree:
|
(_, _)
|
indeterministic:
|
referentially transparent operation
|
infix:
|
no fixity defined
|
iotype:
|
{(_,_) |-> _}
|
name:
|
replaceExtension
|
precedence:
|
no precedence defined
|
result-values:
|
_
|
signature:
|
String -> String -> String
|
solution-complete:
|
operation might suspend on free variables
|
terminating:
|
possibly non-terminating
|
totally-defined:
|
possibly non-reducible on same data term
|