A
Size: a a a
ЗП
MapMaybe
не компилитсяMap
то все окimport Data.Singletons
import Data.Singletons.TH
-- $(promote [d|
-- map :: (a -> b) -> [a] -> [b]
-- map _ [] = []
-- map f (x:xs) = f x : map f xs
-- |])
type family Map (f :: k1 -> k2) (l :: [k1]) :: [k2] where
Map f '[] = '[]
Map f (e ': l) = f e ': Map f l
type MaybeMap xs = Map Maybe xs
ЗП
Expected kind ‘a0 ~> b0’, but ‘Maybe’ has kind ‘* -> *’
AA
ЗП
AA
ЗП
DB
DB
MP
DB