[erlang-questions] Dialyzer and recursive types

Paul Guyot pguyot@REDACTED
Sun Aug 10 09:07:33 CEST 2008


I'm trying to use dialyzer with a recursive type and I get an error  
when using the tree type defined in the slides:

-type(tree(X) :: {X,tree(X),tree(X)} | nil).
-spec(foo/0 :: () -> tree(integer())).
foo() -> nil.
   Checking whether the PLT /Users/paul/.dialyzer_plt is up-to- 
date... yes
   Proceeding with analysis...
Analysis failed with error: Could not scan the following file(s): [{"/ 
Last messages in log cache: ["Reading files and computing  
callgraph... "]

dialyzer: Internal problems were encountered in the analysis.

The same error occurs even if the type is not parametrized.

-type(tree() :: {integer(),tree(),tree()} | nil).
-spec(foo/0 :: () -> tree()).
foo() -> nil.

Is it a known bug? Or is it a mistake in the way I specify the  
recursive type?



More information about the erlang-questions mailing list