Syntax rules for Haskell infix datatype constructors

后端 未结 1 1703
闹比i
闹比i 2021-01-05 04:33

I\'m trying to make a Haskell datatype a bit like a python dictionary, a ruby hash or a javascript object, in which a string is linked to a value, like so:

d         


        
相关标签:
1条回答
  • 2021-01-05 04:52

    Any operator that starts with a colon : is a type constructor or a data constructor, with the exception of (->). If you want the tilde, you could use :~>, but you're not going to get away with using something that doesn't start with a colon. Source

    0 讨论(0)
提交回复
热议问题