Search code examples
packageread-eval-print-loopidris

module Network.Socket isn't found in Idris


I'm trying to import Socket in Idris in REPL:

Idris> :module Network.Socket
Can't find import Network/Socket

Why?


Solution

  • This is because Network.Socket module is not in default available packages. Quick search shows me that Network.Socket is in contrib package:

    https://www.idris-lang.org/docs/0.12/contrib_doc/docs/Network.Socket.html

    Thus, you should run Idris REPL with specified package using -p contrib option:

    $ idris -p contrib
    Idris> :module Network.Socket
    *Network/Socket> :t Socket
    Socket : Type