{-# LANGUAGE TemplateHaskell #-}

-- | Provides a simple way to make syntactic constructs for prototyping. Note
-- that 'Construct' is quite unsafe as it only uses 'String' to distinguish
-- between different constructs. Also, 'Construct' has a very free type that
-- allows any number of arguments.

module Language.Syntactic.Constructs.Construct where

import Language.Syntactic

data Construct sig
    Construct :: String -> Denotation sig -> Construct sig

instance Constrained Construct
    type Sat Construct = Top
    exprDict _ = Dict

instance Semantic Construct
    semantics (Construct name den) = Sem name den

semanticInstances ''Construct