@@ -1246,25 +1246,25 @@ defmodule Module.Types.DescrTest do
12461246 assert list_hd ( term ( ) ) == :badnonemptylist
12471247 assert list_hd ( list ( term ( ) ) ) == :badnonemptylist
12481248 assert list_hd ( empty_list ( ) ) == :badnonemptylist
1249- assert list_hd ( non_empty_list ( term ( ) ) ) == { false , term ( ) }
1250- assert list_hd ( non_empty_list ( integer ( ) ) ) == { false , integer ( ) }
1251- assert list_hd ( difference ( list ( number ( ) ) , list ( integer ( ) ) ) ) == { false , number ( ) }
1249+ assert list_hd ( non_empty_list ( term ( ) ) ) == { :ok , term ( ) }
1250+ assert list_hd ( non_empty_list ( integer ( ) ) ) == { :ok , integer ( ) }
1251+ assert list_hd ( difference ( list ( number ( ) ) , list ( integer ( ) ) ) ) == { :ok , number ( ) }
12521252
1253- assert list_hd ( dynamic ( ) ) == { true , dynamic ( ) }
1254- assert list_hd ( dynamic ( list ( integer ( ) ) ) ) == { true , dynamic ( integer ( ) ) }
1253+ assert list_hd ( dynamic ( ) ) == { :ok , dynamic ( ) }
1254+ assert list_hd ( dynamic ( list ( integer ( ) ) ) ) == { :ok , dynamic ( integer ( ) ) }
12551255 assert list_hd ( union ( dynamic ( ) , atom ( ) ) ) == :badnonemptylist
12561256 assert list_hd ( union ( dynamic ( ) , list ( term ( ) ) ) ) == :badnonemptylist
12571257
12581258 assert list_hd ( difference ( list ( number ( ) ) , list ( number ( ) ) ) ) == :badnonemptylist
12591259 assert list_hd ( dynamic ( difference ( list ( number ( ) ) , list ( number ( ) ) ) ) ) == :badnonemptylist
12601260
12611261 assert list_hd ( union ( dynamic ( list ( float ( ) ) ) , non_empty_list ( atom ( ) ) ) ) ==
1262- { true , union ( dynamic ( float ( ) ) , atom ( ) ) }
1262+ { :ok , union ( dynamic ( float ( ) ) , atom ( ) ) }
12631263
12641264 # If term() is in the tail, it means list(term()) is in the tail
12651265 # and therefore any term can be returned from hd.
1266- assert list_hd ( non_empty_list ( atom ( ) , term ( ) ) ) == { false , term ( ) }
1267- assert list_hd ( non_empty_list ( atom ( ) , negation ( list ( term ( ) , term ( ) ) ) ) ) == { false , atom ( ) }
1266+ assert list_hd ( non_empty_list ( atom ( ) , term ( ) ) ) == { :ok , term ( ) }
1267+ assert list_hd ( non_empty_list ( atom ( ) , negation ( list ( term ( ) , term ( ) ) ) ) ) == { :ok , atom ( ) }
12681268 end
12691269
12701270 test "list_tl" do
@@ -1274,27 +1274,27 @@ defmodule Module.Types.DescrTest do
12741274 assert list_tl ( list ( integer ( ) ) ) == :badnonemptylist
12751275 assert list_tl ( difference ( list ( number ( ) ) , list ( number ( ) ) ) ) == :badnonemptylist
12761276
1277- assert list_tl ( non_empty_list ( integer ( ) ) ) == { false , list ( integer ( ) ) }
1277+ assert list_tl ( non_empty_list ( integer ( ) ) ) == { :ok , list ( integer ( ) ) }
12781278
12791279 assert list_tl ( non_empty_list ( integer ( ) , atom ( ) ) ) ==
1280- { false , union ( atom ( ) , non_empty_list ( integer ( ) , atom ( ) ) ) }
1280+ { :ok , union ( atom ( ) , non_empty_list ( integer ( ) , atom ( ) ) ) }
12811281
12821282 # The tail of either a (non empty) list of integers with an atom tail or a (non empty) list
12831283 # of tuples with a float tail is either an atom, or a float, or a (possibly empty) list of
12841284 # integers with an atom tail, or a (possibly empty) list of tuples with a float tail.
12851285 assert list_tl ( union ( non_empty_list ( integer ( ) , atom ( ) ) , non_empty_list ( tuple ( ) , float ( ) ) ) ) ==
1286- { false ,
1286+ { :ok ,
12871287 atom ( )
12881288 |> union ( float ( ) )
12891289 |> union (
12901290 union ( non_empty_list ( integer ( ) , atom ( ) ) , non_empty_list ( tuple ( ) , float ( ) ) )
12911291 ) }
12921292
1293- assert list_tl ( dynamic ( ) ) == { true , dynamic ( ) }
1294- assert list_tl ( dynamic ( list ( integer ( ) ) ) ) == { true , dynamic ( list ( integer ( ) ) ) }
1293+ assert list_tl ( dynamic ( ) ) == { :ok , dynamic ( ) }
1294+ assert list_tl ( dynamic ( list ( integer ( ) ) ) ) == { :ok , dynamic ( list ( integer ( ) ) ) }
12951295
12961296 assert list_tl ( dynamic ( list ( integer ( ) , atom ( ) ) ) ) ==
1297- { true , dynamic ( union ( atom ( ) , list ( integer ( ) , atom ( ) ) ) ) }
1297+ { :ok , dynamic ( union ( atom ( ) , list ( integer ( ) , atom ( ) ) ) ) }
12981298 end
12991299
13001300 test "tuple_fetch" do
@@ -2374,9 +2374,6 @@ defmodule Module.Types.DescrTest do
23742374 assert list ( term ( ) , term ( ) ) |> to_quoted_string ( ) ==
23752375 "empty_list() or non_empty_list(term(), term())"
23762376
2377- assert non_empty_list ( term ( ) , difference ( term ( ) , list ( term ( ) ) ) ) |> to_quoted_string ( ) ==
2378- "improper_list()"
2379-
23802377 # Test normalization
23812378
23822379 # Remove duplicates
0 commit comments