chore: local hoogle

This commit is contained in:
Gregor Kleen 2021-06-07 09:58:55 +02:00
parent 4843e95ad3
commit fd704e7d23
7 changed files with 47 additions and 10 deletions

18
hoogle.sh Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -e
[ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -en .stack-work.lock "$0" "$@" || :
move-back() {
mv -v .stack-work .stack-work-doc
[[ -d .stack-work-build ]] && mv -v .stack-work-build .stack-work
}
if [[ -d .stack-work-doc ]]; then
[[ -d .stack-work ]] && mv -v .stack-work .stack-work-build
mv -v .stack-work-doc .stack-work
trap move-back EXIT
fi
stack hoogle -- ${@:-server --local --port $((${PORT_OFFSET:-0} + 8081))}

View File

@ -64,10 +64,11 @@ queryVetoedCourses = queryAllocationUser . to queryVetoedCourses'
type UserTableData = DBRow ( Entity User
, UserTableStudyFeatures
, Entity AllocationUser
, Int -- ^ Applied
, Int -- ^ Assigned
, Int -- ^ Vetoed
, Int
, Int
, Int
)
-- ^ `Int`s are applied, assigned, vetoed in that order
resultUser :: Lens' UserTableData (Entity User)
resultUser = _dbrOutput . _1

View File

@ -136,9 +136,10 @@ type WorkflowWorkflowData = DBRow
, Entity WorkflowWorkflow
, Maybe (Entity WorkflowInstance)
, Maybe (Entity WorkflowInstanceDescription)
, Maybe WorkflowWorkflowActionData -- ^ Last Action
, Maybe WorkflowWorkflowActionData
, [Entity User]
)
-- ^ @Maybe `WorkflowWorkflowActionData`@ corresponds to last action
type WorkflowWorkflowActionData = ( Maybe Text
, UTCTime

View File

@ -214,7 +214,7 @@ data JobCtl = JobCtlFlush
| JobCtlQueue Job
| JobCtlGenerateHealthReport HealthCheck
| JobCtlTest
| JobCtlSleep Micro -- | For debugging
| JobCtlSleep Micro -- ^ For debugging
deriving (Eq, Ord, Read, Show, Generic, Typeable)
deriving anyclass (Hashable, NFData)

View File

@ -52,11 +52,11 @@ recodeCsv encOpts toUser act = fromMaybe act $ do
inp <- C.sinkLazy
inp' <- recode inp
sourceLazy inp' .| act
-- | FormatXlsx <- fmt -> do
-- inp <- C.sinkLazy
-- archive <- throwLeft $ Zip.toArchiveOrFail inp
-- archive' <- traverseOf (_zEntries . traverse . _Entrty . _3) recode archive
-- sourceLazy (Zip.fromArchive inp') .| act
-- -- | FormatXlsx <- fmt -> do
-- -- inp <- C.sinkLazy
-- -- archive <- throwLeft $ Zip.toArchiveOrFail inp
-- -- archive' <- traverseOf (_zEntries . traverse . _Entrty . _3) recode archive
-- -- sourceLazy (Zip.fromArchive inp') .| act
| otherwise -> act
where

View File

@ -98,6 +98,9 @@ extra-deps:
- hlint-test-0.1.0.0@sha256:e427c0593433205fc629fb05b74c6b1deb1de72d1571f26142de008f0d5ee7a9,1814
- network-arbitrary-0.6.0.0@sha256:a7034d63295dfc41cf559ee705fc95cac9a9a01b4715300f590eaa237b5ffd48,2506
- process-extras-0.7.4@sha256:4e79289131415796c181889c4a226ebab7fc3b0d27b164f65e1aad123ae9b9e3,1759
- ListLike-4.7.4@sha256:613b2967df738010e8f6f6b7c47d615f6fe42081f68eba7f946d5de7552aa8a4,3778
resolver: nightly-2021-01-11
compiler: ghc-8.10.4
allow-newer: true

View File

@ -534,6 +534,20 @@ packages:
sha256: 97b797944cf068eb5fde620e005e253818f03068b2c20e9cfdd3aaa6cafcb678
original:
hackage: network-arbitrary-0.6.0.0@sha256:a7034d63295dfc41cf559ee705fc95cac9a9a01b4715300f590eaa237b5ffd48,2506
- completed:
hackage: process-extras-0.7.4@sha256:4e79289131415796c181889c4a226ebab7fc3b0d27b164f65e1aad123ae9b9e3,1759
pantry-tree:
size: 1092
sha256: ee89d385c9e822144698633b39f378904e42667aaca0d6ab577d7dea2b452c92
original:
hackage: process-extras-0.7.4@sha256:4e79289131415796c181889c4a226ebab7fc3b0d27b164f65e1aad123ae9b9e3,1759
- completed:
hackage: ListLike-4.7.4@sha256:613b2967df738010e8f6f6b7c47d615f6fe42081f68eba7f946d5de7552aa8a4,3778
pantry-tree:
size: 1854
sha256: 50e22178b0713d0c8367ee6bc9f3b5026422b4b285837bdf9f4173a14db1e8bf
original:
hackage: ListLike-4.7.4@sha256:613b2967df738010e8f6f6b7c47d615f6fe42081f68eba7f946d5de7552aa8a4,3778
snapshots:
- completed:
size: 562265