These are my notes on instaling NixOS 16.03 on a Lenovo ThinkPad X1 Carbon (4th generation) with an encrypted root file system using UEFI.
Most of this is scrambled from the following pages:
[ | |
{ | |
"city": "New York", | |
"growth_from_2000_to_2013": "4.8%", | |
"latitude": 40.7127837, | |
"longitude": -74.0059413, | |
"population": "8405837", | |
"rank": "1", | |
"state": "New York" | |
}, |
{-# LANGUAGE DataKinds, PolyKinds, TypeOperators #-} | |
{-# LANGUAGE TypeFamilies, FlexibleInstances, ScopedTypeVariables #-} | |
{-# LANGUAGE InstanceSigs #-} | |
module TinyServant where | |
import Control.Applicative | |
import GHC.TypeLits | |
import Text.Read | |
import Data.Time |
These are my notes on instaling NixOS 16.03 on a Lenovo ThinkPad X1 Carbon (4th generation) with an encrypted root file system using UEFI.
Most of this is scrambled from the following pages:
At work, I just spent the last few weeks exploring and evaluating every format I could find, and my number one criteria was whether they supported sum types. I was especially interested in schema languages in which I could describe my types and then some standard specifies how to encode them using an on-the-wire format, usually JSON.
EitherIntString
with two subtypes Left
and Right
represented as {"discriminator": "Left", value: 42}
and {"discriminator": "Right", value": "foo"}
. Unfortunately, unlike in Scala in which the parent type is abstract and cannot be instantiated, in Swagger it looks like the parent type is concrete, so when you specify that your input is an EitherIntString
, you might receive {"discriminator": "EitherIntString"}
instead of one of its two subtypes.