If a constructor does not take any data arguments, it is nullary. -- nullary type constructor with two nullary data constructors data Bool = False | True -- non-nullary type constructor with one non-nullary data constructor data Point a = Point a a -- non-nullary type constructor with... data Maybe a = Nothing -- ...nullary data constructor | Just a -- ...unary data constructor
Nếu một hàm tạo mà không có bất kì đối số nào, thì nó là rỗng. -- nullary type constructor with two nullary data constructors data Bool = False | True -- non-nullary type constructor with one non-nullary data constructor data Point a = Point a a -- non-nullary type constructor with... data Maybe a = Nothing --...nullary data constructor | Just a --...unary data constructor