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
class MyClass a where | |
value :: a | |
instance MyClass Char where | |
value = 'a' | |
instance MyClass Int where | |
value = 5 | |
something :: MyClass a => 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
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE ExistentialQuantification #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE TypeFamilies #-} | |
import GHC.Exts (Constraint) |
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
module EncodingPublicKey where | |
import Data.Maybe | |
import Data.Semigroup | |
import Data.Bits | |
import OpenSSL.RSA | |
import qualified Data.ByteString as BS | |
-- Observe the cancer, but don't touch it or you'll contract it. | |
encodePubKey :: RSAKeyPair -> BS.ByteString |
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
#!/bin/bash | |
for i in `seq 1 50`; | |
do | |
wget "https://play.esea.net/index.php?s=stats&last_type_scope=all&game_id=25&sort_by=frags&sort_dir=desc&type_scope=all&d=overall&period[type]=months&period[date_start]=2016-04-01&page=$i" -O "eseadata$i" | |
done |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
-- Data decls could be in their own module for qualified import? | |
-- Alternatively, there might be a solution in GHC 8's duplicate record fields... | |
-- Only thing to update to add fields is the accessor functions | |
-- Test with an int and a str | |
data Test = MkTest Integer String deriving (Eq,Show) | |
number :: Access Integer Test | |
number f (MkTest n s) = (f n, MkTest (f n) s) |
NewerOlder