Haskell DJs: Compose a hit with Vinyl
- Languages
- Concepts
- Libraries
#!/bin/bash | |
set -e | |
# This if stack-enabled fork of https://github.com/ekmett/lens/blob/master/scripts/hackage-docs.sh | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: scripts/hackage-docs.sh HACKAGE_USER" | |
exit 1 | |
fi |
import Control.Lens ((^.)) | |
import Language.Javascript.JSaddle (JSCallAsFunction, MonadJSM, js2, jsg, liftJSM) | |
import Reflex.Dom (Event, MonadWidget, newTriggerEvent) | |
onWindowUnload :: MonadWidget t m => m (Event t ()) | |
onWindowUnload = do | |
(event, trigger) <- newTriggerEvent | |
let body :: JSCallAsFunction = \_ _ [_event] -> liftIO (trigger ()) | |
void . liftJSM $ jsg "window" ^. js2 "addEventListener" "beforeunload" body | |
pure event |
created | dayOfWeek | hourOfDay | score | author | title | |
---|---|---|---|---|---|---|
2021-03-08T17:08:01Z | Monday | 17 | 1 | micheleriva | Haskell in the industry (and community) with Alexander Granin | |
2021-03-08T15:34:14Z | Monday | 15 | 1 | mihaela_workshub | Higher Order Functions: Lambda calculus, Currying, Maps | |
2021-03-08T03:10:08Z | Monday | 3 | 1 | Glittering_Squash_33 | Point-free | |
2021-03-08T01:38:13Z | Monday | 1 | 1 | Tricky_Celebration37 | Entering : by itself in GHCi will run the most recent command you've used | |
2021-03-05T01:01:52Z | Friday | 1 | 8 | stanislavb | Haskell LibHunt - discover popular Haskell projects based on their mentions on Reddit | |
2021-03-04T23:18:56Z | Thursday | 23 | 7 | mitbull420 | Would anyone like to read 'Thinking with types' (type level programming book by Sandy Maguire) with me? | |
2021-03-04T22:57:33Z | Thursday | 22 | 3 | RingularCirc | Typeclasses and similar constructs in languages | |
2021-03-04T21:26:55Z | Thursday | 21 | 98 | hsyl20 | [Haskell-cafe] Serious bug with Natural in GHC 9.0.1 | |
2021-03-04T21:03:05Z | Thursday | 21 | 10 | flatmapcatmap | Heap object de-duplication for memory savings |