|
definition: |
saveDBTerms :: (Read a, Show a, Show en) => String -> String
-> (Key -> a -> Dynamic) -> (Key -> a -> en) -> IO ()
saveDBTerms path ename dynpred toentity = do
keyinfos <- runQ (allDBKeyInfos dynpred)
let savefile = path++"/"++ename++".terms"
terms = map (uncurry toentity) keyinfos
showterms = unlines (map show terms)
if null path
then putStrLn showterms -- show only
else do putStrLn $ "Saving into " ++ savefile
writeFile savefile showterms
|
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
failfree: |
<FAILING> |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_,_,_,_,_,_,_) |-> _}
|
|
name: |
saveDBTerms |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
(Prelude.Read a, Prelude.Show a, Prelude.Show b) => String -> String -> (Prelude.Int -> a -> Database.KeyDatabaseSQLite.Dynamic) -> (Prelude.Int -> a -> b) -> Prelude.IO () |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |