Skip to content

Instantly share code, notes, and snippets.

@Woody88
Created February 12, 2019 08:59
Show Gist options
  • Select an option

  • Save Woody88/25960b89010080034c82f8a218ae107e to your computer and use it in GitHub Desktop.

Select an option

Save Woody88/25960b89010080034c82f8a218ae107e to your computer and use it in GitHub Desktop.
module Apex where
import Prelude
import Data.Symbol (class IsSymbol)
import Foreign (Foreign)
foreign import kind RemoteActionMethod
data RemoteActionProxy (action :: RemoteActionMethod) = RemoteActionProxy
class IsSymbol method <= RemoteAction (action :: RemoteActionMethod) method args result | action -> method args result
foreign import data GetSalesCenter :: RemoteActionMethod
foreign import data GetCompanyCode :: RemoteActionMethod
instance remoteActionGetSalesCenter :: RemoteAction GetSalesCenter "PCMMassSubmitController.getSalesCenterList" Unit Foreign
class HasApexCall (remoteActionMeth :: RemoteActionMethod) where
callApex :: forall method args result. RemoteAction remoteActionMeth method args result => (RemoteActionProxy remoteActionMeth) -> args -> result
callApex =
instance hasApexCallGetSalescenter :: HasApexCall GetSalesCenter
instance hasApexCallGetSalescenter :: HasApexCall GetSalesCenter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment