This file contains hidden or 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
self: super: | |
let | |
versions = import ../versions.nix; | |
in | |
{ | |
elescore = import (builtins.fetchGit { | |
url = https://github.com/Akii/elescore.git; | |
rev = versions.elescoreRev; | |
}); | |
} |
This file contains hidden or 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
self: super: | |
{ | |
elescore = import (builtins.fetchGit { | |
url = https://github.com/Akii/elescore.git; | |
rev = "d4a305800157d4a1109f7fdaeda8f2814ddd002d"; | |
}); | |
} |
This file contains hidden or 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
locations."/" = { | |
root = "${pkgs.elescore-client}/"; | |
extraConfig = '' | |
etag off; | |
add_header etag "elescore-client-${pkgs.elescore-client.version}"; | |
''; | |
}; |
This file contains hidden or 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
with (import <nixpkgs> {}); | |
with (import (builtins.fetchTarball https://github.com/moretea/yarn2nix/archive/master.tar.gz) { inherit pkgs; }); | |
rec { | |
elescore-client = mkYarnPackage { | |
name = "elescore-client"; | |
src = ./.; | |
packageJson = ./package.json; | |
yarnLock = ./yarn.lock; | |
yarnNix = ./elescore-client.nix; | |
}; |
This file contains hidden or 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
/Users/akii/Projects/blah/src/NoPassword.hs:118:45: error: | |
• Couldn't match type ‘a0’ with ‘Yesod.Auth.Piece’ | |
‘a0’ is untouchable | |
inside the constraints: MonadAuthHandler m m1 | |
bound by a type expected by the context: | |
Yesod.Auth.Method | |
-> [Yesod.Auth.Piece] -> AuthHandler m TypedContent | |
at src/NoPassword.hs:118:23-58 | |
Expected type: Yesod.Auth.Method | |
-> [Yesod.Auth.Piece] -> m1 TypedContent |
This file contains hidden or 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 | |
config = { | |
packageOverrides = pkgs: rec { | |
haskellPackages = pkgs.haskellPackages.override { | |
overrides = haskellPackagesNew: haskellPackagesOld: rec { | |
datetime = pkgs.haskell.lib.dontCheck haskellPackagesOld.datetime; | |
}; | |
}; | |
}; | |
}; |
This file contains hidden or 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
<html> | |
<head> | |
<style> | |
body { | |
padding: 5px; | |
} | |
.podest { | |
width: 140px; | |
height: 110px; | |
padding: 5px; |
This file contains hidden or 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 Const k a = Const k | |
deriving (Eq, Show) | |
instance Functor (Const k) where | |
fmap _ (Const k) = Const k | |
instance Monoid k => Applicative (Const k) where | |
pure = const (Const mempty) | |
_ <*> Const k = Const k |
This file contains hidden or 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
registerUser :: UserName -> EmailAddress -> RegistrationAction () | |
registerUser uname email = do | |
mst <- gets aggState | |
case mst of | |
Nothing -> raise (UserRegistered uname email) | |
Just st -> do | |
when (userExists st) (throwError UserAlreadyRegistered) | |
when (emailExists st) (throwError EmailAddressExists) | |
raise (UserRegistered uname email) |
This file contains hidden or 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
-- kay, I get it because it's function chaining | |
foo = do | |
name <- getLine | |
name <- getLine | |
putStrLn name | |
return () | |
-- looks like I can mutat / override `a` | |
someFunction :: Int -> Int | |
someFunction a = |