Skip to content

Instantly share code, notes, and snippets.

@graninas
Last active March 29, 2024 14:43
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save graninas/49be74a21fbd58236bad28e1ce1eed94 to your computer and use it in GitHub Desktop.
Save graninas/49be74a21fbd58236bad28e1ce1eed94 to your computer and use it in GitHub Desktop.
Software Design Showcase Projects in Haskell

Software Design Showcase Projects in Haskell

(WIP)

  • Automatic White-Box Testing with Free Monads | Alexander Granin

    • Description: Article and showcase project about an approach to whitebox testing. Describes the idea of recordable and replayable business scenarios based on the Free Monad approach.
    • Design Approach: [Free Monads]
    • Technologies: [free, aeson]
    • Teaches for: How to make a Free monad based business logic recordable and replayable. How to use the recordings for automatic whitebox testing. How to configure this system to do integration testing.
  • Hydra Framework | Alexander Granin

    • Description: Showcase project for the book "Functional Design and Architecture". Basically, it's a framework with 3 different engines (Free Monads; Church Encoded Free Monads and Final Tagless / mtl) and several demo apps implemented on top of these engines. The Hydra project is aimed to provide a comparison between these 3 approaches.
    • Design Approach: [Free Monads, Final Tagless / mtl]
    • Technologies: [servant, free, beam, beam-sqlite, beam-postgres, beam-mysql, hedis, RocksDB, STM, tiny-logger, Lenses, aeson, universum, MVar, lens, sqlite-simple]
    • Teaches for: The principles of Software Design and Architecture in pure Functional Programming. It provides a framework implemented with several different approaches for easy comparison: Final Tagless, Free Monad, Church Encoded Free Monad. It has a lot of subsystems provided out of the box: multiple SQL and KV support, logging, concurrent state, servant-based functionality etc. You can learn how to structure your application, how to made different testing and how to layer the code. In general, it's a full-fledged framework for building web applications and services, but it's also a showcase project demonstrating the most important approaches to Software Design.
  • Servant Echo Server | Vasily Gorev, Sergei Stepanenko, Alexander Granin

    • Description: Simple Servant-based echo server. Contains 3 different implementations of the business logic: based on Free Monad, Church Encoded Free Monad and Freer Monad
    • Design Approach: [Free Monads]
    • Technologies: [servant, servant-swagger, swagger2, servant-docs, aeson, free, freer, lens]
    • Teaches for: Simple echo server. Shows how to describe HTTP API with servant, allows to generate Swagger spec & servant-docs using servant. Shows some testing facilities.
  • A Dead-Simple Web Stack In Haskell | William Yao

    • Description: A Haskell web application, built using dead-simple libraries. This is meant as a didactic exercise, showing that much of the fancy machinery often talked about in Haskell communities isn't necessary to build a functioning, nontrivial web application.
    • Design Approach: [Straightforward]
    • Technologies: [Spock, blaze-html, configurator, postgresql-simple, fast-logger]
    • Teaches for: Basic stuff for web server and a little of HTML.
  • Wich Type-Safe Database Library Should You Use? | William Yao

    • Project repo
    • Description: Beam versus Squeal: which one is better? Or maybe you’ve heard good things about Selda or Opaleye. Lots of options, not a lot of guidance.
    • Design Approach: [Strightforward]
    • Technologies: [Beam, Opaleye, Squeal, Persistent + Esqueleto, Hasql, Groundhog, Selda]
    • Teaches for: How to use different SQL libraries. The comparison.
  • effects-toy | Patrick Thomson

    • Description: This repo includes implementations of a "Hello, world!" HTTP server in several extensible effects libraries.
    • Tutorial: Serving HTTP Content with Fused-Effects
    • Design Approach: [Effect Systems]
    • Technologies: [fused-effects, eff, polysemy, wai, sqlite-simple]
    • Teaches for: Effect systems combined with web server. Comparison of different effect systems.

Template:

  • Link | Author
    • Description:
    • Design Approach: []
    • Technologies: []
    • Teaches for:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment