Diffstat (limited to 'src/hkt.rs')
| -rw-r--r-- | src/hkt.rs | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -14,9 +14,9 @@ macro_rules! type_class { pub trait Hkt<$ctx>: for<$lt> ForLt<$lt, $ctx, $crate::hkt::Bound<$lt, $ctx>> {} - impl<$ctx, T> Hkt<$ctx> for T - where - T: for<$lt> ForLt<$lt, $ctx, $crate::hkt::Bound<$lt, $ctx>> + impl<$ctx, T> Hkt<$ctx> for T + where + T: for<$lt> ForLt<$lt, $ctx, $crate::hkt::Bound<$lt, $ctx>> {} pub type T<$lt, $ctx, H> = <H as ForLt<$lt, $ctx, $crate::hkt::Bound<$lt, $ctx>>>::T; @@ -32,14 +32,14 @@ pub use type_class; macro_rules! hkt { ( ($($type_class:tt)*): - for<$lt:lifetime, $ctx:lifetime> + for<$lt:lifetime, $ctx:lifetime> $vis:vis $name:ident$([$($generic:tt)*])? $(where {$($bound:tt)*})? => $($type:tt)* ) => { $vis struct $name<$ctx $(, $($generic)*)?>(core::marker::PhantomData<fn() -> (&$ctx (), $($($generic)*)?)>); - impl<$lt, $ctx $(, $($generic)*)?> $($type_class)*::ForLt<$lt, $ctx, $crate::hkt::Bound<$lt, $ctx>> for $name<$ctx $(, $($generic)*)?> - $(where $($bound)*)? + impl<$lt, $ctx $(, $($generic)*)?> $($type_class)*::ForLt<$lt, $ctx, $crate::hkt::Bound<$lt, $ctx>> for $name<$ctx $(, $($generic)*)?> + $(where $($bound)*)? { type T = $($type)*; } |