Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

F# interactive shell (fsi) tutorial?

I'm learning F# with fsi on Mac OS X/mono, but it's hard to know what command to quit and out to shell.

quit, or ^D doesn't work, ^C also doesn't work. What's the command to to stop the fsi?

In general, where can I find some tutorial/user's guide about fsi?

like image 229
prosseek Avatar asked Oct 10 '10 19:10

prosseek


2 Answers

Use #help;; for help, #quit;; to quit.

like image 175
kvb Avatar answered Nov 13 '22 00:11

kvb


When I start F# in OS X/mono I get the following

~> fsi

Microsoft (R) F# 2.0 Interactive build 2.0.0.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

For help type #help;;

By typing #help I get:

> #help;;

  F# Interactive directives:

    #r "file.dll";;        Reference (dynamically load) the given DLL
    #I "path";;            Add the given search path for referenced DLLs
    #load "file.fs" ...;;  Load the given file(s) as if compiled and referenced
    #time ["on"|"off""];;  Toggle timing on/off
    #help;;                Display help
    #quit;;                Exit

  F# Interactive command line options:

      See 'fsi --help' for options


> 

These should provide your answers.

like image 13
Muhammad Alkarouri Avatar answered Nov 13 '22 02:11

Muhammad Alkarouri