Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

standalone database

Name: Anonymous 2009-02-04 20:23

I'm working on an app that is basically a ui and a database.  How should I implement the database?

For the sake of the argument pretend it's for an iTunes/Foobar type music player.

inb4 no help at all

Name: Anonymous 2009-02-06 17:43

>>38
{-# LANGUAGE DeriveDataTypeable #-}

import Control.OldException
import Data.Dynamic

main :: IO ()
main = do
    putStr "HAX "
    label "haxing" $ do
    putStrLn "MY ANUS"
    goto "haxing"
    putStrLn "J/K lol"


data Goto = G String deriving (Typeable)

label :: String -> IO a -> IO ()
label d k = m
    where
    m = catchDyn (k >> return ()) (\(G t) -> if d == t then m else goto t)

goto :: String -> IO ()
goto = evaluate . throwDyn . G

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List