<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="239100" data-post-id="239100">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ityonemo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ityonemo/120/11341_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ityonemo
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Lists are strictly [list_type | final_type] and there’s no additional granularity available.</p>
<p>There’s also some tricky “bugs”? in the spec, like nonempty improper lists are usually tagged as any for the final type, which <em>technically</em> includes the empty list, which is “not correct”</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="239100" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/types-that-you-wish-were-in-elixir/45161/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-239100" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="239100"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="239109" data-post-id="239109">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="eksperimental" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eksperimental/120/1401_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  eksperimental
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="ityonemo" data-post="12" data-topic="45161">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ityonemo/48/11341_2.png" class="avatar"> ityonemo:</div>
<blockquote>
<p>There’s also some tricky “bugs”? in the spec, like nonempty improper lists are usually tagged as any for the final type, which <em>technically</em> includes the empty list, which is “not correct”</p>
</blockquote>
</aside>
<p>That is precisely what I am trying to tackle with the library i just published,<br>
Look at the types <code>t:all/0</code> and <code>t:all_but_empty_list/0</code> (commented out)<br>
<a href="https://github.com/eksperimental/extended_types/blob/53a86539296796ad7843ba4f8de641b2b93ec52c/lib/extended_types/types.ex#L116-L159" rel="noopener nofollow ugc">https://github.com/eksperimental/extended_types/blob/53a86539296796ad7843ba4f8de641b2b93ec52c/lib/extended_types/types.ex#L116-L159</a></p>
<p>I am thinking of creating a function/macro that can generate custom types where certain types are excluded from <code>any()</code>.</p>
<p><em><strong>Edit: It is covered in these lines:</strong></em><br>
<code>@type any_but_list :: ...</code><br>
<a href="https://github.com/eksperimental/extended_types/blob/07594b8acf45b78112e08ad56c6ad867e8f0b675/lib/extended_types/types.ex#L146-L156" rel="noopener nofollow ugc">https://github.com/eksperimental/extended_types/blob/07594b8acf45b78112e08ad56c6ad867e8f0b675/lib/extended_types/types.ex#L146-L156</a></p>
<p><code>@type improper_list :: nonempty_improper_list(any, any_but_list)</code><br>
<a href="https://github.com/eksperimental/extended_types/blob/07594b8acf45b78112e08ad56c6ad867e8f0b675/lib/extended_types/types.ex#L192-L197" rel="noopener nofollow ugc">https://github.com/eksperimental/extended_types/blob/07594b8acf45b78112e08ad56c6ad867e8f0b675/lib/extended_types/types.ex#L192-L197</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="239109" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/types-that-you-wish-were-in-elixir/45161/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-239109" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="239109"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="239110" data-post-id="239110">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="eksperimental" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eksperimental/120/1401_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  eksperimental
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I think it will be a good addition to the Typespecs page, to list all these caveats</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="239110" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/types-that-you-wish-were-in-elixir/45161/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-239110" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="239110"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="239168" data-post-id="239168">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josefrichter" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josefrichter/120/19529_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josefrichter
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This may be relevant <a href="https://twitter.com/wojtekmach/status/1460631269688102920?s=21" class="inline-onebox" rel="noopener nofollow ugc">Wojtek Mach on X: "For type specs fans out there, Erlang 25 is documenting all the built-in types, accessible in html docs and shell! See https://t.co/p6isYSvYpi https://t.co/CzsOAXhq5d" / X</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="239168" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/types-that-you-wish-were-in-elixir/45161/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-239168" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="239168"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>