mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
recognize functions that become tail-recursive after closure conversion
This commit is contained in:
parent
aecafe5c80
commit
4c445f9f24
2 changed files with 12 additions and 3 deletions
|
@ -538,6 +538,11 @@ impl<'a> LambdaSet<'a> {
|
|||
*self.representation
|
||||
}
|
||||
|
||||
/// Does the lambda set contain the given symbol?
|
||||
pub fn contains(&self, symbol: Symbol) -> bool {
|
||||
self.set.iter().any(|(s, _)| *s == symbol)
|
||||
}
|
||||
|
||||
pub fn is_represented(&self) -> Option<Layout<'a>> {
|
||||
if let Layout::Struct(&[]) = self.representation {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue