Copyright | (c) Justus Sagemüller 2022 |
---|---|
License | GPL v3 |
Maintainer | (@) jsag $ hvl.no |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Documentation
type family ZipWithPlus (a :: Maybe Nat) (b :: Maybe Nat) :: Maybe Nat where ... Source #
ZipWithPlus 'Nothing y = 'Nothing | |
ZipWithPlus x 'Nothing = 'Nothing | |
ZipWithPlus ('Just x) ('Just y) = 'Just (x + y) |
type family ZipWithTimes (a :: Maybe Nat) (b :: Maybe Nat) :: Maybe Nat where ... Source #
ZipWithTimes 'Nothing y = 'Nothing | |
ZipWithTimes x 'Nothing = 'Nothing | |
ZipWithTimes ('Just x) ('Just y) = 'Just (x * y) |
type family BindMaybePred (a :: Maybe Nat) :: Maybe Nat where ... Source #
BindMaybePred 'Nothing = 'Nothing | |
BindMaybePred ('Just n) = MaybePred n |
type family FmapTriangularNum (a :: Maybe Nat) where ... Source #
FmapTriangularNum 'Nothing = 'Nothing | |
FmapTriangularNum ('Just n) = 'Just (TriangularNum n) |
binMaybePredSing :: forall a. Sing a -> Sing (BindMaybePred a) Source #
triangularNumSing :: forall a. Sing a -> Sing (TriangularNum a) Source #
fmapTriangularNumSing :: forall a. Sing a -> Sing (FmapTriangularNum a) Source #
zipWithPlusSing :: forall a b r. Sing a -> Sing b -> Sing (ZipWithPlus a b) Source #
zipWithTimesSing :: forall a b r. Sing a -> Sing b -> Sing (ZipWithTimes a b) Source #
zipWithTimesAssoc :: forall a b c r. Sing a -> Sing b -> Sing c -> (ZipWithTimes a (ZipWithTimes b c) ~ ZipWithTimes (ZipWithTimes a b) c => r) -> r Source #
zipWithTimesCommu :: forall a b r. Sing a -> Sing b -> (ZipWithTimes a b ~ ZipWithTimes b a => r) -> r Source #