Agda-2.6.20240714: A dependently typed functional programming language and proof assistant
Safe HaskellNone
LanguageHaskell2010

Agda.Interaction.Library.Parse

Description

Parser for .agda-lib files.

Example file:

    name: Main
    depend:
      standard-library
    include: .
      src more-src

  

Should parse as:

    AgdaLib
      { libName     = Main
      , libFile     = path_to_this_file
      , libIncludes = [ "." , "src" , "more-src" ]
      , libDepends  = [ "standard-library" ]
      }
  
Synopsis

Documentation

parseLibFile :: FilePath -> IO (P AgdaLibFile) Source #

Parse .agda-lib file.

Sets libFile name and turn mentioned include directories into absolute pathes (provided the given FilePath is absolute).

splitCommas :: String -> [String] Source #

Break a comma-separated string. Result strings are trimmed.

trimLineComment :: String -> String Source #

Remove leading whitespace and line comment.

runP :: P a -> (Either LibParseError a, [LibWarning']) Source #