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
#!/usr/bin/env stack | |
{- stack script | |
--resolver lts-18.28 | |
--package bytestring,containers,servant,servant-server,servant-rawm-server,stm,wai,wai-extra,warp | |
-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE ImportQualifiedPost #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE TypeApplications #-} |
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
#!/usr/bin/env stack | |
-- stack script --resolver lts-19.18 --package ansi-terminal,turtle | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# OPTIONS_GHC -Wall #-} | |
import Data.Bool (bool) | |
import System.Console.ANSI (setTitle) | |
import Turtle |
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
WITH person_date AS ( | |
SELECT | |
person_id, | |
MIN(condition_start_date) AS index_date | |
FROM | |
? schema.condition_occurrence | |
WHERE (condition_concept_id IN (1, 2, 3)) | |
GROUP BY | |
person_id | |
HAVING |
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
{- stack script | |
--resolver lts-18.26 | |
--package containers | |
--package random | |
-} | |
{-# LANGUAGE NamedFieldPuns #-} | |
{-# OPTIONS_GHC -Wall #-} | |
import Control.Monad.State.Strict (State) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env stack | |
{- stack script | |
--resolver lts-18.14 | |
--package async,containers,say,stm | |
-} | |
import Control.Concurrent | |
import Control.Concurrent.Async | |
import Control.Concurrent.STM (TVar, atomically, modifyTVar, newTVarIO, readTVar) | |
import qualified Data.IntSet as Set |
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 Thing = A | B | C | |
getThing :: IO Thing | |
getThing = pure A | |
f :: Int -> IO () | |
f i = do | |
thing <- getThing | |
-- TODO what can I do here to make the tactics plugin offer "case split" code action? | |
case thing of |
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 PI.Demo where | |
import Servant (Handler, Put) | |
import Servant.API.Generic (AsApi, ToServant, fromServant) | |
import Servant.Client (ClientM) | |
import Servant.Client.Generic (AsClientT, genericClient) | |
import Servant.Server.Generic (AsServer, genericServer) | |
data Parent mode = Parent | |
{ parent1 :: mode :- Capture "x" Int :> Get '[JSON] String |
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 ConstraintKinds #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeFamilyDependencies #-} |
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
~/Tmp/aws-lambda-play> stack build | |
Building all executables for `aws-lambda-play' once. After a successful build of all of them, only specified executables will be rebuilt. | |
aws-lambda-play> configure (lib + exe) | |
Configuring aws-lambda-play-0.1.0.0... | |
aws-lambda-play> build (lib + exe) | |
Preprocessing library for aws-lambda-play-0.1.0.0.. | |
Building library for aws-lambda-play-0.1.0.0.. | |
Preprocessing executable 'bootstrap' for aws-lambda-play-0.1.0.0.. | |
Building executable 'bootstrap' for aws-lambda-play-0.1.0.0.. | |
Linking .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/build/bootstrap/bootstrap ... |
NewerOlder