generic-env alternatives and similar packages
Based on the "Development" category.
Alternatively, view generic-env alternatives based on common mentions on social networks and blogs.
-
cabal-install-parsers
Scripts and instructions for using CI services (e.g. Travis CI or Appveyor) with multiple GHC configurations -
fourmolu
A fourk of ormolu that uses four space indentation and allows arbitrary configuration. Don't like it? PRs welcome!
InfluxDB – Built for High-Performance Time Series Workloads

Do you think we are missing an alternative of generic-env or a related project?
README
generic-env
generic-env lets you produce your generic type from a given subset of environment variables.
Usage
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeApplications #-}
module Example1 where
import GenericEnv
import GHC.Generics
import System.Environment
data AppEnv = AppEnv { name :: String, ver :: String } deriving (Generic, Show)
main :: IO ()
main = do
setEnv "APP_NAME" "wow"
setEnv "APP_VER" "1.0"
print =<< fromEnv @AppEnv (withPrefix "APP_")
> main
Right (AppEnv {name = "wow", ver = "1.0"})
Let's change our version from String to Float:
data AppEnv = AppEnv { name :: String, ver :: Float } deriving (Generic, Show)
and run the same code:
> main
Right (AppEnv {name = "wow", ver = 1.0})
Next, try making the version an integer:
data AppEnv = AppEnv { name :: String, ver :: Int } deriving (Generic, Show)
> main
Left "Could not parse value of type 'Int' for the field named 'ver' from environment variable 'APP_VER=1.0'"
Idea
This project is based on an idea posted here: https://github.com/patrickt/haskell-project-ideas.
You can check it out for other project ideas.
Documentation
For complete docs, visit https://hackage.haskell.org/package/generic-env.
LICENSE
MIT License
*Note that all licence references and agreements mentioned in the generic-env README section above
are relevant to that project's source code only.