Skip to content

Instantly share code, notes, and snippets.

View hgiasac's full-sized avatar

Toan Nguyen hgiasac

View GitHub Profile
@hgiasac
hgiasac / Dynamic.hs
Last active January 4, 2019 17:41
Typeable - A long journey to type-safe dynamic type representation
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeInType #-}
module Type.Dynamic where
import Control.Monad
import Data.Maybe
@hgiasac
hgiasac / init.el
Last active April 23, 2018 12:34
Emacs TSLint fix file hook
(defun tslint-fix-file ()
"Tslint fix file."
(interactive)
(message (concat "tslint --fixing the file " (buffer-file-name)))
(shell-command (concat "tslint --fix " (buffer-file-name))))
(defun tslint-fix-file-and-revert ()
"Format the current file with TSLint."