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 GADTs, DataKinds, KindSignatures, TypeOperators, TypeFamilies, | |
MultiParamTypeClasses, FlexibleInstances, PolyKinds, FlexibleContexts, | |
UndecidableInstances, ConstraintKinds, OverlappingInstances, ScopedTypeVariables #-} | |
import GHC.TypeLits | |
import Data.Type.Bool | |
import Data.Type.Equality | |
import Data.Proxy | |
import Control.Applicative ((<$>), (<*>)) | |
import Data.Maybe (catMaybes) |
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
*.aux | |
cabal-dev | |
.cabal-sandbox | |
cabal.config | |
cabal.sandbox.config | |
*.chi | |
*.chs.h | |
config/client_session_key.aes | |
dist* | |
.DS_Store |
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 OverloadedStrings #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
import Data.Proxy |
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 MagicHash #-} | |
{-# OPTIONS_GHC -fno-warn-orphans #-} | |
module Data.BufferBuilder.Aeson () where | |
import GHC.Base | |
import GHC.Integer.GMP.Internals | |
import Data.Aeson (Value (..)) | |
import Data.BufferBuilder.Json (ToJson (..), nullValue, unsafeAppendBS, unsafeAppendUtf8Builder) | |
import qualified Data.BufferBuilder.Json as 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
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
main :: IO () | |
main = putStrLn "hello" |
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 DataKinds #-} | |
{-# language PolyKinds #-} | |
{-# language GADTs #-} | |
{-# language TypeOperators #-} | |
{-# language RankNTypes #-} | |
{-# language TypeFamilies #-} | |
{-# language TypeInType #-} | |
{-# language TypeFamilyDependencies #-} | |
{-# language UndecidableInstances #-} |
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 DataKinds #-} | |
{-# language PolyKinds #-} | |
{-# language GADTs #-} | |
{-# language TypeOperators #-} | |
{-# language RankNTypes #-} | |
{-# language TypeFamilies #-} | |
{-# language TypeInType #-} | |
{-# language TypeFamilyDependencies #-} | |
{-# language UndecidableInstances #-} |
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 Lib | |
( someFunc | |
) where | |
import Control.Monad.Primitive | |
import Data.Vector.Mutable (MVector,IOVector,unsafeNew,unsafeWrite) | |
import qualified Data.Vector.Mutable as MV | |
{-@ measure mvlen :: Data.Vector.MVector s a -> Int @-} | |
{-@ invariant { v : Data.Vector.MVector s a | 0 <= mvlen v } @-} |
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 Lib | |
( someFunc | |
) where | |
import Control.Monad.Primitive | |
import Data.Vector.Mutable (MVector,IOVector,unsafeNew,unsafeWrite) | |
import qualified Data.Vector.Mutable as MV | |
{-@ measure mvlen :: Data.Vector.MVector s a -> Int @-} | |
{-@ invariant { v : Data.Vector.MVector s a | 0 <= mvlen v } @-} |
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 -O2 -Wall #-} | |
module Main (main) where | |
import Criterion.Main | |
import Data.Text (Text) | |
import qualified Data.Text as Text | |
-- This benchmark demonstrates the non-linear performance of | |
-- appending text. The behavior I would expect would be that |
OlderNewer