Created
May 11, 2018 02:46
-
-
Save joneshf/238e42fbe4175436472947577222e4a4 to your computer and use it in GitHub Desktop.
expand
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 Unsafe.Coerce | |
data FOO | |
data BAR | |
data BAZ | |
data Run (x :: # Type) a | |
type LessRows r = (foo :: FOO | r) | |
type MoreRows = (foo :: FOO, bar :: BAR, baz :: BAZ) | |
foo :: forall r. Run (LessRows r) Unit | |
foo = unsafeCoerce unit | |
foo' :: Run MoreRows Unit | |
foo' = expand foo | |
expand :: forall r1 r2 rx a. Union r1 rx r2 => Run r1 a -> Run r2 a | |
expand = unsafeCoerce |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment