haskore-0.2.0.3: The Haskore Computer Music System

Safe Haskell | None

Medium.Plain.ContextFreeGrammar

# Documentation

data Tag key prim Source

Constructors

Prim prim |
Call key |
CallMulti Int key |

Instances

(Eq key, Eq prim) => Eq (Tag key prim) |
(Ord key, Ord prim) => Ord (Tag key prim) |
(Show key, Show prim) => Show (Tag key prim) |

type TagMedium key prim = T (Tag key prim)Source

type T key prim = [(key, TagMedium key prim)]Source

fromMedium :: (Ord key, Ord prim) => [key] -> Int -> T prim -> T key primSource

toMedium :: (Show key, Ord key, Ord prim) => T key prim -> T primSource

expand :: (Show key, Ord key, Ord prim) => T key prim -> [(key, T prim)]Source

whileM :: Monad m => (a -> Bool) -> [StateT s m a] -> StateT s m [a]Source

condense :: (Ord key, Ord prim) => key -> T key prim -> (Int, T key prim)Source

joinTag :: Construct medium => Tag key (medium (Tag key prim)) -> medium (Tag key prim)Source

replaceInfix :: (Eq a, Eq b) => a -> [b] -> [b] -> [Tag a b]Source

isCyclic :: Eq a => [a] -> Bool Source

smallestCycle :: Eq a => [a] -> [a]Source

maximumCommonInfix :: (Ord a, Ord b) => ([a] -> b) -> [a] -> [a]Source

maximumCommonInfixMulti :: (Ord a, Ord b) => ([a] -> b) -> [[a]] -> [a]Source

commonPrefix :: Eq a => [a] -> [a] -> [a]Source

commonPrefixRec :: Eq a => [a] -> [a] -> [a]Source