Instance | Branch |
---|
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
class ParseBodyRL (rl :: RowList) b | rl -> b where | |
parseBodyRL :: RLProxy rl -> Request -> ExceptT String Aff b | |
instance parseBodyRLConsNil :: ParseBodyRL RL.Nil Unit where | |
parseBodyRL _ = pure unit | |
-- Weird error message... | |
-- Could not match type | |
-- Unit |
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 Main where | |
import Prelude | |
import Data.Either (Either(..)) | |
import Data.Symbol (class IsSymbol, SProxy(..)) | |
import Effect (Effect) | |
import Effect.Class.Console as Console | |
import Prim.Row (class Cons, class Lacks, class Union) as Row | |
import Prim.RowList (class RowToList, kind RowList) |
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 Main where | |
import Prelude | |
import Data.Either (Either) | |
import Data.Symbol (class IsSymbol, SProxy(..)) | |
import Prim.Row as Row | |
import Prim.RowList (kind RowList) | |
import Prim.RowList as RL | |
import Prim.Symbol as Symbol |
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
Could not match type | |
() | |
with type | |
( id :: Int | |
) | |
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 Main where | |
import Prelude | |
import Data.Either (Either(..)) | |
import Data.Refined (FromTo, Refined, refine, unrefine) | |
import Data.Typelevel.Num (D0, D100) | |
import Effect (Effect) | |
import Effect.Exception (throw) |
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
type ShipApplication = | |
{ id :: String | |
| CoverRow | |
+ ParticularRow | |
+ () | |
} | |
type ParticularRow r | |
= ( netTonnage :: Number | |
, freeBoard :: Number |
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
websocketsOr :: WS.ConnectionOptions | |
-> WS.ServerApp | |
-> Wai.Application | |
-> Wai.Application | |
websocketsOr opts app backup req sendResponse = | |
case websocketsApp opts app req of | |
Nothing -> backup req sendResponse | |
Just res -> sendResponse res | |
websocketsApp :: WS.ConnectionOptions |
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
"use strict"; | |
const Redis = require('ioredis') | |
exports.scanStreamImpl = conn => options => (onError, onSuccess) => { | |
const redis = new Redis(conn.options) | |
var stream = redis.scanStream(options) | |
stream.on("data", resultKeys => { | |
// `resultKeys` is an array of strings representing key names. | |
// Note that resultKeys may contain 0 keys, and that it will sometimes |
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 TypeWitness where | |
import Prelude | |
import Data.Exists (Exists) | |
import Data.Foldable (find) | |
import Data.Leibniz (type (~)) | |
import Data.Maybe (Maybe(..)) | |
import Data.Tuple (Tuple(..)) | |
import Data.Tuple.Nested (Tuple3, T3, (/\)) |
NewerOlder