universe-th-0.0.0.6: Construct a Dec's ancestor list.

Safe HaskellNone

Language.Haskell.TH.Universe

Contents

Synopsis

Documentation

get_universe :: Name -> Q UniverseSource

Collect all the ancestor Dec's for whatever is passed in by name. For instance if we have

 data Otherthing = Otherthing Float
 data Thing = Thing OtherThing Int

then

 get_universe ''Thing

would return the Dec's for Thing, OtherThing, Int and Float

sub_universe :: [Dec] -> Name -> UniverseSource

Find the type in the passed in universe of Decs ([Dec]), and all of the ancestors in the universe.

Utils ... Not sure how to hide these.

filter_dups' :: Eq a => [a] -> [(a, b)] -> [a]Source

eval_state :: (Monad m, Functor m) => ErrorStateT e [a1] m a -> m (Either e a)Source

type Universe = [(Name, Dec)]Source