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 NoImplicitPrelude #-} -- | -- Module: Main -- Description: HLint tests executor -- Copyright: (c) 2015-2016, Ixperta Solutions s.r.o. -- License: BSD3 -- -- Stability: stable -- Portability: portable -- -- HLint tests executor. module Main (main) where import Control.Monad ...
IxpertaSolutions/freer-effects
tests/hlint.hs
bsd-3-clause
874
0
9
291
162
98
64
16
1
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, CPP #-} module Language.Haskell.GhcMod.Gap ( Language.Haskell.GhcMod.Gap.ClsInst , mkTarget , withStyle , setLogAction , getSrcSpan , getSrcFile , withContext , fOptions , toStringBuffer , showSeverityCaption , setCabalPkg , setHideAllPack...
darthdeus/ghc-mod-ng
Language/Haskell/GhcMod/Gap.hs
bsd-3-clause
10,962
0
16
1,871
1,958
1,098
860
166
1
{-# LANGUAGE OverloadedStrings #-} -- | -- Module: Network.FastIRC.Session -- Copyright: (c) 2010 Ertugrul Soeylemez -- License: BSD3 -- Maintainer: Ertugrul Soeylemez <es@ertes.de> -- Stability: alpha -- -- This module implements a framework for IRC client software. -- Essentially it consists of a dumb bot, ...
chrisdone/hulk
fastirc-0.2.0/Network/FastIRC/Session.hs
bsd-3-clause
11,520
0
24
3,259
2,856
1,459
1,397
245
11
module Db where import JSON import Proplists import Data.List type DB = [ Proplist ] type Record = Proplist create :: DB create = [] addRecord :: Record -> DB -> DB addRecord r db = r:db -- Usage: readDB (\x -> printDB (select (get "name") (Str "Innovation") x)) readDB :: (DB -> IO b) -> IO b readDB f = do t...
tty/joy-of-coding
solutions/Db.hs
bsd-3-clause
1,020
0
12
302
449
228
221
33
1
{-# LANGUAGE DeriveDataTypeable #-} module Mistral.Utils.Panic ( panic ) where import qualified Control.Exception as X import Data.Typeable ( Typeable ) data Panic = Panic { panicSource :: String , panicLines :: [String] } deriving (Typeable) instance X.Exception Pa...
GaloisInc/mistral
src/Mistral/Utils/Panic.hs
bsd-3-clause
1,055
0
13
324
241
135
106
26
1
{-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ...
tomberek/rulestesting
src/Control/CCA/Normalize.hs
bsd-3-clause
4,258
13
13
981
846
514
332
-1
-1
-- Copyright (c) 2014-present, Facebook, Inc. -- All rights reserved. -- -- This source code is distributed under the terms of a BSD license, -- found in the LICENSE file. {-# LANGUAGE OverloadedStrings #-} module TestUtils ( makeTestEnv , expectResultWithEnv , expectResult , expectFetches , testinput , id...
jiayuanmark/Haxl
tests/TestUtils.hs
bsd-3-clause
1,629
0
12
333
539
283
256
52
1
----------------------------------------------------------------------------- -- | -- Module : Berp.Base.Truth -- Copyright : (c) 2010 Bernie Pope -- License : BSD-style -- Maintainer : florbitous@gmail.com -- Stability : experimental -- Portability : ghc -- -- Implementation of the truth predicate on Pyt...
bjpop/berp
libs/src/Berp/Base/Truth.hs
bsd-3-clause
1,984
0
10
341
431
242
189
25
1
{-# LANGUAGE OverloadedStrings #-} module Text.Html.Entity ( -- * Entity lookup entityCodePoints , entityChars -- ** Entity validation , isValidEntity -- * Entity lookup by name , entityNameCodePoints , entityNameChars -- ** Entity name validation , isValidEntityName ...
zudov/html5-entity
src/Text/Html/Entity.hs
bsd-3-clause
2,106
0
7
414
324
204
120
30
1
------------------------------------------------------------------------------ -- | Various utils for PP module Utils.Pretty -- exports all where ------------------------------------------------------------------------------ import Data.Text import Data.ByteString.Char8 as B import UH...
atzedijkstra/blog-server
src/Utils/Pretty.hs
bsd-3-clause
642
0
7
99
89
53
36
10
0
module D21Spec (main, spec) where import Test.Hspec import D21Lib import Data.Either (isRight) import qualified Text.Parsec as P main :: IO () main = hspec spec spec :: Spec spec = parallel $ do describe "parsing" $ it "parses instructions" $ do let is = P.parse instructionsP "fixture" instr...
wfleming/advent-of-code-2016
2016/test/D21Spec.hs
bsd-3-clause
2,008
0
20
586
540
266
274
47
1
module Experiment (monteCarloExperiment, singleExperiment, monteCarloGenerators, singleGenerators) where import Control.Monad import Data.Monoid import Simulation.Aivika import Simulation.Aivika.Experiment import Simulation.Aivika.Experiment.Chart import Model -- the simulation specs specs = Sp...
dsorokin/aivika-experiment-chart
examples/Financial/Experiment.hs
bsd-3-clause
3,397
0
11
646
513
304
209
69
1
-- | This module exports functions which are used to execute requests and handle -- the OAuth authentication process. module Network.Factual.API ( -- * Authentication generateToken -- * Read functions , executeQuery , executeMultiQuery , get -- * Write functions , executeWrite , post -...
rudyl313/factual-haskell-driver
Network/Factual/API.hs
bsd-3-clause
7,502
0
12
1,419
1,848
998
850
121
1
module NAA.Interface.GL where import Data.Tuple.HT import qualified Data.Stream as S import Data.Array.Diff import Graphics.Rendering.OpenGL hiding (R) import Graphics.UI.GLFW import Control.Concurrent import NAA.Interface import NAA.Data import NAA.Logic import NAA.State import System.Exit glInterface = UserInterfac...
fatuhoku/haskell-noughts-and-crosses
src/NAA/Interface/GL.hs
bsd-3-clause
7,247
0
14
1,839
1,893
989
904
-1
-1
module Lib where import Control.Monad (guard, (>=>)) import Control.Monad.ST (ST) import Data.Array.IArray (assocs) import Data.Array.MArray (newArray, writeArray) import Data.Array.ST (STUArray, runSTUArray) import Data.List (foldl1') triplesLessThan :: Int -> [Int] triplesLessThan c = map fst . fil...
meditans/ipotenusa
src/Lib.hs
bsd-3-clause
1,125
0
11
250
511
265
246
24
1
{-# LANGUAGE EmptyDataDecls #-} module System.LXC.Container ( LXC, withContainer, -- * Data types Container(..), Snapshot(..), BDevSpecs(..), ContainerState(..), parseState, printState, -- * Flags CloneOption(..), CreateOption(..), cloneFlag, createFlag, -- * LXC errors LXCError(..), prett...
konn/lxc-dummy
src/System/LXC/Container.hs
bsd-3-clause
1,431
0
5
296
259
181
78
67
0
{-# LANGUAGE MultiParamTypeClasses #-} module Control.Monad.Lazy where import Control.Monad.Identity import Control.Monad.Reader import System.IO.Unsafe class Lazy m where lazy :: m a -> m a instance Lazy Identity where lazy = return . runIdentity -- Or just `id'. instance (Monad m, Lazy m) => Lazy (ReaderT r m...
sebastiaanvisser/islay
src/Control/Monad/Lazy.hs
bsd-3-clause
478
0
8
95
161
85
76
15
0
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.NV.FragmentCoverageToColor -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : p...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/NV/FragmentCoverageToColor.hs
bsd-3-clause
831
0
4
91
52
42
10
6
0
module Data.TestCase1KindInference where class F a where f :: a b -> b class Category cat where id :: cat a a (.) :: cat b c -> cat a b -> cat a c data Tree a = Leaf a | Node a (Tree a) (Tree a) type ITree = Tree data Either a b = Left a | Right b class Category a => Arrow a where arr :: (b -...
rodrigogribeiro/mptc
test/Data/TestCase1KindInference.hs
bsd-3-clause
881
0
10
316
485
254
231
24
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} module Test where import Helper import Control.Distributed.Process import Control.Distributed.Process.Serializable import Control.Monad import Data.Binary import Data.Generics hiding (Generic) import GHC.Generics import GHC.Int data Msg = Ping Proce...
abakst/symmetry
checker/src/cloud-haskell-tests/Test.hs
mit
1,722
0
11
553
390
203
187
36
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-| Module : FSM2FSM Description : An example that shows how two FSMs can exc...
linearray/mealstrom
test/FSM2FSM.hs
mit
5,109
2
16
1,166
1,156
606
550
87
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/DeleteUserProfile.hs
mpl-2.0
3,295
0
9
669
360
221
139
48
1
-- | -- Module : Statistics.Matrix.Algorithms -- Copyright : 2014 Bryan O'Sullivan -- License : BSD3 -- -- Useful matrix functions. module Statistics.Matrix.Algorithms ( qr ) where import Control.Applicative ((<$>), (<*>)) import Control.Monad.ST (ST, runST) import Prelude hiding (replicate) import...
bos/statistics
dense-linear-algebra/src/Statistics/Matrix/Algorithms.hs
bsd-2-clause
1,305
0
23
310
504
265
239
29
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module Ros.Nav_msgs.GetMapGoal where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosB...
acowley/roshask
msgs/Nav_msgs/Ros/Nav_msgs/GetMapGoal.hs
bsd-3-clause
981
1
7
144
270
159
111
29
0
{-# LANGUAGE FlexibleContexts #-} module Futhark.Actions ( printAction , interpretAction , impCodeGenAction , kernelImpCodeGenAction , seqCodeGenAction , rangeAction ) where import Control.Monad import Control.Monad.IO.Class import Data.List import qualified Data.Text as T import qualified Data.Text.IO a...
CulpaBS/wbBach
src/Futhark/Actions.hs
bsd-3-clause
3,876
0
18
929
823
453
370
79
4
-- | -- Module : Crypto.PubKey.RSA.PSS -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : Good -- module Crypto.PubKey.RSA.PSS ( PSSParams(..) , defaultPSSParams , defaultPSSParamsSHA1 -- * Sign and verify functions , s...
vincenthz/cryptonite
Crypto/PubKey/RSA/PSS.hs
bsd-3-clause
8,662
0
12
2,821
1,891
1,009
882
149
2
{-# OPTIONS -Wall #-} module Test.Paraiso.QuickCheckItself ( testQuickCheckItself )where import Test.Paraiso.Adaptor (testResult) import Test.Framework (Test, testGroup) import Test.QuickCheck testQuickCheckItself :: Test testQuickCheckItself = testGroup "test for QuickTest itself" $ tests where ...
nushio3/Paraiso
Test/Paraiso/QuickCheckItself.hs
bsd-3-clause
1,649
0
12
325
457
267
190
32
1
-- | This is the syntax for bkp files which are parsed in 'ghc --backpack' -- mode. This syntax is used purely for testing purposes. module Eta.Backpack.BkpSyn ( -- * Backpack abstract syntax HsUnitId(..), LHsUnitId, HsModuleSubst, LHsModuleSubst, HsModuleId(..), LHsModuleId, HsCompone...
rahulmutt/ghcvm
compiler/Eta/Backpack/BkpSyn.hs
bsd-3-clause
2,458
0
12
614
491
296
195
45
0
{-# LANGUAGE CPP, DeriveDataTypeable, MultiParamTypeClasses, FlexibleInstances, TypeFamilies, Rank2Types, ScopedTypeVariables #-} -- | -- Module : Data.Vector.Storable -- Copyright : (c) Roman Leshchinskiy 2009-2010 -- License : BSD-style -- -- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au> -- Stabil...
dolio/vector
Data/Vector/Storable.hs
bsd-3-clause
47,212
37
17
10,283
10,528
5,824
4,704
-1
-1
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleContexts #-} module Yesod.Auth.Rpxnow ( authRpxnow ) where import Yesod.Auth import qualified Web.Authenticate.Rpxnow as Rpxnow import Control.Monad (mplus) import Yesod.Core import Text.Hamlet (ha...
ygale/yesod
yesod-auth/Yesod/Auth/Rpxnow.hs
mit
2,199
0
19
578
567
303
264
48
3
module Inter.Edit where import Inter.CGI class Edit a where edit :: Monad m => a -> Form m a
Erdwolf/autotool-bonn
src/Inter/Edit.hs
gpl-2.0
100
0
9
26
41
21
20
4
0
{-# LANGUAGE RankNTypes, CPP #-} -- | Backend for Common Gateway Interface. Almost all users should use the -- 'run' function. module Network.Wai.Handler.CGI ( run , runSendfile , runGeneric , requestBodyFunc ) where import Network.Wai import Network.Wai.Internal import Network.Socket (getAddrInfo,...
kazu-yamamoto/wai
wai-extra/Network/Wai/Handler/CGI.hs
mit
7,459
0
35
2,262
1,995
1,041
954
163
7
module Layout00017 where foo = do if True then putStrLn "yep" else putStrLn "nope"
KasperJanssens/intellij-haskforce
tests/gold/parser/Layout00017.hs
apache-2.0
108
0
8
39
26
14
12
5
2
<?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="ar-SA"> <title>Custom Payloads Add-on</title> <maps> <homeID>custompayloads</homeID> <m...
thc202/zap-extensions
addOns/custompayloads/src/main/javahelp/org/zaproxy/zap/extension/custompayloads/resources/help_ar_SA/helpset_ar_SA.hs
apache-2.0
978
77
67
157
413
209
204
-1
-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="ro-RO"> <title>OAST Support Add-on</title> <maps> <homeID>oast</homeID> <mapref locatio...
thc202/zap-extensions
addOns/oast/src/main/javahelp/org/zaproxy/addon/oast/resources/help_ro_RO/helpset_ro_RO.hs
apache-2.0
965
77
67
157
413
209
204
-1
-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="ko-KR"> <title>Kotlin Support</title> <maps> <homeID>kotlin</homeID> <mapref location="...
kingthorin/zap-extensions
addOns/kotlin/src/main/javahelp/org/zaproxy/addon/kotlin/resources/help_ko_KR/helpset_ko_KR.hs
apache-2.0
962
77
66
156
407
206
201
-1
-1
module B where import A.Sig exclaimA :: A -> String exclaimA = (++ "!") . showA
sdiehl/ghc
testsuite/tests/backpack/cabal/T16219/library-a/B.hs
bsd-3-clause
82
0
6
18
31
19
12
4
1
module LetIn2 where --A definition can be removed if it is not used by other declarations. --Where a definition is removed, it's type signature should also be removed. --In this Example: remove the defintion 'square' sumSquares x y = let square x =x^2 --There is a comment ...
SAdams601/HaRe
old/testing/removeDef/LetIn2.hs
bsd-3-clause
403
0
9
125
78
40
38
7
1
module Foo where import Language.Haskell.Liquid.Prelude {-@ mycmp :: forall <p :: a -> Prop, q :: a -> Prop>. {x::a<p>, y::a<q> |- a <: {v:a | x <= y} } Ord a => [a<p>] -> [a<q>] -> Bool @-} mycmp :: Ord a => [a] -> [a] -> Bool mycmp (x:_) (_:y:_) = liquidAssert (x <= y) True {-...
mightymoose/liquidhaskell
tests/pos/CompareConstraints.hs
bsd-3-clause
1,385
0
15
508
288
149
139
18
1
{-# LANGUAGE TypeFamilies #-} module T6018Cfail where import T6018Bfail type instance H Int Char Bool = Bool type instance H Char Bool Int = Int
ezyang/ghc
testsuite/tests/typecheck/should_fail/T6018Cfail.hs
bsd-3-clause
150
0
4
30
36
22
14
5
0
module A012 where
urbanslug/ghc
testsuite/tests/driver/A012.hs
bsd-3-clause
18
0
2
3
4
3
1
1
0
{-# LANGUAGE FlexibleContexts #-} module Common.Util where import Common.Error import System.Random import System.Exit import Data.Map.Strict(Map) import qualified Data.Map.Strict as Map import Control.Monad.Except import Control.Monad.Random import Control.Arrow -- import Debug.Trace -- | Randomness, ala QC freq...
QuickChick/Luck
luck/src/Common/Util.hs
mit
3,425
0
13
955
1,464
772
692
72
3
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Ethereum.Trie.MapDB ( MapDB, runMapDB ) where import Control.Monad.State import qualified Data.Map as Map import Ethereum.Prelude type MapDB k v a = StateT (Map k v) Maybe a runMapDB :: Ord k => DB k v a -> MapDB k v a runMapDB = runDB putDB getDB where ...
bkirwi/ethereum-haskell
src/Ethereum/Trie/MapDB.hs
mit
509
0
13
139
179
92
87
17
1
Config { -- appearance font = "xft:DejaVu Sans Mono:size=9:bold:antialias=true" , bgColor = "black" , fgColor = "white" , position = BottomSize C 100 21 -- system info , commands = [ Run Memory ["-t", "MEM <fc=#7FFF7F><usedratio>%</fc>", "-w 3"] 10 , Run Cpu ["-t", "CPU <fc=#7FFF7F><total>...
yurizhykin/.xmonad
panels/botxmobar.hs
mit
993
0
9
286
190
114
76
-1
-1
module Flavour (Flavour (..)) where import Expression -- | 'Flavour' is a collection of build settings that fully define a GHC build. -- Note the following type semantics: -- * @Bool@: a plain Boolean flag whose value is known at compile time. -- * @Action Bool@: a flag whose value can depend on the build environment...
izgzhen/hadrian
src/Flavour.hs
mit
1,374
0
9
433
118
83
35
15
0
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.Attr (js_getName, getName, js_getSpecified, getSpecified, js_setValue, setValue, js_getValue, getValue, js_getOwnerElement, getOwnerElement, js_getIsId, getIsId, Attr, castToAttr, gTypeAttr)...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/Attr.hs
mit
3,127
38
10
452
803
463
340
48
1
module CallbackTests ( callingCallbacks ) where import Control.Concurrent.MVar import Control.Monad (when) import Data.Maybe (isNothing, isJust) import System.Timeout (timeout) import Test.HUnit import Gnatsd import Network.Nats -- | Check that callbacks are called when needed at connection and -- disconnect...
kosmoskatten/hats
test/CallbackTests.hs
mit
2,025
0
14
620
457
218
239
46
1
module TreeMap where data Tree a = Node (Tree a ) (Tree a) | Leaf a deriving (Show) treeMap :: (a -> b) -> Tree a -> Tree b treeMap f (Leaf a) = Leaf (f a) treeMap f (Node l r) = Node (treeMap f l) (treeMap f r) instance Functor Tree where fmap = treeMap
dservgun/haskell_test_code
src/TreeMap.hs
gpl-2.0
293
0
8
95
143
74
69
9
1
{-# LANGUAGE NoImplicitPrelude #-} module Lamdu.GUI.ExpressionEdit.ApplyEdit ( make ) where import Prelude.Compat import Control.Lens.Operators import Control.Lens.Tuple import Control.MonadA (MonadA) import Data.Store.Transaction (Transaction) import ...
rvion/lamdu
Lamdu/GUI/ExpressionEdit/ApplyEdit.hs
gpl-3.0
5,700
0
16
1,666
1,361
729
632
-1
-1
module CrackXor where import Data.List (sortBy, transpose) import Data.List.Split (chunksOf) import Data.Char import CryptoChallenge import Plaintext import XorEncode import Plaintext keyAlphabet :: Key --keyAlphabet = fromText (['a'..'z'] ++ ['A'..'Z'] ) keyAlphabet = [0..0xff] --keyAlphabet = fromText ['a'..'z'] ...
CharlesRandles/cryptoChallenge
crackxor.hs
gpl-3.0
2,292
0
11
566
807
442
365
44
1
module HEP.Automation.MadGraph.Dataset.Set20110315set14 where import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.Cluster import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Dataset.Common my_ssetup :: ...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110315set14.hs
gpl-3.0
1,692
0
10
410
356
219
137
46
1
module Util where import qualified Data.Vector.Unboxed.Mutable as UM import qualified Data.Text as T import Control.Monad import System.Random -- | Strips all whitespace from a Text. -- -- >>> :set -XOverloadedStrings -- >>> stripWhitespace "\t\tba na na \ns\t " -- "bananas" stripWhitespace :: T.Text -> T.Te...
dtrifuno/holz
src/Util.hs
gpl-3.0
649
0
12
129
231
126
105
14
1
{-# LANGUAGE Haskell2010 #-} module Simplex.Util ( when', ifElse, tail', tail'', skipOneSpace, (~=), (~~), (^=), units, removeIfExists, isLeft, isRight, getModificationTime', exec) where import Text.Regex import Data.Maybe import Control.Exception import Control.Monad import Data.Time import System.D...
scravy/simplex
src/Simplex/Util.hs
gpl-3.0
2,725
0
14
686
1,065
568
497
72
5
-- our local prelude, imports common to all modules module Import ( module Control.Applicative , module Control.Monad , module Data.List , module Data.Maybe , module System.Exit , module Text.Printf ) where import Control.Applicative ((<$>), (<*), (*>)) import Control.Monad (liftM, when, u...
simonmichael/shelltestrunner
src/Import.hs
gpl-3.0
442
0
5
84
107
71
36
13
0
f :: Either Int Double -> String
hmemcpy/milewski-ctfp-pdf
src/content/1.9/code/haskell/snippet10.hs
gpl-3.0
32
0
6
6
15
7
8
1
0
module Rebass.Cache(readCachedStatus, writeStatus) where import Rebass.RebassProject import Rebass.FileStatus import System.Directory(createDirectoryIfMissing, getHomeDirectory) import Rebass.Path import Control.Monad(liftM) readCachedStatus :: String -> IO RebassProjectStatus readCachedStatus projectName = do st...
codeflows/rebass
src/Rebass/Cache.hs
gpl-3.0
904
0
9
130
227
116
111
20
1
{-# LANGUAGE PatternGuards #-} module HipSpec.GHC.FreeTyCons (bindsTyCons,bindsTyCons',varTyCons,tyTyCons) where import CoreSyn import CoreUtils (exprType) import DataCon import TyCon import Id import Type import Var import Data.Set (Set) import qualified Data.Set as S bindsTyCons :: [CoreBind] -> [TyCon] bindsTyCon...
danr/hipspec
src/HipSpec/GHC/FreeTyCons.hs
gpl-3.0
1,898
0
13
480
723
366
357
45
10
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.AppsCalendar.Types -- Copyright : (c) 2015-2016 Brenda...
brendanhay/gogol
gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types.hs
mpl-2.0
10,299
0
7
2,786
1,277
871
406
362
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Languages/List.hs
mpl-2.0
4,545
0
18
1,112
726
421
305
104
1
module ProjectM36.DataTypes.Sorting where import ProjectM36.Base compareAtoms :: Atom -> Atom -> Ordering compareAtoms (IntegerAtom i1) (IntegerAtom i2) = compare i1 i2 compareAtoms (IntAtom i1) (IntAtom i2) = compare i1 i2 compareAtoms (DoubleAtom d1) (DoubleAtom d2) = compare d1 d2 compareAtoms (ScientificAtom s1) (...
agentm/project-m36
src/lib/ProjectM36/DataTypes/Sorting.hs
unlicense
1,272
0
8
208
451
222
229
32
14
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} module HW06 where import Data.Aeson import Data.Monoid import GHC.Generics import Data.List import qualified Data.ByteString.Lazy.Char8 as B import qualified Data.Text as T import qualified Data.Text.IO as T -- $setup -...
romanofski/codesnippets
haskellCIS194/homework6/HW06.hs
unlicense
2,795
0
10
643
622
348
274
50
2
module OrderedAlgebra where import Grouplike.Internal import Ringlike.Internal import Relation.Internal import Relation.Traits import Data.List import Data.Ord -- |An algebraic structure, combined with a partial -- order data OrderedStruct s o el t = OrderedStruct{ordStruct::s el t, ordOrder::o ...
jtapolczai/algebra
OrderedAlgebra.hs
apache-2.0
1,003
0
10
246
329
183
146
23
3
module Reddit.Actions.CaptchaSpec where import Reddit.Actions.Captcha import ConfigLoad import Test.Hspec isRight :: Either a b -> Bool isRight = const False `either` const True main :: IO () main = hspec spec spec :: Spec spec = describe "Reddit.Actions.Captcha" $ do (reddit, _, _) <- runIO loadConfig it "sh...
intolerable/reddit
test-io/Reddit/Actions/CaptchaSpec.hs
bsd-2-clause
435
0
12
84
137
72
65
14
1
{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} -- | Tracing/Debugging support - Trace Implementation module Control.Distributed.Process.Management.Internal.Trace.Tracer ( -- * API for the Management Agent traceController -- * Built in tracers , defaultTracer , systemLoggerTracer , logfileTr...
mboes/distributed-process
src/Control/Distributed/Process/Management/Internal/Trace/Tracer.hs
bsd-3-clause
12,435
0
26
3,470
3,317
1,729
1,588
272
7
module D8Spec (main, spec) where import Test.Hspec import D8Lib import qualified Text.Parsec as P main :: IO () main = hspec spec spec :: Spec spec = parallel $ do describe "screen" $ do it "basic set/show functionality" $ do let s = screen 2 2 show s `shouldBe` "..\n..\n" ...
wfleming/advent-of-code-2016
2016/test/D8Spec.hs
bsd-3-clause
2,841
0
21
1,108
955
460
495
68
1
module Data.Astro.CoordinateTest ( tests , testEC1 , testEcC ) where import Test.Framework (testGroup) import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.HUnit import Test.HUnit.Approx import Test.QuickCheck import Control.Monad (unless) import Data.As...
Alexander-Ignatyev/astro
test/Data/Astro/CoordinateTest.hs
bsd-3-clause
7,538
0
15
2,153
2,569
1,320
1,249
141
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UndecidableInstances #-} {-# LA...
sonyandy/wart
src/Control/Lens/Tuple/Generics.hs
bsd-3-clause
2,484
0
13
741
1,112
623
489
63
1
module Penny.Report where import Data.Sequence (Seq) import Data.Text (Text) import Rainbow (Chunk) import Penny.Clatch.Types import Penny.Colors import Penny.Cursor import Penny.Popularity import Penny.Price -- | Type for user-facing reports. type Report = Seq (Price (Maybe Cursor)) -> Colors -> History ->...
massysett/penny
penny/lib/Penny/Report.hs
bsd-3-clause
371
0
13
62
122
68
54
15
0
module GUI.MainWindow ( MainWindow, mainWindowNew, MainWindowActions(..), setFileLoaded, setStatusMessage, sidebarSetVisibility, eventsSetVisibility, ) where import Paths_threadscope -- Imports for GTK import Graphics.UI.Gtk as Gtk import qualified System.Glib.GObject as Glib -------...
ml9951/ThreadScope
GUI/MainWindow.hs
bsd-3-clause
7,593
0
11
1,683
1,523
715
808
-1
-1
module Crypto.Curve25519( module Crypto.Curve25519.Exceptions ) where import Crypto.Curve25519.Exceptions
acw/curve25519
src/Crypto/Curve25519.hs
bsd-3-clause
124
0
5
26
21
14
7
3
0
{-# LANGUAGE OverloadedStrings #-} module JKF.Parser.Kif ( parseKifu ) where -- import qualified JKF.Type as Type import JKF.Parser.Kif.Internal import Text.Parsec import Text.Parsec.Char import Text.Parsec.String import Text.ParserCom...
suzuki-shin/jkf-hs
src/JKF/Parser/Kif.hs
bsd-3-clause
508
0
9
151
99
59
40
13
2
module Test.Common where import System.Directory cleanStateDir :: IO() cleanStateDir = do exists <- doesDirectoryExist "state" if exists then removeDirectoryRecursive "state" else createDirectory "state"
bonnefoa/org-monad
testsuite/src/Test/Common.hs
bsd-3-clause
225
0
8
44
53
27
26
8
2
{-# LANGUAGE ScopedTypeVariables, FlexibleContexts, OverlappingInstances, TypeFamilies, RecordWildCards #-} module YaLedger.Reports.Stats (Stats (..), StatRecord (..), calculate, toDouble, toList) where import Text.Printf import qualified Data.Vector as V import Statistics.Sample import Statistics.Quantile im...
portnov/yaledger
YaLedger/Reports/Stats.hs
bsd-3-clause
12,082
0
22
3,928
3,851
1,970
1,881
241
6
module State.Themes ( listThemes , setTheme ) where import Prelude () import Prelude.MH import Brick.Themes ( themeToAttrMap ) import qualified Data.Text as T import Lens.Micro.Platform ( (.=) ) import State.Common import Themes import T...
aisamanra/matterhorn
src/State/Themes.hs
bsd-3-clause
753
0
14
253
185
102
83
-1
-1
-- Unpack a tarball containing a Cabal package {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleContexts #-} module Distribution.Server.Packages.Unpack ( unpackPackage, unpackPackageRaw, ) where import qualified Codec.Archive.Tar as Tar import qualified Codec.Archive.Tar.Entry as Tar i...
chrisdotcode/hackage-server
Distribution/Server/Packages/Unpack.hs
bsd-3-clause
15,610
0
20
3,681
3,055
1,613
1,442
265
6
{-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} module RoadMap where import Control.Lens import Control.Applicative ((<$>)) -- One possible specification for the languages we care about: they have both an -- ev...
ezrosent/s-explore
src/RoadMap.hs
bsd-3-clause
1,685
0
9
354
245
144
101
23
0
module Main where import Control.Monad import System.Exit import System.Environment import System.Directory (doesFileExist) import System.Cmd (rawSystem) import L5.ParL import L5.ErrM import L5ToBinary.Compile import Paths_schemeCompiler main :: IO () main = do args <- getArgs when (length args /= 1) $ do ...
mhuesch/scheme_compiler
src/L5ToBinary/Main.hs
bsd-3-clause
1,101
0
17
286
340
164
176
34
3
{-# OPTIONS_HADDOCK hide #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.Functions.F01 -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : por...
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F01.hs
bsd-3-clause
63,927
0
30
8,315
10,205
5,308
4,897
1,087
1
{-# LANGUAGE ScopedTypeVariables #-} module VirtualHom.Rendering( RenderingOptions, renderingOptions, targetDivId, onElementChanged ) where import Control.Lens import Data.Text (Text) import VirtualHom.Internal.Element (RenderingAction, elementId) import VirtualHom.Internal.Rendering -- | Callbac...
j-mueller/virtual-hom
src/VirtualHom/Rendering.hs
bsd-3-clause
705
0
10
113
137
79
58
14
1
module FooParserSpec where import Test.Hspec import FooParser import Text.Megaparsec spec :: Spec spec = describe "parses stuff" $ do it "parses one word" $ do runParser parseWord "" "<foo>" `shouldBe` Right "foo" it "parses one word with dash" $ do runParser parseWord "" "<foo-bar>" `shouldBe` ...
frontrowed/pragmatic-haskell
test/FooParserSpec.hs
bsd-3-clause
984
0
14
224
292
150
142
25
1
{-| This module provides webhook handlers both general and WAI-specific. -} module Line.Messaging.Webhook ( -- * Types -- | Re-exported for convenience. module Line.Messaging.Webhook.Types, -- * Basic webhook webhook, -- * Webhook as a WAI application webhookApp, defaultOnFailure, -- * Webhook as a S...
noraesae/line
src/Line/Messaging/Webhook.hs
bsd-3-clause
4,804
0
19
998
810
448
362
68
3
<?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="id-ID"> <title>Konteks Filter Peringatan | Eksistensi ZAP</title> <maps> <homeID>top</homeI...
veggiespam/zap-extensions
addOns/alertFilters/src/main/javahelp/org/zaproxy/zap/extension/alertFilters/resources/help_id_ID/helpset_id_ID.hs
apache-2.0
988
80
66
161
417
211
206
-1
-1
{- | Module : Data.DRS.Input.Boxer Copyright : (c) Harm Brouwer and Noortje Venhuizen License : Apache-2.0 Maintainer : me@hbrouwer.eu, n.j.venhuizen@rug.nl Stability : provisional Portability : portable Converts Boxer's Prolog output to DRS -} module Data.DRS.Input.Boxer ( PrologDRS , boxerToD...
hbrouwer/pdrt-sandbox
src/Data/DRS/Input/Boxer.hs
apache-2.0
11,233
0
19
3,249
3,343
1,727
1,616
133
4
-- | -- Copyright : (c) Sam Truzjan 2013 -- License : BSD3 -- Maintainer : pxqr.sta@gmail.com -- Stability : experimental -- Portability : portable -- -- The return value for a query for peers includes an opaque value -- known as the 'Token'. For a node to announce that its controlling -- peer i...
DavidAlphaFox/bittorrent
src/Network/BitTorrent/DHT/Token.hs
bsd-3-clause
3,936
0
10
800
579
353
226
-1
-1
-- | Type-safe client-server communication framework for Haste. -- -- In addition to the Haste.App extras, this module exports the same API as -- "Haste", modified slightly to work better with the automatic program -- slicing Haste.App provides. This means that you should import either this -- module *or* Haste...
akru/haste-compiler
libraries/haste-lib/src/Haste/App.hs
bsd-3-clause
1,040
0
6
183
203
137
66
23
0
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "Data/Primitive/MachDeps.hs" #-} {-# LANGUAGE CPP, MagicHash #-} -- | -- Module : Data.Primitive.MachDeps -- Copyright : (c) Roman Leshchinskiy 2009-2012 -- License : BSD-style -- -- Maintainer : Roman Leshchinskiy <...
phischu/fragnix
tests/packages/scotty/Data.Primitive.MachDeps.hs
bsd-3-clause
2,026
0
4
676
264
190
74
71
1
import BasicPrelude import Criterion.Main import qualified Data.Aeson as A import qualified Data.Binary as B import qualified Data.ByteString.Base64 as Base64 import qualified Data.ByteString.Lazy as LBS import SwiftNav.SBP -- | Message length and dispatch overhead for SBP serialization and -- deserialization (on loca...
mookerji/libsbp
haskell/bench/Bench.hs
lgpl-3.0
5,073
0
13
1,368
701
374
327
57
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANG...
dbp/snaplet-wordpress
src/Web/Offset.hs
bsd-3-clause
1,057
0
5
252
197
139
58
43
0
{-# LANGUAGE BangPatterns, CPP, Rank2Types #-} {-# OPTIONS_HADDOCK not-home #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Text.Internal.Builder -- Copyright : (c) 2013 Bryan O'Sullivan -- (c) 2010 Johan Tibell -- License : BSD3-style (s...
spencerjanssen/text
Data/Text/Internal/Builder.hs
bsd-2-clause
10,501
0
17
2,450
1,872
1,033
839
154
2
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} -- | Contains a debug function to dump parts of the hsSyn AST. It uses a syb -- traversal which falls back to displaying based on the constructor name, so ...
ezyang/ghc
compiler/hsSyn/HsDumpAst.hs
bsd-3-clause
7,666
0
25
3,073
2,058
1,071
987
150
18
{-# LANGUAGE ExistentialQuantification #-} -- !!! Tests existential data types -- Originally from Kevin Glynn module Main(main) where data Coordinate3D = Coord3D {cx, cy, cz::Double} deriving (Eq, Show) -- We Represent a line by two coordinates which it passes through. data Line = MkLine Coord...
ezyang/ghc
testsuite/tests/typecheck/should_run/tcrun004.hs
bsd-3-clause
2,162
0
9
712
463
255
208
45
1
module Roles12 where import Roles12a data T a
siddhanathan/ghc
testsuite/tests/roles/should_fail/Roles12.hs
bsd-3-clause
48
0
3
10
11
8
3
-1
-1
module Main where foreign import ccall "foo" c_foo :: Int main = print c_foo
sdiehl/ghc
testsuite/tests/rts/T14611/main.hs
bsd-3-clause
79
0
5
16
24
14
10
3
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Data.Git.Blob ( Blob(..), HasBlob(..) , newBlobBase , createBlob , getBlobContents , writeBlob ) where import Data.ByteString as B hiding (map) import Data.ByteString.Unsafe import ...
dabrahams/gitlib
Data/Git/Blob.hs
mit
3,623
4
19
1,088
1,004
517
487
-1
-1
module Pdr ( tests ) where import Algorithm.Pdr import Algorithm.Pdr.State import Domain import Domain.LiaDomain import Domain.Trans.LocationAwareDomain import Monitor import Monitor.IOMonitor import System hiding ( name ) import System.Expression import Utils.Miscellaneous import Data.Array import Data.Map import D...
d3sformal/bacon-core
test/Pdr.hs
mit
2,195
0
15
753
848
449
399
58
1
maybeHead :: [a] -> Maybe a maybeHead [] = Nothing maybeHead (x:xs) = Just x f :: [a] -> Bool f xs = case maybeHead xs of Nothing -> False Just _ -> True
proudzhu/proudzhu.github.io
_code/2016-06-17-Optional-Type-In-C++/maybe_example.hs
mit
179
0
8
59
86
43
43
7
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Web.Welshy ( welshy, welshyApp -- * Middleware & Routing , Welshy, middleware, route, RoutePattern , get, post, put, patch, delete, head, options -- * Actions , Action , h...
mcschroeder/welshy
Web/Welshy.hs
mit
4,963
0
13
1,137
1,144
627
517
91
5
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} module Keter.Types.V10 where import Control.Applicative ((<$>), (<*>), (<|>)) import Data.Aeson ...
snoyberg/keter
Keter/Types/V10.hs
mit
19,038
0
37
5,943
4,648
2,449
2,199
518
2
module Rebase.GHC.IO.Encoding.UTF8 ( module GHC.IO.Encoding.UTF8 ) where import GHC.IO.Encoding.UTF8
nikita-volkov/rebase
library/Rebase/GHC/IO/Encoding/UTF8.hs
mit
104
0
5
12
26
19
7
4
0
module BlocVoting.Instructions.Cast where import qualified Data.ByteString as BS import qualified BlocVoting.Nulldata as ND import BlocVoting.Bitcoin.Address import BlocVoting.Bitcoin.Base58 import BlocVoting.Binary (get1ByteInt) import BlocVoting.Instructions (op_CAST) data OpCast = OpCast { castScalar :: Int ...
XertroV/blocvoting
src/BlocVoting/Instructions/Cast.hs
mit
812
0
10
139
266
145
121
21
2