@@ -0,0 +1,25 @@
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE AllowAmbiguousTypes #-}
|
||||
module Gyehoek.Language
|
||||
( Language(..)
|
||||
) where
|
||||
|
||||
import Data.Kind (Type)
|
||||
import Gyehoek.Prelude
|
||||
import Language.SexpGrammar (Position, Grammar, (:-), Sexp)
|
||||
|
||||
|
||||
class Language l where
|
||||
type Program l :: Type
|
||||
languageName :: Text
|
||||
programGrammar :: forall t. Grammar Position (List Sexp :- t) (Program l :- t)
|
||||
|
||||
readProgramFile
|
||||
:: forall l es. Language l
|
||||
=> FilePath -> Eff es (Program l)
|
||||
readProgramFile fp = _
|
||||
|
||||
readProgramStringPos
|
||||
:: forall l. Language l
|
||||
=> Position -> Text -> Either Text (Program l)
|
||||
readProgramStringPos pos s = _
|
||||
Reference in New Issue
Block a user