Created
July 6, 2020 10:07
-
-
Save i-am-the-slime/55def659d5107f00aaafb9d2fff79dcd to your computer and use it in GitHub Desktop.
This file contains hidden or 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.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