Student name: Kyle Headley
- Project kind: IC library implementation
- Project details: Extend the rust implementation of the RAZ with additional incremental features.
| #![allow(dead_code)] | |
| struct True; | |
| struct False; | |
| impl IsEqual<False> for True {type Out=False;} | |
| impl IsEqual<False> for False {type Out=True;} | |
| impl IsEqual<True> for True {type Out=True;} | |
| impl IsEqual<True> for False {type Out=False;} | |
| trait Nat {fn inst()->usize;} | |
| struct Zero; |
| // emulates the type of a function from types 'E' to sequence-like types | |
| pub trait SeqTypeFn<E> { type Result : SeqLike<E>; } | |
| // sequence-like interface | |
| pub trait SeqLike<E>{ | |
| fn new() -> Self; | |
| fn push(self,e:E) -> Self; | |
| fn first(&self) -> Option<&E>; | |
| } |
| trait F<V,X> {} | |
| struct D; | |
| trait TheV2 { | |
| type IsThis; | |
| } | |
| impl<V1,V2> TheV2 for F<V1,V2> { | |
| type IsThis = V2; |
| #![allow(unused)] | |
| use std::fmt::Debug; | |
| #[derive(Debug)] | |
| struct Door<S: DoorState> { | |
| state: S, | |
| } | |
| trait DoorState {} |
| use std::fmt::Display; | |
| trait Monadic {} | |
| #[derive(Debug)] | |
| struct Monad<M:Monadic,T>(M,T); | |
| #[derive(Debug)] | |
| struct Opt(bool); | |
| impl Monadic for Opt {} | |
| impl<T:Default> Monad<Opt,T> { |