Agda-2.6.2.2.20221128: A dependently typed functional programming language and proof assistant
Safe HaskellSafe-Inferred
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.