module Discokitty.Examples.AliceAndBob where
import Discokitty
import Discokitty.Models.Diagrams
import Discokitty.Models.Rel
data Universe = Alice | Bob | IsTrue | IsFalse deriving (Eq, Ord, Show)
type Term = Words (Rel Universe)
alice :: Term
alice = Words
{ meaning = relation [ [ Alice ] ]
, grammar = [N]
, text = "Alice"
}
bob :: Term
bob = Words
{ meaning = relation [ [ Bob ] ]
, grammar = [N]
, text = "Bob"
}
loves :: Term
loves = Words
{ meaning = relation [ [ Alice , IsTrue , Bob ] ]
, grammar = [ L N , S , R N ]
, text = "loves"
}
example :: [Term]
example = sentence [alice , loves , bob] @@@ [S]
exampleDiagram :: String
exampleDiagram = tikzDiagrams [alice , loves , bob]