MetaObject-0.0.6.20150815: A meta-object system for Haskell based on Perl 6

Safe HaskellNone
LanguageHaskell98

MO.Util

Synopsis

Documentation

on :: (b -> b -> c) -> (a -> b) -> a -> a -> c infixl 0 Source

traceShow :: Show a => a -> b -> b Source

traceM :: Monad m => String -> m () Source

(?==?) :: (Eq a, Typeable a, Typeable b) => a -> b -> Bool Source

(?<=>?) :: (Ord a, Typeable a, Typeable b) => a -> b -> Ordering Source

data Ord a => Collection a Source

Constructors

MkCollection 

Fields

c_objects :: Set a
 
c_names :: AtomMap a
 

Instances

Ord a => Eq (Collection a) 
Ord a => Ord (Collection a) 
(Ord a, Show a) => Show (Collection a) 
Typeable (* -> *) Collection 

cmap :: (Ord a, Ord b) => (a -> b) -> Collection a -> Collection b Source

remove :: (Monad m, Ord a) => Atom -> a -> Collection a -> m (Collection a) Source

add :: (Monad m, Ord a) => Atom -> a -> Collection a -> m (Collection a) Source

insert :: Ord a => Atom -> a -> Collection a -> Collection a Source

newCollection :: Ord a => [(Atom, a)] -> Collection a Source

newCollection' :: Ord a => (a -> Atom) -> [a] -> Collection a Source

items :: Ord a => Collection a -> [a] Source

items_named :: Ord a => Collection a -> [(Atom, a)] Source

includes :: Ord a => Collection a -> a -> Bool Source

includes_any :: Ord a => Collection a -> [a] -> Bool Source

includes_all :: Ord a => Collection a -> [a] -> Bool Source

shadow :: Ord a => [Collection a] -> [a] Source

merge :: Ord a => [Collection a] -> [a] Source

sym_shadowing :: (Show a, Ord a) => b -> (b -> [b]) -> (b -> Collection a) -> Collection a Source

sym_merged_parents :: (Show a, Ord a) => b -> (b -> [b]) -> (b -> Collection a) -> Collection a Source

sym_inheritance :: Ord a => b -> (b -> [b]) -> (b -> Collection a) -> Collection a Source

module MO.Capture

trace :: String -> a -> a

The trace function outputs the trace message given as its first argument, before returning the second argument as its result.

For example, this returns the value of f x but first outputs the message.

trace ("calling f with x = " ++ show x) (f x)

The trace function should only be used for debugging, or for monitoring execution. The function is not referentially transparent: its type indicates that it is a pure function but it has the side effect of outputting the trace message.