// Souffle - A Datalog Compiler
// Copyright (c) 2020, The Souffle Developers. All rights reserved
// Licensed under the Universal Permissive License v 1.0 as shown at:
// - https://opensource.org/licenses/UPL
// - <souffle root>/licenses/SOUFFLE-UPL.txt

//
// Store ADT 2
// Test writing complex adts in CSV format
//


.type Nat = S {x : Nat}
          | Zero {}


.decl NumToNat(u : unsigned, n: Nat)
NumToNat(0, $Zero()).
NumToNat(x + 1, $S(n)) :- NumToNat(x, n), x < 10.
.output NumToNat
