Skip to content

Instantly share code, notes, and snippets.

module Infra.Resources.Config where
import Prelude
import Data.Either (Either(..), note)
import Dotenv as Dotenv
import Effect.Aff (Aff, error, makeAff, throwError)
import Foreign.Object (Object)
import Foreign.Object as Object
import Infra.Resources.Database.DBAdapter (MYSQL, REDIS, kind DBAdapter)
No type class instance was found for
Network.Wai.Router.Internal.RouteContext (Cons "user"
{ params :: { id :: Int
}
}
Nil
)
( user :: { params :: { id :: Int
}
@Woody88
Woody88 / Test.purs
Created September 25, 2019 16:10
How to return subset of a record
module Test where
import Prim.Row
import Record as Record
type UpdateProps r
= ( name :: String
, purgeHistoryDays :: String
, purgeImmediate :: String
, forceRestartTime :: Int
@Woody88
Woody88 / Error1.txt
Created September 18, 2019 03:13
Purescript Error message when using "." on a non Record type
Could not match type
Record
with type
Function (Mod CommandFields t2)
while trying to match type { fold :: t0
| t1
}
with type Mod CommandFields t2 -> Parser t2
while checking that expression subparser
has type { fold :: t0
module Lib where
import Prelude
import Type.Row (type (+))
import Control.Monad.Except (ExceptT(..))
import Control.Monad.Except.Checked (ExceptV, handleError, safe)
import Data.Bifunctor (lmap)
import Data.Either (Either(..))
import Data.Variant (SProxy(..), Variant, inj)
module Data.PCM where
import Prelude
import Apex.Internal (ApexError(..), Visualforce)
import Apex.Internal as Apex
import Control.Monad.Except (runExcept)
import Data.Array as Array
import Data.Bifunctor (lmap)
import Data.Either (Either)
exports._getVisualforce = function(just){
return function(nothing){
if (typeof Visualforce !== "undefined" &&
typeof Visualforce.remoting !== "undefined" &&
typeof Visualforce.remoting.Manager !== "undefined") {
return just(Visualforce);
}
else {
return nothing;
}
module Apex where
import Prelude
import Data.Symbol (class IsSymbol)
import Foreign (Foreign)
foreign import kind RemoteActionMethod
data RemoteActionProxy (action :: RemoteActionMethod) = RemoteActionProxy
module DesignSystem.Components.ComboBox where
import DesignSystem.Components.Internal (_comboBoxImpl)
import React.Basic (JSX, element)
import React.Basic.Events (EventHandler)
import Prim.Row
type ComboboxProps
= ( assistiveText :: String
module Component.FileUploader where
import Prelude
import Control.Monad.Except (ExceptT(..), catchError, runExceptT)
import Control.Monad.Maybe.Trans (MaybeT(..), runMaybeT)
import Control.MonadZero (guard)
import Control.Plus (empty)
import Data.Array as Array
import Data.Bifunctor (lmap)