Получите Eq и Show для псевдонима типа в Haskell
ve псевдоним следующего типа
data Bindable = Const Value
| Variable Location
| Func Function
| Proc
deriving (Eq, Show)
type Function = Argument -> Store -> Value
но компилятор выдает ошибку
No instance for (Show Function)
arising from the 'deriving' clause of a data type declaration
Possible fix:
add an instance declaration for (Show Function)
or use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Show Bindable)
Могу ли я определить Show & Уравнение для функции? Если нет, то каким было бы решение? Должен ли я определить Eq и Show to Argument, Store и Value?