Skip to content

Instantly share code, notes, and snippets.

@i-am-the-slime
Created July 6, 2020 10:07
Show Gist options
  • Save i-am-the-slime/55def659d5107f00aaafb9d2fff79dcd to your computer and use it in GitHub Desktop.
Save i-am-the-slime/55def659d5107f00aaafb9d2fff79dcd to your computer and use it in GitHub Desktop.
module Main where
import Prelude
import Data.Symbol (SProxy(..))
import Effect (Effect)
import Effect.Class.Console (logShow)
import Record (insert)
ex1 :: { aNewField :: Int }
ex1 = insert (SProxy :: SProxy "aNewField") 234 {}
-- Defining some aliases
type Key = SProxy
key :: forall a. SProxy a
key = SProxy
ex2 :: { aNewField :: Int }
ex2 = insert (key :: Key "aNewField") 482 {}
main :: Effect Unit
main = do
logShow ex1
logShow ex2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment