code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-|
Module : Math.ExpPairs.ProcessMatrix
Copyright : (c) Andrew Lelechenko, 2014-2020
License : GPL-3
Maintainer : andrew.lelechenko@gmail.com
Sequences of \( A \)- and \( B \)-processes
of van der Corput's method of exponential sums.
A good reference can be found in
/Graham S. W., Kolesnik G. A./
Van Der ... | Bodigrim/exp-pairs | Math/ExpPairs/ProcessMatrix.hs | gpl-3.0 | 2,197 | 0 | 8 | 418 | 374 | 211 | 163 | 37 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Ctxt where
import Control.Lens
import Data.Monoid ((<>))
import Data.Pool
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.... | huggablemonad/smooch | app/src/Ctxt.hs | gpl-3.0 | 1,456 | 0 | 11 | 547 | 329 | 186 | 143 | 35 | 2 |
{-
Íàïèøèòå ðåàëèçàöèþ ôóíêöèè qsort. Ôóíêöèÿ qsort äîëæíàÿ ïðèíèìàòü íà âõîä ñïèñîê ýëåìåíòîâ è ñîðòèðîâàòü åãî â ïîðÿäêå âîçðàñòàíèÿ ñ ïîìîùüþ ñîðòèðîâêè Õîàðà: äëÿ êàêîãî-òî ýëåìåíòà x èçíà÷àëüíîãî ñïèñêà (îáû÷íî âûáèðàþò ïåðâûé) äåëèòü ñïèñîê íà ýëåìåíòû ìåíüøå è íå ìåíüøå x, è ïîòîì çàïóñêàòüñÿ ðåêóðñèâíî íà îáåèõ... | devtype-blogspot-com/Haskell-Examples | Qsort/Demo.hs | gpl-3.0 | 703 | 0 | 8 | 129 | 108 | 60 | 48 | 6 | 1 |
{-|
Module : Devel.ReverseProxy
Description : Reverse proxies and starts warp on localhost:<PORT>.
Copyright : (c)
License : GPL-3
Maintainer : njagi@urbanslug.com
Stability : experimental
Portability : POSIX
Reverse proxying and other network realated activities.
-}
{-# LANGUAGE OverloadedStrings, Scope... | bitemyapp/wai-devel | src/Devel/ReverseProxy.hs | gpl-3.0 | 2,290 | 0 | 16 | 441 | 480 | 254 | 226 | 47 | 2 |
module SimpleArithmeticTest where
import Lib
import Data.List (sort)
-- 1. for a function
halfIdentity = (*2).half
prop_halfIdentity :: Double -> Bool
prop_halfIdentity n = (halfIdentity n) == n
-- 2. For any list you apply sort to
-- this property should hold
prop_listOrdered :: (Ord a) => [a] -> Bool
prop_listOrd... | nirvinm/Solving-Exercises-in-Haskell-Programming-From-First-Principles | Testing/quickcheck-testing/test/SimpleArithmeticTest.hs | gpl-3.0 | 2,845 | 0 | 9 | 629 | 945 | 512 | 433 | 52 | 3 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
-- |
-- Copyright : (c) 2010-2012 Benedikt Schmidt & Simon Meier
-- License : GPL v3 (see LICENSE)
--
-- Maintainer : Benedikt Schmidt <beschmi@gmail.... | rsasse/tamarin-prover | lib/term/src/Term/Term/Raw.hs | gpl-3.0 | 7,525 | 0 | 14 | 2,046 | 2,244 | 1,170 | 1,074 | 138 | 10 |
module Foreign.Storable.FixedArray where
import Control.Monad.Trans.State (StateT, evalStateT, get, put, )
import Control.Monad.Trans.Class (lift, )
import Foreign.Ptr (Ptr, castPtr, )
import Foreign.Storable (Storable(..))
import Foreign.Marshal.Array (advancePtr, )
{-# INLINE roundUp #-}
roundUp :: Int -> Int -> ... | elitak/hs-datahand | stm32f10x/hs_src/Foreign/Storable/FixedArray.hs | gpl-3.0 | 983 | 0 | 9 | 225 | 383 | 205 | 178 | 29 | 1 |
func = do
-- complex first step
aaa
-- complex second step
bbb
where
helper :: Helper
helper = helpful
other :: Other
other = True
| lspitzner/brittany | data/Test225.hs | agpl-3.0 | 148 | 1 | 6 | 43 | 52 | 22 | 30 | 7 | 1 |
import Test.Hspec
import System.Random
import Prelude hiding (succ)
import Church
turn :: Int -> Number
turn 0 = zero
turn n = succ $ turn (n - 1)
randomList :: Int -> Int -> IO [Int]
randomList a b = getStdGen >>= return . randomRs (a, b)
getRand :: Int -> IO [Int]
getRand n = take n <$> randomList 233 666
runTes... | ice1000/OI-codes | codewars/authoring/haskell/ChurchSpec.hs | agpl-3.0 | 1,204 | 1 | 20 | 357 | 594 | 287 | 307 | 35 | 1 |
{-
Copyright (C) 2004 - 2009 John Goerzen <jgoerzen@complete.org>
-}
{- |
Module : Test.QuickCheck.Tools
Copyright : Copyright (C) 2004-2005 John Goerzen
License : GNU LGPL, version 2 or above
Maintainer : John Goerzen <jgoerzen@complete.org>
Stability : provisional
Portability: portable
... | jgoerzen/testpack | src/Test/QuickCheck/Tools.hs | lgpl-2.1 | 1,654 | 0 | 10 | 453 | 219 | 137 | 82 | 13 | 1 |
--------------------------------------------------------------------------------
-- $Id: BuiltInMap.hs,v 1.5 2003/12/18 18:27:46 graham Exp $
--
-- Copyright (c) 2003, G. KLYNE. All rights reserved.
-- See end of this file for licence information.
---------------------------------------------------------------... | amccausl/Swish | Swish/HaskellRDF/BuiltInMap.hs | lgpl-2.1 | 2,914 | 0 | 4 | 540 | 101 | 89 | 12 | 7 | 0 |
import Test.Tasty
import TestSet
import TestTree23
import TestTrie
import TestLightTrie
import TestBTree
import TestLightBTree
import TestFixFile
main :: IO ()
main = defaultMain $
testGroup "FixFile"
[
test23
,testSet
,testTrie
,testLightTrie
,testBTree
,testLightB... | revnull/fixfile | tests/Tests.hs | lgpl-3.0 | 352 | 0 | 7 | 101 | 78 | 44 | 34 | 19 | 1 |
data List a = Cons a (List a)
| Nil
deriving (Show)
fromList :: [a] -> List a
fromList (x:xs) = Cons x (fromList xs)
fromList [] = Nil
fromList' :: List a -> [a]
fromList' (Cons x xs) = x:fromList' xs
fromList' Nil = []
| EricYT/Haskell | src/chapter-14-3.hs | apache-2.0 | 259 | 2 | 10 | 85 | 138 | 66 | 72 | 9 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Actions
( doExports
) where
import Prelude
import Data.Maybe (fromMaybe)
import Haste
import Haste.Foreign
import FormEngine.JQuery
import qualified Bridge as B
doExports :: IO ()
doExports = doExport B.SavePlan savePlan
doExport :: (ToAny a, FFI a) => B.ClientAction -... | DataStewardshipPortal/ds-elixir-cz | src/Actions.hs | apache-2.0 | 832 | 0 | 14 | 168 | 316 | 156 | 160 | 26 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
-- |Basic downloading and file saving functions.
module Crawling.Hephaestos.Fetch (
-- *Task categories
-- |These categories are used by 'download' to send updates about running
... | jtapolczai/Hephaestos | Crawling/Hephaestos/Fetch.hs | apache-2.0 | 12,562 | 0 | 21 | 3,073 | 2,414 | 1,323 | 1,091 | -1 | -1 |
import Prelude
split' :: [a] -> [a] -> Int -> [[a]]
split' firstList xs 0 = (reverse firstList):xs:[] -- return the result
split' firstList [] _ = (reverse firstList):[]:[]
split' firstList (x:xs) n = split' (x:firstList) xs (n - 1)
split :: Eq a => [a] -> Int -> [[a]]
split [] _ = []
split xs n = split' [] xs n
| 2dor/99-problems-Haskell | 11-20-lists-continued/problem-17.hs | bsd-2-clause | 316 | 1 | 11 | 65 | 211 | 105 | 106 | 8 | 1 |
{-# OPTIONS -#include "openssl/md5.h" #-}
--------------------------------------------------------------------
-- |
-- Module : Data.Digest.OpenSSL.MD5
-- Copyright : (c) Galois, Inc. 2007
-- License : BSD3
-- Maintainer: Don Stewart <dons@galois.com>
-- Stability : provisional
-- Portability: Requires FFI
-... | Axiomatic-/nano-md5 | Data/Digest/OpenSSL/MD5.hs | bsd-3-clause | 2,173 | 0 | 16 | 480 | 402 | 229 | 173 | 26 | 2 |
{-# LANGUAGE RankNTypes, TemplateHaskell, DeriveGeneric #-}
{-| This module defines a data type that can be used as the summary
type for a composite analysis using all of the analyses defined in
this package.
It is useful to have it defined in a common module so it can be
re-used for all of the tests and the driver pr... | travitch/foreign-inference | src/Foreign/Inference/Analysis/Util/CompositeSummary.hs | bsd-3-clause | 7,059 | 0 | 10 | 1,956 | 1,155 | 676 | 479 | 166 | 1 |
module Data.Geo.GPX.Lens.VdopL where
import Data.Lens.Common
class VdopL a where
vdopL :: Lens a (Maybe Double)
| tonymorris/geo-gpx | src/Data/Geo/GPX/Lens/VdopL.hs | bsd-3-clause | 117 | 0 | 9 | 20 | 40 | 23 | 17 | 4 | 0 |
module Data.Json.Projection where
import JPrelude
newtype Projection = Projection { unProject :: Value}
-- TODO: Implement
| Prillan/haskell-jsontools | src/Data/Json/Projection.hs | bsd-3-clause | 126 | 0 | 6 | 19 | 24 | 17 | 7 | 3 | 0 |
-- |
-- Module: Database.PostgreSQL.Store
-- Copyright: (c) Ole Krüger 2016
-- License: BSD3
-- Maintainer: Ole Krüger <ole@vprsm.de>
module Database.PostgreSQL.Store (
-- * Errand
Errand,
runErrand,
execute,
execute',
query,
queryWith,
prepare,
beginTransaction,
commitTransaction,
saveTransaction... | vapourismo/pg-store | src/Database/PostgreSQL/Store.hs | bsd-3-clause | 1,065 | 56 | 5 | 221 | 261 | 175 | 86 | 36 | 0 |
{-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, RankNTypes, TypeOperators, FlexibleContexts, ScopedTypeVariables, MultiParamTypeClasses, FunctionalDependencies, TypeSynonymInstances, FlexibleInstances, GADTs, UndecidableInstances #-}
import GHC.Prim (Any)
import Unsafe.Coerce (unsafeCoerce)
import Prelude (undefined,... | ekmett/hask | wip/Evil.hs | bsd-3-clause | 2,233 | 50 | 11 | 571 | 1,079 | 575 | 504 | -1 | -1 |
--
-- A very simple example application using System.MIDI.
-- It's a basic MIDI monitor: prints all the incoming messages.
--
module Main where
import Control.Monad
import Control.Concurrent
import System.MIDI
-- the essence
mythread conn = do
events <- getEvents conn
mapM_ print events
(threadDelay 5000)
... | hanshoglund/hamid | examples/monitor.hs | bsd-3-clause | 1,419 | 0 | 22 | 394 | 463 | 218 | 245 | -1 | -1 |
module Language.Verilog.AST
( Identifier
, Module (..)
, ModuleItem (..)
, Stmt (..)
, LHS (..)
, Expr (..)
, UniOp (..)
, BinOp (..)
, Sense (..)
, Call (..)
, PortBinding
, Case
, Range
) where
import Data.Bits
import Data.List
import Data.Maybe... | tomahawkins/verilog | Language/Verilog/AST.hs | bsd-3-clause | 9,396 | 0 | 15 | 3,202 | 3,390 | 1,741 | 1,649 | 249 | 14 |
{-# OPTIONS_GHC -Wall -fwarn-tabs #-}
{-# OPTIONS_GHC -O2 -fenable-rewrite-rules #-}
----------------------------------------------------------------
-- ~ 2021.10.17
-- |
-- Module : Data.Number.Transfinite
-- Copyright : Copyright (c) 2007--2021 wren gayle roma... | wrengr/logfloat | src/Data/Number/Transfinite.hs | bsd-3-clause | 8,775 | 0 | 9 | 1,756 | 484 | 337 | 147 | 38 | 4 |
{-# LANGUAGE OverloadedStrings, PatternGuards #-}
--
-- Author: Sean Seefried
-- Date: Wed 21 Dec 2011
--
module Main where
-- library imports
import Data.Text (Text)
import qualified Data.Text as T
import Text.Printf
import System.Environment (getArgs, getProgName)
import Control.Monad
import System.Exit
import Dat... | sseefried/task | src/Task.hs | bsd-3-clause | 4,256 | 0 | 15 | 1,144 | 1,203 | 617 | 586 | 119 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
module User.Handlers where
import Servant
import Text.Blaze.Html5 hiding (map)
import Database.Persist.Postgresql
import Crypto.PasswordStore
import System.Random
import Control.Monad
import Control.Monad.Trans
import Control.Monad.Trans.Either
import Data... | hectorhon/autotrace2 | app/User/Handlers.hs | bsd-3-clause | 4,916 | 0 | 22 | 1,268 | 1,603 | 797 | 806 | 130 | 3 |
-- | Configuring the compiler
module Fay.Config
( Config
( configOptimize
, configFlattenApps
, configExportRuntime
, configExportStdlib
, configExportStdlibOnly
, configPrettyPrint
, configHtmlWrapper
, configSourceMap
, configHtmlJSLibs
, configLibrary
... | fpco/fay | src/Fay/Config.hs | bsd-3-clause | 6,822 | 0 | 11 | 2,036 | 964 | 595 | 369 | 119 | 1 |
-- | Compute PCA from a Matrix
--
-- http://www.cs.otago.ac.nz/cosc453/student_tutorials/principal_components.pdf
module PCA (
-- * PCA Computations
pcaSVD, pca', pca'', pca''',
pcaNipals, fastPCA, fastPCA',
-- * Conversions
toMatrix, toLists
) where
import Debug.Trace
-- TODO remove
import quali... | abailly/hs-word2vec | src/PCA.hs | bsd-3-clause | 4,367 | 0 | 20 | 1,306 | 1,218 | 649 | 569 | 74 | 4 |
-- | Labels for data types in the base package. The label types are kept
-- abstract to be fully reusable in custom contexts. Build to be imported
-- qualified.
{-# LANGUAGE NoMonomorphismRestriction, TemplateHaskell, TypeOperators #-}
module Label.Base
(
-- * Labels for lists.
head
, tail
, list
, at
-- * Labels ... | sebastiaanvisser/labels | src/Label/Base.hs | bsd-3-clause | 4,119 | 0 | 15 | 1,059 | 1,441 | 811 | 630 | 75 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Hrpg.Game.Resources.Mobs.Common
( skeleton
, rat
) where
import Data.Text
import Hrpg.Framework.Level
import Hrpg.Framework.Mobs.MobType
import Hrpg.Framework.Stats
import Hrpg.Game.Resources.Items.LootTables
defaultMobBaseStats = Stats (Str 50) (Agi 50)
... | cwmunn/hrpg | src/Hrpg/Game/Resources/Mobs/Common.hs | bsd-3-clause | 841 | 0 | 8 | 201 | 194 | 120 | 74 | 26 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ExistentialQuantification #-}
module HtmlTemplates where
import Aria.Types
import Aria.Routes
import Web.Routes.PathInfo (toPathInfo)
import Control.Lens
import ... | theNerd247/ariaRacer | arweb/app/HtmlTemplates.hs | bsd-3-clause | 3,229 | 0 | 21 | 802 | 970 | 507 | 463 | 86 | 1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.Compatibility33
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability ... | haskell-opengl/OpenGLRaw | src/Graphics/GL/Compatibility33.hs | bsd-3-clause | 52,653 | 0 | 5 | 7,325 | 8,530 | 5,275 | 3,255 | 2,001 | 0 |
module SubListKata.Day6 (sublist, Result(..)) where
import Data.List(isInfixOf)
data Result = Equal | Unequal | Sublist | Superlist
deriving (Eq, Show)
sublist :: (Ord a) => [a] -> [a] -> Result
sublist [] [] = Equal
sublist [] _ = Sublist
sublist _ [] = Superlist
sublist ... | Alex-Diez/haskell-tdd-kata | old-katas/src/SubListKata/Day6.hs | bsd-3-clause | 458 | 0 | 8 | 150 | 178 | 94 | 84 | 13 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Test.Snooze.Arbitrary where
import Disorder.Corpus
import P
import Snooze.Balance.Data
import Snooze.Url
import Test.QuickCheck
import Test.QuickCheck.Instances ()
instance A... | ambiata/snooze | test/Test/Snooze/Arbitrary.hs | bsd-3-clause | 719 | 0 | 7 | 174 | 139 | 78 | 61 | 24 | 0 |
{-# LANGUAGE EmptyDataDecls, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-}
module Lang.JavaScript where
import Generic.Control.Function
import Generic.Data.Bool
import Generic.Data.Either
import Generic.Data.List hiding ((++))
import Generic.Data.Maybe
import Generic.Data.Number
import Generic.Data.Tu... | sebastiaanvisser/AwesomePrelude | src/Lang/JavaScript.hs | bsd-3-clause | 2,882 | 0 | 17 | 764 | 1,415 | 780 | 635 | -1 | -1 |
module SECD.LambdaCalculusTests(allLambdaCalculusTests) where
import SECD.LambdaCalculus
import SECD.SECDCode
import SECD.TestUtils
allLambdaCalculusTests = do
testFunction (fst . toSECD 0 emptyEnv) toSECDCases
toSECDCases =
[(intVal 5, [int 5]),
(boolVal True, [bool True]),
(floatVal (-12.3), [float (-1... | dillonhuff/SECD | test/SECD/LambdaCalculusTests.hs | bsd-3-clause | 1,167 | 0 | 17 | 236 | 622 | 336 | 286 | 24 | 1 |
module Channel.Event where
import Type
data Event =
Join UserName
| Message UserName String
| Kick UserName UserName (Maybe String)
| beni55/alonzo | src/Channel/Event.hs | mit | 152 | 0 | 8 | 40 | 40 | 23 | 17 | 6 | 0 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable,
DeriveTraversable #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstan... | pparkkin/eta | compiler/ETA/HsSyn/HsDecls.hs | bsd-3-clause | 70,760 | 0 | 16 | 21,135 | 12,162 | 6,628 | 5,534 | 870 | 6 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "Data/ByteString/Lazy/Builder/ASCII.hs" #-}
-- | We decided to rename the Builder modules. Sorry about that.
--
-- In additon, the ASCII module has been merged into the main
-- "Data.ByteString.Builder" module.
--
-- The old names will hang about for at least once release cycle be... | phischu/fragnix | tests/packages/scotty/Data.ByteString.Lazy.Builder.ASCII.hs | bsd-3-clause | 802 | 0 | 6 | 112 | 89 | 62 | 27 | 13 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Main where
-- Import our template "pr"
import Printf ( pr )
-- The splice operator $ takes the Haskell source code
-- generated at compile time by "pr" and splices it into
-- the argument of "putStrLn".
main = putStrLn ( $(pr "Hello") )
| sol/doctest | test/integration/template-haskell-bugfix/Main.hs | mit | 279 | 0 | 9 | 52 | 35 | 22 | 13 | 4 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAG... | ezyang/ghc | testsuite/tests/typecheck/should_compile/T12734a.hs | bsd-3-clause | 2,578 | 0 | 10 | 714 | 524 | 301 | 223 | -1 | -1 |
module PackageTests.BuildDeps.InternalLibrary4.Check where
import qualified Data.ByteString.Char8 as C
import PackageTests.PackageTester
import System.FilePath
import Test.HUnit
suite :: FilePath -> FilePath -> Test
suite ghcPath ghcPkgPath = TestCase $ do
let spec = PackageSpec
{ directory = "Packag... | DavidAlphaFox/ghc | libraries/Cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary4/Check.hs | bsd-3-clause | 1,195 | 0 | 15 | 279 | 302 | 155 | 147 | 24 | 1 |
-- | contains a prettyprinter for the
-- Template Haskell datatypes
module Language.Haskell.TH.Ppr where
-- All of the exports from this module should
-- be "public" functions. The main module TH
-- re-exports them all.
import Text.PrettyPrint (render)
import Language.Haskell.TH.PprLib
import Language.Ha... | acowley/ghc | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | bsd-3-clause | 24,210 | 0 | 14 | 7,312 | 8,977 | 4,376 | 4,601 | 487 | 6 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple
-- Copyright : Isaac Jones 2003-2005
-- License : BSD3
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- This is the command line front end to the Simple build sys... | rimmington/cabal | Cabal/Distribution/Simple.hs | bsd-3-clause | 30,341 | 0 | 17 | 7,656 | 6,120 | 3,123 | 2,997 | 503 | 8 |
-- | Groups black-box tests of cabal-install and configures them to test
-- the correct binary.
--
-- This file should do nothing but import tests from other modules and run
-- them with the path to the correct cabal-install binary.
module Main
where
-- Modules from Cabal.
import Distribution.Simple.Configure (... | x-y-z/cabal | cabal-install/tests/PackageTests.hs | bsd-3-clause | 3,921 | 0 | 13 | 863 | 661 | 372 | 289 | 62 | 1 |
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-}
-------------------------------------------------------------------------------
--
-- (c) The University of Glasgow 2007
--
-- | Break Arrays
--
-- An array of bytes, indexed by a breakpoint number (breakpointId in Tickish)
-- ... | tolysz/prepare-ghcjs | spec-lts8/ghci/GHCi/BreakArray.hs | bsd-3-clause | 3,419 | 0 | 20 | 839 | 1,005 | 505 | 500 | 79 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MagicHash #-}
module Main where
import Language.Haskell.TH
import GHC.Prim(Addr#)
import GHC.Ptr
import Foreign.Marshal.Array (peekArray)
import Data.Word (Word8)
check_equal :: [Word8] -> Addr# -> IO ()
check_equal bytes addr = do
bytes' <- peekArray (length bytes) (Pt... | manyoo/ghcjs | test/ghc/th/tH_StringPrimL.hs | mit | 532 | 0 | 13 | 93 | 193 | 101 | 92 | 17 | 1 |
{-# LANGUAGE TemplateHaskell, DataKinds #-}
module T8455 where
ty = [t| 5 |] | forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/th/T8455.hs | bsd-3-clause | 78 | 0 | 4 | 14 | 14 | 11 | 3 | 3 | 1 |
--
-- Helper module for mod101.hs
module Mod101_AuxA where
data DataA = ConA Int | ConB Bool
| urbanslug/ghc | testsuite/tests/module/Mod101_AuxA.hs | bsd-3-clause | 94 | 0 | 6 | 18 | 20 | 13 | 7 | 2 | 0 |
module H6502.Util
(
setPC, setS, setA, setX, setY,
setFlag, unsetFlag, setFlags, putFlag,
onState, getPC, getS, getA, getX, getY,
getFlag, getFlags,
wordJoin, wordSplit,
peek, poke, peek16, poke16, peekPC, peekPC16,
pop, push, pop16, push16,
addrZeroPa... | mniip/h6502 | src/H6502/Util.hs | mit | 7,355 | 0 | 13 | 1,785 | 2,489 | 1,264 | 1,225 | 150 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Execute a computation of type '{IO} () that has been previously added to
-- the codebase, without setting up an interactive environment.
--
-- This allows one to run standalone applications implemented in the Unison
-... | unisonweb/platform | parser-typechecker/src/Unison/Codebase/Execute.hs | mit | 2,276 | 0 | 18 | 578 | 518 | 273 | 245 | -1 | -1 |
module GHCJS.DOM.OESVertexArrayObject (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/OESVertexArrayObject.hs | mit | 50 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
module Oden.Output.Compiler.Resolution where
import Text.PrettyPrint.Leijen
import Oden.Compiler.Resolution
import Oden.Core.ProtocolImplementation
import Oden.Metadata
import Oden.Output
import ... | oden-lang/oden | src/Oden/Output/Compiler/Resolution.hs | mit | 2,203 | 0 | 16 | 654 | 433 | 214 | 219 | 54 | 0 |
module Acronym (abbreviate) where
abbreviate :: String -> String
abbreviate xs = error "You need to implement this function."
| exercism/xhaskell | exercises/practice/acronym/src/Acronym.hs | mit | 127 | 0 | 5 | 20 | 29 | 16 | 13 | 3 | 1 |
module AIChallenger.Config
( Config(..)
, defaultConfig
, getConfigFromCommandlineFlags
) where
import Control.Applicative
import Data.Maybe
import Options.Applicative
import Options.Applicative.Builder.Internal (HasValue)
import Path
import System.Directory
import AIChallenger.Types
data Config = C... | ethercrow/ai-challenger | src/AIChallenger/Config.hs | mit | 1,584 | 0 | 14 | 325 | 478 | 252 | 226 | 40 | 1 |
{-# LANGUAGE Arrows, NoMonomorphismRestriction, DeriveDataTypeable #-}
--------------------------------------------------------------------
-- |
-- Module : Codemanic.NikeRuns
-- Copyright : (c) Uwe Hoffmann 2009
-- License : LGPL
--
-- Maintainer: Uwe Hoffmann <uwe@codemanic.com>
-- Stability : provisional
-- Por... | uwedeportivo/NikePlus-Cocoa-RunLog | haskell/nikepub/Codemanic/NikeRuns.hs | mit | 7,762 | 2 | 19 | 1,758 | 2,504 | 1,307 | 1,197 | 183 | 2 |
{-# LANGUAGE Arrows, NoMonomorphismRestriction, DeriveDataTypeable #-}
--------------------------------------------------------------------
-- |
-- Module : Codemanic.Util
-- Copyright : (c) Uwe Hoffmann 2009
-- License : LGPL
--
-- Maintainer: Uwe Hoffmann <uwe@codemanic.com>
-- Stability : provisional
-- Portabi... | uwedeportivo/NikePlus-Cocoa-RunLog | haskell/nikepub/Codemanic/Util.hs | mit | 1,548 | 0 | 12 | 225 | 363 | 205 | 158 | 41 | 2 |
#!/usr/bin/env stack
{-
stack --resolver lts-8.6 script
--package stm
--package mtl
--package network-uri
--package http-client
--package http-client-tls
--package http-types
--package bytestring
--package conduit-combinators
--package containers
--package async
--package optparse-applicative
-}
{-# LANGUAGE FlexibleC... | futtetennista/IntroductionToFunctionalProgramming | RWH/src/Ch28/Check.hs | mit | 8,204 | 0 | 19 | 2,334 | 2,416 | 1,235 | 1,181 | 215 | 6 |
module ChangeCount where
import Data.List(sort)
changeCount :: Int -> [Int] -> Int
changeCount money coins | money <= 0 = 0
| otherwise = changeCount' money (reverse . sort $ coins)
changeCount' money coins | null coins = 0
| money == 0 =... | slon1024/functional_programming | haskell/ChangeCount.hs | mit | 484 | 0 | 12 | 198 | 168 | 83 | 85 | 9 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{- |
Module : Orville.PostgreSQL.Expr.GroupBy.GroupByClause
Copyright : Flipstone Technology Partners 2016-2021
License : MIT
-}
module Orville.PostgreSQL.Internal.Expr.GroupBy.GroupByClause
( GroupByClause,
groupByClause,
)
where
import Orville.PostgreSQL.Inte... | flipstone/orville | orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/Expr/GroupBy/GroupByClause.hs | mit | 653 | 0 | 9 | 78 | 101 | 63 | 38 | 11 | 1 |
module Utility (module Control.Error, catchIO, foldML, strictIO) where
import Control.Error
import Control.Monad
catchIO :: IO a -> EitherT String IO a
catchIO a = tryIO a `catchT` (left . show)
foldML :: Monad m => [a -> m a] -> a -> m a
foldML = foldl (>=>) return
-- | Run an application with an error possibilit... | Prinhotels/goog-closure | src/Utility.hs | mit | 476 | 0 | 9 | 92 | 157 | 84 | 73 | 9 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE RebindableSyntax #-}
module Course.Monad(
Monad(..)
, join
, (>>=)
, (<=<)
) where
import Course.Applicative hiding ((<*>))
import Course.Core
import Course.Functor
import Course.Id
import Course.Lis... | harrisi/on-being-better | list-expansion/Haskell/course/src/Course/Monad.hs | cc0-1.0 | 3,271 | 0 | 11 | 809 | 669 | 407 | 262 | 84 | 1 |
module Ohua.DFLang.Util where
import Ohua.Prelude
import qualified Data.Foldable as F
import qualified Data.HashMap.Strict as HM
import qualified Data.HashSet as HS
import qualified Data.Sequence as DS
import Data.Sequence (Seq, (|>))
import Ohua.DFLang.Lang
-- | Find the usages of a binding
findUsages :: Foldable ... | ohua-dev/ohua-core | core/src/Ohua/DFLang/Util.hs | epl-1.0 | 1,218 | 0 | 13 | 287 | 357 | 195 | 162 | 26 | 2 |
module Two where
import Data.List
import Data.Time
fak 0 = 1
fak i = i * (fak $ i - 1)
fact i
| i == 0 = 1
| otherwise = i * (fact $ i - 1)
sum' [] = 0
sum' (x : []) = x
sum' (x : xs) = x + sum xs
range i j
| i == j = [i]
| otherwise = i : (range (succ i) j)
prime' x
| x < 2 = False
| x == 2 = True
... | zeniuseducation/poly-euler | Alfa/haskell/tutorial/two.hs | epl-1.0 | 1,976 | 0 | 15 | 757 | 1,069 | 522 | 547 | 70 | 4 |
-- | Combinations.
-- This module is depracated; it is equivalent to the module "Compositions",
-- but it turns out that \"compositions\" is the accepted name. I will
-- remove this module in the future.
module Math.Combinat.Combinations where
import Math.Combinat.Numbers (factorial,binomial)
---------------------... | garykrige/project_euler | Haskell/Math/Combinat/Combinations.hs | gpl-2.0 | 1,841 | 0 | 10 | 389 | 517 | 284 | 233 | 34 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
module Ast where
import Data.Typeable
import Data.Data
import Data.Generics.Uniplate.Direct
data TranslUnit =
TranslUnit [ExtDecl]
deriving (Data, Typeable)
data ExtDecl =
DeclExt CDecl
| FDefExt FunDef
deriving (Data, Typeable)
data CDecl = CDecl Int
deriving (D... | copton/ocram | try/uniplate/src/Ast.hs | gpl-2.0 | 1,427 | 0 | 8 | 381 | 268 | 144 | 124 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
module Main where
import Control.Concurrent (threadDelay)
import Control.Monad ((>>=))
import Data.Function (($), (.))
import Data.Monoid ((<>))
import Foreign.Marshal.Alloc (alloca)
import Foreign.Ptr (nullPtr)
import Foreign.Storable (peek)
import System.IO
(BufferMode(NoBuffer... | IxpertaSolutions/hsua | test/test.hs | gpl-2.0 | 5,319 | 0 | 30 | 1,252 | 1,139 | 590 | 549 | 132 | 1 |
import System.Environment (getArgs)
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as B
import Control.Parallel.Strategies
--encrypt :: Integer -> Integer -> ByteString -> ByteString
-- encrypt :: Integer -> Integer -> Integer -> Integer
-- encrypt n e x = x ^ e `mod` n
p, q, e, n, ... | y-kamiya/parallel-concurrent-haskell | src/Rsa/Main.hs | gpl-2.0 | 1,910 | 0 | 12 | 505 | 767 | 411 | 356 | 56 | 5 |
{- |
Module : $Header$
Description : Parser for symbols in translations and reductions
Copyright : (c) Christian Maeder, Uni Bremen 2002-2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : portable
Parsing symbols for transla... | nevrenato/Hets_Fork | CASL/SymbolParser.hs | gpl-2.0 | 4,127 | 0 | 22 | 1,235 | 1,374 | 690 | 684 | 100 | 4 |
{-|
Module: Network.Ricochet.Protocol.Protobuf.ContactRequest
Description: Lenses for ContactRequestChannel.proto messages
These types and lenses are useful to deal with protobuf messages sent in
relation with @im.ricochet.contact.request@ channels. They are used te
introduce a new client and ask for user ap... | Jugendhackt/haskell-ricochet | src/Network/Ricochet/Protocol/Protobuf/ContactRequest.hs | gpl-3.0 | 2,895 | 2 | 7 | 505 | 335 | 218 | 117 | -1 | -1 |
{-# LANGUAGE LambdaCase,TupleSections #-}
module Main where
import System.Directory
import System.Posix.Files
import System.FilePath (combine,(</>))
import System.Environment ( getArgs )
import System.Posix.Process ( getProcessID)
import Control.Applicative
import Control.Monad
import Control.Concurrent
import Control... | cetu86/watchopenfd | Main.hs | gpl-3.0 | 4,169 | 0 | 29 | 1,551 | 1,294 | 664 | 630 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances, OverlappingInstances #-}
module Rebass.Path where
import Data.List
import Rebass.ListUtil
type Path = String
class Pathy a where
pathOf :: a -> Path
instance Pathy Path where
pathOf path = path
samePath :: Pathy a => Pathy b => a -> b -> Bool
samePath a b = ... | codeflows/rebass | src/Rebass/Path.hs | gpl-3.0 | 896 | 0 | 10 | 200 | 363 | 183 | 180 | -1 | -1 |
module Engine.Graphics.Render.ShadowVolume(renderShadowVolumeToStencil) where
import Control.Monad
import Engine.Graphics.Common
import Foreign.Ptr (nullPtr)
import qualified Graphics.GLUtil as GLUtil
import ... | halvorgb/AO2D | src/Engine/Graphics/Render/ShadowVolume.hs | gpl-3.0 | 2,879 | 0 | 11 | 833 | 627 | 317 | 310 | 56 | 1 |
{-# LANGUAGE FlexibleContexts #-}
-- -----------------------------------------------------------------------------
module Main(main) where
-- -----------------------------------------------------------------------------
import System.Environment( getArgs, getProgName )
import qualified Data.Aeson as A
import qualified... | zhensydow/zhtoolkit | src/GetJson.hs | gpl-3.0 | 3,933 | 0 | 15 | 868 | 1,187 | 587 | 600 | 89 | 5 |
module Language.Mulang.Inspector.Literal (
isAnything,
isBool,
isChar,
isNil,
isNumber,
isSelf,
isString,
isSymbol,
isLogic,
isMath,
isLiteral,
isSimple,
isCompound,
isNonliteral,
isOther) where
import Data.Function.Extra (orElse)
import Language.Mulang.Ast
import Language.Mulang.Ast.Ope... | mumuki/mulang | src/Language/Mulang/Inspector/Literal.hs | gpl-3.0 | 1,826 | 0 | 7 | 408 | 594 | 333 | 261 | 69 | 1 |
module Application.Game.Engine where
import Application.Game.Logic (eventHandler)
import Middleware.Gloss.Environment (runEnvironment)
import View.State (runGameStep)
import View.View (drawState)
ticksPerSecond = 10
runEngine state = runEnvironment ticksPerSecond state drawState eventHandler runGameStep
| EPashkin/gamenumber-gloss | src/Application/Game/Engine.hs | gpl-3.0 | 308 | 0 | 5 | 30 | 73 | 43 | 30 | 7 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/DeleteApp.hs | mpl-2.0 | 2,962 | 0 | 9 | 664 | 349 | 214 | 135 | 47 | 1 |
module QuantLib.Prices
( PriceType (..)
, CallPrice (..)
, IntervalPrice (..)
) where
-- | Price types
data PriceType = Bid | Ask | Last | Close | Mid | MidEq | MidSafe
deriving (Show, Eq)
-- | Call price
data CallPrice = DirtyPrice {
cpPrice :: Double
}... | paulrzcz/hquantlib | src/QuantLib/Prices.hs | lgpl-3.0 | 599 | 0 | 8 | 219 | 153 | 96 | 57 | 17 | 0 |
module Prover.ProverMonad where
| kik/ToyPr | src/Prover/ProverMonad.hs | apache-2.0 | 35 | 0 | 3 | 6 | 6 | 4 | 2 | 1 | 0 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Main where
import Control.Concurrent
import System.Directory
import Control.Monad (msum)
import Control.Monad.Zip
import Data.Time.Clock
import Data.Time.Calendar
import Happstack.Server
import Pages
runCleanup :: IO ()
runCleanup = do
pastePaths ... | koto-bank/kopaste | src/Main.hs | bsd-2-clause | 1,183 | 0 | 14 | 270 | 324 | 166 | 158 | 37 | 2 |
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-}
module Handler.Feed where
import Lounge
import Storage
import Settings
import Common
import Model.Entry
import Data.Time.Clock.POSIX
import Yesod.Helpers.AtomFeed
getFeedR :: Handler RepAtom
getFeedR = do
entries <- liftIO $ runLSM Settings.connStr $ loadEntries... | fortytools/lounge | Handler/Feed.hs | bsd-2-clause | 1,053 | 8 | 12 | 197 | 317 | 168 | 149 | 31 | 2 |
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
-- In addition, you can configure a number of different aspects of Yesod
-- by overriding methods in the Yesod typeclass. That instance is
-- declared in the Foundation.hs file.... | jannschu/bitlove-ui | Settings.hs | bsd-2-clause | 2,549 | 0 | 10 | 539 | 318 | 197 | 121 | -1 | -1 |
{- |
Use this applicaton to generate the 'Data.Time.Clock.AnnouncedLeapSeconds'
module. Compile and pipe an EOP file from Celestrak through the binary,
e.g.:
curl http://www.celestrak.com/SpaceData/eop19620101.txt | ./MakeLeapSecondTable > Data/Time/Clock/AnnouncedLeapSeconds.hs
-}
import Astro.Celestrak
import Da... | bjornbm/leapseconds-announced | MakeLeapSecondTable.hs | bsd-3-clause | 4,479 | 0 | 11 | 846 | 553 | 320 | 233 | 73 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Mismi.IAM.Core.Data (
IamRole (..)
) where
import P
newtype IamRole =
IamRole {
iamRole :: Text
} deriving (Eq, Show, Ord)
| ambiata/mismi | mismi-iam-core/src/Mismi/IAM/Core/Data.hs | bsd-3-clause | 230 | 0 | 6 | 60 | 50 | 33 | 17 | 9 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Snap.Snaplet.OAuth.Internal.Utils where
import Control.Applicative
import Data.Aeson
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
import Data.Maybe (fromMaybe)... | HaskellCNOrg/snaplet-oauth | src/Snap/Snaplet/OAuth/Internal/Utils.hs | bsd-3-clause | 1,569 | 0 | 10 | 408 | 335 | 193 | 142 | 32 | 1 |
module Test.Util.Util where
sb = " should be "
| visood/bioalgo | test/Test/Util/Util.hs | bsd-3-clause | 48 | 0 | 4 | 10 | 12 | 8 | 4 | 2 | 1 |
{-# LANGUAGE PolyKinds #-}
{-# OPTIONS_HADDOCK hide #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeFamilyDependencies #-}
{-# LA... | kcsongor/generic-lens | generic-lens/src/Data/Generics/Internal/VL/Iso.hs | bsd-3-clause | 3,000 | 0 | 11 | 695 | 1,113 | 606 | 507 | 58 | 1 |
{-|
Copyright : (c) Dave Laing, 2017
License : BSD3
Maintainer : dave.laing.80@gmail.com
Stability : experimental
Portability : non-portable
-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVar... | dalaing/type-systems | src/Fragment/Pair/Rules/Type/Infer/Common.hs | bsd-3-clause | 6,944 | 0 | 16 | 2,069 | 2,607 | 1,331 | 1,276 | 180 | 1 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE GADTs, NoImplicitPrelude, UnicodeSyntax, FlexibleContexts, InstanceSigs, UndecidableInstances
, AllowAmbiguousTypes#-}
module Data.Nested.Internal
( -- * Tree and Forest types
Tree (..), Forest (..)
-- * Query
, fruit, forest, trees, treeAsso... | sheganinans/applicative-nestedmap | src/Data/Nested/Internal.hs | bsd-3-clause | 9,307 | 0 | 13 | 1,878 | 3,720 | 1,977 | 1,743 | 166 | 2 |
module Main where
import Support ( inner )
import Control.Monad ( when )
import System.Environment ( getArgs )
main :: IO ( )
main =
do { -- Following stuff has nothing to do with the Lobster use case
-- It is for running and testing this program. We get names for
-- the internal file... | GaloisInc/sk-dev-platform | libs/symbolic-io/src/Data/Symbolic/UseCases/A.hs | bsd-3-clause | 517 | 0 | 12 | 161 | 120 | 67 | 53 | 10 | 1 |
{-# LANGUAGE GADTs, GeneralizedNewtypeDeriving, FlexibleInstances, CPP #-}
module Data.JSTarget.AST where
import qualified Data.Set as S
#if __GLASGOW_HASKELL__ >= 708
import qualified Data.Map.Strict as M
#else
import qualified Data.Map as M
#endif
import System.IO.Unsafe
import System.Random (randomIO)
import Data.IO... | joelburget/haste-compiler | src/Data/JSTarget/AST.hs | bsd-3-clause | 6,646 | 0 | 15 | 1,681 | 1,812 | 959 | 853 | 255 | 1 |
{-# LANGUAGE QuasiQuotes, ScopedTypeVariables #-}
module Atomo.Kernel.Ports (load) where
import Data.Char (isSpace)
import Data.Maybe (catMaybes)
import System.Console.Haskeline as Haskeline
import System.Directory
import System.FilePath ((</>), (<.>))
import System.IO
import qualified Data.Text as T
import qualified ... | Mathnerd314/atomo | src/Atomo/Kernel/Ports.hs | bsd-3-clause | 12,398 | 187 | 60 | 3,979 | 5,610 | 2,720 | 2,890 | -1 | -1 |
module Main where
import Data.Reflection.Extras
main = print "hey" | jfischoff/reflection-extras | tests/Main.hs | bsd-3-clause | 67 | 0 | 5 | 9 | 18 | 11 | 7 | 3 | 1 |
module TestData
-- blockchains
( singletonBlockchainUnvalidated
, singletonBlockchain
, blockchain1Block
, blockchain2BlockFork
, blockchain3Block
-- blocks
, genesisBlock
, block1A
, block1ACoinbasePrivateKey
, block1B
, block1BCoinbasePrivateKey
, block2A
, bloc... | TGOlson/blockchain | test/TestData.hs | bsd-3-clause | 2,512 | 0 | 9 | 376 | 479 | 258 | 221 | 51 | 1 |
{-# LANGUAGE BangPatterns, CPP, MagicHash, OverloadedStrings #-}
#ifdef USE_MONO_PAT_BINDS
{-# LANGUAGE MonoPatBinds #-}
#endif
-- | Support for HTTP response encoding.
--
-- TODO: Improve documentation.
module Blaze.ByteString.Builder.HTTP (
-- * Chunked HTTP transfer encoding
chunkedTransferEncoding
, chunk... | meiersi/blaze-builder | Blaze/ByteString/Builder/HTTP.hs | bsd-3-clause | 8,216 | 0 | 27 | 2,677 | 1,290 | 679 | 611 | 109 | 3 |
import Air.Env
import Air.TH
import Prelude ()
import System.Nemesis.Titan
import Test.Hspec
import Air.Spec
spec :: IO ()
spec = hspec $ do
describe "PlainShow" $ do
it "should show unicode spec" - do
-- (PlainShowWrapper "测试") `shouldBe` (PlainShowWrapper "测试 unicode")
"测试" === "测试 unicode"
... | nfjinjing/air-spec | src/Test.hs | bsd-3-clause | 414 | 2 | 14 | 100 | 105 | 52 | 53 | 14 | 1 |
{-# LANGUAGE OverloadedStrings, TupleSections, TypeFamilies, FlexibleContexts,
PackageImports #-}
module Network.XmlPush.HttpPush.Body (
HttpPush, HttpPushArgs(..), makeHttpPush,
HttpPushTest(..), HttpPushTestArgs(..),
) where
import Prelude hiding (filter)
import Control.Applicative
import Control.Monad
import ... | YoshikuniJujo/xml-push | src/Network/XmlPush/HttpPush/Body.hs | bsd-3-clause | 5,760 | 72 | 24 | 1,154 | 2,432 | 1,223 | 1,209 | 153 | 3 |
module Network.OpenFlow.Decode where
import qualified Data.ByteString as B
import Network.OpenFlow.Message (OfpMessage)
import Network.OpenFlow.Parser
decode :: B.ByteString -> Either String OfpMessage
decode = parseOnly ofpMessage
| utky/openflow | src/Network/OpenFlow/Decode.hs | bsd-3-clause | 254 | 0 | 6 | 46 | 56 | 34 | 22 | 6 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.EXT.PointParameters
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/EXT/PointParameters.hs | bsd-3-clause | 994 | 0 | 4 | 123 | 73 | 56 | 17 | 11 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.