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 AllowAmbiguousTypes #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE DuplicateRecordFields #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE NoMonomorphismRestriction #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ScopedTypeVariables #-} |
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
ghc: | |
macosx: | |
8.8.0.20190424: | |
url: https://downloads.haskell.org/ghc/8.8.1-alpha1/ghc-8.8.0.20190424-x86_64-apple-darwin.tar.xz | |
sha256: 563e34bb2d8a48fa5630136c5acc059bab0e807bf4f02b23d0fbc75f38500feb | |
windows64: | |
8.8.0.20190424: | |
url: https://downloads.haskell.org/ghc/8.8.1-alpha1/ghc-8.8.0.20190424-x86_64-unknown-mingw32.tar.xz | |
sha256: 1b5ff7995a07e7251b26b3c7dadba57906b7e6d236d0e94c4e92d9b5b8ee3300 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Set-PSDebug -trace 2 | |
$FORMAT = "yyyy-MM-dd" | |
$QUERY_FORMAT = "yyyyMMdd" | |
$since = [DateTime]::ParseExact($args[0], $FORMAT, $null) | |
$until = if ($args[1]) { | |
[DateTime]::ParseExact($args[1], $FORMAT, $null) | |
} else { |
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
#!/bin/env stack | |
{- | |
stack --resolver=lts-12.24 script --package extensible | |
-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE OverloadedLabels #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE TypeOperators #-} | |
import Data.Extensible |
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
class Parser | |
attr_reader :value | |
def initialize string, value = nil | |
@string = string | |
@value = value | |
end | |
def self.eval string | |
self.new(string).expr.value |
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
describe "example group" $ do | |
-- Equivalent with RSpec's `let!(:hoge){ 1 }`. | |
-- An action passed to `given` function is executed every time | |
-- an example (defined by `it`) in the `describe` block is executed, | |
-- then the action's result is cached until the example's execution completes. | |
hoge <- given $ return 1 | |
-- Equivalent with RSpec's `let(:hoge){ 1 }` (without exclamation). | |
hogeIfNecessary <- givenIfNecessary $ runOnlyIfReferred |
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
let g:neoformat_haskell_mystylishhaskell = { | |
\ 'exe': 'stylish-haskell', | |
\ 'args': ['2>nul'], | |
\ 'stdin': 1, | |
\ } | |
let g:neoformat_enabled_haskell = ['mystylishhaskell'] | |
augroup fmt | |
autocmd! | |
autocmd BufWritePre *.hs undojoin | Neoformat mystylishhaskell | |
augroup 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 ConstraintKinds #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE OverloadedLabels #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeFamilies #-} |
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
class Parser | |
def initialize string | |
@string = string | |
# To improve performance, increments position instead of modifying @string. | |
@position = 0 | |
end | |
def self.eval string |