如果我有数据类型说:
data Color = Red | Yellow | Green
有没有办法可以将其转换为[Color]类型列表获取所有可能的值?[红色,黄色,绿色]
也许这是一个完整的反模式?
haskell types list
haskell ×1
list ×1
types ×1