Где F # Интерактив на Mac - PullRequest
0 голосов
/ 24 октября 2018

В Windows исполняемые файлы для F # Interactive и F # Compiler имеют имена fsi и fsc.На Mac с Mono они называются fsharpi и fsharpc.Почему это так?

1 Ответ

0 голосов
/ 24 октября 2018

Эти имена являются просто оболочками сценариев Mono для fsi.exe и fsc.exe.

Это один и тот же exe-файл на основе CIL, заключенный в сценарий sh для выполнения их в среде выполнения mono.Создайте псевдонимы в выбранной оболочке, если хотите.

/ Библиотека / Каркасы / Mono.framework / Версии / Текущие / Команды / fsharpc

#!/bin/sh
EXEC="exec "

if test x"$1" = x--debug; then
   DEBUG=--debug
   shift
fi

if test x"$1" = x--gdb; then
   shift
   EXEC="gdb --eval-command=run --args "
fi

if test x"$1" = x--valgrind; then
  shift
  EXEC="valgrind $VALGRIND_OPTIONS"
fi

# Beware this line must match the regular expression " (\/.*)\/fsi\.exe" when fsc.exe is fsi.exe.
# That's because the FSharp MonoDevelop addin looks inside the text of this script to determine the installation
# location of the default FSharp install in order to find the FSharp compiler binaries (see
# fsharpbinding/MonoDevelop.FSharpBinding/Services/CompilerLocationUtils.fs). That's a pretty unfortunate
# way of finding those binaries. And really should be changed.
$EXEC /Library/Frameworks/Mono.framework/Versions/5.16.0/bin/mono $DEBUG $MONO_OPTIONS /Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/fsharp/fsc.exe --exename:$(basename "$0") "$@"

/ Библиотека / Каркасы / Моно.framework / Версии / Текущий / Команды / fsharpi

#!/bin/sh
EXEC="exec "

if test x"$1" = x--debug; then
   DEBUG=--debug
   shift
fi

if test x"$1" = x--gdb; then
   shift
   EXEC="gdb --eval-command=run --args "
fi

if test x"$1" = x--valgrind; then
  shift
  EXEC="valgrind $VALGRIND_OPTIONS"
fi

# Beware this line must match the regular expression " (\/.*)\/fsi\.exe" when fsi.exe is fsi.exe.
# That's because the FSharp MonoDevelop addin looks inside the text of this script to determine the installation
# location of the default FSharp install in order to find the FSharp compiler binaries (see
# fsharpbinding/MonoDevelop.FSharpBinding/Services/CompilerLocationUtils.fs). That's a pretty unfortunate
# way of finding those binaries. And really should be changed.
$EXEC /Library/Frameworks/Mono.framework/Versions/5.16.0/bin/mono $DEBUG $MONO_OPTIONS /Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/fsharp/fsi.exe --exename:$(basename "$0") "$@"
...