aboutsummaryrefslogtreecommitdiff
path: root/example/turing/src
diff options
context:
space:
mode:
Diffstat (limited to 'example/turing/src')
-rw-r--r--example/turing/src/machine.h34
1 files changed, 20 insertions, 14 deletions
diff --git a/example/turing/src/machine.h b/example/turing/src/machine.h
index a30c6e3..4a72d94 100644
--- a/example/turing/src/machine.h
+++ b/example/turing/src/machine.h
@@ -63,19 +63,22 @@ class simulate {
>::template get<Field>;
public:
- using type = tav::Eval<simulate<
- Transition,
- current_state<state::field::NEXT>,
- tape::writeSymbol<
- Position,
- current_state<state::field::WRITE>,
- Tape
- >,
- updatePosition<
- current_state<state::field::MOVE>,
- Position
- >
- >>;
+ using type = tav::Cons<
+ tav::Pair<Position, Tape>,
+ tav::Eval<simulate<
+ Transition,
+ current_state<state::field::NEXT>,
+ tape::writeSymbol<
+ Position,
+ current_state<state::field::WRITE>,
+ Tape
+ >,
+ updatePosition<
+ current_state<state::field::MOVE>,
+ Position
+ >
+ >>
+ >;
};
template <
@@ -84,7 +87,10 @@ template <
typename Position
>
struct simulate<Transition, void, Tape, Position> {
- typedef Tape type;
+ using type = tav::Cons<
+ tav::Pair<Position, Tape>,
+ void
+ >;
};
// (define (run program state tape position)