Reserved Keywords

Note: Some of these words are reserved purely for backward compatibility.

If you need to use one of these names as binding and/or field name, see Use Illegal Identifier Names.

  • and

  • as

  • assert

  • await

  • constraint

  • else

  • exception

  • external

  • false

  • for

  • if

  • in

  • include

  • let

  • module

  • mutable

  • of

  • open

  • private

  • rec

  • switch

  • true

  • try

  • type

  • when

  • while

async, break, and continue are recognized in specific syntactic contexts, but can also be used as binding names. list and dict introduce literals when followed immediately by {; they can otherwise be used as names. lazy and with are not reserved.