Created
August 30, 2022 15:41
-
-
Save paluh/54548cd80ae6e6ca908d49b84bc2e4ca to your computer and use it in GitHub Desktop.
Compact singature
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.Foldable (fold) | |
import Data.Tuple.Nested (type (/\)) | |
import Type.Prelude (Proxy(..)) | |
import Effect (Effect) | |
import TryPureScript (h1, h2, p, text, list, indent, link, render, code) | |
class Compact a b c | a b -> c -- , c -> a b | |
instance Compact a a a | |
else instance Compact a b (a /\ b) | |
summary :: forall a b c. Compact a b c => Proxy a -> Proxy b -> Proxy c | |
summary _ _ = Proxy | |
x = summary (Proxy :: Proxy String) (Proxy :: Proxy String) | |
y = summary (Proxy :: Proxy String) (Proxy :: Proxy Int) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment