Skip to content

Instantly share code, notes, and snippets.

@neongreen
neongreen / travis.diff
Created September 2, 2018 18:47
Breaking a Travis CI build into two
diff --git a/.travis.yml b/.travis.yml
index 2068d7d..261c7f5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,37 +17,43 @@ cache:
- .stack-work
timeout: 1000
-matrix:
+jobs:
---
# Amazon MQ can only be set up in a VPC (created in vpc.yml). However, all
# the other services are running on EC2-Classic, and it's impossible for
# security groups to filter traffic between EC2-VPC and EC2-Classic.
#
# One solution is to leave Amazon MQ accessible on the public internet and
# use credentials for controlling access. We don't want to go this way
# because it's one more set of credentials to maintain.
#
# Use Fedora as the base
FROM fedora:27
# Install git
RUN dnf -y install git
# Install Stack
ARG STACK_VERSION=1.6.3
RUN curl -sSfL https://github.com/commercialhaskell/stack/releases/download/v${STACK_VERSION}/stack-${STACK_VERSION}-linux-x86_64-static.tar.gz \
| tar --wildcards -C /usr/local/bin --strip-components=1 -xzvf - '*/stack' && chmod 755 /usr/local/bin/stack
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE NoImplicitPrelude #-}
import BasePrelude
import Data.Text (Text)
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
import SuperRecord
import Data.Aeson
import Data.ByteString (ByteString)
-- stack --resolver lts-10.3 --install-ghc runghc --package fmt --package base-prelude --package optparse-applicative --package text
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ApplicativeDo #-}
-- | A small program replicating a part of @aws-cli@ (only the interface,
-- not the functionality).
module Main where
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MonoLocalBinds #-}
import Generics.Eot
import Data.Char
greadMaybe :: forall a. (HasEot a, EnumType (Eot a)) => String -> Maybe a
@neongreen
neongreen / atoms.hs
Last active February 15, 2018 17:04
{-# OPTIONS -Wall #-}
{-# LANGUAGE FlexibleContexts #-} -- not all of these are needed
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-} -- really
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-} -- don't get scared
{-# OPTIONS -Wall #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title xmlns:ns="http://www.w3.org/2005/Atom" ns:type="text">Dirt Cheap Haskell: Library</title><id>https://dirtcheaphaskell.io#library</id><updated>2017-11-02T00:00:00Z</updated><link xmlns:ns="http://www.w3.org/2005/Atom" ns:href="https://dirtcheaphaskell.io#library"/><entry><id>2017-11-02-editor-integration</id><title xmlns:ns="http://www.w3.org/2005/Atom" ns:type="text">Haskell integration with editors</title><updated>2017-11-02T00:00:00Z</updated><content xmlns:ns="http://www.w3.org/2005/Atom" ns:type="html">&lt;details class="qa-session"&gt;&lt;summary&gt;&lt;span class="qa-header"&gt;&lt;span id="2017-11-02-editor-integration" class="qa-title"&gt;&lt;a href="#2017-11-02-editor-integration"&gt;Haskell integration with editors&lt;/a&gt;&lt;/span&gt;&lt;time class="qa-time"&gt;2017-11-02&lt;/time&gt;&lt;/span&gt;&lt;/summary&gt;&lt;div class="qa-message qa-role-client qa-msg-highlight"&gt;&lt;p class="qa-author"&gt;&lt;span cl