Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mihaimaruseac/io-manager
Haskell IO manager for hiding the IO monad and related advanced concepts. Useful for beginners.
https://github.com/mihaimaruseac/io-manager
hacktoberfest
Last synced: about 2 months ago
JSON representation
Haskell IO manager for hiding the IO monad and related advanced concepts. Useful for beginners.
- Host: GitHub
- URL: https://github.com/mihaimaruseac/io-manager
- Owner: mihaimaruseac
- License: bsd-3-clause
- Created: 2013-02-12T14:51:23.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2024-10-14T14:08:22.000Z (2 months ago)
- Last Synced: 2024-10-14T15:41:39.322Z (2 months ago)
- Topics: hacktoberfest
- Language: Haskell
- Homepage:
- Size: 304 KB
- Stars: 7
- Watchers: 5
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# io-manager [![Hackage](https://img.shields.io/hackage/v/io-manager.svg?style=flat)](https://hackage.haskell.org/package/io-manager) [![Haskell Cabal](https://github.com/mihaimaruseac/io-manager/actions/workflows/presubmit-cabal.yaml/badge.svg)](https://github.com/mihaimaruseac/io-manager/actions/workflows/presubmit-cabal.yaml) [![Haskell Stack](https://github.com/mihaimaruseac/io-manager/actions/workflows/presubmit-stack.yaml/badge.svg)](https://github.com/mihaimaruseac/io-manager/actions/workflows/presubmit-stack.yaml) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/mihaimaruseac/io-manager/badge)](https://api.securityscorecards.dev/projects/github.com/mihaimaruseac/io-manager)
This is a simple framework which hides away the IO monad and allows beginner
students to write simple applications in Haskell without having to touch the
`IO` monad for reading or writing to standard file descriptors or other files.This skeleton comes with a simple example showing the usage of this system. As
you can see, only three lines are to be copied by the student:* the `module Main` one
* the `import Training.MM.IOManager` one
* the `main = wrapIO ..` oneEverything else is free of advanced concepts like monads, mutability,
strictness, etc.This skeleton can be used to set up a homework which can then be automatically
tested using tools like [vmchecker][vmchecker]Example
=======The repository contains an example code in `SimpleEchoExample.hs`: a
demonstrative program which copies content from files (or `stdin`) to files
(or `stdout`) depending on a description written at `stdin`.Run `make` (or the usual `cabal` setup) to build it and then give as arguments
the name of the files from which you want to read. Finish `stdin` with `EOF`
(`^D` on Linux, `^Z` on Windows).Example:
./SimpleEchoExample Makefile M.out unused
Makefile out_Makefile
M.out out_Mout
@stdin out_stdin
@stdin @stdoutDue to Haskell's laziness, `unused` will not be read.
[vmchecker]: https://github.com/vmchecker/vmchecker "vmchecker"