Skip to content

Instantly share code, notes, and snippets.

View rightfold's full-sized avatar
🎯
Finally focussing

rightfold rightfold

🎯
Finally focussing
  • Utrecht, Netherlands
View GitHub Profile

OpenCart Issue #1286

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.


Damian Bushong

{-# 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
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)
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>();
@rightfold
rightfold / passgen.hs
Last active August 29, 2015 14:26 — forked from ThomasLocke/passgen.hs
A Haskell noob trying to create sorta-kinda random passwords
import Control.Applicative
import System.Environment
import System.Exit
import System.Random
main = getArgs >>= parseArgs
-- Exit with success.
exit :: IO a
exit = exitWith ExitSuccess
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);
};
}
class Builder{
String message = "";
Builder greet(string only_one){
message += "Hello "
message += only_one;
}
Builder greet(string first, string... rest){
greet(first);
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
data TExpr
= TInt Int
| TBool Bool
| TStructVal (Map String TExpr)
| TVar StrictText
| TSum [TExpr]
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 ::