BayesianLogic / blog

The BLOG programming language
http://bayesianlogic.github.io/
BSD 4-Clause "Original" or "Old" License
98 stars 31 forks source link

New iota #225

Closed lileicc closed 10 years ago

lileicc commented 10 years ago
type Person;
#Person ~ 1;

random Person x ~ iota({p for Person p});

query x;
cberzan commented 10 years ago

LGTM

Type ANY basically means BLOG doesn't do any type checking, and a runtime exception will be raised if there's a type mismatch, right?

lileicc commented 10 years ago

@cberzan Yes. Since we do have generic for Set. this is one way to handle it.

lileicc commented 10 years ago

Fixed iota to throw exception on non-singleton set.

lileicc commented 10 years ago

going to merge.