FileTypeDB

.LHS File Extension

A .LHS file is a Literate Haskell Script, created by N/A.

Open with The Haskell Platform. Available for Linux, Windows, and Mac.

What is a .LHS file?

The file extension .LHS stands for Literate Haskell Script. This type of file contains the source code for a program written in Haskell, which is a functional programming language known for its expressiveness and high-level abstraction. Unlike standard Haskell scripts, which use the .HS file extension, .LHS files include a special formatting style that integrates both code and extensive commentary. This literate programming approach makes the code easier to understand and document, as it allows the programmer to describe the logic and functionality in a narrative style alongside the code.

In a .LHS file, the actual Haskell code that the compiler will execute is distinguished by lines starting with the ">" character. All other lines are treated as comments and are ignored by the compiler, serving as documentation or explanation of the code.

To work with .LHS files, you can use several software programs and development environments that support Haskell and literate programming. Some of the most common programs include: 1. **The Haskell Platform**: This is a comprehensive, all-in-one environment that provides everything you need to start programming with Haskell, including tools to manage and run .LHS files.

2. **Leksah**: An open-source Haskell IDE (Integrated Development Environment) designed to provide a friendly programming environment. It supports .LHS files and offers features like code editing, project management, and debugging tools.

3. **EclipseFP**: A plugin for the Eclipse IDE tailored for Haskell development. It supports both .HS and .LHS files and integrates with other Haskell tools.

4. **Hugs**: An interpreter for Haskell that allows you to quickly test and run Haskell scripts, including .LHS files.

5. **GNU Emacs**: A highly customizable text editor that, with the appropriate extensions, can be used to edit Haskell scripts. It supports syntax highlighting and other features that are helpful when working with .LHS files.

6. **Vi and gVim**: Classic text editors that can be configured with syntax highlighting and other features to improve the handling of Haskell and .LHS files.

7. **File Viewer Plus**: Available from the Microsoft Store, this is a versatile file viewer that can open a wide range of file types, including .LHS files, if you need to quickly view the contents without editing.

8. **MacVim**: The graphical version of Vim for macOS, which supports editing .LHS files with appropriate plugins.

9. **yi**: A text editor written and extensible in Haskell, which

Verification

Our goal is to help people find the most up-to-date information about file extensions for Windows, Mac, Linux, Android and iOS. We researched over 10,000 file extensions and their respective programs that open those files. If you want to suggest edits or updates about .LHS file formats, example files, or programs that are compatible. Please contact us.

More extensions