Haskell Quickstart Guide
MinIO Haskell SDK
SILO implements the S3-compatible server contract, so Haskell applications can use the upstream minio-hs package directly.
The latest tagged upstream release is 1.7.0, published in 2023, and its package metadata lists GHC 8.10.7 as the tested compiler. Validate minio-hs against your current GHC, resolver, TLS stack, and workload before adopting it. Check Hackage and upstream releases for newer compatibility information.
Install the package
Add minio-hs to the build-depends section of your Cabal package or to the dependency list in package.yaml. For an interactive inspection of the installed API:
Then run :browse Network.Minio in GHCi.
Configure the connection
Version 1.7.0 provides fromMinioEnv, which reads the following credential variables:
S3_ENDPOINT is a complete URL, including the http:// or https:// scheme. Keep credentials outside source control.
Create a bucket and upload an object
Save the following as Main.hs:
Create hello.txt, then run the program with the build tool and resolver selected for your project. The repository’s examples directory and API reference cover streaming, presigned URLs, encryption, notifications, object locking, and other operations.
Production checklist
- Use TLS and verify the server certificate; do not disable certificate validation.
- Load credentials from a secret manager or protected environment.
- Grant the application only the bucket and object permissions it needs.
- Pin and test the GHC, resolver, SDK, TLS, and HTTP dependency versions together.
- Define timeouts and handle
MinioErr, retries, resource cleanup, and incomplete multipart uploads explicitly.
See Identity and Access Management for server-side policy configuration.