This file contains hidden or 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/bash | |
# Options / Usage | |
# put this script in the same directory as your *.cabal file | |
# it will use the first line of "cabal info ." to determine the package name | |
# custom options for "cabal install" | |
CUSTOM_OPTIONS=(--haddock-options='-q aliased') | |
# hackage server to upload to (and to search uploaded versions for) | |
HACKAGESERVER=hackage.haskell.org |
This file contains hidden or 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 DataKinds #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
import Control.Applicative ((<$>)) |
This file contains hidden or 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
{ | |
"AD": { | |
"countryName": "Andorra", | |
"currency": "EUR", | |
"symbol": "€" | |
}, | |
"AE": { | |
"countryName": "United Arab Emirates", | |
"currency": "AED", | |
"symbol": "AED" |
This file contains hidden or 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
$ nix-shell | |
building '/nix/store/2p075yxfnykj1wgcf7cl83n3ygnnlds1-git-ls-files.drv'... | |
trace: No index state specified for haskell-project, using the latest index state that we know about (2022-01-06T00:00:00Z)! | |
trace: To make project.plan-nix for hoogle a fixed-output derivation but not materialized, set `plan-sha256` to the output of the 'calculateMaterializedSha' script in 'passthru'. | |
trace: To materialize project.plan-nix for hoogle entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'. | |
trace: No index state specified for cabal-install, using the latest index state that we know about (2022-01-06T00:00:00Z)! | |
trace: No index state specified for ghcid, using the latest index state that we know about (2022-01-06T00:00:00Z)! | |
trace: No index state specified for haskell-language-server, using the latest index state that we know about (2022-01-06T00:00:00Z)! | |
trace: No index state specified for hlint, using the latest index state that we know about (202 |
This file contains hidden or 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/bash | |
cd | |
# | |
# fix locales | |
# | |
echo "en_US.UTF-8 UTF-8" > /var/lib/locales/supported.d/local | |
dpkg-reconfigure locales |
This file contains hidden or 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
# Haskell stack project Github Actions template | |
# https://gist.github.com/mstksg/11f753d891cee5980326a8ea8c865233 | |
# | |
# To use, mainly change the list in 'plans' and modify 'include' for | |
# any OS package manager deps. | |
# | |
# Currently not working for cabal-install >= 3 | |
# | |
# Based on https://raw.githubusercontent.com/commercialhaskell/stack/stable/doc/travis-complex.yml | |
# |
This file contains hidden or 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 TypeOperators #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
module HFilter where | |
data a :* b = a :* b | |
deriving (Show, Eq) | |
infixr 5 :* | |
hlist :: Int :* String :* Int :* Maybe Float :* () |
This file contains hidden or 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
-- Example of a dynamically generated FromJSON instance. | |
-- | |
-- Can be useful when one needs to use a function with a | |
-- FromJSON constraint, but some detail about the | |
-- conversion from JSON is not known until runtime. | |
{-# LANGUAGE Rank2Types #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE OverloadedStrings #-} |
This file contains hidden or 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 OverloadedStrings #-} | |
module SimpleThings where | |
import Control.Applicative ((<$>), (<*>)) | |
import Control.Monad (mzero) | |
import Data.Aeson | |
import qualified Data.Aeson as A | |
-- | sum type containing all possible payloads |
This file contains hidden or 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
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |
NewerOlder