Haskell在`ghci`中多行`let`(Haskell multi-line `let` in `ghci`)
我在
ghci
,发现以下工作:let foo = ["a", "b", "c"]
......但这不起作用:
let bar = ["a", "b", "c"]
......也不是这样的:
let baz = ["a"] ++ ["b"] ++ ["c"]
当我尝试将其编译为文件时,提供了相同的错误,因此它不是来自
ghci
与使用ghc
。错误:
[1 of 1] Compiling Main ( test.hs, test.o ) test.hs:3:1: error: parse error (possibly incorrect indentation or mismatched brackets)
I'm in
ghci
and find that the following works:let foo = ["a", "b", "c"]
... but this doesn't work:
let bar = ["a", "b", "c"]
... nor does this:
let baz = ["a"] ++ ["b"] ++ ["c"]
The same error is provided when I try to compile it as a file, so it's not something that comes from being in
ghci
vs usingghc
.The error:
[1 of 1] Compiling Main ( test.hs, test.o ) test.hs:3:1: error: parse error (possibly incorrect indentation or mismatched brackets)
原文:https://stackoverflow.com/questions/40933256
更新时间:2023-01-02 06:01
最满意答案
Zend期待关键的“主机”而不是“服务器名称”。 默认参数被设置为解释错误异常的本地主机。
Zend expected the key "host" and not "servername". Default param is set as localhost which explains the error exception.
相关问答
更多-
Kohana自动加载器希望小写的文件名。 您可以注册Zend和Kohana自动加载器,它应该可以正常工作。 在bootstrap中你有: /** * Enable the Kohana auto-loader. * * @see http://docs.kohanaphp.com/features/autoloading * @see http://php.net/spl_autoload_register */ spl_autoload_register(array('Kohana', 'a ...
-
您需要在服务器上安装“Zend Optimizer”扩展。 如果您有共享主机帐户,请让您的Web主机为您安装。 它非常简单,不需要任何费用 - 详情如下: http://www.zend.com/topics/Zend-Optimizer-User-Guide-v330-new.pdf You need the "Zend Optimizer" extension to be installed on your server. If you have a shared hosting account, as ...
-
在Laravel 4中,php artisan会迁移错误PDOException(php artisan migrate error PDOException in Laravel 4)[2023-11-08]
不确定,但要确保你的mysql server正在运行,并且它按照预期在正确的端口上运行,因为Laravel的默认端口值是3306 (它是mysql服务器的默认端口),而且大多数情况下mysql可能运行在不同的端口上。 这是一个讨论 ,也检查这个答案 ,它几乎相似。 还请按照以下讨论并解决您在问题中提到的相同错误的线索 : [SOLVED] SQLSTATE[HY000] [2002] Connection refused Not sure but make sure your mysql server i ... -
Zend服务器版本?(Zend Server Version?)[2022-01-24]
您无法从phpinfo (或相关环境)派生服务器版本。 我假设您在Monitor |的Server Control GUI中显示的值之后 服务器信息 ,例如version和build 。 它们存储在$InstallDir/GUI/application/data/zend-server.ini 。 您的应用程序必须能够访问Ini所在的文件夹,加载Ini文件(使用类似Zend_Config)然后您可以使用这些值。 请注意,ZS是使用ZF构建的,文件未经过模糊处理,因此您可以查看其源代码以了解它们如何访问此信息 ... -
好的,这听起来像是一个营销的答案。 主要区别在于Zend Server CE是一个完全集成的堆栈产品 字节码加速器(优化器+) Zend数据缓存 经过认证的PHP发行版 Zend框架 Apache(或IIS集成) MySQL(在Windows和Mac OS X上) 与所有常见数据库的开箱即用连接 Java代码连接 基于Web的PHP管理员控制台 开箱即用的Zend Studio可以轻松地插入 : 自动检测本地Zend服务器 服务器视图 Zend服务器事件列表 导入和调试Zend服务器事件 在Zend Ser ...
-
无法在Zend框架1.12中找到套接字传输“ssl”(Unable to find the socket transport “ssl” in Zend framework 1.12)[2022-01-10]
您的Web服务器上未启用OpenSSL支持。 您可以使用phpinfo()来查看PHP安装支持的扩展。 如果OpenSSL不是其中之一,那么使用SSL或TLS是不合时宜的。 OpenSSL support isn't enabled on your web server. You can use phpinfo() to see what extensions your PHP installation supports. If OpenSSL isn't one of them you're out of ... -
Zend期待关键的“主机”而不是“服务器名称”。 默认参数被设置为解释错误异常的本地主机。 Zend expected the key "host" and not "servername". Default param is set as localhost which explains the error exception.
-
看起来你的代码这部分不起作用 [general] db.adapter = PDO_MYSQL db.params.host = 192.168.0.233 db.params.username = root db.params.password = my_password db.params.dbname = "mydatabasename" 或者IP不正确,如果是这样的话,请在Windows中输入cmd并键入ipconfig,您将得到正确的ip粘贴到此处,或者只是简单地写 db.param ...
-
我终于能够通过以下方式解决这个问题: 将PHP 5.6还原为PHP 5.5 通过ssh在实际的vagrant vm上运行composer update I was finally able to solve this by doing the following: Revert PHP 5.6 to PHP 5.5 Run composer update on the actual vagrant vm via ssh
-
使用现有的设置本身,您可以将Zend Server CE升级到更高版本。 如果您在现有服务器中进行了大量配置,这可以节省配置时间 检查以下pdf中的页面:69 - http://static.zend.com/topics/Zend-Server-CE-Installation-Guide-V40-n.pdf 您也可以将Zend Server CE升级到Zend Server。 With the existing setup itself you can upgrade Zend Server CE to ...