I hereby claim:
- I am mstksg on github.
- I am mstksg (https://keybase.io/mstksg) on keybase.
- I have a public key whose fingerprint is 1BB5 2738 56F8 1236 7977 2D4F 7250 9247 67D5 7F1C
To claim this, I am signing this object:
foo :: StateT s m Int | |
bar :: Int -> StateT s m Bool | |
-- using State appropriately | |
baz :: StateT s m Bool | |
baz = do | |
x <- foo | |
bar x |
{-# LANGUAGE AllowAmbiguousTypes #-} | |
{-# LANGUAGE ExistentialQuantification #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeInType #-} |
Result: 1 | |
Items { | |
TemplateId: "BADGE_BATTLE_ATTACK_WON" | |
Badge { | |
BadgeType: BADGE_BATTLE_ATTACK_WON | |
BadgeRanks: 4 | |
Targets: "\nd\350\007" | |
} | |
} | |
Items { |
diff -urN htop-1.0.2-orig/CRT.c htop-1.0.2/CRT.c | |
--- htop-1.0.2-orig/CRT.c 2013-03-23 14:10:29.500604247 +0100 | |
+++ htop-1.0.2/CRT.c 2013-03-23 14:11:01.916663508 +0100 | |
@@ -59,6 +59,9 @@ | |
UPTIME, | |
BATTERY, | |
TASKS_RUNNING, | |
+ TEMPERATURE_COOL, | |
+ TEMPERATURE_MEDIUM, | |
+ TEMPERATURE_HOT, |
{-# language DataKinds, PolyKinds, ScopedTypeVariables, UndecidableInstances, | |
FlexibleInstances, FlexibleContexts, GADTs, TypeFamilies, RankNTypes, | |
LambdaCase, TypeOperators, ConstraintKinds #-} | |
import GHC.TypeLits | |
import Data.Proxy | |
import Data.Singletons.Prelude | |
import Data.Singletons.Decide | |
import Data.Constraint |
I hereby claim:
To claim this, I am signing this object:
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE StandaloneDeriving #-} |
And a case for a compositional, denotative, and locally stateful style.
{-# LANGUAGE Arrows #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE NoMonomorphismRestriction #-} | |
module Main (main) where | |
import Control.Wire | |
import FRP.Netwire.Move | |
import Control.Arrow | |
import Prelude hiding ((.), id, mapM_) |
andThen :: (s -> IO (a, s)) -> (s -> IO (b, s)) -> (s -> IO (b, s)) | |
andThenWith :: (s -> IO (a, s)) -> (a -> (s -> IO (b, s))) -> (s -> IO (b, s)) | |
-- type synonym: | |
-- | |
-- > type MIOS s a = s -> IO (s, a) |