hamler-lang / hamler

Haskell-style functional programming language running on Erlang VM.
https://www.hamler-lang.org/
BSD 3-Clause "New" or "Revised" License
1.03k stars 39 forks source link

feat(TCP): enhanced TCP module #474

Closed lafirest closed 3 years ago

sdzx-1 commented 3 years ago

your test can't run.

 hamler git:(tcp) ✗ make test
cabal run hamler testDev
Up to date
{"init terminating in do_boot",{undef,[{'Foreign',to_ffis,['Network.TCP',isffiListenOptionTerm,[{'TcpOption',{'Option',{'Active',false}}},{'TcpOption',{'Family',{'Inet'}}},{'TcpOption',{'Option',{'Backend',{'SocketBackend'}}}},{'Backlog',100}]],[]},{'Network.TCP',listen,2,[]},{'Test.Network.TCP',echoSvr,1,[]},{'Test.Network.TCP',start,0,[]},{'Test.Network.TCP',test,0,[]},{'Test',main,0,[]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,685}]},{erl_eval,expr,5,[{file,"erl_eval.erl"},{line,425}]}]}}
init terminating in do_boot ({undef,[{Foreign,to_ffis,[Network.TCP,isffiListenOptionTerm,[_]],[]},{Network.TCP,listen,2,[]},{Test.Network.TCP,echoSvr,1,[]},{Test.Network.TCP,start,0,[]},{Test.Network.

Crash dump is being written to: erl_crash.dump...done
hamler: 
Ran commands: 
erl -pa /home/hk/haskell/hamler/.test -noshell -eval io:setopts([{encoding, unicode}]), ('Test':main())() -s init stop
which erl

Exception: error running: erl -pa /home/hk/haskell/hamler/.test -noshell -eval io:setopts([{encoding, unicode}]), ('Test':main())() -s init stop
exit status: 1
stderr: init terminating in do_boot ({undef,[{Foreign,to_ffis,[Network.TCP,isffiListenOptionTerm,[_]],[]},{Network.TCP,listen,2,[]},{Test.Network.TCP,echoSvr,1,[]},{Test.Network.TCP,start,0,[]},{Test.Network.

Crash dump is being written to: erl_crash.dump...done

make: *** [Makefile:28: test] Error 1

you can add the test to Test.hm use this pr https://github.com/lafirest/hamler/pull/1