sifflet-2.3.0: Simple, visual, functional language for learning about recursion.

Safe HaskellNone
LanguageHaskell2010

System.Sifflet.Paths

Synopsis

Documentation

findDataFile :: VPUI -> FilePath -> IO (Maybe FilePath) Source

Try to find the original of a datafile that is part of the sifflet library. These are usually files like sifflet.scm or sifflet.py that provide Sifflet support for the target language when exporting. First try the directory where Cabal would have installed data files. This may fail if Sifflet has been installed (or portably installed) on Windows into a non-standard location; in that case, also try the directory from which sifflet.exe was launched.

copyLibFile :: VPUI -> FilePath -> FilePath -> IO () Source

Try to copy a library file (such as sifflet.py or Sifflet.java) to the same directory where an export file is being written, if it doesn't already exist there. Show a warning message if the library file cannot be found.

readLibFile :: VPUI -> FilePath -> FilePath -> IO String Source

Get the contents of a library file (such as sifflet.scm) so you can insert it into the file being exported. If the file cannot be found, display an error message and return the empty string.