В F# смысл ! отличается, и определяется он так:
type 'a ref { Contents : 'a }
let (!) (cell : ref 'a) = cell.Contents
Ошибка возникает, потому что вы передали bool, тогда как операнду ! требуется тип bool ref.
Замените его функцией not:
if not(File.Exists(inputPath)) then
printfn "inputPath doesn't exist %s" inputPath; failwith "stop"
Переведено с английского·Показать оригиналF# gives ! a different meaning, and thats defined as follows:
type 'a ref { Contents : 'a }
let (!) (cell : ref 'a) = cell.Contents
This fails because you supplied a bool, whereas the operand required by ! is a bool ref.
Replace it with the not function:
if not(File.Exists(inputPath)) then
printfn "inputPath doesn't exist %s" inputPath; failwith "stop"