MagicHaskeller-0.9.6.7: Automatic inductive functional programmer by systematic search

Safe HaskellNone
LanguageHaskell98

Control.Monad.Search.Best

Synopsis

Documentation

data Best a Source #

Unlike Matrix, Recomp, etc., the Best monad only keeps the best set of results. This makes the analytical synthesis like IgorII, and the exhaustive synthesis like Djinn, i.e., the resulting algorithms are more efficient, but cannot be used for (analytically-)generate-and-test.

Constructors

Result [a] 
Delay (Best a) 

Instances

Monad Best Source # 

Methods

(>>=) :: Best a -> (a -> Best b) -> Best b #

(>>) :: Best a -> Best b -> Best b #

return :: a -> Best a #

fail :: String -> Best a #

Functor Best Source # 

Methods

fmap :: (a -> b) -> Best a -> Best b #

(<$) :: a -> Best b -> Best a #

Applicative Best Source # 

Methods

pure :: a -> Best a #

(<*>) :: Best (a -> b) -> Best a -> Best b #

(*>) :: Best a -> Best b -> Best b #

(<*) :: Best a -> Best b -> Best a #

Alternative Best Source # 

Methods

empty :: Best a #

(<|>) :: Best a -> Best a -> Best a #

some :: Best a -> Best [a] #

many :: Best a -> Best [a] #

MonadPlus Best Source # 

Methods

mzero :: Best a #

mplus :: Best a -> Best a -> Best a #

Search Best Source # 

Methods

fromRc :: Recomp a -> Best a Source #

toRc :: Best a -> Recomp a Source #

fromMx :: Matrix a -> Best a Source #

toMx :: Best a -> Matrix a Source #

fromDB :: DBound a -> Best a Source #

fromDF :: [a] -> Best a Source #

toDF :: Best a -> [a] Source #

mapDepth :: (Bag a -> Bag b) -> Best a -> Best b Source #

catBags :: Best (Bag a) -> Best a Source #

mergesortDepthWithBy :: (k -> k -> k) -> (k -> k -> Ordering) -> Best k -> Best k Source #

ifDepth :: (Int -> Bool) -> Best a -> Best a -> Best a Source #

Delay Best Source # 

Methods

delay :: Best a -> Best a Source #

ndelay :: Int -> Best a -> Best a Source #

getDepth :: Best Int Source #

Memoable Best Best Source # 

Methods

tabulate :: Best a -> Best a Source #

applyMemo :: Best a -> Best a Source #

Read a => Read (Best a) Source # 
Show a => Show (Best a) Source # 

Methods

showsPrec :: Int -> Best a -> ShowS #

show :: Best a -> String #

showList :: [Best a] -> ShowS #

getBests :: Best a -> [a] Source #

fromLists :: [[a]] -> Best a Source #