Derive Eq e Show para alias de tipo em Haskell
Eu tenho o seguinte tipo alias
data Bindable = Const Value
| Variable Location
| Func Function
| Proc
deriving (Eq, Show)
type Function = Argument -> Store -> Value
mas o compilador me dá um erro
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)
Posso definir Show & Eq for Function? Se não, qual seria a solução? Devo definir Eq e mostrar para argumento, armazenamento e valor?