Erlang/OTP Forums

Author Message

<  Erlang  ~  Unable to find remote type dict:dictionary()

roth
Posted: Fri Apr 09, 2010 7:52 pm Reply with quote
User Joined: 07 Apr 2010 Posts: 13
Any idea why dialyzer gives the following?

Code:

-module (main).
-export ([start/0]).

-spec test (dict:dictionary ()) -> ok.
test (Things) ->
  io:fwrite ("~w~n", [Things]),
  ok.

-spec start () -> ok.
start () -> test (dict:new ()).


Code:

dialyzer: Analysis failed with error: Unable to find remote type dict:dictionary()
View user's profile Send private message
zajda
Posted: Sat Apr 10, 2010 10:30 am Reply with quote
User Joined: 22 Aug 2009 Posts: 83
there is no such type in specs as dictionary.

here is initial EEP for specs with list of available types http://www.erlang.org/eeps/eep-0008.html

There are some hanges i.e. since R13B bool was changed into boolean.

if you want to have new type for specific argument, just define it:
Code:

-type header() :: {string() | atom(), string()}.

or
Code:
-type orddict(Key, Val) :: [{Key, Val}].



however, I can be difficult to build new complex types.





Michał Zajda
------------------
Erlang Solutions Ltd
View user's profile Send private message
roth
Posted: Sat Apr 10, 2010 4:34 pm Reply with quote
User Joined: 07 Apr 2010 Posts: 13
zajda wrote:
there is no such type in specs as dictionary.


Looks like 'dict()' is what I wanted...
View user's profile Send private message
zajda
Posted: Sat Apr 10, 2010 4:48 pm Reply with quote
User Joined: 22 Aug 2009 Posts: 83
ok, my bad.. in eep there is none. So, the bug is ":" in spec which shouldn't be used, but probably you got it already. If it does not work, make sure you have R13 release.






Michał Zajda
------------------
Erlang Solutions Ltd
View user's profile Send private message
wuji
Posted: Sat Aug 25, 2012 8:54 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
ram the ship, killing 17 American sailors.Word of the shooting shooting discount designer *beep* shooting comes on the same day that the Pentagon confirmed
it had agreed to a recent request from U.S. Central Central [h3]cheap Ralph Lauren Polo[/h3] Central Command to maintain a two carrier presence in the
East.The carrier U.S.S. John C. Stennis has been ordered to to cheap louboutins to head to the region four months ahead of schedule
September to replace the outgoing U.S.S. Enterprise. A A cheap designer *beep* A Pentagon spokesman said the Stennis is being sent so
there is no gap in between two carrier assignments to to replica designer *beep* to the region.On Sunday, the U.S.S. Eisenhower replaced the
Abraham Lincoln in the region. By replacing the Enterprise, Enterprise, [h4]discount designer *beep*[/h4] Enterprise, the U.S. will now be able to avoid having
View user's profile Send private message
dongdongwu
Posted: Thu Sep 20, 2012 2:12 am Reply with quote
User Joined: 19 Sep 2012 Posts: 236
His good friend Diane said: "Christian Louboutin Men Shoes was a magician, he make shoes is immediately put his female people with legs and advantage. He understands women wanted to do and can make them into beautiful Cinderella." Madonna often in its concert wearing Christian louboutin high heels , and some famous superstar like Angelina jolie, mariah Carey, beyonce Knowles, the famous Japanese singer YaYouMei Hamasaki helps Christian Louboutin Men Shoes set up its powerful position. The youngest customers will count Tom cruise's daughter sully cruz. Louboutin made for only a pair of handmade Christian Louboutin high heel Shoes! Want to be more fashion? Put on Christian Louboutin Outlet !
Candy colors of the chalaza high-heeled shoes with lolita type allure, set full finely gem blue "neon shoes" is to need to use "sexy" to describe. Each pair are worth careful appreciation of lithe and graceful fairy ludaoli, what kind of most let you move?Christian Louboutin Men Shoes that one brush red is always cannot resist the temptation, Christian Louboutin men outlet continue to use the days of high 8cm above slender heel proclaim the sexy and luxuriant. The bowknot on black pointed high-heeled shoes with sharp rivet concomitant, wild python met enchanting color printing grain, It is that pairs of high-heeled shoes lets Carrie more feminine flavour. Like Christian Louboutin for men her word.
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum