This is the full version of the thread for opencart#1286, archived from notification emails.
The discussion has since been deleted almost entirely by OpenCart's developer.
Everyone who posted in it has also been blocked from the OpenCart repo.
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
{-# LANGUAGE GADTs, TypeOperators, ScopedTypeVariables #-} | |
import Data.Eq.Type | |
import Unsafe.Coerce | |
data Expr e a where | |
Sum :: Expr [x] Int -> Expr [x] Int | |
-- | This is almost ADT, x is existetial. | |
data Expr' e a where |
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
using System; | |
using System.Reactive.Disposables; | |
using System.Reactive.Linq; | |
internal sealed class ObservableAdresses : IDisposable | |
{ | |
private readonly IDisposable _connection; | |
private bool _disposed; | |
public ObservableAdresses(IPoller poller) |
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
public class NotifyCollectionChangedEventArgs<T> | |
{ | |
private readonly NotifyCollectionChangedEventArgs _args; | |
public NotifyCollectionChangedEventArgs(NotifyCollectionChangedEventArgs args) | |
{ | |
_args = args; | |
} | |
public IEnumerable<T> NewItems => _args.NewItems?.Cast<T>() ?? Enumerable.Empty<T>(); |
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
import Control.Applicative | |
import System.Environment | |
import System.Exit | |
import System.Random | |
main = getArgs >>= parseArgs | |
-- Exit with success. | |
exit :: IO a | |
exit = exitWith ExitSuccess |
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
function signin_required($login_page, $fn) { | |
return function($db) use ($fn, $login_page) { | |
if (array_key_exists('user_id', $_SESSION)) | |
$fn($db); | |
else engine\redirect($login_page); | |
}; | |
} |
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
class Builder{ | |
String message = ""; | |
Builder greet(string only_one){ | |
message += "Hello " | |
message += only_one; | |
} | |
Builder greet(string first, string... rest){ | |
greet(first); |
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
f :: obj1 -> obj2 | |
class Diffable delta obj | |
applyDiff :: delta -> obj -> obj | |
instance Diffable obj1Delta obj1 | |
instance Diffable obj2Delta obj2 | |
class PipeThroughDiff o1 d1 o2 d2 where | |
pipeThroughDiff :: o1 -> d1 -> o2 -> d2 |
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
data TExpr | |
= TInt Int | |
| TBool Bool | |
| TStructVal (Map String TExpr) | |
| TVar StrictText | |
| TSum [TExpr] |
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
data TType = TypeInt | TypeBool | TypeVec TType | |
data TExpr a where | |
TInt :: Int -> TExpr Int | |
TBool :: Bool -> TExpr Bool | |
TIVar :: StrictText -> TExpr Int | |
TBVar :: StrictText -> TExpr Bool | |
TSum :: [TExpr Int] -> TExpr Int | |
TVecGet :: |
NewerOlder