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 -XOverloadedStrings | |
> :set -XTemplateHaskell | |
> import Language.Haskell.TH | |
> $(bsToExp "Hello, World" >>= stringE . show) | |
"AppE (VarE GHC.IO.Unsafe.unsafePerformIO) (AppE (AppE (VarE Data.ByteString.Unsafe.unsafePackAddressLen) \ | |
\(LitE (IntegerL 12))) (LitE (StringPrimL [72,101,108,108,111,44,32,87,111,114,108,100])))" | |
> | |
> :set -ddump-splices |
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 FlexibleInstances #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE TypeFamilies #-} | |
import Data.Bifunctor |
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 ScopedTypeVariables #-} | |
module Data.Graph.Shuffle where | |
-- | Shuffle a graph into a randomly sorted list, preserving | |
-- topological order. | |
{- | |
> quickCheckWith stdArgs {maxSuccess=10000} prop_identity |
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 PartialTypeSignatures #-} | |
module StableShuffle where | |
import Control.Monad | |
import Control.Monad.Random | |
import Data.Bifunctor | |
import Data.List | |
import qualified Data.Map.Strict as M | |
import Data.Maybe | |
import Data.Ord |
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 PartialTypeSignatures #-} | |
module StableShuffle where | |
import Control.Monad | |
import Control.Monad.Random.Class | |
import Data.List | |
import qualified Data.Map.Strict as M | |
import Data.Maybe | |
import Data.Ord | |
import System.Random.Shuffle |
This file has been truncated, but you can view the full file.
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
chris@precision:~/Work/chrisdone/prj$ stack build -v | |
Version 2.2.0, Git revision 896869ee79d82e3bd9bead30d610ac2bf580cd99 (dirty) (7790 commits) PRE-RELEASE x86_64 hpack-0.31.2 | |
2019-07-31 14:16:17.668130: [debug] Checking for project config at: /home/chris/Work/chrisdone/prj/stack.yaml | |
2019-07-31 14:16:17.668320: [debug] Loading project config file stack.yaml | |
2019-07-31 14:16:17.674494: [debug] SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2019-07-30 13:16:17.674439 UTC] | |
2019-07-31 14:16:17.675171: [debug] Using package location completions from a lock file | |
2019-07-31 14:16:17.877293: [debug] Asking for a supported GHC version | |
2019-07-31 14:16:17.877678: [debug] Installed tools: | |
- ghc-8.2.2 | |
- ghc-8.6.3 |
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
chris@precision:~/Work/chrisdone/prj$ stack build -v | |
Version 2.2.0, Git revision 896869ee79d82e3bd9bead30d610ac2bf580cd99 (dirty) (7790 commits) PRE-RELEASE x86_64 hpack-0.31.2 | |
2019-07-31 13:32:31.396846: [debug] Checking for project config at: /home/chris/Work/chrisdone/prj/stack.yaml | |
2019-07-31 13:32:31.397084: [debug] Loading project config file stack.yaml | |
2019-07-31 13:32:31.405902: [debug] SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2019-07-30 12:32:31.40582 UTC] | |
2019-07-31 13:32:31.406606: [debug] Using package location completions from a lock file | |
2019-07-31 13:32:31.568532: [debug] Asking for a supported GHC version | |
2019-07-31 13:32:31.569087: [debug] Installed tools: | |
- ghc-8.2.2 | |
- ghc-8.6.3 |
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
{- | |
> :t $$(named [|| map ||]) | |
$$(named [|| map ||]) | |
:: TypedName | |
((ghc-prim-0.5.3:GHC.Types.Any -> ghc-prim-0.5.3:GHC.Types.Any) | |
-> [ghc-prim-0.5.3:GHC.Types.Any] | |
-> [ghc-prim-0.5.3:GHC.Types.Any]) | |
> $$(named [|| map ||]) | |
TypedName GHC.Base.map |
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 DeriveDataTypeable #-} | |
{-# LANGUAGE CPP #-} | |
-- | A version of aeson that parses with key order preserved. | |
-- | |
-- Copyright: (c) 2019 Hasura, Inc. | |
-- (c) 2011-2016 Bryan O'Sullivan | |
-- (c) 2011 MailRank, Inc. | |
module Data.Parser.Json |
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
{-# OPTIONS_GHC -fno-warn-type-defaults #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE ExtendedDefaultRules #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE StandaloneDeriving #-} |