Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am fimad on github.
  • I am fimad (https://keybase.io/fimad) on keybase.
  • I have a public key ASBbMAXBwM-nOtClBaNP6YAOUGdNbVoduz_b14Y4MTYTkAo

To claim this, I am signing this object:

@fimad
fimad / gist.pl
Created August 10, 2014 09:37 — forked from numberten/gist.pl
#!/usr/bin/perl
use Getopt::Long;
#Parse flags using Getopt::Long.
my $desc = '';
my $public = 0;
my $user = '';
my $verbose = 0;
GetOptions ('desc:s' => \$desc,
'public' => \$public,
@fimad
fimad / Label.hs
Last active December 26, 2015 20:38
I needed some way of working with arbitrarily deep stacks of arbitrary types for my current project. This is what I came up with. I thought it was pretty neat so I figured I'd share it.
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverlappingInstances #-}
{-# LANGUAGE TypeOperators #-}
-- An example of how to have an arbitrary stack of types, while still allowing
-- for easy querying and modifying the value at arbitrary depths of the stack.
--
-- While having multiple of the same type in the stack still type checks, the