WebSockets Type in api
- On the branch dev-websockets
- Error at compilation pasted above
- What is the type of the echo function ? My guess: echo :: ConduitT Value Value ?? ()
src/Gargantext/API/Routes.hs:257:1: warning: [-Wmissing-signatures] Top-level binding with no type signature: echo :: ConduitT b b (Control.Monad.Trans.Resource.Internal.ResourceT IO) () | 257 | echo = CL.map identity | ^^^^ [263 of 267] Compiling Gargantext.API.ThrowAll ( src/Gargantext/API/ThrowAll.hs, interpreted )
src/Gargantext/API/ThrowAll.hs:49:46: error: • Couldn't match type ‘err’ with ‘GHC.IO.Exception.IOException’ arising from a functional dependency between: constraint ‘MonadError err IO’ arising from a use of ‘throwAll'’ instance ‘MonadError GHC.IO.Exception.IOException IO’ at ‘err’ is a rigid type variable bound by the type signature for: serverPrivateGargAPI :: forall env err. GargServerM env err GargPrivateAPI at src/Gargantext/API/ThrowAll.hs:47:1-58 • In the expression: throwAll' (_ServerError # err401) In an equation for ‘serverPrivateGargAPI’: serverPrivateGargAPI _ = throwAll' (_ServerError # err401) The equation(s) for ‘serverPrivateGargAPI’ have one argument, but its type ‘ServerT GargPrivateAPI (Gargantext.API.Prelude.GargM env err)’ has none • Relevant bindings include serverPrivateGargAPI :: ServerT GargPrivateAPI (Gargantext.API.Prelude.GargM env err) (bound at src/Gargantext/API/ThrowAll.hs:48:1) | 49 | serverPrivateGargAPI _ = throwAll' (_ServerError # err401)