Skip to content

Instantly share code, notes, and snippets.

@LeviSchuck
Created September 17, 2013 21:16
Show Gist options
  • Save LeviSchuck/6600759 to your computer and use it in GitHub Desktop.
Save LeviSchuck/6600759 to your computer and use it in GitHub Desktop.
{-# LANGUAGE DeriveDataTypeable #-}
module KV2 where
import qualified Solar.Data.KV as K
import System.IO.Unsafe(unsafePerformIO)
import Data.Time.Clock
import Data.Text(pack)
import Data.Typeable
import GHC.Generics as G
data Color = Red | Green | Blue | Yellow
deriving (Show, Read, Typeable)
data Vehicle = Car | Truck | Semi | Van
deriving (Show, Read, Typeable)
data Ponies = Fluttershy | TwilightSparkle | Rarity | Applejack | PinkiePie | RainbowDash
deriving (Show, Read, Typeable)
data Forum n r c = Forum r
deriving (Show, Typeable)
time = unsafePerformIO $ getCurrentTime
ident = K.KVIdentifier Red (pack "Hai")
ident2 = K.KVIdentifier Blue (pack "Potatoes")
arel = K.KVLink ident2 [Car, Van] [Rarity] K.In time False
met = K.KVMeta ident [RainbowDash, Fluttershy] [arel] time time time False
kv = K.KV met (Forum Truck) K.kvNoCache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment