首页 \ 问答 \ Haskell在`ghci`中多行`let`(Haskell multi-line `let` in `ghci`)

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 using ghc.

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 ...
  • 不确定,但要确保你的mysql server正在运行,并且它按照预期在正确的端口上运行,因为Laravel的默认端口值是3306 (它是mysql服务器的默认端口),而且大多数情况下mysql可能运行在不同的端口上。 这是一个讨论 ,也检查这个答案 ,它几乎相似。 还请按照以下讨论并解决您在问题中提到的相同错误的线索 : [SOLVED] SQLSTATE[HY000] [2002] Connection refused Not sure but make sure your mysql server i ...
  • 您无法从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 ...
  • 您的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 ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。