Original: https://hastebin.com/ucuqijegec.vbs
Mirror: https://pastebin.com/2ZKhTswH
I've camelCased all the functions, since that is the standard in Haskell.
-- 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) |
#!/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 |
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 |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE ExistentialQuantification #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE TypeFamilies #-} | |
import GHC.Exts (Constraint) |
class MyClass a where | |
value :: a | |
instance MyClass Char where | |
value = 'a' | |
instance MyClass Int where | |
value = 5 | |
something :: MyClass a => a |
class Fork q where | |
type RuntimeConstraint q x :: Constraint | |
fork :: RuntimeConstraint q r => Eff (q ': r) a -> q (Eff r a) | |
data MyEffect a where | |
ForkMyEffect :: Member IO r => Eff (MyEffect ': r) a -> MyEffect (Eff r a) | |
Say :: MyEffect () | |
instance Fork MyEffect where | |
type RuntimeConstraint MyEffect x = Member IO x |
Original: https://hastebin.com/ucuqijegec.vbs
Mirror: https://pastebin.com/2ZKhTswH
I've camelCased all the functions, since that is the standard in Haskell.
The vast majority of the errors are because your functions (particularly help
and version
) are IO String
when they should really be IO ()
. All of the alternatives in a case must have the same type, all the expressions in a do
block must have the same base monad, and the last expression in a do
block must have the same type as the do
block overall. Let's look at your main
function:
Unless otherwise specified, these files all go in the root of your Github repository.
We use Travis CI to build and test on each commit or pull request to the Github repository.
The Travis setup is all the defaults, plus this as .travis.yml
:
# Travis build script for mineman