This file contains hidden or 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 App.Front.Lib.Dom ( | |
elDynAttrWithPreventDefaultEvent', | |
elDynAttrWithModifyConfig' | |
) where | |
import Control.Lens ((%~), (.~)) | |
import Data.Map (Map) | |
import Data.Proxy (Proxy(..)) | |
import Data.Text (Text) | |
import Reflex.Dom.Core |
This file contains hidden or 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
leadPropertyFilters :: (Columnar f0 Int | |
~ | |
QGenExpr context syntax s t, | |
HaskellLiteralForQExpr a ~ Int, | |
Columnar f0 Bool ~ QGenExpr context syntax s Bool, | |
Columnar f0 (Maybe Int) ~ QGenExpr context syntax s a1, | |
Columnar f0 Text ~ QGenExpr context syntax s a4, | |
Columnar f0 (Auto Int) ~ QGenExpr context syntax s (Auto a3), | |
Database.Beam.Backend.SQL.SQL92.IsSql92ExpressionSyntax syntax, | |
SqlOrd |
This file contains hidden or 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 | |
, ... | |
}: | |
let | |
cfg = config.simpleWebServer; | |
in with lib; { |
This file contains hidden or 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 EmptyDataDecls #-} | |
{-# LANGUAGE RecordWildCards #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeFamilies #-} | |
module Db.Migration | |
( Method(..) | |
, PM36Migration | |
, Table, Uniqueness(..) | |
, defineTableIfNotExists |
This file contains hidden or 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
nix-build project-m36.nix | |
# to open a shell where cabal works | |
nix-shell -E '(import ./project-m36.nix {}).env' | |
# cabal build |
This file contains hidden or 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 CPP #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE RecursiveDo #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeFamilies #-} |
This file contains hidden or 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
:set prompt "> " | |
:set -isrc | |
:load Main |
This file contains hidden or 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 RecursiveDo, TemplateHaskell, FlexibleContexts, TypeFamilies, OverloadedStrings #-} | |
import Control.Monad | |
import Control.Lens | |
import Reflex.Dom | |
import Reflex.Dom.Widget.Input | |
import qualified GHCJS.DOM.HTMLInputElement as J | |
import qualified GHCJS.DOM.Element as J | |
import Data.FileEmbed | |
import qualified Data.Text as T |
This file contains hidden or 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 PolyKinds, TypeFamilies, TypeOperators #-} | |
type family ($) (f :: k1) (x :: k2) :: k3 | |
data Id | |
type instance Id $ x = x | |
data DoSomething | |
type instance DoSomething $ x = Either x x |
This file contains hidden or 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
latestLeft :: (Reflex t, MonadHold t m) => a -> Event t (Either a b) -> m (Dynamic t a) | |
latestLeft initial x = holdDyn initial $ fmapMaybe (either Just (const Nothing)) x |