Last active
June 4, 2020 03:26
-
-
Save gabejohnson/a3f058f888dd4d6e4826b4296028d40e to your computer and use it in GitHub Desktop.
Record shenanigans
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 Record.Unsafe (unsafeDelete) | |
import Effect (Effect) | |
import TryPureScript (h1, text, render) | |
r :: forall t. Record (x :: Boolean, x :: Int, x :: String, x :: t) | |
r = { x: [3] } { x = true } | |
r2 :: forall t. Record (x :: Boolean, x :: Int, x :: String, x :: t) | |
r2 = unsafeDelete "x" r | |
main :: Effect Unit | |
main = | |
render $ h1 (text $ show r2.x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment