Commit cab191ca authored by Jeff Smits's avatar Jeff Smits

Fixed bug in building explode patterns

parent 8de600eb
......@@ -413,14 +413,13 @@ impl BuildTerm {
}
Explode(ref cons, ref children) => {
use aterm::Term::*;
use interpreter::b;
use interpreter::{b, from_cons_nil_list};
let cons = cons.build(context)?;
let children = children.build(context)?;
let children = children
.get_list()
.ok_or(
Error::UnknownBehaviour(
let children =
from_cons_nil_list(children)
.map_err(|_| Error::UnknownBehaviour(
"Non-list in build of explode pattern (#) second argument"))?;
match b(&cons).as_inner().term {
Application(ref c, ref r) if r.is_empty() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment