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
| retry' :: ∀ e a. Eff e a → (a → Boolean) → Int → String → ExceptionableEff e a | |
| retry' action cond i errMsg = ExceptT $ retry'' action cond i errMsg | |
| where retry'' action cond i errMsg | i <= 0 = map (\_ → Left errMsg) action | |
| | otherwise = do | |
| res ← action | |
| if cond res then pure $ Right res else retry'' action cond (i-1) errMsg |
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 Control.Monad.Aff | |
| import Control.Monad.Eff.Console | |
| import Control.Monad.Eff | |
| import Network.HTTP.Affjax | |
| import Network.HTTP.StatusCode | |
| import Data.Functor | |
| import Network.HTTP.Affjax.Response | |
| import Control.Monad |
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 Object where | |
| import Prelude | |
| import Data.Foreign | |
| import Data.Foreign.Class | |
| import Data.String | |
| import Data.List (List(..), fromFoldable) | |
| import Data.List.Types | |
| import Data.Either | |
| import Control.Monad.Except.Trans |
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
| # This file has been auto-generated by i3-config-wizard(1). | |
| # It will not be overwritten, so edit it as you like. | |
| # | |
| # Should you change your keyboard layout some time, delete | |
| # this file and re-run i3-config-wizard(1). | |
| # | |
| # i3 config file (v4) | |
| # | |
| # Please see http://i3wm.org/docs/userguide.html for a complete reference! |
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
| -----BEGIN PGP PUBLIC KEY BLOCK----- | |
| mQENBFlvASQBCADeRkGri0A+UEOlER16ev8wDZ2+kHPxk4y63vjNCLf1AYE5Dcnl | |
| YiBA6FHr4cf66ECg83PqtOZiCRw3T75jX3MYcwKOtWghrlIjsRZBNk6gSvm7DbbT | |
| 0RsVw9HPb/EhxsVQoiDb7SIeTNOoWjr20ixdUW4WRy+OCRNxuxzM65B8SrJKftEz | |
| UKIxMo6JqRzEqDALsJB+8FmY1ZqsmWiI/5LSp131obm6dS653fawGpxHw4AKna5U | |
| scsT7LmcFrv18ID1ca/e2XXnBGogtEg23I2Tv2svOtJld3Q69aBbW1bidi7q/+DS | |
| fzlXsdKtlv3iHTRpxHOP+jlbJ1kSKcUbFl5HABEBAAG0PlBhdWwgVmljdG9yIFJh | |
| aiAoUGF1bCBWaWN0b3IncyBHUEcga2V5KSA8cGF1bHZpY3RvckBnbWFpbC5jb20+ | |
| iQFOBBMBCAA4FiEEP8i/n4ahkxxtV8peRuauRp9+Y+oFAllvASQCGwMFCwkIBwIG |
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
| 0x0ea94785c4a59Db46e02129ddfaD9962F29011Eb |
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
| exports.affToEvent = function(aff) { | |
| return function(sub) { | |
| aff(function(a) { sub(a); }, function(e){}) | |
| } | |
| } | |
| exports.randomIntBetween = function(min) { | |
| return function(max) { | |
| return function(e) { | |
| return function(sub) { |
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 RecordMods where | |
| import Prelude | |
| import Control.Monad.Eff (Eff) | |
| import Data.Foreign (Foreign) | |
| import Data.Record (insert) | |
| import Data.Symbol (SProxy(..)) | |
| newtype Person = Person {firstName :: String, lastName :: String, address :: Address} |
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 RowSubset (row :: # Type) (xs :: RowList) (subrow :: # Type) | xs -> subrow where | |
| subsetImpl :: RLProxy xs -> {|row} -> {|subrow} | |
| instance nilRowSubset :: RowSubset row Nil () where subsetImpl _ _ = {} | |
| instance consRowSubset | |
| :: | |
| ( IsSymbol sym | |
| , Cons sym a subrowWithoutSym subrowWithSym | |
| , Cons sym a srcWithoutSym src |
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
| newtype WithDefault b a = WithDefault a | |
| instance showWithDefault :: Show a => Show (WithDefault b a) where | |
| show (WithDefault a) = show a | |
| class Reflect a b | b -> a where | |
| reflect :: Proxy a -> b | |
| instance reflectSProxyString :: IsSymbol sym => Reflect (SProxy sym) String where | |
| reflect = const (reflectSymbol (SProxy :: SProxy sym)) |