I hereby claim:
- I am int-index on github.
- I am int_index (https://keybase.io/int_index) on keybase.
- I have a public key ASDdpc-5-1Z79PVP06_HBtD5DQ-q0TkrX3nyQs7cIvSEFQo
To claim this, I am signing this object:
{-# LANGUAGE TemplateHaskell #-} | |
module Application where | |
import Control.Lens | |
import Snap.Snaplet | |
import Snap.Snaplet.Heist (Heist, HasHeist(..)) | |
data App = App | |
{ _heist :: Snaplet (Heist App) |
module Dynamic where | |
import Control.Applicative | |
import Data.Dynamic | |
please = maybe (error "dynamic typing is bad :(") toDyn | |
pleaseApp2 :: (Rational -> Rational -> Rational) | |
-> (Dynamic -> Dynamic -> Dynamic) | |
pleaseApp2 f a b = please $ f <$> fromDynamic a <*> fromDynamic b |
{-# LANGUAGE PartialTypeSignatures #-} | |
module Main where | |
data I a = I a | |
instance Functor I where | |
fmap f (I a) = I (f a) | |
newtype B t a = B a | |
instance Functor (B t) where | |
fmap f (B a) = B (f a) |
GHCi, version 7.10.3: http://www.haskell.org/ghc/ :? for help | |
Prelude> :l M.hs | |
[1 of 1] Compiling Main ( M.hs, interpreted ) | |
Ok, modules loaded: Main. | |
*Main> |
{-# LANGUAGE NoImplicitPrelude, GADTs, DataKinds, PolyKinds, FlexibleInstances #-} | |
import Data.Monoid | |
import Control.Category | |
-- A monoid gives a rise to a single-object category. | |
newtype M m (a :: ()) (b :: ()) = M m | |
instance Monoid m => Category (M m) where | |
id = M mempty |
[1 of 1] Compiling Main ( fieldtype.hs, fieldtype.o ) | |
fieldtype.hs:19:27: error: | |
• Expected kind ‘Fin (FieldCount T)’, | |
but ‘'FZ’ has kind ‘Fin ('S n0)’ | |
• In the second argument of ‘FieldType’, namely ‘FZ’ | |
In the type instance declaration for ‘FieldType’ | |
fieldtype.hs:20:28: error: | |
• Expected kind ‘Fin (FieldCount T)’, |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, | |
TypeOperators, UndecidableInstances #-} | |
{-# LANGUAGE RankNTypes, ScopedTypeVariables, ConstraintKinds #-} | |
import Data.Constraint | |
import Data.Constraint.Forall | |
class C1 a b | |
class C2 a b | |
instance C1 a b => C2 a b |
{-# LANGUAGE RankNTypes, ScopedTypeVariables, FlexibleContexts #-} | |
import Control.Monad.Reader | |
import Data.Reflection | |
import Data.Tagged | |
import Data.Proxy | |
f :: Reader String Int | |
f = do | |
a <- ask |
I hereby claim:
To claim this, I am signing this object:
{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleInstances, OverloadedStrings, UndecidableInstances #-} | |
import Control.Monad.Logger | |
import Control.Monad.Trans | |
import Control.Monad.Trans.Identity | |
import Data.Coerce | |
class Monad m => MonadFoo m where | |
foo :: m () |