简体   繁体   English

在haskell中,做什么:+:在数据类型定义中意味着什么?

[英]In haskell, What does :+: mean in data type definition?

This is the definition for a new data type: 这是新数据类型的定义:

data Total a = Total a :+: Total a 
              |...

What does :+: mean in this type definition? 什么:+:在这种类型定义中意味着什么?

It is a data constructor written in infix form. 它是以中缀形式编写的数据构造函数。 You can have an operator as constructor if it begins with : . 如果操作符以构造函数开头,则可以使用:

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

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