Skip to content

Commit 285bfa9

Browse files
committed
Add more pointers, remove some cruft
1 parent 14ea6a7 commit 285bfa9

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

examples/typed_gen_server/lib/typed_gen_server/stage1.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ defmodule TypedGenServer.Stage1.Server do
2323
end
2424

2525
@spec echo(pid(), String.t()) :: String.t()
26-
# @spec echo(pid(), String.t()) :: {:echo_req, String.t()}
2726
def echo(pid, message) do
2827
case annotate_type(GenServer.call(pid, {:echo_req, message}), Contract.Echo.res()) do
2928
# case call_echo(pid, message) do

examples/typed_gen_server/lib/typed_gen_server/stage2.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ defmodule TypedGenServer.Stage2.Server do
2727
end
2828

2929
@spec echo(t(), String.t()) :: String.t()
30-
# @spec echo(t(), String.t()) :: {:echo_req, String.t()}
3130
def echo(pid, message) do
3231
case annotate_type(GenServer.call(pid, {:echo_req, message}), Contract.Echo.res()) do
3332
# case call_echo(pid, message) do
@@ -81,6 +80,9 @@ end
8180
defmodule Test.TypedGenServer.Stage2.Server do
8281
alias TypedGenServer.Stage2.Server
8382

83+
## Run with:
84+
## recompile(); Test.TypedGenServer.Stage2.Server.test()
85+
##
8486
## Typecheck with:
8587
## recompile(); Gradient.type_check_file(:code.which( Test.TypedGenServer.Stage2.Server ), [:infer])
8688
## recompile(); Gradient.type_check_file(:code.which( Test.TypedGenServer.Stage2.Server ), [:infer, ex_check: false])

examples/typed_gen_server/lib/typed_gen_server/stage4.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ defmodule TypedGenServer.Stage4.Server do
1212
##
1313
## Then use the following to recheck the file on any change:
1414
## recompile(); Gradient.type_check_file(:code.which( TypedGenServer.Stage4.Server ), [:infer])
15+
## recompile(); Gradient.type_check_file(:code.which( TypedGenServer.Stage4.Server ), [:infer, ex_check: false])
1516

1617
@opaque t :: pid()
1718

0 commit comments

Comments
 (0)