module Curry.Syntax
( module Curry.Syntax.Type
, module Curry.Syntax.Utils
, L.Token (..), L.Category (..), L.Attributes (..)
, unlit, unlitLexSource, unlitParseHeader, unlitParsePragmas, unlitParseModule
, lexSource, parseInterface, parseHeader, parsePragmas, parseModule, parseGoal
, ppModule, ppInterface, ppIDecl
, showModule
) where
import Curry.Base.Monad (CYM)
import Curry.Base.Span (Span)
import qualified Curry.Files.Unlit as U (unlit)
import qualified Curry.Syntax.Lexer as L
import qualified Curry.Syntax.Parser as P
import Curry.Syntax.Pretty (ppModule, ppInterface, ppIDecl)
import Curry.Syntax.ShowModule (showModule)
import Curry.Syntax.Type
import Curry.Syntax.Utils
unlit :: FilePath -> String -> CYM String
unlit = U.unlit
unlitLexSource :: FilePath -> String -> CYM [(Span, L.Token)]
unlitLexSource fn src = U.unlit fn src >>= L.lexSource fn
unlitParsePragmas :: FilePath -> String -> CYM (Module ())
unlitParsePragmas fn src = U.unlit fn src >>= P.parsePragmas fn
unlitParseHeader :: FilePath -> String -> CYM (Module ())
unlitParseHeader fn src = U.unlit fn src >>= P.parseHeader fn
unlitParseModule :: FilePath -> String -> CYM (Module ())
unlitParseModule fn src = U.unlit fn src >>= P.parseSource fn
lexSource :: FilePath -> String -> CYM [(Span, L.Token)]
lexSource = L.lexSource
parseInterface :: FilePath -> String -> CYM Interface
parseInterface = P.parseInterface
parsePragmas :: FilePath -> String -> CYM (Module ())
parsePragmas = P.parsePragmas
parseHeader :: FilePath -> String -> CYM (Module ())
parseHeader = P.parseHeader
parseModule :: FilePath -> String -> CYM (Module ())
parseModule = P.parseSource
parseGoal :: String -> CYM (Goal ())
parseGoal = P.parseGoal