A guide to setting up the Haskell tooling for Emacs in a Nix environment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"owner": "NixOS", | |
"repo": "nixpkgs", | |
"rev": "eabe7b845f867e696f8a11be04d47520b3ff4660", | |
"sha256": "068qbrp2fvpn437hwg932hm0pav2m10sj7v0kcj3wp8hsvsv088w" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
pkgs = import <nixpkgs> {}; | |
python = import ./requirements.nix { inherit pkgs; }; | |
in | |
python.mkDerivation rec { | |
pname = "cloudsmith-cli"; | |
version = "0.22.2"; | |
format = "wheel"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
main :: IO () | |
main = putStrLn "Hello, Haskell!" |
I hereby claim:
- I am sevanspowell on github.
- I am sevanspowell (https://keybase.io/sevanspowell) on keybase.
- I have a public key ASAaO170tDIXDAN2Trvf5P4Rkh5c6QaN0y4Axrg-fq_rIAo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x :: (MonadReader r m | |
, HasLogger r | |
, LoggerF r ~ m | |
, HasOther r | |
, OtherF r ~ m | |
, ... | |
) | |
x = undefined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
type Logger m = Severity -> String -> m () | |
-- Fundep | |
class HasLoggerFundep r m | r -> m where | |
loggerLFundep :: Lens' r (Logger m) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data WrapperError = WrappingS3Error Jaws.S3Error | |
makeClassyPrisms ''WrapperError | |
instance Jaws.AsS3Error WrapperError where | |
_S3Error = _WrappingS3Error | |
data Lookup m a = Lookup (m a) | |
inner | |
:: ( AWS.MonadAWS m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data WrapperError = WrappingS3Error S3Error | |
makeClassyPrisms ''WrapperError | |
instance AsS3Error WrapperError where | |
_S3Error = _WrappingS3Error | |
inner | |
:: ( AWS.MonadAWS m | |
, MonadError e m | |
, AsS3Error e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
withFileSystem basePath fs = ContT $ \action -> bracket | |
(liftIO $ do | |
createDirectoryIfMissing True basePath | |
instantiateFs basePath fs | |
) | |
(\_ -> uninterruptibleMask $ \_ -> do | |
liftIO $ removeDirectoryRecursiveIfExists basePath | |
) | |
action |
NewerOlder