Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
0399-Define-list-list-ContentType-using-built-i...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0399-Define-list-list-ContentType-using-built-ins.patch of Package erlang
From 6b4a4b3c12785aa09023a5dabbc75bbff97e882f Mon Sep 17 00:00:00 2001 From: Maxwell Elliot Heiber <mheiber@fb.com> Date: Mon, 21 Feb 2022 21:26:43 +0000 Subject: [PATCH] Define list() + list(ContentType) using built-ins Change the implementation of the `list/0` and `list/1` types exposed in the `erlang` module to be as documented in https://www.erlang.org/doc/reference_manual/typespec.html - My motivation for this change is to make it easier to implement a type checker for Erlang specs, since then we can remove some hard-coding for the meaning of `list()` and rely on `erlang.erl` as the source of truth. --- erts/preloaded/src/erlang.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl index af6f1e1946..181aa0f6f0 100644 --- a/erts/preloaded/src/erlang.erl +++ b/erts/preloaded/src/erlang.erl @@ -92,8 +92,8 @@ -type integer() :: integer(). -type iodata() :: iolist() | binary(). -type iolist() :: maybe_improper_list(byte() | binary() | iolist(), binary() | []). --type list() :: list(). --type list(ContentType) :: list(ContentType). +-type list() :: [any()]. +-type list(ContentType) :: [ContentType]. -type map() :: #{ any() => any() }. -type maybe_improper_list() :: maybe_improper_list(any(), any()). -type maybe_improper_list(ContentType, TerminationType) :: maybe_improper_list(ContentType, TerminationType). -- 2.34.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor