我正在处理一个我声明为Integer的变量,并发现>不是Integer的成员.这是一个简单的例子:
scala> i
warning: there were deprecation warnings; re-run with -deprecation for details
res28: Integer = 3
scala> i > 3
<console>:6: error: value > is not a member of Integer
i > 3
^
Run Code Online (Sandbox Code Playgroud)
将它与Int进行比较:
scala> j
res30: Int = 3
scala> j > 3
res31: Boolean = false
Run Code Online (Sandbox Code Playgroud)
Integer和Int有什么区别?我看到了弃用警告,但我不清楚为什么它被弃用,并且鉴于它已经存在,为什么它没有>方法.
我是NixOS的新手,我正在尝试使用以下函数从Haskell程序调用emacs:
ediff :: String -> String -> String -> IO ()
ediff testName a b = do
a' <- writeSystemTempFile (testName ++ ".expected") a
b' <- writeSystemTempFile (testName ++ ".received") b
let quote s = "\"" ++ s ++ "\""
callCommand $ "emacs --eval \'(ediff-files " ++ quote a' ++ quote b' ++ ")\'"
Run Code Online (Sandbox Code Playgroud)
当我运行调用此命令的程序时stack test,我得到以下结果(穿插单元测试结果):
/bin/sh: emacs: command not found
Exception: callCommand: emacs --eval '(ediff-files "/run/user/1000/ast1780695788709393584.expected" "/run/user/1000/ast4917054031918502651.received")'
Run Code Online (Sandbox Code Playgroud)
当我运行无法从我的shell运行上面的命令时,它运行完美.如何从NixOS中的Haskell运行进程,就像我直接调用它们一样,以便它们可以访问与我的用户相同的命令和配置?