ottengo il seguente errore dalla GHC per la mia biblioteca servo:"Nessuna istanza per" l'errore - ma esiste l'istanza (tipo non corrisponde)
No instance for (GetEndpoint
(Verb 'GET 200 '[JSON] Position)
(Verb 'GET 200 '[JSON] Position)
'True)
arising from a use of `callServer3'
ma ho un esempio nel campo di applicazione, che sembra quello:
instance GetEndpoint (Verb n s ct a) (Verb n s ct a) 'True where
getEndpoint _ _ _ _ server = server
che sembra esattamente come quello che un ghc non riesce a trovare. Sono un po 'confuso adesso.
codice completo può essere trovato qui:
- Instance definition - proprio alla fine del file.
- File triggering the error - codice pertinente anche nella parte inferiore.
Eventuali indizi? Grazie mille per ogni suggerimento!
sei sicuro che i tuoi 'tipi' sono giusti (' 'GET' contro '*' etc) (la tua istanza dovrebbe apparire come '(Verbo (n :: GET) (s :: Nat) ..)' (nota che non sono sicuro sul 'Nat' qui ^^) – Carsten
Grazie mille Carsten - questo ha fatto il trucco - pubblicherò una risposta una volta risolti gli altri errori che stanno spuntando. – robert