* rename Base to Core? * more efficient implementation for universe multiset trie * separate the generic hashing implementation from the type class; put the non-boilerplate related stuff into a Util namespace (maybe even a separate packege? fixplate-utils; and we can put the CSE etc which depends on the hash tables also there) * refactor synthRewrite/synthTransform (isn't basically a simple rewrite anyway?) * find a better API for all the synthesize/inherit/scan/etc functions - maybe a type (or types) for recursion schemes, and using that? eg. data Rec f a = Cata (f a -> a) | Para (f (Mu f, a) -> a) data Transform = T (Mu f -> Mu f) ----------------------------------------------------------------------------------------- mit jelent a resynthesis? csinalunk valtoztatasokat, es automatikusan le kene kovetni azt mondjuk Hash-ujraszamolassal vagy akar user altal adott ujraszamolo izevel a hashNodeWith fuggveny eleg arulkodo: hashNodeWith :: (Foldable f, Functor f, HashValue hash) => (f Hole -> hash -> hash) -> f (HashMu hash f) -> HashMu hash f de igazabol ha osszevonjuk, akkor f (HashMu hash f) -> (HashMu hash f) errol van szo csak nem kene melyre nyulni a strukturaban dehat valahol a synthTransform mar eddig is ezt csinalja: Attr f a -> Maybe (f (Attr f a)) ez amit a user ad es o adja hozza az f (Attr f a) -> Attr f a reszt --------- data Fold f a = Cata (f a -> a) | Para (f (Mu f, a) -> a) | Histo (f (Attr f a) -> a) -- | Para' (f (Mu f) -> f a -> a) -- ez lehetne smart constructor is | CataAnn (Ann f b a -> a) -- genSynth ebbol scan-t csinal? para' :: (f (Mu f) -> f a -> a) -> Fold f a para' g = Para (\xy -> g (fmap fst xy) (fmap snd xy) data Unfold f a = Ana (a -> f a) | Apo (a -> f (Either (Mu f) a)) | Futu (a -> f (CoAttr f a)) genFold :: Fold f a -> Mu f -> a genSynth :: Fold f a -> Mu f -> Attr f a --genScan :: Fold f a -> Attr f a -> Attr f a scan1 :: Fold f a -> f (Attr f a) -> Attr f a synth1 :: Fold f a -> f (Mu f , a) -> Attr f a data Zygo f a b = Zygo (f b -> b) (f (b,a) -> a) sot meg az Attr-ban is ki lehetne altalanositani a