Created
July 1, 2020 16:24
-
-
Save jmatsushita/404eefaba98d2e42c16fcd333487ce8b 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 Effect (Effect) | |
import Data.Foldable (fold) | |
import TryPureScript (h1, text, render) | |
data Nat m n = Nat (m ~> n) | |
data NatR m n = NatR { nat :: (m ~> n) } | |
use :: forall m n. Nat m n -> m Unit -> n Unit | |
use (Nat nat) = nat | |
useR :: forall m n. NatR m n -> m Unit -> n Unit | |
useR (NatR { nat }) = nat | |
main :: Effect Unit | |
main = | |
render $ fold | |
[ h1 (text "Try natural transformation in records!") | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment