This file contains 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
def showA0() | |
puts self.class | |
puts @a | |
end | |
class B | |
def showA(t) | |
@a = t | |
showA0() | |
end |
This file contains 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 TemplateHaskell, ViewPatterns #-} | |
module AccessorTemplateExpr where | |
import Language.Haskell.TH (reify, runIO, Info(TyConI), Dec(DataD), ppr, Con(NormalC, RecC), newName, | |
tupE, appE, lamE, varE, conE, | |
conP, varP, wildP) | |
import Data.Accessor.Basic (fromSetGet) | |
makeAccessors typeName = do | |
info <- reify typeName |
This file contains 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
parseExprControl = | |
do { | |
label <- try (do { l <- p_name; p_eq [Spec ":"]; return l}) | |
; e <- parseExprControl | |
; return (Label label e) | |
} | |
<|> do { | |
try (p_eq [Spec "def"]) | |
; name <- p_name | |
; p_eq [Spec "="] |
This file contains 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 IOFrontend where | |
import qualified Control.Monad.IO.Class as MIO | |
import qualified Data.Aeson as A | |
import qualified Data.Attoparsec as AP | |
import qualified Data.ByteString.Lazy as BSL | |
import qualified Data.Enumerator as E | |
import qualified Data.Enumerator.Binary as EB | |
import qualified Data.Enumerator.List as EL | |
import qualified GHC.IO.Handle as GIO |
This file contains 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
From cd696bc74d369ac5c3a61a93afd327cddd57adf3 Mon Sep 17 00:00:00 2001 | |
From: Max Kirillov <max@max630.net> | |
Date: Sat, 20 Apr 2013 18:26:31 +0300 | |
Subject: [PATCH 1/3] gitk refactor: split getblobdiffline into IO and text | |
handling | |
I would like to hack into diffs which gitk gets from commands. | |
To ease it, let's divide the read handler, getblobdiffline, | |
into reading and subsequent handling. |
This file contains 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
@-moz-document domain("juick.com") { | |
html, input { | |
font-size: 100% !important; | |
} | |
#topwrapper { | |
width: auto !important; | |
} | |
#content { |
This file contains 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
A kind of specs for window manager I need now. A bit overspecified in some places, but is a good start. | |
Layout: | |
Windows are floating, should snap each other. Would be interesting to play with tiling features, but only sometimes (auto resize snapped window). | |
service area is along side, which is ignored by window layouting (initial placement, maximize). | |
Focusing: | |
Either click to focus or sloppy focus (depends on having TrackPoint). No autoraise | |
Decorations: |
This file contains 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 MultiParamTypeClasses #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE ExplicitNamespaces #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE OverlappingInstances #-} | |
{-# LANGUAGE UndecidableInstances #-} |
This file contains 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 FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
module MonadStateIO (evalStateT,execStateT) where | |
import Data.Tuple (swap) | |
import qualified Control.Applicative as App | |
import qualified Control.Monad.Catch as MC | |
import qualified Control.Monad.Trans as MT |