JetBrains Rider
 
Get JetBrains Rider
Get your hands on the new features ahead of the release by joining the Early Access Program for Rider 2025.1! Learn more

F# Interactive

Last modified: 11 February 2024

To enable F# interactive on your computer:

  • Install Visual Studio Build Tools 2017 or later, with F# compiler enabled on the Individual components tab. If you already have VS Build Tools or Visual Studio 2017 or later, you can run the installer to modify the installation and choose to install the F# compiler.

    JetBrains Rider: F# compiler in Visual Studio Build Tools
  • F# Interactive relies on the F# Support plugin. The plugin comes bundled with JetBrains Rider, but if you observe any malfunction, make sure that the plugin is enabled on the Plugins settings page  CtrlAlt0S.

JetBrains Rider includes a Read–Eval–Print Loop (REPL), which lets you experiment with F# code without compiling it.

As soon as the F# Interactive is started, you can write any F# expressions and evaluate them by pressing Enter.

JetBrains Rider: F# Interactive in action

F# Interactive will attempt to compile your code and execute it if successful. Otherwise the interpreter will return the error messages.

All expressions that you execute during the session are recorded in history. To find a previously executed statement, use the Up/Down buttons or copy any recently executed command:

JetBrains Rider: F# Interactive. Set recent command

To have the copied command executed at once, uncheck Copy recent commands to Interactive editor on the Languages & Frameworks | F# Interactive page of JetBrains Rider settings CtrlAlt0S.