(ast: AST.AST)
| 167 | * @category reflection |
| 168 | */ |
| 169 | export const isVoid = (ast: AST.AST): boolean => { |
| 170 | switch (ast._tag) { |
| 171 | case "VoidKeyword": { |
| 172 | return true |
| 173 | } |
| 174 | case "Transformation": { |
| 175 | return isVoid(ast.from) |
| 176 | } |
| 177 | case "Suspend": { |
| 178 | return isVoid(ast.f()) |
| 179 | } |
| 180 | default: { |
| 181 | return false |
| 182 | } |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | /** |
| 187 | * @since 1.0.0 |
no test coverage detected