https://github.com/reflex-frp/reflex-platform/blob/develop/docs/project-development.md
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 DerivingStrategies #-} | |
{-# LANGUAGE EmptyDataDecls #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE PartialTypeSignatures #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} |
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
jbetz> is `rhyolite` for enabling the frontend to subscribe to backend events via web sockets? and has anyone outside of obsidian tried using it? | |
02:06 <Cale> jbetz: rhyolite is a bunch of partially-baked miscellaneous libraries which are at various levels of polish, but which we needed to open-source early for various reasons. Use it at your own risk, but please let us know if you find anything particularly good/bad if you do end up trying it out. | |
02:07 We've been breaking out pieces of it, taking off the sharp edges, and open sourcing them as separate libraries as time permits. | |
02:08 Rhyolite.Backend.App does contain something like what you described though | |
02:10 → mtesseract joined (~moritz@x5d8555ca.dyn.telefonica.de) | |
02:13 <jbetz> Cale: gotcha. I got curious when I started looking through obsidian's tezos projects. | |
02:18 also, I really like the idea of widget's subscribing to database queries. there's a clojure project called `precept` that pretty much does this. the database is just a graph of facts, wi |
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 Main where | |
import qualified Database.Beam.Backend.SQL as Beam | |
import qualified Database.Beam.Backend.Types as Beam | |
import qualified Database.Beam.Migrate as Beam | |
import qualified Database.Beam.Migrate.Backend as Beam | |
import qualified Database.Beam.Migrate.Generics as Beam | |
import qualified Database.Beam.Migrate.Simple as Beam | |
import Database.Beam.Postgres.Syntax (PgCommandSyntax, pgRenderSyntaxScript, fromPgCommand, pgBigSerialType) | |
import qualified Database.Beam.Postgres as Beam |
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
-- | Examples | |
data Foo = Foo {foo1:: Double, foo2:: Bar} deriving (Show, GHC.Generic) | |
instance Generic Foo | |
instance HasDatatypeInfo Foo | |
data Bar = | |
Bar | |
| Bar2 deriving (Show, GHC.Generic) |
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
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory |
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
;; -*- mode: emacs-lisp; lexical-binding: t -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Layer configuration: | |
This function should only modify configuration layer settings." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory | |
;; `+distribution'. For now available distributions are `spacemacs-base' |
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
{ config, pkgs, lib, ...}: | |
{ | |
services.hydra.package = pkgs.hydra.overrideAttrs (o: { src = (pkgs.fetchFromGitHub { | |
owner = "nixos"; | |
repo = "hydra"; | |
rev = "e0f204f3da6245fbaf5cb9ef59568b775ddcb929"; | |
sha256 = "66002da8d68027b8a5edaf03bd81dd8b6327397311d71398776e1d3ef1ec96e1"; | |
}); | |
}); | |
imports = [ |
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
traverseConcurrentlyWith :: Traversable f => Int -> (a -> IO b) -> f a -> IO (f b) | |
traverseConcurrentlyWith count f t0 = do | |
(queue, t1) <- atomically $ do | |
queueDList <- newTVar id | |
t1 <- for t0 $ \x -> do | |
res <- newEmptyTMVar | |
modifyTVar queueDList (((x, res):) .) | |
pure . atomically $ takeTMVar res | |
dlist <- readTVar queueDList | |
queue <- newTVar $ dlist [] |
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
# ghc-options: | |
# - -Weverything | |
# - -Wno-missing-exported-signatures # missing-exported-signatures turns off the more strict -Wmissing-signatures. See https://ghc.haskell.org/trac/ghc/ticket/14794#ticket | |
# - -Wno-missing-import-lists # Requires explicit imports of _every_ function (e.g. '$'); too strict | |
# - -Wno-missed-specialisations # When GHC can't specialize a polymorphic function. No big deal and requires fixing underlying libraries to solve. | |
# - -Wno-all-missed-specialisations # See missed-specialisations | |
# - -Wno-unsafe # Don't use Safe Haskell warnings | |
# - -Wno-missing-local-signatures # Warning for polymorphic local bindings. Don't think this is an issue | |
# - -Wno-monomorphism-restriction # Don't warn if the monomorphism restriction is used |
NewerOlder