Skip to content

Instantly share code, notes, and snippets.

{-# language TemplateHaskell, BlockArguments, RecordWildCards, OverloadedStrings #-}
module Templates where
import Language.Haskell.TH
import Data.Profunctor.Product.TH
import Opaleye
import Opaleye.Table
import Data.Maybe (fromMaybe)
import LocalQ
@kindaro
kindaro / Main.hs
Last active January 8, 2021 19:47
module Main where
import Data.Foldable
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.FromField
import qualified Opaleye
import Templates
makeOpaleyeInterface
TableIdentifier {maybeNameOfSchema = Just "information_schema", nameOfTable = "columns"}
{- cabal:
build-depends: base, base-unicode-symbols
, containers, containers-unicode-symbols
, pretty-show
, tasty, tasty-quickcheck, quickcheck-instances, tasty-smallcheck, smallcheck-series, tasty-hunit
, aeson
default-extensions: UnicodeSyntax, BlockArguments, TupleSections, TypeApplications, PartialTypeSignatures, PatternSynonyms
, LiberalTypeSynonyms, StandaloneDeriving
, DeriveFunctor, DeriveFoldable, DeriveTraversable, DeriveGeneric
, FlexibleInstances, FlexibleContexts, MultiParamTypeClasses, FunctionalDependencies
% cabal run bytestring-bench -- --pattern "/foldl'/"
Up to date
Sanity checks:
lengths of input data: [10000,10000,10000,10000,10000,10000,10000]
All
folds
strict
foldl'
1: OK (0.22s)
10 ns ± 772 ps
{- cabal:
default-language: Haskell2010
default-extensions:
UnicodeSyntax BlockArguments TupleSections TypeApplications
PartialTypeSignatures PatternSynonyms LiberalTypeSynonyms
StandaloneDeriving DeriveFunctor DeriveFoldable DeriveTraversable
DeriveGeneric FlexibleInstances FlexibleContexts
MultiParamTypeClasses FunctionalDependencies RankNTypes DataKinds
PolyKinds GADTs ConstraintKinds PolyKinds KindSignatures
TypeOperators TypeFamilies TypeFamilyDependencies
From Coq Require Import Unicode.Utf8.
From Coq Require Import Logic.Decidable.
From Coq Require Import QArith.
From Coq Require Import Vectors.Vector.
Notation ℕ := nat.
Notation ℙ := Prop.
Notation 𝔹 := bool.
Notation ℤ := Z.
Notation ℚ := Q.
002c:fixme:winediag:LdrInitializeThunk wine-staging 7.2 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
0080:trace:x11drv:init_pixmap_formats depth 1, bpp 1, pad 32
0080:trace:x11drv:init_pixmap_formats depth 4, bpp 8, pad 32
0080:trace:x11drv:init_pixmap_formats depth 8, bpp 8, pad 32
0080:trace:x11drv:init_pixmap_formats depth 15, bpp 16, pad 32
0080:trace:x11drv:init_pixmap_formats depth 16, bpp 16, pad 32
0080:trace:x11drv:init_pixmap_formats depth 24, bpp 32, pad 32
0080:trace:x11drv:init_pixmap_formats depth 32, bpp 32, pad 32
0080:trace:x11drv:init_visuals default visual 21 class 4 argb b5
Found "/home/kindaro/code/haskell/pixels/hie.yaml" for "/home/kindaro/code/haskell/pixels/a"
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.6.1.0, Git revision f4022c5bb8530cd306c53b941878244bf27a5d41 (dirty) x86_64 ghc-8.10.7
Current directory: /home/kindaro/code/haskell/pixels
Operating system: linux
Arguments: ["--lsp","-d","-l","/tmp/hls.log"]
Cradle directory: /home/kindaro/code/haskell/pixels
Cradle type: Cabal
Tool versions found on the $PATH
cabal: 3.6.2.0
haskell-language-server version: 1.6.1.0 (GHC: 9.2.1) (PATH: /srv/src/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-9.2.1/haskell-language-server-1.6.1.0/x/haskell-language-server/build/haskell-language-server/haskell-language-server) (GIT hash: f4022c5bb8530cd306c53b941878244bf27a5d41)
Starting (haskell-language-server)LSP server...
with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Just "/tmp/hls.log", argsThreads = 0, argsProjectGhcVersion = False}
with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "fourmolu",PluginId "ormolu",PluginId "callHierarchy",PluginId "importLens",PluginId "qualifyImportedNames",PluginId "refineImports",PluginId "moduleName",PluginId "selectionRange",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions-imports-exports",PluginId "ghcide-code-actions-type-signatures",PluginId "ghcide-code-actions-bindings",Plu
2022-04-01 14:19:03.284003569 [ThreadId 4] INFO hls: Logging heap statistics every 60.00s
2022-04-01 14:19:03.291353814 [ThreadId 4] INFO hls: Starting LSP server...
2022-04-01 14:19:03.29165556 [ThreadId 4] INFO hls: If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
2022-04-01 14:19:03.29515318 [ThreadId 10] INFO hls: Started LSP server in 0.00s
2022-04-01 14:19:03.310531672 [ThreadId 10] DEBUG hls: setInitialDynFlags cradle: Cradle {cradleRootDir = "/home/kindaro/code/haskell/pixels", cradleOptsProg = CradleAction: Cabal}
2022-04-01 14:19:03.541538958 [ThreadId 10] DEBUG hls: runSubset: False
2022-04-01 14:19:03.541893403 [ThreadId 16] DEBUG hls: Initializing exports map from hiedb
2022-04-01 14:19:03.542301157 [ThreadId 10] INFO hls: Registering ide configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri (-3453843489293670691) "file:///home/kindaro/code/haskell/pixels"], clientSettings = hashed Nothing}
2022-04-01 14:19:03.544614606 [ThreadId 1