macos - Mac 上的 F# Interactive 在哪里

标签 macos f# mono f#-interactive

在 Windows 上,F# Interactive 和 F# 编译器的可执行文件名为 fsifsc。在使用 Mono 的 Mac 上,它们被称为 fsharpifsharpc。这是为什么?

最佳答案

这些名称只是 fsi.exefsc.exe 的 Mono 脚本包装器。

它们是相同的基于 CIL 的“exe”,包装在 sh 脚本中,通过 mono 运行时执行它们。如果需要,可以在选择的 shell 中创建一些别名。

/Library/Frameworks/Mono.framework/Versions/Current/Commands/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") "$@"

/Library/Frameworks/Mono.framework/Versions/Current/Commands/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") "$@"

关于macos - Mac 上的 F# Interactive 在哪里,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52960053/

相关文章:

macos - 如何找到旧版本的 Node ?

asynchronous - F# ASync.Parallel 加主线程

windows - 在 Windows : workaround for Gtk# requirement? 上安装 MonoDevelop

f# - 匹配列表的前两个元素

c# - Windows 上的 mono mkbundle 实用程序

linux - 如何在 Debian 中安装 Mono

macos - OSX Swift webview 加载本地文件

C++ 控制台模式程序在 Mac 和 Windows 上产生不同的结果

macos - mac 上的午夜指挥官文件位置

map - 方法链 vs |> 管道操作符