1
이 오류를 일으킬 수 있도록 도와 줄 수 있습니까? 고맙습니다. Produto Type이 내 기능 헤더의 유형으로 인식되지 않는 이유를 모릅니다 ... 도와 주시겠습니까?유효하지 않은 유형 서명 : TabelaProdutos :: ...?
--" Invalid type signature: TabelaProdutos :: ...
-- Should be of form <variable> :: <type> "
type Codigo = Int
type Nome = [Char]
type Preco = Int
type Produtos = [(Codigo, Nome, Preco)] -- Type Product defined here
type Carrinho = [Codigo]
type Conta = [(Nome, Preco)]
TabelaProdutos :: Produtos -- THE ERROR OCCURS IN THAT LINE
TabelaProdutos = [(001, "Chocolate", 121)
,(002, "Biscoito", 1010)
,(003, "Laranja", 56)
,(004, "Sabao", 21)
,(005, "Batata Chips", 133)
,(006, "Doritos", 450)
]