This file contains 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
import qualified Data.Map as M | |
div_ [ style_ $ M.singleton "background" "red" ] [ ] | |
--- Comibing attributes | |
div_ [ style_ $ ( mappend (mappend (M.singleton "background" "red") (M.singleton "width" "250px")) (M.singleton "height" "250px")] [ ] |
This file contains 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
import qualified Data.Map as M | |
import Data.Monoid ((<>)) | |
(=:) :: k -> a -> M.Map k a | |
a =: b = M.singleton a b | |
-- | Constructs a virtual DOM from a model | |
viewModel :: Model -> View Action | |
viewModel x = div_ [] [ | |
button_ [ onClick AddOne ] [ text "+" ] |
This file contains 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.mkClient = function(){ | |
var jsforce = require('jsforce'); | |
return new jsforce.Client(); | |
} | |
exports.getConnection = function(client, loginProps, connectionCancel, connectionError, left, right){ | |
return function(onError, onSuccess) { | |
function loginHandler(err, result){ | |
if (err != null) |
This file contains 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 Effect (Effect) | |
import Effect.Class | |
import Effect.Console (log) | |
import Effect.Aff | |
import Salesforce.Client |
This file contains 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
// Generated by purs version 0.12.0 | |
"use strict"; | |
var Control_Bind = require("../Control.Bind/index.js"); | |
var Data_Either = require("../Data.Either/index.js"); | |
var Data_Function = require("../Data.Function/index.js"); | |
var Effect = require("../Effect/index.js"); | |
var Effect_Aff = require("../Effect.Aff/index.js"); | |
var Effect_Class = require("../Effect.Class/index.js"); | |
var Effect_Console = require("../Effect.Console/index.js"); | |
var Prelude = require("../Prelude/index.js"); |
This file contains 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.queryString_ = function(conn, q, error, success){ | |
return function(onError, onSuccess){ | |
conn.query(q, function(err, res){ | |
if (err){ | |
console.log('FFI queryString Error: ', err); | |
return onSucess( error( err.message ) ); | |
} | |
console.log('FFI queryString Result: ', res); | |
return onSuccess( sucesss( res ) ); |
This file contains 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 Salesforce.SOQL.Query where | |
import Prelude | |
import Control.Monad.Except | |
import Control.Monad.Error.Class | |
import Data.Either (Either(..)) | |
import Data.Function.Uncurried (Fn4, runFn4) | |
import Effect.Aff (Aff) | |
import Effect.Aff.Compat (EffectFnAff, fromEffectFnAff) | |
import Foreign (Foreign, MultipleErrors) |
This file contains 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 Salesforce.Connection where | |
import Prelude | |
import Data.Either (Either(..)) | |
import Data.Tuple | |
import Data.Function.Uncurried (Fn1) | |
import Data.Generic.Rep (class Generic) | |
import Data.Generic.Rep.Show (genericShow) | |
import Data.Function.Uncurried (Fn6, runFn6) |
This file contains 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 Data.Tuple | |
import Effect.Aff | |
import Effect.Class | |
import Prelude | |
import Salesforce.Client | |
import Salesforce.SOQL.Query | |
import Salesforce.Types |
This file contains 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, Either) | |
import Data.Generic.Rep (class Generic) | |
import Foreign.Generic (genericDecode, defaultOptions) | |
import Effect (Effect) | |
import Effect.Class (liftEffect) | |
import Effect.Aff (Aff) | |
import Effect.Console (log, logShow) |