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
<feed>
<item>
<x>1</x>
<y>2</y>
<z>3</z>
</item>
<item>
<x>4</x>
<y>5</y>
<z>6</z>

If you are getting "Conflicting definitions are in scope for kind Effect", this is because you are using compiler 0.10 with purescript-eff 3.0.0. purescript-eff 3.0.0 is for compiler 0.11.

You should downgrade purescript-eff to 2.0.0 for the time being. Likewise, downgrade purescript-prelude to 2.5.0 and purescript-psci-support to 2.0.0. You can do this by changing the version numbers in bower.json and invoking bower install.

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
@rightfold
rightfold / CONTRIBUTING.md
Last active May 13, 2016 10:42
rightfold's constructive contribution guidelines template (work in progress)

Contribution guidelines

What is a contribution?

A contribution is any of the following:

  • pull request,
  • bug report,
  • feature request,
  • discussion, or
@rightfold
rightfold / unique_lock_prioritizing_shared_mutex.hpp
Last active November 27, 2015 23:32
Just like a shared mutex, except acquiring a shared lock while a thread is waiting to acquire a unique lock will block.
template<typename SharedMutex>
class unique_lock_prioritizing_shared_mutex {
public:
void lock() {
std::lock_guard<decltype(control)> lock(control);
mutex.lock();
}
void unlock() {
mutex.unlock();
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