-
Notifications
You must be signed in to change notification settings - Fork 0
Other FS000X Compiler Errors
Louis Kueh edited this page Jan 20, 2019
·
3 revisions
No paranthesis when calling functions. This is because white space is the standard separator for function parameters.
let result = add (1 2) //wrong
// error FS0003: This value is not a function and cannot be applied
let result = add 1 2 //correctThis can occur when passing too many arguments.
let add1 x = x + 1
let x = add1 2 3
// ==> error FS0003: This value is not a function and cannot be appliedThe error message requires an understanding of how currying works in F# and how every function really only has 1 parameter.
If the code is not align correctly F# throws an obscure error that there is an unexpected identifier in the binding. The error message does not relate well to the solution, which is to simply align the code.
let f =
let x=1 // offside line is at column 3
x+1 When calling a class missing a paranthesis can lead to this error
type Something() =
let field = ()
let x1 = new Something // Error FS0010
let x2 = new Something() // OK!This also occurs if
- there is no paranthesis around an operator
(|+) 2 - missing one side of an infix operator
|| false - sending namespace definition to F Sharp interactive e.g.
namespace Customer
-
Research
-
Implementation
-
Weekly Reports
-
Meeting Feedback