简体   繁体   English

Purescript中的字符串连接

[英]String Concatenation in Purescript

Playing with purescript and running into an odd problem with string concatenation. 玩purescript并遇到字符串连接的奇怪问题。 I've loaded and imported the Prelude , Data.List , Data.Maybe , and Data.String (also, tried importing Data.Array ) but the PSCi still doesn't recognize (++) . 我已经加载并导入PreludeData.ListData.MaybeData.String (也尝试导入Data.Array ),但PSCi仍然无法识别(++) This would suggest that either, (++) is not contained in any of my imported modules (in which case a pointer to the appropriate module(s) to import would be appreciated), or there was some weird problem when I installed purescript and set my enviornment. 这表明, (++)不包含在我导入的任何模块中(在这种情况下,指向要导入的相应模块的指针),或者当我安装purescript时出现了一些奇怪的问题。设置我的环境。 I find the latter unlikely but hey I'll keep my considerations open. 我发现后者不太可能,但嘿,我会保持我的考虑因素。

Thanks in advance! 提前致谢!

Newer versions of PureScript (since 0.9 I think) have abandoned ++ in favor of <> . 较新版本的PureScript(我认为自0.9以来)放弃了++ ,而选择<> That operator should work out of the box, since it is contained in purescript-prelude . 该运算符应该开箱即用,因为它包含在purescript-prelude中

Thanks @gb. 谢谢@gb。 for the clarification. 澄清。 Edited the incorrect part of my answer. 编辑了我的答案中不正确的部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM