You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, When I try to copy the fpinscala code into my project, my IDE shows some compile errors, like the title, When the List.Nil appears to the left of a case statement in a pattern match, the compiler tells me that Values of types MyList[Nothing] and MyList[Int] cannot be compared with == or !=
val factorialREPL: IO[Unit] = sequence_(
PrintLine(helpstring),
ReadLine.doWhile: line =>
val ok = line != "q"
when(ok):
for
n <- factorial(line.toInt)
_ <- PrintLine("factorial: " + n)
yield ()
)
this code IDE show 4 error: Not found: type line; an identifier expected, but 'val' found; Not found: ok; an identifier expected, but 'for' found.
but when I pull down the whole project, the errors are compilable, I'm very puzzled, and I'd really like to get your help and advice!
The text was updated successfully, but these errors were encountered:
maudslice
changed the title
enum List.Nil compile error: Values of types MyList[Nothing] and MyList[Int] cannot be compared with == or !=
enum List.Nil compile error: Values of types List[Nothing] and MyList[Int] cannot be compared with == or !=
Aug 1, 2023
Hello, When I try to copy the fpinscala code into my project, my IDE shows some compile errors, like the title, When the List.Nil appears to the left of a case statement in a pattern match, the compiler tells me that Values of types MyList[Nothing] and MyList[Int] cannot be compared with == or !=
this code IDE show 4 error: Not found: type line; an identifier expected, but 'val' found; Not found: ok; an identifier expected, but 'for' found.
but when I pull down the whole project, the errors are compilable, I'm very puzzled, and I'd really like to get your help and advice!
The text was updated successfully, but these errors were encountered: