{-# LANGUAGE DeriveGeneric              #-}
{-# LANGUAGE OverloadedStrings          #-}

module Types where 

import GHC.Generics

import qualified Post as P
import qualified Data.Text as T

type Board = [Thread]
type ThreadID = Int 
type Catalog = [Page]
type BoardID = T.Text 

data Thread = Thread
  { posts :: [P.Post]
  } deriving (Show, Generic)

data Page = Page
  { page :: Integer
  , threads :: [ThreadStub]
  } deriving (Show, Generic)

data ThreadStub = ThreadStub
  { no          :: ThreadID 
  } deriving (Show, Generic)

boards :: [BoardID]
boards = ["a", "b","c","d","e","f","g","gif","h","hr","k","m","o","p","r","s","t","u","v","vg","vr","w","wg","i","ic","r9k","s4s","cm","hm","lgbt","y","3","aco","adv","an","asp","biz","cgl","ck","co","diy","fa","fit","gd","hc","his","int","jp","lit","mlp","mu","n","news","out","po","pol","sci","soc","sp","tg","toy","trv","tv","vp","wsg","x"]

data Meme = Meme { 
  alias :: [T.Text]
} deriving (Show, Eq, Ord)

memes :: [Meme] 
memes = map Meme [
 ["haskell"], 
 ["ocaml"], 
 ["f#"], 
 ["java"], 
 ["c++"], 
 ["c#", "cshart"], 
 ["python"], 
 ["pepe", "sad frog", "frogposter"],
 ["dank"],
 ["meme"], 
 ["reddit"], 
 ["epic"], 
 ["trump"], 
 ["rubio"], 
 ["cruz"], 
 ["carson"], 
 ["hillary", "shillary"]]
