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
{-# LANGUAGE QuasiQuotes, OverloadedStrings, ScopedTypeVariables #-} module Test.Network.AuthorizeNet.Api (authorizeNetTests) where import qualified Data.ByteString.Lazy import Network.AuthorizeNet.Api import Network.AuthorizeNet.Types import Test.Network.AuthorizeNet.Request import Test.Network.AuthorizeNet.Respon...
MichaelBurge/haskell-authorize-net
test/Test/Network/AuthorizeNet/Api.hs
bsd-3-clause
1,886
0
12
199
195
109
86
26
1
{-# LINE 1 "Control.Monad.ST.Strict.hs" #-} {-# LANGUAGE Safe #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.ST.Strict -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Mai...
phischu/fragnix
builtins/base/Control.Monad.ST.Strict.hs
bsd-3-clause
704
0
5
105
38
31
7
4
0
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RankNTypes #-} module Cardano.Wallet.Kernel.Restore ( restoreWallet , restoreKnownWallet , continueRestoration , blundToResolvedBlock , mkPrefilter ) where import Universum import Control.Concurrent...
input-output-hk/pos-haskell-prototype
wallet/src/Cardano/Wallet/Kernel/Restore.hs
mit
26,857
0
33
8,295
5,238
2,783
2,455
-1
-1
main = putStrLn "hello, world"
feliposz/learning-stuff
haskell/helloworld.hs
mit
30
0
5
4
9
4
5
1
1
{- | Module : $Header$ Description : the abstract syntax for analysis and final signature instance Copyright : (c) Christian Maeder and Uni Bremen 2003-2005 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : experimental Portability : portable abstract sy...
nevrenato/HetsAlloy
HasCASL/Le.hs
gpl-2.0
11,642
1
15
2,623
2,913
1,568
1,345
255
8
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ {-# LANGUAGE MagicHash #-} #endif -- | -- Module : Data.ByteString.Unsafe -- Copyright : (c) Don Stewart 2006-2008 -- (c) Duncan Coutts 2006-2011 -- License : BSD-style -- Maintainer : dons00@gmail.com, duncan@community.haskell.org -- Stability :...
jwiegley/ghc-release
libraries/bytestring/Data/ByteString/Unsafe.hs
gpl-3.0
12,922
0
12
2,527
1,489
870
619
68
1
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section{Tidying up Core} -} {-# LANGUAGE CPP, ViewPatterns #-} module TidyPgm ( mkBootModDetailsTc, tidyProgram, globaliseAndTidyId ) where #include "HsVersions.h" import TcRnTypes import DynFlags import CoreSyn import CoreUnfold import CoreFV...
vTurbine/ghc
compiler/main/TidyPgm.hs
bsd-3-clause
63,721
0
19
19,592
7,471
4,042
3,429
568
5
{-# LANGUAGE OverloadedStrings #-} module Brick.Widgets.DeviceList ( newDeviceList , renderDeviceList , module Brick.Widgets.List , module Brick.Widgets.List.Utils ) where import Brick import Brick.Widgets.List import Brick.Widgets.List.Utils import Brick.Widgets.Border import DBus....
rootzlevel/device-manager
src/Brick/Widgets/DeviceList.hs
bsd-3-clause
5,414
0
18
1,442
1,534
796
738
141
17
module Main where import Data.Monoid import Test.Framework import Test.Framework.Providers.HUnit import TestLexer -- checkToken :: String -> (TokenType -> Bool) -> Test.HUnit.Test -- checkToken s f = TestLabel ("test token \"" ++ s ++ "\"") $ TestCase $ do -- let tokens = alexScanTokens s -- length tokens @?...
ademinn/JavaWithClasses
test/src/Test.hs
bsd-3-clause
752
0
7
165
65
44
21
7
1
-- little more complex. use the path to the obj file we get back from -- 'make'. load() uses this to find the .hi file import System.Plugins import API main = do status <- makeAll "../Tiny.hs" ["-i../api"] o <- case status of MakeSuccess _ o -> return o MakeFailure e ...
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/testsuite/make/makeall001/prog/Main.hs
bsd-3-clause
548
0
12
201
142
66
76
12
3
----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Init -- Copyright : (c) Brent Yorgey 2009 -- License : BSD-like -- -- Maintainer : cabal-devel@haskell.org -- Stability : provisional -- Portability : portable -- -- Implementation of t...
themoritz/cabal
cabal-install/Distribution/Client/Init.hs
bsd-3-clause
37,522
0
20
10,963
8,861
4,503
4,358
690
17
module Package ( base ) where base :: String base = "de.htwk.autolat.Connector"
Erdwolf/autotool-bonn
server/gen/Package.hs
gpl-2.0
85
0
4
17
19
12
7
4
1
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} module ModuleReExport.ExportsModule ( module ModuleReExport.ExportsIdentifier , module Prelude , foo ) where import ModuleReExport.ExportsIdentifier import Prelude hiding (div) foo = div
beni55/fay
tests/ModuleReExport/ExportsModule.hs
bsd-3-clause
265
0
5
42
42
28
14
9
1
{-# LANGUAGE TemplateHaskell #-} {-| Implementation of the Ganeti error types. This module implements our error hierarchy. Currently we implement one identical to the Python one; later we might one to have separate ones for frontend (clients), master and backend code. -} {- Copyright (C) 2012 Google Inc. This pro...
vladimir-ipatov/ganeti
src/Ganeti/Errors.hs
gpl-2.0
6,312
0
12
1,182
1,338
816
522
126
2
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE IncoherentInstances #-} -- :-/ {-# LANGUAGE DefaultSignatures #-} {-# L...
ml9951/ghc
testsuite/tests/generics/GShow/GShow.hs
bsd-3-clause
5,151
0
17
1,632
1,815
925
890
105
1
-- (c) The University of Glasgow, 1997-2006 {-# LANGUAGE BangPatterns, CPP, DeriveDataTypeable, MagicHash, UnboxedTuples #-} {-# OPTIONS_GHC -O -funbox-strict-fields #-} -- We always optimise this, otherwise performance of a non-optimised -- compiler is severely affected -- | -- There are two principal string types u...
urbanslug/ghc
compiler/utils/FastString.hs
bsd-3-clause
21,608
0
26
4,917
4,223
2,189
2,034
328
5
module Eval (eval) where import Language.Haskell.Liquid.Prelude (liquidError) import Prelude hiding (lookup) type Val = Int type Bndr = Int data Expr = Const Int | Var Bndr | Plus Expr Expr | Let Bndr Expr Expr type Env = [(Bndr, Val)] -----------------------------------------...
mightymoose/liquidhaskell
tests/neg/Eval.hs
bsd-3-clause
974
0
9
264
295
160
135
21
1
{-# LANGUAGE CPP #-} {-# OPTIONS_HADDOCK hide #-} module Distribution.Compat.TempFile ( openTempFile, openBinaryTempFile, openNewBinaryFile, createTempDirectory, ) where import System.FilePath ((</>)) import Foreign.C (eEXIST) import System.IO (Handle, openTempFile, openBin...
DavidAlphaFox/ghc
libraries/Cabal/Cabal/Distribution/Compat/TempFile.hs
bsd-3-clause
4,651
0
17
1,235
843
465
378
70
5
{-# LANGUAGE DataKinds, TypeFamilies, UndecidableInstances #-} module T5792 where data T = TT type family Compare (m :: T) :: Ordering type instance Compare TT = Compare TT type Compare' a = Compare a
olsner/ghc
testsuite/tests/typecheck/should_compile/T5792.hs
bsd-3-clause
207
0
6
40
50
31
19
6
0
module Game.Halma.AI.Competitive ( aiMove ) where import Game.Halma.Board import Game.Halma.Rules import Game.Halma.AI.Base import Data.List (sortOn) -- | The perspective of the first team as opposed to the second team. type Perspective = (Team, Team) flipPersp :: Perspective -> Perspective flipPersp (t0, t1) =...
timjb/halma
halma/src/Game/Halma/AI/Competitive.hs
mit
2,821
0
15
770
964
511
453
78
10
module Net.Communication where import Network import Network.Socket import System.IO as IO import Net.Protocol (Message(..), serialize, parse) -- http://hackage.haskell.org/package/network-2.4.2.1/docs/Network.html -- opens a server socket open :: Int -> IO Socket open = listenOn2 -- connects t...
davidarnarsson/tictactoe
Net/Communication.hs
mit
1,582
0
11
345
353
181
172
29
1
module Util.Digit where import Data.Char (digitToInt) type Digits = [Integer] toDigits :: Int -> Digits toDigits = map (toInteger . digitToInt) . show fromDigits :: Digits -> Int fromDigits = read . foldr ((++) . show) ""
franza/sh3-hospital-riddle-haskell
src/Util/Digit.hs
mit
225
0
8
40
85
49
36
7
1
applyMaybe :: Maybe a -> (a -> Maybe b) -> Maybe b applyMaybe Nothing f = Nothing applyMaybe (Just x) f = f x
RAFIRAF/HASKELL
Functors, Applicative Functors, Monoids/applyMaybe.hs
mit
115
0
9
29
59
28
31
3
1
{- Recursion examples. -} maximum' :: [Int] -> Int maximum' [] = error "List is empty" maximum' [x] = x maximum' (x:xs) | x > maxTail = x | otherwise = maxTail where maxTail = maximum' xs {- Replicate function that replicates the number into a list number of times example replicate' 5 3 => [5,5,5] -} replicate'...
gs-akhan/haskel-experiments
recursion.hs
mit
1,579
0
11
369
672
341
331
40
1
----------------------------------------------------------------------------- -- | -- Module : Data.BitSet.Word -- Copyright : (c) Sergei Lebedev, Aleksey Kladov, Fedor Gogolev 2013 -- Based on Data.BitSet (c) Denis Bueno 2008-2009 -- License : MIT -- Maintainer : superbobry@gmail.com -- ...
lambda-llama/bitset
src/Data/BitSet/Word.hs
mit
4,849
0
9
1,074
822
475
347
86
1
module Main where import Data.List (nub, foldl') import Control.Applicative ((<$>), (<*>), pure) import qualified Data.Map.Strict as M import qualified Data.Set as S main :: IO () main = do let b = M.fromList [((1,1), White)] print $ negamaxScore 2 White b type Board = M.Map (Int, Int) Space data ...
erantapaa/haskell-pentago
src/Main.hs
mit
6,080
0
15
2,391
2,398
1,332
1,066
101
7
-- ~~~~~~~~~~ Purely functional FRW, strict non path-tracking module Main where import Nilsson import Data.Array import Data.Graph import System.Environment import System.IO type Pair = [(Capacity,Length)] type GraphFRW = Array Edge [(Capacity,Length)] frw :: GraphFRW -> GraphFRW frw g = foldr induct g (...
jcsaenzcarrasco/MPhil-thesis
frwFS.hs
mit
888
0
12
188
392
217
175
21
1
import Data.List splitLines :: String -> [String] splitLines [] = [] splitLines xs = let (pre,suf) = break isReturn xs in pre : case suf of ('\r':'\n':rest) -> splitLines rest ('\r':rest) -> splitLines rest ('\n':rest) -> splitLines rest _ -> [] isReturn c = c == '\r' || c == '\n'
zhangjiji/real-world-haskell
ch4-splitLines.hs
mit
309
0
12
78
145
73
72
11
4
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.VTTRegion (js_newVTTRegion, newVTTRegion, js_getTrack, getTrack, js_setId, setId, js_getId, getId, js_setWidth, setWidth, js_getWidth, getWidth, js_setHeight, setHeight, js_getHeight, getHei...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/VTTRegion.hs
mit
8,225
122
11
1,154
1,819
986
833
113
1
module Main where import Data.Numbers.Primes (isPrime, primes) import System.IO (print) main = print ooohYouTouchMySolution cyclic :: Int -> [Int] cyclic n = (map read . cyclicTake l . take (2*l-1) . cycle) s where s = show n l = length s ...
t00n/ProjectEuler
Euler/Euler35/main.hs
epl-1.0
712
0
12
270
202
106
96
13
2
module Gx.App where import Gx.Data.App import Gx.Data.Input import Gx.Data.Window import Gx.Internal.Backend import Control.Monad.IO.Class (liftIO) import Control.Concurrent import Control.Lens play :: w -> AppLifeCycle w -> InputListener w -> Window -> IO () play world lifecycle input win = playBackend (mkAppSt...
andgate/GXK
src/Gx/App.hs
gpl-2.0
507
0
10
89
180
97
83
17
1
module Exp.Test where -- $Id$ import Exp.Property import Autolib.Exp import Autolib.Exp.Einfach import Autolib.Exp.Sanity import Autolib.Reporter import Autolib.Reporter.Set import Autolib.ToDoc import Autolib.Reader import Autolib.Size import Autolib.Symbol import Control.Monad ( forM_ ) tests ps a = forM_ ps $...
marcellussiegburg/autotool
collection/src/Exp/Test.hs
gpl-2.0
1,266
4
15
353
415
203
212
36
1
{-# LANGUAGE ScopedTypeVariables #-} module PL.Reader where import PL.Data import PL.ToDoc import Autolib.ToDoc import Autolib.Reader import Autolib.TES.Identifier import Text.ParserCombinators.Parsec.Expr import Text.ParserCombinators.Parsec instance Reader Formel where reader = buildExpressionParser ...
Erdwolf/autotool-bonn
src/PL/Reader.hs
gpl-2.0
2,643
25
17
706
863
435
428
70
2
{- | Module : $Header$ Description : Abstract syntax of CSP-CASL processes Copyright : (c) Markus Roggenbach and Till Mossakowski and Uni Bremen 2004 License : GPLv2 or higher, see LICENSE.txt Maintainer : a.m.gimblett@swan.ac.uk Stability : provisional Portability : portable Abstract syntax of C...
nevrenato/Hets_Fork
CspCASL/AS_CspCASL_Process.hs
gpl-2.0
11,902
0
11
3,481
2,955
1,512
1,443
217
1
{-# LANGUAGE GeneralizedNewtypeDeriving, TypeSynonymInstances #-} module Mescaline.Data.Unique ( Unique(..) , Id , Namespace , mkNamespace , fromString , unsafeFromString , toString , fromBinary , Map , toMap ) where import Data.Binary (Put) import qualified Data.Binary.Put as Binary i...
kaoskorobase/mescaline
lib/mescaline/Mescaline/Data/Unique.hs
gpl-3.0
1,304
0
9
272
406
233
173
40
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/Insert.hs
mpl-2.0
3,560
0
15
778
398
239
159
63
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/UploadArchive.hs
mpl-2.0
8,189
0
13
1,740
904
553
351
96
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-ml/gen/Network/AWS/MachineLearning/CreateDataSourceFromRedshift.hs
mpl-2.0
10,591
0
13
1,992
981
614
367
115
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} module Main (main) where import qualified BookIndexer.BookMetadataReader as BM (loadMetadata, BookMetadata(author, title, epubVersion)) import BookIndexer.IndexerState (IndexerState(IndexerState), lastSeq, indexerStateId) import BookIndexer.Types.Bo...
asvyazin/my-books.purs
server/my-books/BookIndexer/Main.hs
mpl-2.0
9,790
0
23
2,145
2,614
1,385
1,229
-1
-1
module Snail where exampleArray :: [[Int]] exampleArray = [[1,2,3], [8,9,4], [7,6,5]] -- exampleArray2 :: [[Int]] exampleArray2 = [[1,2,3], [4,5,6], [7,8,9]] -- snail :: [[Int]] -> [Int] snail [] = [] snail [[a]] = [a] snail [[a, b], [c, d]] = [a, b, ...
ice1000/OI-codes
codewars/1-100/snail.hs
agpl-3.0
520
0
12
176
283
168
115
20
1
#!/usr/bin/env runhaskell module Main where import Data.Functor import Data.List import System.Environment main = do header <- unwords <$> getArgs let dash_count = 80 - 2 - length header right_dash_count = dash_count `div` 2 left_dash_count = dash_count - right_dash_count putStrLn $ replicate 80 '-'...
gcross/habit-of-fate
misc/center-banner.hs
agpl-3.0
452
0
12
89
133
67
66
12
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE DataKinds #-} module Config ( OS(..), Cluster(..), Config(..), Backend(..) ...
input-output-hk/daedalus
installers/common/Config.hs
apache-2.0
4,360
0
17
1,228
941
526
415
77
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QToolTip.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:15 Warning : this file is machine generated - do not ...
uduki/hsQt
Qtc/Gui/QToolTip.hs
bsd-2-clause
4,464
0
15
724
1,280
674
606
87
1
{-# LANGUAGE CPP, DeriveFunctor, DeriveFoldable, DeriveTraversable #-} -- | -- Module : Documentation.Haddock.Types -- Copyright : (c) Simon Marlow 2003-2006, -- David Waern 2006-2009, -- Mateusz Kowalczyk 2013 -- License : BSD-like -- -- Maintainer : ha...
haskell/haddock
haddock-library/src/Documentation/Haddock/Types.hs
bsd-2-clause
10,680
0
15
2,496
3,736
1,948
1,788
106
1
module Graphics.GL.Pal.Types where import Graphics.GL import Control.Monad.Trans import Foreign newtype GLProgram = GLProgram { unGLProgram :: GLuint } newtype AttributeLocation = AttributeLocation { unAttributeLocation :: GLint } newtype UniformLocation = UniformLocation { unUn...
lukexi/reshader
src/Graphics/GL/Pal/Types.hs
bsd-2-clause
913
0
11
237
207
126
81
16
1
module Main (main) where import Control.Exception (IOException, try) import Control.Monad.Error (ErrorT(..), MonadError(..)) import System.Environment (getArgs, getProgName) import System.Exit (exitFailure, exitSuccess) import System.IO (hPutStrLn, stderr) import Language.Dot (parseDot, renderDot...
bsl/language-dot
ppdot/Main.hs
bsd-3-clause
1,996
0
11
504
628
328
300
48
3
{-# OPTIONS_GHC -Wall #-} import Data.Maybe import Distribution.PackageDescription import Distribution.Simple import Distribution.Simple.PreProcess main :: IO () main = defaultMainWithHooks hooks { hookedPreProcessors = hscDropCpp11 $ hookedPreProcessors hooks } where hooks = simpleUserHooks -- gcc show...
arybczak/haskell-mcl
Setup.hs
bsd-3-clause
1,008
0
14
295
259
141
118
18
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} module Main where import Control.Applicative import Control.Lens import Control.Monad.Reader import qualified Data.ByteString.UTF8 as B import Data.Maybe import Data.Monoid import Data.Pool import Database.Post...
purefn/hiplambda
src/HipBot/HipLambda.hs
bsd-3-clause
2,579
0
12
427
649
351
298
-1
-1
{-# LANGUAGE BangPatterns #-} import Diff import qualified Data.Sequence as S import Data.Machine import qualified Data.Text as T import qualified Data.Text.IO as T import qualified Data.Text.Lazy as TL import Data.Attoparsec.Text (parseOnly) import qualified Data.Text.Lazy.Builder as TB import Control.Appl...
bgamari/diff-utils
filter-diff.hs
bsd-3-clause
2,035
0
16
587
675
362
313
37
5
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-| Module : Numeric.AERN.IVP.Plot.UsingFnView Description : visualising IVP solutions using FnView Copyright : (c) Michal Konecny License : BSD3 Maintainer : mikkonecny@gmail.com ...
michalkonecny/aern
aern-ivp/src/Numeric/AERN/IVP/Plot/UsingFnView.hs
bsd-3-clause
35,811
0
23
12,029
7,790
4,141
3,649
-1
-1
-- UUAGC 0.9.50 (src-ag/DeclBlocks.ag) module DeclBlocks where {-# LINE 2 "./src-ag/DeclBlocks.ag" #-} import Code (Decl,Expr) {-# LINE 9 "dist/build/DeclBlocks.hs" #-} -- DeclBlocks -------------------------------------------------- {- alternatives: alternative DeclBlock: child defs : {[...
norm2782/uuagc
src-generated/DeclBlocks.hs
bsd-3-clause
852
0
9
229
81
53
28
5
0
{-# LANGUAGE DeriveDataTypeable #-} -- | The types types that we use in Ghcid module Language.Haskell.Ghcid.Types( GhciError(..), Stream(..), Load(..), Severity(..), isMessage ) where import Data.Data import Control.Exception.Base (Exception) -- | GHCi shut down data GhciError = UnexpectedExit String...
JPMoresmau/ghcid
src/Language/Haskell/Ghcid/Types.hs
bsd-3-clause
1,090
0
9
247
299
177
122
27
1
{-# LANGUAGE TemplateHaskell #-} module QCommon.PackFileT where import Control.Lens (makeLenses) import qualified Data.ByteString as B import Types packFileSize :: Int packFileSize = 64 packFileNameSize :: Int packFileNameSize = 56 makeLenses ''PackFileT
ksaveljev/hake-2
src/QCommon/PackFileT.hs
bsd-3-clause
282
0
6
58
56
34
22
10
1
main :: IO () main = putStrLn "Test suite not yet implemented" {- #### Some test ideas let p = number of proposals i = interest ratio r = probability of getting attention if the client interviews only one applicant, let's say that the probability of getting attention is inversely proportional to the number ...
danse/opwer
test/Spec.hs
bsd-3-clause
649
0
6
128
20
10
10
2
1
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, ExistentialQuantification, TemplateHaskell, RecordWildCards, FlexibleContexts #-} -- |This module exports basic WD actions that can be used to interact with a -- browser session. module Test.WebDriver.Commands ( -- * Sessions createSessio...
kallisti-dev/hs-webdriver
src/Test/WebDriver/Commands.hs
bsd-3-clause
36,130
0
13
7,973
7,680
4,137
3,543
460
3
{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} module DrawBoids where import Diagrams.Prelude hiding (position) import Diagrams.Backend.Rasterific import Diagrams.Backend.CmdLine hiding (interval) import Diagrams.Size import Diagrams.Co...
MaximilianAlgehed/Boids
src/DrawBoids.hs
bsd-3-clause
1,957
0
21
569
731
376
355
47
1
module Control.Eff (module Control.Eff.Internal.Eff ,module Control.Eff.Internal.TCQ ,module Control.Eff.Internal.Union ,Elem ) where import Control.Eff.Internal.Eff import Control.Eff.Internal.TCQ import Control.Eff.Internal.Union import TypeFun.Data.List (Elem)
Lazersmoke/reee-monads
src/Control/Eff.hs
bsd-3-clause
275
0
5
31
67
47
20
9
0
{-# LANGUAGE CPP #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANG...
emwap/feldspar-language
src/Feldspar/Vector.hs
bsd-3-clause
48,539
2
21
13,000
18,578
9,504
9,074
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving, ScopedTypeVariables #-} module HsenvMonad ( Hsenv , runHsenv , indentMessages , debug , info , trace , warning , finally , throwError ...
Paczesiowa/hsenv
src/HsenvMonad.hs
bsd-3-clause
2,947
0
14
857
962
505
457
75
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE DataKinds #-} module WebApi.Security where import Data.Text (Text) im...
byteally/webapi
webapi-contract/src/WebApi/Security.hs
bsd-3-clause
4,939
0
16
906
1,046
601
445
89
3
{- Additional List functions, from the 'extra' package -} module Data.List.Extra (list) where {-| Non-recursive transform over a list, like maybe. >>> list 1 (\v _ -> v - 2) [] 1 >>> list 1 (\v _ -> v - 2) [5,6,7] 3 -} list :: b -> (a -> [a] -> b) -> [a] -> b list nil _ [] = nil list _ cons (x:xs) = cons x xs
tittoassini/typed
src/Data/List/Extra.hs
bsd-3-clause
320
0
10
80
86
48
38
4
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Zoli.Timestamp ( fileTimestamp ) where import Control.Exception (tryJust) import Control.Monad (guard) import Data.Time.Clock.POSIX (POSIXTime) import System.IO.Error (isDoesNotExistError) import System.Posix.Files...
bitonic/zoli
src/Zoli/Timestamp.hs
bsd-3-clause
640
0
13
137
159
87
72
14
2
module Main ( main ) where import Control.Monad.Logger import Jerimum.Environment import Jerimum.Storage.Server import System.Posix.Signals (Handler (Catch), installHandler, sigINT, sigTERM) main :: IO () main = do menv <- storageServerSystemEnv case menv of Right env -> do server <- runStdoutLogg...
dgvncsz0f/nws
app/jerimum-core.hs
bsd-3-clause
530
0
16
110
170
87
83
16
2
{-# LANGUAGE ImpredicativeTypes, FlexibleContexts #-} -- | El modulo Propiedades representa las propiedades de CSS. module Parser.Propiedades ( -- * Funciones Publicas mostrarPropiedades , lista_valor_parser , propiedadesCSS ) where import Text.ParserCombinators.UU import Text.ParserCombinators.UU.BasicInstances im...
carliros/Simple-San-Simon-Functional-Web-Browser
src/Parser/Propiedades.hs
bsd-3-clause
9,293
0
10
3,019
1,621
968
653
82
1
----------------------------------------------------------------------------- -- | -- Module : XMonad.Util.Dzen -- Description : Handy wrapper for dzen. -- Copyright : (c) glasser@mit.edu -- License : BSD -- -- Maintainer : glasser@mit.edu -- Stability : stable -- Portability : unportable -- -- Han...
xmonad/xmonad-contrib
XMonad/Util/Dzen.hs
bsd-3-clause
8,188
0
19
1,673
1,320
756
564
96
4
{-# LANGUAGE ConstraintKinds, TupleSections, BangPatterns #-} {-| @ /.stash/ 81273888827172/ -- A Hash of meta data.json -- JSON value type.json -- JSON string which is the TypeRep meta.json -- JSON string which is the TypeRep @ -} module Database.Stash ( Stas...
hanshoglund/stash
src/Database/Stash.hs
bsd-3-clause
4,229
0
20
906
1,337
709
628
-1
-1
-- !!! Testing list operations -- Hack: The only purpose of this script is to give us a place to put -- the above comment... -- It might be useful to import the List library so that we can test it too. -- padding so that this isn't an empty script module TestList where import Prelude
FranklinChen/Hugs
tests/rts/testlist.hs
bsd-3-clause
287
0
3
58
12
10
2
2
0
----------------------------------------------------------------------------- -- | -- Module : Security.InfoFlow.Policy.FlowLocks.Actor -- Copyright : (c) Niklas Broberg 2013 -- License : BSD-style (see the file LICENSE.txt) -- -- Maintainer : Niklas Broberg, niklas.broberg@chalmers.se -- Stability : ...
niklasbroberg/flowlocks-framework
src/Security/InfoFlow/Policy/FlowLocks/Actor.hs
bsd-3-clause
1,502
0
8
285
272
161
111
13
1
module U.Util.String where import qualified Data.Text as Text import qualified U.Util.Text as Text stripMargin :: String -> String stripMargin = Text.unpack . Text.stripMargin . Text.pack
unisonweb/platform
codebase2/util/U/Util/String.hs
mit
190
0
7
27
52
33
19
5
1
-- -- -- ------------------ -- Exercise 10.28. ------------------ -- -- -- module E'10'28 where -- import Prelude hiding ( getLine ) -- From chapter 7 ... type Word = String type Line = [Word] -- ... -- "getLine": ------------- getLine' :: (a -> Int) -> Int -> [a] -> [a] getLine' _ _ [] = [] getLine...
pascal-knodel/haskell-craft
_/links/E'10'28.hs
mit
2,132
0
11
651
413
233
180
26
1
{-# LANGUAGE TupleSections #-} module CriticalPairAnalysis ( Options , options , execute ) where import Control.Monad (when) import Data.Matrix (Matrix) import qualified Data.Matrix as Matrix import Data.M...
rodrigo-machado/verigraph
src/CLI/CriticalPairAnalysis.hs
gpl-3.0
11,063
0
19
2,898
2,879
1,475
1,404
188
5
module Database.Design.Ampersand.Output ( module Database.Design.Ampersand.Output.FSpec2Pandoc , module Database.Design.Ampersand.Output.PandocAux , module Database.Design.Ampersand.Output.FSpec2Excel , module Database.Design.Ampersand.Output.Population2Xlsx ) where import Database.Design.Ampersand....
guoy34/ampersand
src/Database/Design/Ampersand/Output.hs
gpl-3.0
533
0
5
52
88
65
23
10
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/CopyImage.hs
mpl-2.0
5,398
0
9
1,245
776
468
308
85
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-workspaces/gen/Network/AWS/WorkSpaces/RebootWorkspaces.hs
mpl-2.0
4,946
0
13
1,051
621
371
250
80
1
module Main where import Control.Monad import Database.HDBC import Database.HDBC.MySQL connectDatabase :: IO Connection connectDatabase = connectMySQL defaultMySQLConnectInfo go :: IO () go = do conn <- connectDatabase putStrLn $ "driver " ++ (show $ hdbcDriverName conn) putStrLn $ "server version "...
ryantm/hdbc-mysql
Test.hs
lgpl-2.1
1,033
0
15
299
303
150
153
21
1
-- | This module provides the Regex data type and matching functions module Regex ( Regex(..) , Match(..) , allMatches , matches , matchesExact ) where -- | The data type of regexes data Regex = Nil -- ^ No string matches this pattern | Dot -- ^ Matches any sin...
eneas193933/regex-derivatives
Regex.hs
bsd-2-clause
2,808
0
15
790
831
423
408
57
4
module Diagrams.Gloss ( fromGloss, toGloss ) where import qualified Graphics.Gloss.Data.Picture as G import qualified Graphics.Gloss.Data.Color as C import Diagrams.AST {-| Gloss: data Picture - A 2D picture Constructors: Blank Polygon Path Line Path Circle Float ThickCircle Float Float Text ...
sordina/Diagrams-AST
src/Diagrams/Gloss.hs
bsd-3-clause
1,444
0
10
354
534
276
258
22
1
module Main where import Brick ui :: Widget () ui = str "Hello, world!" main :: IO () main = simpleMain ui
sjakobi/brick
programs/HelloWorldDemo.hs
bsd-3-clause
110
0
6
25
43
23
20
6
1
{-# LANGUAGE OverloadedStrings, GADTs, NoImplicitPrelude, ExistentialQuantification, FlexibleInstances #-} -- |You only need to import this module to use this library. -- This module exports all modules except "D3JS.Example" module D3JS ( module D3JS.Type , module D3JS.Func , module D3JS.Syntax , module D3JS.Reify...
ocramz/d3js-haskell
D3JS.hs
bsd-3-clause
481
2
5
70
77
50
27
14
0
{-# LANGUAGE ForeignFunctionInterface, EmptyDataDecls, ScopedTypeVariables, DeriveDataTypeable #-} module IntuitionisticFFI where import Foreign import Foreign.C.String import Prelude hiding (catch) import Intuitionistic import CommonFFI uw_Haskell_parseIntuitionistic :: Ptr UrwebContext -> CString -> IO CString u...
diflying/logitext
IntuitionisticFFI.hs
bsd-3-clause
506
0
8
59
97
53
44
10
1
{-# language ViewPatterns #-} module Editor.Scene.Rendering ( renderEditorScene, renderObjectScene, transformation, renderCursorStepSize, ) where import Utils import Data.SelectTree import Data.Abelian import qualified Data.Indexable as I import Graphics.Qt import Base import Editor.Scene.Types ...
geocurnoff/nikki
src/Editor/Scene/Rendering.hs
lgpl-3.0
7,048
0
16
1,569
2,193
1,045
1,148
137
3
{-# LANGUAGE CPP #-} {-# LANGUAGE Rank2Types #-} #ifndef MIN_VERSION_profunctors #define MIN_VERSION_profunctors(x,y,z) 1 #endif #if __GLASGOW_HASKELL__ < 708 || !(MIN_VERSION_profunctors(4,4,0)) {-# LANGUAGE Trustworthy #-} #endif ------------------------------------------------------------------------------- -- | -...
danidiaz/lens
src/Control/Lens/Review.hs
bsd-3-clause
7,564
0
11
1,572
889
569
320
-1
-1
module Dotnet.System.IO.Stream where import Dotnet import qualified Dotnet.System.MarshalByRefObject import qualified Data.Word import qualified Dotnet.System.Array import qualified Data.Int import qualified Dotnet.System.IO.SeekOrigin {- import qualified Dotnet.System.IAsyncResult import qualified Dotnet.System.Async...
FranklinChen/Hugs
dotnet/lib/Dotnet/System/IO/Stream.hs
bsd-3-clause
3,073
0
12
427
565
314
251
-1
-1
-- | -- Module : Crypto.PubKey.ECC.DH -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- -- Elliptic curve Diffie Hellman -- module Crypto.PubKey.ECC.DH ( Curve , PublicPoint , PrivateNumber , SharedKey(..)...
vincenthz/cryptonite
Crypto/PubKey/ECC/DH.hs
bsd-3-clause
1,419
0
10
273
324
192
132
27
1
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="sr-SP"> <title>Authentication Statistics | ZAP Extension</title> <maps> <homeID>top</homeID>...
kingthorin/zap-extensions
addOns/authstats/src/main/javahelp/org/zaproxy/zap/extension/authstats/resources/help_sr_SP/helpset_sr_SP.hs
apache-2.0
986
78
66
159
413
209
204
-1
-1
{-# LANGUAGE TemplateHaskell, DeriveFunctor, DeriveFoldable, DeriveTraversable, DeriveDataTypeable #-} module Lamdu.Data.Definition ( FFIName(..) , Builtin(..) , Content(..) , Body(..), bodyContent, bodyType , Definition(..), defBody, defPayload ) where import Data.Binary (Binary(..)) import Data.Binary.Ge...
schell/lamdu
Lamdu/Data/Definition.hs
gpl-3.0
1,400
0
9
222
456
261
195
43
0
{-# LANGUAGE ForeignFunctionInterface, BangPatterns #-} module MemBench (memBench) where import Foreign import Foreign.C import Control.Exception import System.CPUTime import Numeric memBench :: Int -> IO () memBench mb = do let bytes = mb * 2^20 allocaBytes bytes $ \ptr -> do let bench label test = do ...
CloudI/CloudI
src/api/haskell/external/binary-0.8.7.0/benchmarks/MemBench.hs
mit
2,936
0
22
914
1,028
481
547
72
1
{-# OPTIONS_GHC -Wall #-} import Distribution.PackageDescription import Distribution.Simple import Distribution.Simple.LocalBuildInfo import Distribution.Simple.PreProcess import Distribution.Simple.Utils import System.Exit import System.FilePath import System.Process (rawSystem) main :: IO () main = defaultMainWithH...
mydaum/cabal
cabal-testsuite/PackageTests/CustomPreProcess/Setup.hs
bsd-3-clause
1,412
0
17
407
318
169
149
29
2
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} -- Check that "->" is an instance of Eval module ShouldSucceed where instance Show (a->b) where show _ = error "attempt to show function" instance (Eq b) => Eq (a -> b) where (==) f g = error "attempt to compare functions" -- Since Eval is a superclass ...
ghc-android/ghc
testsuite/tests/typecheck/should_compile/tc088.hs
bsd-3-clause
768
0
9
315
257
131
126
14
0
-- !!! Checking the exhaustiveness of constructor -- !!! with labelled fields. module ShouldCompile where data E = B { a,b,c,d,e,f :: Bool } bug x = case x of B _ _ _ _ True False -> undefined B {e=True, f=False} -> undefined B {a=a,f=False,e=False} -> undefined
urbanslug/ghc
testsuite/tests/deSugar/should_compile/ds043.hs
bsd-3-clause
279
0
10
64
110
67
43
7
3
{-# LANGUAGE GeneralizedNewtypeDeriving, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses #-} module WriterIO where import Control.Monad.Writer import System.IO (IOMode) import MonadHandle import SafeHello data Event = Open FilePath IOMode | Put String String | Close String | GetContent...
pauldoo/scratch
RealWorldHaskell/ch15/WriterIO.hs
isc
875
0
9
164
231
126
105
20
1
import Test.Hspec (Spec, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Cipher (caesarDecode, caesarEncode, caesarEncodeRandom) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs specs :: Spec specs = do it "no-op encode" $ do caesar...
exercism/xhaskell
exercises/practice/simple-cipher/test/Tests.hs
mit
2,113
0
16
559
670
344
326
45
1
{-# OPTIONS_GHC -Wall #-} module HW02 where --import Data.List -- Mastermind ----------------------------------------- -- A peg can be one of six colors data Peg = Red | Green | Blue | Yellow | Orange | Purple deriving (Show, Eq, Ord) -- A code is defined to simply be a list of Pegs type Code = [Peg] -- A m...
tamasgal/haskell_exercises
CIS-194/homework-02/HW02-2015.hs
mit
2,414
0
11
512
627
342
285
39
2
module Database.Memcached.Binary {-# WARNING "use Database.Memcached.Binary.Maybe(or Either, IO) instead." #-} ( module Database.Memcached.Binary.Maybe ) where import Database.Memcached.Binary.Maybe
philopon/memcached-binary
src/Database/Memcached/Binary.hs
mit
208
0
5
26
25
18
7
3
0
-- This module was formerly called "HugsUtils" - but it was -- too messy to make it a "standard Hugs library" so we moved it -- over here. module HaskoreUtils( assert, unlinesS, concatS, rightS, leftS, centreS, right, left, centre, spaces, andOnError, butOnError, zeroOrMore, oneOrMore, ) where import Mo...
jtestard/cse230Winter2015
SOE/haskore/src/HaskoreUtils.hs
mit
3,066
10
10
749
696
394
302
34
1
-- make a gen random generator for the data type import Test.QuickCheck data Fool = Fulse | Frue deriving (Eq, Show) genFool :: Gen Fool genFool = elements [Fulse, Frue] genMoreFulse :: Gen Fool genMoreFulse = elements [Fulse, Fulse, Frue]
JustinUnger/haskell-book
ch14/ch14-ex-4.hs
mit
245
0
6
45
75
42
33
6
1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Graphics.Urho3D.UI.DropDownList( DropDownList , dropDownListContext , SharedDropDownList , dropDownListAddItem , dropDownListInsertItem , DropDownListRemoveItem(..) , dropDownListRemoveAllItems , dropDownListSetSelection , dropDownListSetPlaceholderText ...
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/UI/DropDownList.hs
mit
10,025
0
18
1,625
2,042
1,117
925
-1
-1
module Colors.TomorrowNight where colorScheme = "tomorrow-night" colorBack = "#1d1f21" colorFore = "#c5c8c6" -- Black color00 = "#1d1f21" color08 = "#666666" -- Red color01 = "#cc6666" color09 = "#ff3334" -- Green color02 = "#b5bd68" color10 = "#9ec400" -- Yellow color03 = "#e6c547" color11 = "#f0c674" -- Blue color...
phdenzel/dotfiles
.config/xmonad/lib/Colors/TomorrowNight.hs
mit
558
0
4
87
119
75
44
22
1
module Geo.Program.Type ( module Geo.Program.AST ) where import Geo.Program.AST import Geo.Program.ToDoc import Geo.Program.Reader
marcellussiegburg/autotool
collection/src/Geo/Program/Type.hs
gpl-2.0
142
0
5
24
34
23
11
5
0
{-# language DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} module CNF.Optimize where import CNF.Form import CNF.Eval import CNF.Example import OBDD (OBDD) import qualified OBDD.Operation as O import qualified OBDD.Property as P import Challenger.Partial import Autolib.ToDoc import Autolib.Reporte...
florianpilz/autotool
src/CNF/Optimize.hs
gpl-2.0
1,820
0
14
555
483
249
234
46
1