Safe Haskell | None |
---|
- get_universe :: Name -> Q Universe
- sub_universe :: [Dec] -> Name -> Universe
- get_type_names :: Type -> [Name]
- filter_dups' :: Eq a => [a] -> [(a, b)] -> [a]
- collect_new_dec_names :: (Monad m, MonadPlus m, MonadState Universe m, MonadError String m) => Dec -> m [Name]
- collect_dec_type_names :: Dec -> [Name]
- eval_state :: (Monad m, Functor m) => ErrorStateT e [a1] m a -> m (Either e a)
- type Universe = [(Name, Dec)]
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.
get_type_names :: Type -> [Name]Source
filter_dups' :: Eq a => [a] -> [(a, b)] -> [a]Source
collect_new_dec_names :: (Monad m, MonadPlus m, MonadState Universe m, MonadError String m) => Dec -> m [Name]Source
collect_dec_type_names :: Dec -> [Name]Source
eval_state :: (Monad m, Functor m) => ErrorStateT e [a1] m a -> m (Either e a)Source