module Language.Grammars.Grammar.AspectAG where

import Language.Grammars.Grammar
import Data.HList
import Control.Applicative


------------------------
-- IDIOMS FOR AspectAG


instance  Idiomatic l env f g  => Idiomatic  l env ((Record HNil -> a) -> f) (Symbol a TAttT env -> g) where
    idiomatic isf is = idiomatic (isf <*> ((\x (Record HNil) -> x) <$> (sym is :: PreProductions l env a)))



instance  Idiomatic l env f g  => Idiomatic  l env ((Record HNil -> DTerm String) -> f) (Kw -> g) where
    idiomatic isf (Kw is) = idiomatic (isf <*> ((\x (Record HNil) -> x) <$> (tr is)))