Start elaborating singleton labeled tuple patterns #6065
112 passed, 17 failed and 0 skipped
❌ junit_tests.xml
129 tests were completed in 0ms with 112 passed, 17 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
HazelTests | 112✅ | 17❌ | 0ms |
❌ HazelTests
HazelTests.MakeTerm
✅ Singleton Labled Tuple ascription in let
✅ Assigning labeled tuple to variable
✅ Multiple labels in tuple
✅ Integer Literal
✅ Empty Hole
✅ Free Variable
✅ Parenthesized Expression
✅ Let Expression
✅ Function Application
✅ Named Function Definition
✅ Incomplete Function Definition
✅ Constructor
✅ Type Alias
HazelTests.LabeledTuple
✅ Singleton unlabeled
✅ Singleton labeled
✅ unlabeled remains same order
✅ fully labeled retains ordering
✅ Missing labels get added
✅ Present labels get reordered
✅ Partial labels get reordered
✅ Extra labels get reordered
✅ pair labeled, unlabled
✅ Independent label sets with some overlap
HazelTests.Statics
✅ Function with unknown param
✅ Function with known param
✅ Function with labeled param
✅ bifunction
✅ bifunction
✅ Typechecking fails for unlabeled variable being assigned to labeled tuple
✅ Typechecking fails for unlabeled variable being assigned to labeled tuple
❌ Assigning labeled tuple to variable
Alcotest assertion failure
❌ Singleton Labled Tuple ascription in let
Alcotest assertion failure
✅ Singleton Labled Tuple ascription in let with wrong type should fail
❌ Singleton Labled Tuple with specified label
Alcotest assertion failure
✅ Labeled tuple with multiple labels
✅ Let statement that adds labels during elaboration
❌ Duplicate singleton labels
Alcotest assertion failure
✅ Reconstructed labeled tuple without values
❌ Singleton labeled argument let with unknown type
Alcotest assertion failure
❌ nested different singleton labeled arguments
Alcotest assertion failure
❌ nested different singleton labeled arguments
Alcotest assertion failure
✅ Singleton labeled argument function application with unknown type
✅ Singleton labeled argument function application with no labeled param
✅ Singleton labeled argument not labeled in pattern
HazelTests.Elaboration
✅ Single integer
✅ Empty hole
✅ Free variable
✅ Let expression
✅ Inconsistent binary operation
✅ Consistent if statement
✅ An unapplied function
✅ Application of function on free variable
✅ Inconsistent case statement
✅ Let expression for a function
✅ Function application with a deferred argument
✅ Labeled tuple elaboration
✅ Rearranged labeled tuple
❌ Singleton labeled tuple adds labels
Alcotest assertion failure
✅ Singleton labeled tuple
❌ Singleton labeld tuple analysis adds label
Alcotest assertion failure
❌ Singleton labeld tuple analysis adds label with type alias
Alcotest assertion failure
❌ Singleton labeld tuple analysis adds label with type alias
Alcotest assertion failure
✅ Singleton labeled argument function application with known type
✅ Singleton labeled argument function application with no label in ap
❌ Failed cast inside labeled tuple
Alcotest assertion failure
❌ nested different singleton labeled arguments
Alcotest assertion failure
❌ Singleton labeled argument function application with unknown type
Alcotest assertion failure
❌ Singleton labeled argument let with unknown type
Alcotest assertion failure
✅ Function application with a single remaining argument after deferral
❌ Function application with a deferral of a hole
Alcotest assertion failure
HazelTests.Evaluator
✅ Integer literal
✅ Integer sum
✅ Labeled tuple projection
✅ Function application
✅ Function deferral
✅ Deferral applied to hole
❌ Elaborated Pattern for labeled tuple
Alcotest assertion failure
HazelTests.ListUtil
✅ rev_if with false
✅ rev_if with true
✅ dedup
✅ dedup_f
✅ group_by with constant function preserves list
✅ group_by groups into evens/odds
✅ range generates sequential integers [1,6)
✅ range defaults lower bound to 0
✅ range lo = hi is empty
✅ Invalid range raises error
✅ mk_frame creates a frame from the beginning
✅ mk_frame creates a frame from the end
✅ mk_frame raises when making a frame past the end
✅ mk_frame raises when making a frame before the beginning
✅ mk_frame makes a frame splitting the list
✅ mk_frame makes a frame splitting the list
✅ split with no found element returns the original list
✅ split with first found returns the head and tail
✅ splits on the middle element
✅ combine_opt
✅ is_empty with empty list
✅ is_empty with non-empty list
✅ flat_map with empty list
✅ flat_map with non-empty list
✅ flat_map with non-empty list and empty result
✅ join with empty list
✅ join with single element list
✅ join with multiple element list
✅ hd_opt with empty list
✅ hd_opt with non-empty list
✅ nth_opt with empty list
✅ nth_opt with non-empty list
✅ nth_opt with out of bounds index
✅ split_n_opt with empty list
✅ split_n_opt with non-empty list
✅ split_n_opt with out of bounds index
✅ split_n_opt with zero index
✅ split_n with empty list
✅ split_n with non-empty list
✅ split_n with out of bounds index
✅ split_n with zero index
✅ split_sublist_opt with empty list
✅ split_sublist_opt with non-empty list
✅ split_sublist_opt with out of bounds index
✅ split_sublist_opt with zero index
✅ split_sublist with empty list
✅ split_sublist with non-empty list
✅ split_sublist with out of bounds index
✅ split_sublist with zero index
✅ sublist with empty list
✅ sublist with non-empty list
✅ sublist with out of bounds index
Annotations
Check failure on line 0 in junit_tests.xml
github-actions / Test Report
HazelTests ► HazelTests.Statics ► Assigning labeled tuple to variable
Failed test found in:
junit_tests.xml
Error:
Alcotest assertion failure
Raw output
Alcotest assertion failure
FAIL let x = (l=32) in let y : (l=Int) = x in y
Expected: `Some
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel ({ ids = <opaque>; copied = <opaque>; term = (Label "l") },
{ ids = <opaque>; copied = <opaque>; term = Int }))
}
])
}'
Received: `Some { ids = <opaque>; copied = <opaque>; term = Int }'
Check failure on line 0 in junit_tests.xml
github-actions / Test Report
HazelTests ► HazelTests.Statics ► Singleton Labled Tuple ascription in let
Failed test found in:
junit_tests.xml
Error:
Alcotest assertion failure
Raw output
Alcotest assertion failure
FAIL let x : (l=String) = ("a") in x
Expected: `Some
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel ({ ids = <opaque>; copied = <opaque>; term = (Label "l") },
{ ids = <opaque>; copied = <opaque>; term = String }))
}
])
}'
Received: `Some { ids = <opaque>; copied = <opaque>; term = String }'
Check failure on line 0 in junit_tests.xml
github-actions / Test Report
HazelTests ► HazelTests.Statics ► Singleton Labled Tuple with specified label
Failed test found in:
junit_tests.xml
Error:
Alcotest assertion failure
Raw output
Alcotest assertion failure
FAIL let x : (l=String) = (l="a") in x
Expected: `Some
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel ({ ids = <opaque>; copied = <opaque>; term = (Label "l") },
{ ids = <opaque>; copied = <opaque>; term = String }))
}
])
}'
Received: `Some { ids = <opaque>; copied = <opaque>; term = String }'
Check failure on line 0 in junit_tests.xml
github-actions / Test Report
HazelTests ► HazelTests.Statics ► Duplicate singleton labels
Failed test found in:
junit_tests.xml
Error:
Alcotest assertion failure
Raw output
Alcotest assertion failure
FAIL let y : (l=(l=Int)) = (l=1) in y
Expected: `Some
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel ({ ids = <opaque>; copied = <opaque>; term = (Label "l") },
{ ids = <opaque>; copied = <opaque>;
term =
(Parens
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>;
term = (Label "l") },
{ ids = <opaque>; copied = <opaque>; term = Int }
))
}
])
})
}
))
}
])
}'
Received: `Some { ids = <opaque>; copied = <opaque>; term = Int }'
Check failure on line 0 in junit_tests.xml
github-actions / Test Report
HazelTests ► HazelTests.Statics ► Singleton labeled argument let with unknown type
Failed test found in:
junit_tests.xml
Error:
Alcotest assertion failure
Raw output
Alcotest assertion failure
FAIL let x : (a=?) = (a=1) in x
Expected: `Some
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel ({ ids = <opaque>; copied = <opaque>; term = (Label "a") },
{ ids = <opaque>; copied = <opaque>;
term = (Unknown (Hole EmptyHole)) }
))
}
])
}'
Received: `Some
{ ids = <opaque>; copied = <opaque>; term = (Unknown Internal) }'
Check failure on line 0 in junit_tests.xml
github-actions / Test Report
HazelTests ► HazelTests.Statics ► nested different singleton labeled arguments
Failed test found in:
junit_tests.xml
Error:
Alcotest assertion failure
Raw output
Alcotest assertion failure
FAIL let x : (b=c=String) = b="" in x
Expected: `Some
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel ({ ids = <opaque>; copied = <opaque>; term = (Label "b") },
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>; term = (Label "c")
},
{ ids = <opaque>; copied = <opaque>; term = String }))
}
])
}
))
}
])
}'
Received: `Some { ids = <opaque>; copied = <opaque>; term = String }'
Check failure on line 0 in junit_tests.xml
github-actions / Test Report
HazelTests ► HazelTests.Statics ► nested different singleton labeled arguments
Failed test found in:
junit_tests.xml
Error:
Alcotest assertion failure
Raw output
Alcotest assertion failure
FAIL let x : (a=b=c=?) = b=? in x
Expected: `Some
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel ({ ids = <opaque>; copied = <opaque>; term = (Label "a") },
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>; term = (Label "b")
},
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>;
term = (Label "c") },
{ ids = <opaque>; copied = <opaque>;
term = (Unknown (Hole EmptyHole)) }
))
}
])
}
))
}
])
}
))
}
])
}'
Received: `Some
{ ids = <opaque>; copied = <opaque>; term = (Unknown Internal) }'
Check failure on line 0 in junit_tests.xml
github-actions / Test Report
HazelTests ► HazelTests.Elaboration ► Singleton labeled tuple adds labels
Failed test found in:
junit_tests.xml
Error:
Alcotest assertion failure
Raw output
Alcotest assertion failure
FAIL let x : (l=String) = "a" in x
Expected: `{ ids = <opaque>; copied = <opaque>;
term =
(Let ({ ids = <opaque>; copied = <opaque>; term = (Var "x") },
{ ids = <opaque>; copied = <opaque>;
term =
(Tuple
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>; term = (Label "l") },
{ ids = <opaque>; copied = <opaque>; term = (String "a") }))
}
])
},
{ ids = <opaque>; copied = <opaque>; term = (Var "x") }))
}'
Received: `{ ids = <opaque>; copied = <opaque>;
term =
(Let (
{ ids = <opaque>; copied = <opaque>;
term =
(Cast (
{ ids = <opaque>; copied = <opaque>;
term =
(Cast (
{ ids = <opaque>; copied = <opaque>;
term =
(Cast (
{ ids = <opaque>; copied = <opaque>; term = (Var "x") },
{ ids = <opaque>; copied = <opaque>; term = String },
{ ids = <opaque>; copied = <opaque>;
term = (Unknown Internal) }
))
},
{ ids = <opaque>; copied = <opaque>; term = (Unknown Internal)
},
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term = (Unknown Internal) }
])
}
))
},
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term = (Unknown Internal) }
])
},
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>; term = (Label "l")
},
{ ids = <opaque>; copied = <opaque>; term = String }))
}
])
}
))
},
{ ids = <opaque>; copied = <opaque>;
term =
(Tuple
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>; term = (Label "l") },
{ ids = <opaque>; copied = <opaque>; term = (String "a") }))
}
])
},
{ ids = <opaque>; copied = <opaque>; term = (Var "x") }))
}'
Check failure on line 0 in junit_tests.xml
github-actions / Test Report
HazelTests ► HazelTests.Elaboration ► Singleton labeld tuple analysis adds label
Failed test found in:
junit_tests.xml
Error:
Alcotest assertion failure
Raw output
Alcotest assertion failure
FAIL Singleton labeld tuple analysis adds label
Expected: `{ ids = <opaque>; copied = <opaque>;
term =
(Let ({ ids = <opaque>; copied = <opaque>; term = (Var "x") },
{ ids = <opaque>; copied = <opaque>;
term =
(Tuple
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>; term = (Label "l") },
{ ids = <opaque>; copied = <opaque>; term = (String "a") }))
}
])
},
{ ids = <opaque>; copied = <opaque>; term = (Var "x") }))
}'
Received: `{ ids = <opaque>; copied = <opaque>;
term =
(Let (
{ ids = <opaque>; copied = <opaque>;
term =
(Cast (
{ ids = <opaque>; copied = <opaque>;
term =
(Cast (
{ ids = <opaque>; copied = <opaque>;
term =
(Cast (
{ ids = <opaque>; copied = <opaque>; term = (Var "x") },
{ ids = <opaque>; copied = <opaque>; term = String },
{ ids = <opaque>; copied = <opaque>;
term = (Unknown Internal) }
))
},
{ ids = <opaque>; copied = <opaque>; term = (Unknown Internal)
},
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term = (Unknown Internal) }
])
}
))
},
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term = (Unknown Internal) }
])
},
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>; term = (Label "l")
},
{ ids = <opaque>; copied = <opaque>; term = String }))
}
])
}
))
},
{ ids = <opaque>; copied = <opaque>;
term =
(Tuple
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>; term = (Label "l") },
{ ids = <opaque>; copied = <opaque>; term = (String "a") }))
}
])
},
{ ids = <opaque>; copied = <opaque>; term = (Var "x") }))
}'
Check failure on line 0 in junit_tests.xml
github-actions / Test Report
HazelTests ► HazelTests.Elaboration ► Singleton labeld tuple analysis adds label with type alias
Failed test found in:
junit_tests.xml
Error:
Alcotest assertion failure
Raw output
Alcotest assertion failure
FAIL type T = (a=String) in
let x : T = "hello" in x
Expected: `{ ids = <opaque>; copied = <opaque>;
term =
(Let ({ ids = <opaque>; copied = <opaque>; term = (Var "x") },
{ ids = <opaque>; copied = <opaque>;
term =
(Tuple
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>; term = (Label "a") },
{ ids = <opaque>; copied = <opaque>; term = (String "hello")
}
))
}
])
},
{ ids = <opaque>; copied = <opaque>; term = (Var "x") }))
}'
Received: `{ ids = <opaque>; copied = <opaque>;
term =
(Let (
{ ids = <opaque>; copied = <opaque>;
term =
(Cast (
{ ids = <opaque>; copied = <opaque>;
term =
(Cast (
{ ids = <opaque>; copied = <opaque>;
term =
(Cast (
{ ids = <opaque>; copied = <opaque>; term = (Var "x") },
{ ids = <opaque>; copied = <opaque>; term = String },
{ ids = <opaque>; copied = <opaque>;
term = (Unknown Internal) }
))
},
{ ids = <opaque>; copied = <opaque>; term = (Unknown Internal)
},
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term = (Unknown Internal) }
])
}
))
},
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term = (Unknown Internal) }
])
},
{ ids = <opaque>; copied = <opaque>;
term =
(Parens
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>;
term = (Label "a") },
{ ids = <opaque>; copied = <opaque>; term = String
}
))
}
])
})
}
))
},
{ ids = <opaque>; copied = <opaque>;
term =
(Tuple
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>; term = (Label "a") },
{ ids = <opaque>; copied = <opaque>; term = (String "hello")
}
))
}
])
},
{ ids = <opaque>; copied = <opaque>; term = (Var "x") }))
}'
Check failure on line 0 in junit_tests.xml
github-actions / Test Report
HazelTests ► HazelTests.Elaboration ► Singleton labeld tuple analysis adds label with type alias
Failed test found in:
junit_tests.xml
Error:
Alcotest assertion failure
Raw output
Alcotest assertion failure
FAIL let zip_only : (zip=Int) = (zip=12345) in zip_only
Expected: `{ ids = <opaque>; copied = <opaque>;
term =
(Let ({ ids = <opaque>; copied = <opaque>; term = (Var "zip_only") },
{ ids = <opaque>; copied = <opaque>;
term =
(Tuple
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>; term = (Label "zip") },
{ ids = <opaque>; copied = <opaque>; term = (Int 12345) }))
}
])
},
{ ids = <opaque>; copied = <opaque>; term = (Var "zip_only") }))
}'
Received: `{ ids = <opaque>; copied = <opaque>;
term =
(Let (
{ ids = <opaque>; copied = <opaque>;
term =
(Cast (
{ ids = <opaque>; copied = <opaque>;
term =
(Cast (
{ ids = <opaque>; copied = <opaque>;
term =
(Cast (
{ ids = <opaque>; copied = <opaque>;
term = (Var "zip_only") },
{ ids = <opaque>; copied = <opaque>; term = Int },
{ ids = <opaque>; copied = <opaque>;
term = (Unknown Internal) }
))
},
{ ids = <opaque>; copied = <opaque>; term = (Unknown Internal)
},
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term = (Unknown Internal) }
])
}
))
},
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term = (Unknown Internal) }
])
},
{ ids = <opaque>; copied = <opaque>;
term =
(Prod
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>;
term = (Label "zip") },
{ ids = <opaque>; copied = <opaque>; term = Int }))
}
])
}
))
},
{ ids = <opaque>; copied = <opaque>;
term =
(Tuple
[{ ids = <opaque>; copied = <opaque>;
term =
(TupLabel (
{ ids = <opaque>; copied = <opaque>; term = (Label "zip") },
{ ids = <opaque>; copied = <opaque>; term = (Int 12345) }))
}
])
},
{ ids = <opaque>; copied = <opaque>; term = (Var "zip_only") }))
}'