Skip to content

Instantly share code, notes, and snippets.

View mvoidex's full-sized avatar

Alexandr Ruchkin mvoidex

View GitHub Profile
@mvoidex
mvoidex / Default (Windows).sublime-keymap
Created July 15, 2015 11:15
Default sublime text 3 keymap for Windows
[
{ "keys": ["up"], "command": "repl_view_previous",
"context":
[
{ "key": "setting.history_arrows", "operator": "equal", "operand": true },
{ "key": "setting.repl", "operator": "equal", "operand": true },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false }
]
},
{ "keys": ["alt+p"], "command": "repl_view_previous",
@mvoidex
mvoidex / hlintfix.hs
Created February 21, 2015 18:18
hlintfix example
{-# LANGUAGE OverloadedStrings #-}
module Main (
main
) where
import Control.Arrow
import Control.Applicative
import Control.Lens (lens, traverseOf, view, Simple, Lens)
import Data.Aeson
@mvoidex
mvoidex / gist:3912474
Created October 18, 2012 15:14
Serializable
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-}
module ParseTest (
) where
import Data.ByteString (ByteString)
import Data.Text (Text)
import qualified Data.Text.Encoding as T
import Data.Serialization
import Data.Serialization.Text.Print
@mvoidex
mvoidex / gist:3910976
Created October 18, 2012 10:52
Serializable
data A = A Text Int Double
deriving (Eq, Ord, Read, Show)
$(makeIso "aiso" ''A)
-- | Serialize with show, deserialize with attoparsec
type Textual a = Serializable Text ShowText Atto a
class Ser a where
ser :: Textual a
@mvoidex
mvoidex / Serializable.hs
Created October 18, 2012 10:52
Serializable
data A = A Text Int Double
deriving (Eq, Ord, Read, Show)
$(makeIso "aiso" ''A)
-- | Serialize with show, deserialize with attoparsec
type Textual a = Serializable Text ShowText Atto a
class Ser a where
ser :: Textual a
@mvoidex
mvoidex / gist:3910970
Created October 18, 2012 10:52
Serializable
data A = A Text Int Double
deriving (Eq, Ord, Read, Show)
$(makeIso "aiso" ''A)
-- | Serialize with show, deserialize with attoparsec
type Textual a = Serializable Text ShowText Atto a
class Ser a where
ser :: Textual a
@mvoidex
mvoidex / gist:3910965
Created October 18, 2012 10:51
Serializable
data A = A Text Int Double
deriving (Eq, Ord, Read, Show)
$(makeIso "aiso" ''A)
-- | Serialize with show, deserialize with attoparsec
type Textual a = Serializable Text ShowText Atto a
class Ser a where
ser :: Textual a