Mark Eibes
2020-07-06T10:07:52Z

Main.purs

| 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