LHS Converter

Extract text from Literate Haskell files (LHS)


Drop or upload your .LHS file

How to extract text from your LHS file

  1. Click the "Select File" button above, and choose your LHS file.
  2. You’ll see a preview, if available.
  3. Click the "Convert file to..." button to extract text information.

Convert LHS to another file type

To convert LHS Haskell files to another format, you need Glasgow Haskell Compiler or other Developer software.

Convert a file to LHS

To convert other file formats to the "Literate Haskell Script" file type, you need software like Glasgow Haskell Compiler or a similar tool.


About LHS files

An .LHS file primarily functions as Literate Haskell Source code, a format where human-readable documentation is the default and Haskell programming code is explicitly marked. A smaller subset of .LHS files acts as proprietary Microsoft Jet Database containers.

For development workflows, the Glasgow Haskell Compiler (GHC) is the standard software to parse and compile the code. Legacy Jet Database variations are managed by tools like Microsoft Access.

Managing .LHS source files presents immediate practical challenges. Because the file freely mixes rich text formatting (like LaTeX or Markdown) with executable code, most modern IDEs and standard syntax highlighters fail to parse the file correctly. The code is meant to be readable to humans, but it still requires a compiler environment to execute. If the file is a legacy Jet Database, it is a closed, binary format that requires outdated software to query. Attempting to open either variant in standard office applications results in broken formatting or unreadable binary garbage.

To make the content accessible, users typically convert .LHS source files to PDF, HTML, or MD using document generators to share the logic with non-developers. Conversely, extracting the code to a standard HS file is necessary for pure development without formatting overhead.

Because these files contain either highly specific parser-dependent syntax or proprietary database tables, standard online converters often fail to process them. Just drag and drop your file to convert.guru to identify the exact format, view its internal structure, and convert it when supported.

Convert.Guru analyzes your LHS file, detects the exact format, and lets you read the text inside.

Users also converted HS, CS and LSP files.


FAQ

If you want to convert LHS file to JS, TS, PY, JAVA, CPP, C, CS, PHP, RB, GO, RS or SWIFT, you can use Glasgow Haskell Compiler or similar software from the "Literate Programming Source Code" category. In the File menu, look for Save As… or Export….

To convert SH, PY, KT, PS1, SWIFT, LUA, PL, JAVA, SCALA, JS, VBS or TS files to LHS, try Glasgow Haskell Compiler or another comparable tool in the "Literate Programming Source Code" category.



The LHS Converter Story

The history of Convert.Guru began over 25 years ago in California with Tom Simondi’s file-format database. A former contributor to Space Shuttle development and a software pioneer of the 1980s, Simondi established a trusted resource for file type analysis that was even referenced by Microsoft Windows XP. Today, we use modern technology to process and convert thousands of file formats while continually improving our LHS converter.