I need to execute the cp_r
function from the Shelly library to copy a
to b
.
However,
import Shelly
main = do cp_r "a" "b"
yields
Couldn't match expected type `Shelly.FilePath'
with actual type `[Char]'
In the first argument of `cp_r', namely `"a"'
In the expression: cp_r "a" "b"
In an equation for `it': it = cp_r "a" "b"
for both the first and the second argument to cp_r
.
How can I use String
(FilePath
is defined as String on any platform I know of) as argument to cp_r
?
Note: This question intentionally does not show any research effort as it was answered Q&A-Style.