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
#nullable enable | |
using System; | |
// --- | |
interface Hk<W, A> { } | |
// --- |
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
package example.playground.parserclass; | |
import lombok.AllArgsConstructor; | |
import lombok.EqualsAndHashCode; | |
import lombok.RequiredArgsConstructor; | |
import lombok.Value; | |
import lombok.experimental.Delegate; | |
import java.util.function.BiFunction; | |
import java.util.function.Function; |
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
import Control.Exception | |
import System.IO.Unsafe | |
match :: (a -> b) -> a -> Maybe b | |
match m a = unsafeDupablePerformIO $ | |
handle (\(PatternMatchFail _) -> pure Nothing) $ do | |
x <- evaluate (m a) | |
return (Just x) | |
what :: Either a b -> Maybe b |
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
{-# LANGUAGE RankNTypes #-} | |
module Symbolic where | |
data Expr | |
= Var -- x | |
| Lit Double | |
| BinOp BinOp Expr Expr | |
| UnaOp UnaOp Expr | |
deriving (Show, Eq) |
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
{-# OPTIONS_GHC -Wall #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE FlexibleContexts #-} |
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
package example.playground.ufuture; | |
import com.google.common.util.concurrent.FluentFuture; | |
import com.google.common.util.concurrent.Futures; | |
import com.google.common.util.concurrent.SettableFuture; | |
import lombok.EqualsAndHashCode; | |
import lombok.RequiredArgsConstructor; | |
import lombok.Value; | |
import java.util.concurrent.CompletableFuture; |
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
package example.playground; | |
import lombok.RequiredArgsConstructor; | |
import lombok.Value; | |
import lombok.With; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Parameter; | |
import java.util.ArrayList; | |
import java.util.Arrays; |
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
package example.playground.parsec; | |
import lombok.EqualsAndHashCode; | |
import lombok.Value; | |
import lombok.val; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.HashSet; |
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
{-# Language GADTs #-} | |
{-# Language RankNTypes #-} | |
{-# Language TypeFamilies #-} | |
import Control.Monad | |
--- | |
class Rel a where | |
type Delta a :: * |
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
from abc import ABC | |
from abc import abstractmethod | |
from abc import abstractproperty | |
from dataclasses import dataclass, field | |
from typing import Any | |
from typing import AsyncGenerator | |
from typing import Awaitable | |
from typing import Callable | |
from typing import Generator | |
from typing import Generic |