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
module Main where | |
import Control.Exception | |
import Control.Concurrent | |
import Control.Concurrent.Async | |
import System.Environment | |
import System.IO | |
import System.IO.Error |
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
#include "Cmm.h" | |
/* Place a ByteArray# object header so that its payload is at the given address. | |
The payload pointer we're given points to the first byte of the payload, | |
so we have to place the object header immediately before it. The caller | |
must ensure that the space before the payload is appropriately allocated | |
so that we can use it. | |
*/ | |
stg_placeByteArrayzh ( W_ payload, W_ n ) |
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 SequenceFiles ( | |
writeBinaryFileSequence, | |
appendBinaryFileSequence, | |
hPutBinaryFileSequence, | |
readBinaryFileSequenceLazy, | |
withBinaryFileSequenceLazy, | |
withBinaryFileSequence, | |
) where |
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
> module DataRefinement1 where | |
> import Data.Word | |
> import qualified Data.ByteString as BS | |
> import Control.Applicative | |
> import Test.QuickCheck | |
> import Prelude hiding (abs, null, replicate) | |
Data refinement provides a roadmap for how to think about, specify and test |
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
cleanAction :: CleanFlags -> [String] -> GlobalFlags -> IO () | |
cleanAction cleanFlags extraArgs globalFlags = do | |
projectRootDir <- findProjectRoot | |
let DistDirLayout{distDirectory} = defaultDistDirLayout projectRootDir | |
notice verbosity "cleaning..." | |
-- Remove the whole shared dist dir | |
chattyTry "removing dist/" $ do |
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 CPP, DeriveGeneric, DeriveFunctor, RecordWildCards #-} | |
----------------------------------------------------------------------------- | |
-- | | |
-- Module : Distribution.Client.TargetSelector | |
-- Copyright : (c) Duncan Coutts 2012, 2015, 2016 | |
-- License : BSD-like | |
-- | |
-- Maintainer : [email protected] | |
-- | |
-- Handling for user-specified target selectors. |
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
data ReadMode -- just type level tags | |
data ReadWriteMode | |
-- | Like Bool but statically determined by the mode type. | |
data OpenMode mode where | |
OpenReadMode :: OpenMode ReadMode | |
OpenReadWriteMode :: OpenMode ReadWriteMode | |
-- | Like Maybe but the case is statically determined by the mode type. | |
data InReadWriteMode mode a where |
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
-- | Pure lazy API on top of CBOR | |
{-# LANGUAGE BangPatterns #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
module CBOR.Lazy ( | |
-- * Encoding | |
EncodedElems(..) | |
, encodeElems | |
-- * Decoding | |
, DecodeLazy(..) | |
, DecoderState(..) |