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
| # Install not only the Hoogle library and executable, but also a local Hoogle | |
| # database which provides "Source" links to all specified 'packages' -- or the | |
| # current Haskell Platform if no custom package set is provided. | |
| # | |
| # It is intended to be used in config.nix similarly to: | |
| # | |
| # { packageOverrides = pkgs: rec { | |
| # | |
| # haskellPackages = | |
| # let callPackage = pkgs.lib.callPackageWith haskellPackages; |
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
| combine :: Monoid e | |
| => (a -> Either e r1) | |
| -> (b -> Either e r2) | |
| -> (a,b) | |
| -> Either (Either e1 (e1,e2)) (r1,r2) | |
| combine fa fb (a,b) = | |
| let faa = fa a | |
| fbb = fb b | |
| in case faa of | |
| Left e1 -> Left (Left e1) |
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
| {-# OPTIONS_GHC -fforce-recomp -ddump-simpl -fno-worker-wrapper -dsuppress-all #-} | |
| module Main (main) where | |
| import System.Environment (getArgs) | |
| main :: IO () | |
| main = do | |
| [x,y] <- map read <$> getArgs | |
| let f1 = f x A B |
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
| module Example (main) where | |
| import Data.IORef | |
| import Data.Primitive | |
| import Data.Primitive.PrimArray | |
| import GHC.Prim (RealWorld) | |
| main :: IO () | |
| main = do | |
| let len = 30 |
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 LambdaCase #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE RecordWildCards #-} | |
| module Main where | |
| import Data.Aeson | |
| import qualified Data.ByteString.Lazy.Char8 as LBSC8 |
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
| import Data.List (sort) | |
| type Pairs = [(Double,Double)] | |
| type Measure = [Double] -> Double | |
| midpoints :: Pairs -> [Double] | |
| midpoints = map (\(x, y) -> (x + y) / 2) | |
| mean :: Measure |
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 MagicHash #-} | |
| {-# LANGUAGE RecordWildCards #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE UnboxedTuples #-} | |
| import GHC.IO.Handle.Internals | |
| import GHC.IO.Exception | |
| import GHC.Ptr | |
| import GHC.IO |
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
| data Settings = Settings | |
| { settingsFoo :: Int | |
| , settingsBar :: String | |
| , settingsBaz :: [Int] | |
| } | |
| deriving (stock) Generic | |
| instance FromJSON Settings where | |
| parseJSON = parseJSONFielded |
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
| \(\d\+\): \(\d\+\)/(\1,\2) |
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
| Building build.rs (librocksdb-sys) | |
| Running rustc --crate-name build_script_build build.rs --crate-type bin -C opt-level=3 -C codegen-units=1 --cfg feature="zstd" --cfg feature="zlib" --cfg feature="static" --cfg feature="snappy" --cfg feature="lz4" --cfg feature="default" --cfg feature="bzip2" --out-dir target/build/librocksdb-sys --emit=dep-info,link -L dependency=target/buildDeps --extern bindgen=/nix/store/ksq6msrj8lxn771j7q4wmnjfx58rcfy9-rust_bindgen-0.47.3/lib/libbindgen-257b470b9c.rlib --extern cc=/nix/store/2bihshk564grlwk8jllqb6niwyj58j6a-rust_cc-1.0.32/lib/libcc-d214a1c57c.rlib --extern glob=/nix/store/ffzh87sjai1hqj046g69gr99pdbsvbqy-rust_glob-0.2.11/lib/libglob-67202cca89.rlib --cap-lints allow -L native=/nix/store/vrzv48gkazkwkbn1v9x0fcxsyja3bdiw-rust_backtrace-sys-0.1.28/lib/backtrace-sys.out -L native=/nix/store/xv6f9l6sg5mfsam2ak78qysda66nf368-rust_libloading-0.5.0/lib/libloading.out -l dl -l static=backtrace -l static=global_static --color always | |
| thread 'main' panicked at 'Unable to find libcl |