use crate::{logic::ops::IndexLogic, prelude::*};
use core::marker::PhantomData;
#[builtin("map.Map.map")]
pub struct Mapping<A: ?Sized, B>(PhantomData<fn(&A) -> B>);
impl<A: ?Sized, B> Mapping<A, B> {
#[logic]
#[builtin("map.Map.get")]
#[allow(unused_variables)]
pub fn get(self, a: A) -> B {
dead
}
#[logic]
#[builtin("map.Map.set")]
#[allow(unused_variables)]
pub fn set(self, a: A, b: B) -> Self {
dead
}
#[logic]
#[builtin("map.Const.const")]
#[allow(unused_variables)]
pub fn cst(b: B) -> Self {
dead
}
#[logic]
#[builtin("map.MapExt.(==)")]
#[allow(unused_variables)]
pub fn ext_eq(self, x: Self) -> bool {
dead
}
}
impl<A: ?Sized, B> IndexLogic<A> for Mapping<A, B> {
type Item = B;
#[logic(open, inline)]
fn index_logic(self, a: A) -> B {
self.get(a)
}
}