Skip to content

Instantly share code, notes, and snippets.

"use strict";
exports.src = function (script) {
return function () {
return script.src;
};
};
exports.setSrc = function (src) {
return function (script) {
{- This is a machine generated module.
Do not edit.
See cabal file for repository url.
-}
{- | Two letter Country Codes
Defines the type CountryCode with constructors for each
of the two-letter codes defined in
@linearray
linearray / IBAN.purs
Last active December 15, 2019 15:34
IBAN checker for Purescript, quick and very ugly port of haskell's iban package
module Util.IBAN
( IBAN(..)
, IBANError(..)
, parseIBAN
, prettyIBAN
, SElement
, checkStructure
, parseStructure
, countryStructures
, mod97_10
@linearray
linearray / PTTable
Last active September 11, 2019 13:07
module UI.PTTable where
import Data.Maybe
import Prelude
import Types.Common
import Data.Array as DA
import Data.Array.NonEmpty (NonEmptyArray)
import Data.Array.NonEmpty as DANE
import Data.Newtype (class Newtype, unwrap)
@linearray
linearray / Main
Last active September 5, 2019 17:09
import Halogen.VDom.Driver (runUI)
import Routing.PushState as RPS
main :: Effect Unit
main = HA.runHalogenAff do
body <- HA.awaitBody
i <- liftEffect $ RPS.makeInterface
liftEffect $ log "Hello"
io <- runUI (maincomp i) unit body
liftEffect $ log "Hello2"
module Main where
import Prelude
import Data.Array as DA
import Effect (Effect)
import Effect.Console (log)
import Debug.Trace (traceM)
main :: Effect Unit
main =
### Keybase proof
I hereby claim:
* I am linearray on github.
* I am amx (https://keybase.io/amx) on keybase.
* I have a public key ASDyOIgNrUQNg36_Rqi91EpdKVT-IX-TPihpAE6DInFjpgo
To claim this, I am signing this object:
handleClient :: HasCallStack
=> Server
-> Auth
-> Server ApiTypes.ClientApi
handleClient s auth = if (isAdmin auth) then get :<|> patch else anonGet :<|> anonPatch
diff --git a/31-Design-Patterns/07-Simulating-Constraint-Kinds.md b/31-Design-Patterns/07-Simulating-Constraint-Kinds.md
index 3177b5b..1c11f71 100644
--- a/31-Design-Patterns/07-Simulating-Constraint-Kinds.md
+++ b/31-Design-Patterns/07-Simulating-Constraint-Kinds.md
@@ -33,14 +33,14 @@ However, the above will not compile because PureScript does not yet have "Constr
```purescript
-- PureScript with CPS
type WithMyMonad m a =
- ( MonadAff m
- , ConsoleIO m
module Util.ChildPath
( module Util.ChildPath
, module Util.Prism
) where
import Prelude hiding (compose)
import Data.Lens (Prism', review, preview)
import Data.Lens.Prism.Coproduct as PC
import Data.Lens.Prism.Either as PE