Leiten Sie Gl. Und Show für Typalias in Haskell ab
Ich habe den folgenden Typ-Alias
data Bindable = Const Value
| Variable Location
| Func Function
| Proc
deriving (Eq, Show)
type Function = Argument -> Store -> Value
aber der compiler gibt mir einen fehler
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)
Kann ich Show & Eq für Function definieren? Wenn nicht, was wäre dann die Lösung? Soll ich Eq und Show to Argument, Store und Value definieren?