F#에서 !의 의미는 다르며, 이렇게 정의됩니다:
type 'a ref { Contents : 'a }
let (!) (cell : ref 'a) = cell.Contents
!가 요구하는 피연산자는 bool ref인데 bool을 전달해서 실패한 것입니다.
대신 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"