toy-datalog/src/Datalog/Syntax.hs

18 lines
305 B
Haskell
Raw Normal View History

module Datalog.Syntax where
import Data.Text (Text)
type Ident = Text
data Term = Con Ident | Var Ident
deriving (Eq, Ord, Show)
data Atom = Atom Ident [Term]
deriving (Eq, Ord, Show)
data Rule = Atom :- [Atom]
deriving (Eq, Ord, Show)
data Program = Program [Rule]
deriving (Eq, Ord, Show)