[英]Attempting to run Haskell File on GHC error
尝试将 Haskell 文件 test.hs 加载到终端时。 我得到这样的回应:
<interactive>:5:1: error: Variable not in scope: test :: b0 -> c
<interactive>:5:6: error: Variable not in scope: hs :: a -> b0
这是来自 test.hs 的代码:
double x = x + x
quadruple x = double (double x)
如何让文件加载到终端?
openai 说查找文档或可能需要导入模块?
如果您在 GHCi 提示符下键入test.hs
,就会发生这种情况。 您打算改为键入:l test.hs
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.