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

Copyright(c) 2006 Caio Marcelo
LicenseMIT
Maintainercmarcelo@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell98

MO.Util.C3

Description

C3 method resolution order implementation based on algorithm described in The Python 2.3 Method Resolution Order, v1.4, by Michele Simionato available at http://www.python.org/download/releases/2.3/mro/. Some tests also copied from Perl module Algorithm::C3.

The main function contains the test cases.

Synopsis

Documentation

linearize :: (Monad m, Eq a) => (a -> m [a]) -> a -> m [a] Source

Returns the a linearization using C3 algorithm. Takes a function and an element. We can apply the function in this element to obtain its parents.