mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
Lift Listable through Listable2.
This commit is contained in:
parent
6db5cf152a
commit
fe6a0852c5
@ -11,6 +11,7 @@ module Data.Functor.Listable
|
||||
, Listable1(..)
|
||||
, tiers1
|
||||
, Listable2(..)
|
||||
, tiers2
|
||||
, liftCons1
|
||||
) where
|
||||
|
||||
@ -27,6 +28,10 @@ tiers1 = liftTiers tiers
|
||||
class Listable2 l where
|
||||
liftTiers2 :: [[a]] -> [[b]] -> [[l a b]]
|
||||
|
||||
tiers2 :: (Listable a, Listable b, Listable2 l) => [[l a b]]
|
||||
tiers2 = liftTiers2 tiers tiers
|
||||
|
||||
|
||||
liftCons1 :: [[a]] -> (a -> b) -> [[b]]
|
||||
liftCons1 tiers f = mapT f tiers `addWeight` 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user