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
<?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="zh-CN"> <title>Support for the Open API Specification | ZAP Extension</title> <maps> <homeI...
veggiespam/zap-extensions
addOns/openapi/src/main/javahelp/org/zaproxy/zap/extension/openapi/resources/help_zh_CN/helpset_zh_CN.hs
apache-2.0
1,000
80
66
164
423
214
209
-1
-1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.IndexUtils -- Copyright : (c) Duncan Coutts 2008 -- License : BSD-like -- -- Maintainer : duncan@community.haskell.org -- Stability : provisional -- Portability : p...
DavidAlphaFox/ghc
libraries/Cabal/cabal-install/Distribution/Client/IndexUtils.hs
bsd-3-clause
24,027
0
21
6,309
4,908
2,547
2,361
412
11
-- {-# OPTIONS_GHC -Wno-redundant-constraints -Wno-simplifiable-class-constraints #-} {-# LANGUAGE UndecidableInstances, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} module T3108 where -- Direct recursion terminates (typechecking-wise) class C0 x where m0 :: x -> () m0 = const...
rahulmutt/ghcvm
tests/suite/typecheck/compile/T3108.hs
bsd-3-clause
965
0
8
183
258
141
117
-1
-1
{-# LANGUAGE TemplateHaskell,DeriveDataTypeable,BangPatterns #-} module Main where import Remote import Remote.Process (roundtripResponse,setRemoteNodeLogConfig,getConfig,PayloadDisposition(..),roundtripQuery,roundtripQueryMulti) import KMeansCommon import Control.Exception (try,SomeException,evaluate) import Control...
jepst/CloudHaskell
examples/kmeans/KMeans.hs
bsd-3-clause
8,229
0
25
2,929
2,350
1,220
1,130
126
3
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : ...
rahulmutt/ghcvm
libraries/base/Control/Monad.hs
bsd-3-clause
9,327
0
12
2,241
1,476
856
620
114
2
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE CPP, DeriveDataTypeable, DeriveFunctor #-} -- | CoreSyn holds all the main data types for use by for the Glasgow Haskell Compiler midsection module CoreSyn ( -- * Main data types Expr(..), A...
nushio3/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
73,179
0
14
19,898
8,479
4,816
3,663
593
5
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Data/IntMap/Internal.hs" #-} {-# LANGUAGE CPP #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE MagicHash, DeriveDataTypeable, StandaloneDeriving #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE ...
phischu/fragnix
tests/packages/scotty/Data.IntMap.Internal.hs
bsd-3-clause
114,732
0
21
29,173
27,075
14,011
13,064
1,603
14
{-# OPTIONS_JHC -fffi -funboxed-values #-} module Data.Typeable(TypeRep(),Typeable(..),Typeable1(..),Typeable2(..)) where import Jhc.Prim import Jhc.String type String_ = BitsPtr_ data TypeRep = TypeRep String_ [TypeRep] showsAddr__ :: String_ -> [Char] -> [Char] showsAddr__ a xs = unpackStringFoldr a (:) xs inst...
m-alvarez/jhc
lib/haskell-extras/Data/Typeable.hs
mit
4,497
2
12
1,076
929
483
446
62
2
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances, FlexibleContexts, EmptyDataDecls, ScopedTypeVariables, TypeOperators, TypeSynonymInstances, TypeFamilies #-} --module Main where import Records import References import ReferenceMonad import Methods {- key = firs...
vs-team/Papers
Before Giuseppe's PhD/Monads/ObjectiveMonad/MonadicObjects/trunk/Src/Main.hs
mit
3,251
0
15
745
606
317
289
39
1
-- | PDF viewer demo -- Author : Andy Stewart -- Copyright : (c) 2010 Andy Stewart <lazycat.manatee@gmail.com> -- | The PDF viewer base on poppler library. -- -- Usage: -- pdfviewer file -- module Main where import Control.Applicative import Control.Concurrent.STM import Control.Monad import Data.May...
wavewave/poppler
demo/PdfViewer.hs
lgpl-2.1
3,804
0
13
871
960
478
482
91
3
{-# LANGUAGE ScopedTypeVariables #-} import StackTest import System.Directory import Control.Exception (catch, IOException) main :: IO () main = do removeFileIgnore "stack.yaml" createDirectory "unreachabledir" `catch` \(e :: IOException) -> pure () setPermissions "unreachabledir" emptyPermissions sta...
juhp/stack
test/integration/tests/skip-unreachable-dirs/Main.hs
bsd-3-clause
332
0
10
53
90
46
44
10
1
module E5 where data BTree a = Empty | T a (BTree a) (BTree a) deriving Show buildtree :: Ord a => [a] -> BTree a buildtree [] = Empty buildtree ((x : xs)) = head (insert x (buildtree xs)) insert :: Ord a => a -> (BTree a) -> [BTree a] insert val v2 = do case v2 of T val Empty Empty ...
kmate/HaRe
old/testing/unfoldAsPatterns/E5AST.hs
bsd-3-clause
1,090
0
16
635
353
181
172
25
3
module DuplicateModuleName (Window(..)) where data Window = Window deriving (Show)
ezyang/ghc
testsuite/tests/typecheck/T13168/package1/DuplicateModuleName.hs
bsd-3-clause
84
0
6
11
27
17
10
2
0
{-# LANGUAGE TypeFamilies, ConstraintKinds, UndecidableInstances, UndecidableSuperClasses #-} module Ctx where import Data.Kind ( Constraint ) type family Indirect :: * -> Constraint type instance Indirect = Show class Indirect a => Cls a where foo :: Cls a => a -> String foo = show
ezyang/ghc
testsuite/tests/typecheck/should_compile/tc256.hs
bsd-3-clause
288
0
6
49
72
40
32
-1
-1
module T4114dSub (assertKeep, assertNoKeep) where import Control.Monad (unless, when) import System.Directory (doesFileExist) assertNoKeep :: FilePath -> IO () assertNoKeep a = whenM (doesFileExist a) $ error ("error: intermediate '" ++ a ++ "' exists") assertKeep :: FilePath -> IO () assertKeep a = ...
ezyang/ghc
testsuite/tests/driver/T4114dSub.hs
bsd-3-clause
574
0
9
133
247
124
123
15
1
module Player where import GameEngine playerX :: Player playerX = Player 'X' playerO :: Player playerO = Player 'O' -- workaround since the Player data type is not an instance of eq isPlayer :: Player -> Player -> Bool isPlayer (Player a) (Player b) = a == b isPlayerSymbol :: Player -> Symbol -> Bool isPlayerS...
TGOlson/haskell-tic-tac-toe
Src/Player.hs
mit
500
0
7
92
139
75
64
14
1
-- Recursiveness -- Gets the biggest value in a list -- This version uses guards maximum' :: (Ord a) => [a] -> a maximum' [] = error "no max for empty lists" maximum' [x] = x maximum' (x:y) | x > maxTail = x | otherwise = x where maxTail = maximum' y -- We can improve this by using `max` shortMax :: (Ord a) =>...
lucasfcosta/haskell-experiences
Chapter 5/recursiveness.hs
mit
1,737
0
12
434
742
395
347
40
1
module LC where import Data.List (sort) kthLargest :: Int -> [Int] -> Int kthLargest k = last . take k . sort
AriaFallah/leetcode
haskell/KthLargest.hs
mit
112
0
7
24
49
27
22
4
1
{-| Module : PostgREST.DbStructure Description : PostgREST schema cache This module contains queries that target PostgreSQL system catalogs, these are used to build the schema cache(DbStructure). The schema cache is necessary for resource embedding, foreign keys are used for inferring the relationships between t...
begriffs/postgrest
src/PostgREST/DbStructure.hs
mit
37,710
0
21
10,645
4,568
2,419
2,149
254
5
module LoggingSpec (spec, main) where import Control.Monad.Except (runExceptT) import Data.Either.Combinators (fromRight') import Data.Monoid ((<>)) import Network.AWS.S3.Types (BucketName(..)) import Network.AWS.Types (Region(..)) import Test.Hspec ( describe , context , shouldBe ...
SEEK-Org/evaporate
test/LoggingSpec.hs
mit
4,260
0
23
1,310
866
443
423
105
1
module Data.Rational where import Prelude hiding (Rational) import Data.Maybe import Data.List import Data.Function data Rational = Rational { numerator :: Integer , denominator :: Integer } instance Show Rational where show r = show (numerator r) ++ "/" ++ show (denominator r) instance Read Ration...
gallais/dailyprogrammer
easy/226/Data/Rational.hs
mit
768
0
11
200
320
175
145
20
1
module Core.CorePrelude(preludeDefs) where import Core.CoreExpr preludeDefs :: CoreProgram preludeDefs = [ ("I", ["x"], EVar "x"), ("K", ["x","y"], EVar "x"), ("K1",["x","y"], EVar "y"), ("S", ["f","g","x"], EAp (EAp (EVar "f") (EVar "x")) (EAp (EVar "g") (...
binesiyu/ifl
Core/CorePrelude.hs
mit
524
0
11
169
250
143
107
12
1
ms = [getChar, getChar] s1 :: Monad m => [m a] -> m [a] s1 [] = return [] s1 (m:ms) = m >>= \ a -> do as <- s1 ms return (a:as) -- can't >>= on return () <-- needs to be return [] {-s2 :: Monad m => [m a] -> m [a]-} {-s2 ms = foldr func (return ()) ms-} {-where-} {-func :: (Monad m) => m a ...
adz/real_world_haskell
edx-fp1/sequence.hs
mit
1,428
0
11
489
351
189
162
21
1
{-# language ScopedTypeVariables #-} module Control.Unification.IntVar.Extras (liftCatch) where import Control.Unification.IntVar import Control.Monad.Signatures (Catch) import Control.Monad.Trans (lift) import qualified Control.Monad.State.Class as St runWithState :: St.MonadState s m => s -> m a -> m a runWithState...
lambdageek/use-c
src/Control/Unification/IntVar/Extras.hs
mit
844
0
11
156
292
154
138
16
1
import Data.Array import Data.Maybe (catMaybes) import qualified Data.Heap as H import qualified Data.Set as S import Debug.Trace --trace _ b = b main = do input <- readFile "p083_matrix.txt" print $ process input process input = lookup (Point (1,1)) $ solve $ matrixArray $ toMatrix input type Score...
arekfu/project_euler
p0083/p0083.hs
mit
2,889
0
12
798
1,351
723
628
59
2
-- statemonads.hs import Control.Monad.State
gitrookie/functionalcode
code/Haskell/snippets/statemonads.hs
mit
48
0
4
7
8
5
3
1
0
import Data.Matrix import Hungarian import System.Random import Criterion.Main import Control.DeepSeq (($!!)) data NamedMatrix a = NMatrix String (Matrix a) instance (Show a) => Show (NamedMatrix a) where show (NMatrix string matr) = "\n\n" ++ string ++ "\n\n" ++ show matr main = do putStrLn "Enter a numb...
jjeffrey/hungarian
CriterionTests.hs
mit
1,929
12
16
453
592
304
288
38
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE NamedFieldPuns #-} module Server.Web where import Data.String (fromString) import Web.Scotty import Network.HTTP.Types (status404) import Network.Wai.Middleware.RequestLogger (logStdoutDev) import Server.Types import...
best-coloc-ever/twitch-cast
streamer/app/Server/Web.hs
mit
1,425
0
13
280
376
192
184
35
1
{-| Module : Sivi.Operation.Types Description : Type declarations Copyright : (c) Maxime ANDRE, 2015 License : GPL-2 Maintainer : iemxblog@gmail.com Stability : experimental Portability : POSIX -} module Sivi.Operation.Types ( Transformation , Operation ...
iemxblog/sivi-haskell
src/Sivi/Operation/Types.hs
gpl-2.0
3,199
0
10
808
450
275
175
46
1
import Data.Char import System.IO n :: Integer n = 1348960361041021334462089549731185308007430447114193036304565352952043047718001008926095934307028333093870823539599921618654385231956717609461426578092289388243138657606308329801607274070842048645447063878906550831795184551555205018216816068743464636982159166276324182...
Qwaz/solved-hacking-problem
HITCON/2019 Quals/very_simple_haskell/prob.hs
gpl-2.0
2,051
6
12
504
788
394
394
47
2
{-# LANGUAGE OverloadedStrings #-} module TestHttpConduit (runGoogle) where import Network.HTTP.Conduit import Data.Conduit import Data.Conduit.Binary(sinkFile) import qualified Data.ByteString.Lazy as L import Control.Monad.IO.Class (liftIO) -- Process the result byte string by saving the transaction in -- the d...
dservgun/haskell_test_code
src/TestHttpConduit.hs
gpl-2.0
1,227
0
14
353
165
93
72
17
1
{-# LANGUAGE OverloadedStrings #-} module Lib.Parallelism ( ParId , Parallelism, new , Cell , Priority(..) , startAlloc , withReleased ) where import Control.Concurrent.MVar import Control.Monad import Data.IORef import Lib.Exception (bracket, bracket_, finally) import Lib.IORef (atomicModifyIORef_) impo...
nadavshemer/buildsome
src/Lib/Parallelism.hs
gpl-2.0
3,029
0
20
624
712
377
335
56
5
module Codegen( cGen, runtimeCode, runtimeMain ) where import Bytecode import Data.List type CCode = String type Prototype = String runtimeCode :: IO String runtimeCode = readFile "lib/runtime.c" runtimeMain :: IO String runtimeMain = readFile "lib/runtime_main.c" cGen :: CompiledFun -> ([Prototype...
dosenfrucht/beagle
src/Codegen.hs
gpl-2.0
2,174
0
12
682
656
339
317
54
9
module Functions.Algebra (incSum ) where incSum :: (Float -> Float) -> Float -> Float -> Float incSum f sumMinBound sumMaxBound = sum [f i | i <- [sumMinBound .. sumMaxBound]]
LeoMingo/RPNMathParser
Functions/Algebra.hs
gpl-3.0
180
0
9
34
70
38
32
4
1
module Infsabot.Strategy.Random.Interface( complexity, cRandom, randomChecks ) where import Infsabot.Strategy.Random.Tests import Infsabot.Strategy.Random.Logic
kavigupta/Infsabot
Infsabot/Strategy/Random/Interface.hs
gpl-3.0
189
0
4
39
33
23
10
5
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/ExternalVPNGateways/TestIAMPermissions.hs
mpl-2.0
4,589
0
17
1,016
475
283
192
86
1
module Grouch.Simulation.PaperTrade where import Grouch.Data import Grouch.Games.Common import Grouch.Bots.Blackjack import Grouch.Games.Blackjack import Grouch.Logging.Logger import Data.Maybe import Control.Arrow ((&&&)) import Control.Concurrent (threadDelay) import Control.Monad.Trans.State import Control.Monad.T...
tetigi/hlol
src/HLol/Simulation/PaperTrade.hs
agpl-3.0
7,220
0
16
1,545
2,043
1,065
978
129
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} module CountdownGame.State.Snapshots ( Snapshot , takeSnapshot )where import GHC.Generics (Generic) import Data.Aeson (ToJSON) import Data.Function (on) import Data.Text (Text) import Data.Time.Clock (UTCTime, getCurrentTime, diff...
CarstenKoenig/DOS2015
CountdownGame/src/web/CountdownGame/State/Snapshots.hs
unlicense
1,390
0
9
234
382
220
162
39
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Kubernetes.V1.Probe where import GHC.Generics import Kubernetes.V1.ExecAction import Kubernetes.V1.HTTPGetAction import Kubernetes.V1.TCPSocket...
minhdoboi/deprecated-openshift-haskell-api
kubernetes/lib/Kubernetes/V1/Probe.hs
apache-2.0
1,904
0
9
310
166
101
65
23
0
-- -- Copyright 2017 Andrew Dawson -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed t...
aopp-pred/fp-truncate
test/Test/Truncate/Arbitrary.hs
apache-2.0
3,208
0
11
663
624
358
266
53
1
{- Copyright 2020 The CodeWorld Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicab...
google/codeworld
codeworld-compiler/test/testcases/programCalledMain/source.hs
apache-2.0
643
0
6
119
13
7
6
1
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} -- | Constructors for K3 Expressions. This module should almost certainly be imported qualified. module Language.K3.Core.Constructor.Expression ( immut, mut, constant, variable, some, indirect, tuple, unit, record, ...
yliu120/K3
src/Language/K3/Core/Constructor/Expression.hs
apache-2.0
4,212
0
10
871
1,430
748
682
89
2
module Handler.Gallery where import Import import qualified Data.Map as M import Andon.Theme import Andon.Gallery getGalleryR :: Handler RepHtml getGalleryR = defaultLayout $ do setTitle "Gallery" $(widgetFile "gallery")
amutake/andon-yesod
Handler/Gallery.hs
bsd-2-clause
234
0
10
40
60
33
27
9
1
{-| PyValueInstances contains instances for the 'PyValue' typeclass. The typeclass 'PyValue' converts Haskell values to Python values. This module contains instances of this typeclass for several generic types. These instances are used in the Haskell to Python generation of opcodes and constants, for example. -} {-...
apyrgio/snf-ganeti
src/Ganeti/PyValueInstances.hs
bsd-2-clause
2,991
0
13
533
473
253
220
39
0
module Exercises.BalancedParenthesesSpec (main, spec) where import Test.Hspec import Exercises.BalancedParentheses main :: IO () main = hspec spec spec :: Spec spec = describe "isValid" $ do context "when input string is empty" $ it "valid" $ isValid "" `shouldBe` True context "when input st...
WarKnife/exercises
test/Exercises/BalancedParenthesesSpec.hs
bsd-3-clause
837
0
12
218
227
113
114
24
1
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Duration.DA.Rules ( rules ) where i...
facebookincubator/duckling
Duckling/Duration/DA/Rules.hs
bsd-3-clause
3,472
0
18
809
909
510
399
100
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInst...
wdanilo/algebraic
src/Math/Coordinate/LogPolar.hs
bsd-3-clause
3,802
0
11
892
1,125
618
507
87
1
-- ------------------------------------------------------------ {- | Module : Yuuko.Text.XML.HXT.Arrow.DocumentInput Copyright : Copyright (C) 2005 Uwe Schmidt License : MIT Maintainer : Uwe Schmidt (uwe@fh-wedel.de) Stability : experimental Portability: portable Version : $Id$ St...
nfjinjing/yuuko
src/Yuuko/Text/XML/HXT/Arrow/DocumentInput.hs
bsd-3-clause
11,803
312
19
3,012
2,491
1,344
1,147
279
2
{-# LANGUAGE OverloadedStrings, RecordWildCards, ScopedTypeVariables #-} -- Reindents the type signature of Haskell functions. {-# LANGUAGE OverloadedStrings, RecordWildCards, ScopedTypeVariables #-} -- For use within a text editor like Vim. module Main where import Text.Parsec import qualified Text.Parsec.Token as...
danchoi/ftindent
Main.hs
bsd-3-clause
3,060
0
11
729
763
390
373
74
2
module Language.BCoPL.DataLevel.CompareNat ( -- * Types Nat (..) , Judge (..) -- * Deducer , deduce1 , deduce2 , deduce3 -- * Session for deriving judgement on comparing 'Nat' , session1 , session2 , session3 , session1' , session2' , session3' ) where import Language.BCoPL.DataLe...
nobsun/hs-bcopl
src/Language/BCoPL/DataLevel/CompareNat.hs
bsd-3-clause
2,053
0
13
635
753
408
345
51
3
import Data.Numbers.Primes decompose :: Int -> [Int] decompose n = factor primes n where factor (p:ps) n | (p*p) > n = [n] | mod n p == 0 = p : (factor (p:ps) (div n p)) | otherwise = factor ps n main :: IO () main = print (last (decompose 600851475143))
JacksonGariety/euler.hs
003.hs
bsd-3-clause
289
0
10
87
160
80
80
9
1
module Network.Hawk.Internal.Server.Header ( header , headerSuccess , headerFail , timestampMessage ) where import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as S8 import Data.Time.Clock.POSIX import Data.Maybe (catMaybes) i...
rvl/hsoz
src/Network/Hawk/Internal/Server/Header.hs
bsd-3-clause
2,398
0
13
463
670
372
298
40
3
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE Record...
bergey/plots
src/Plots/Types/Others.hs
bsd-3-clause
13,554
0
14
4,464
3,953
2,054
1,899
227
1
import XMonad import XMonad.Config.Gnome import XMonad.Actions.CycleWS import XMonad.Hooks.SetWMName import XMonad.Layout.NoBorders (smartBorders) import XMonad.Layout.Spacing (smartSpacing) import qualified Data.Map as M myManageHook = composeAll ( [ manageHook gnomeConfig , className =? "Unity-2d-panel" --> ...
dgtized/dotfiles
dot/xmonad/xmonad.hs
bsd-3-clause
1,162
0
11
305
296
176
120
27
1
module Main where import ABS (x:i:ni:num_div:obj:i_divides:f:n:primeb:reminder:res:nprimes:fv:the_end) = [1..] main_ :: Method main_ [] this wb k = Assign n (Val (I 1500)) $ Assign x (Sync check_primes [n]) $ k check_primes :: Method check_primes [pn] this wb k = Assign nprimes (Val (I 0)) $ Assign i (Val...
abstools/abs-haskell-formal
benchmarks/5_primes_range/progs/1500.hs
bsd-3-clause
1,528
0
20
408
916
457
459
51
1
module Database.Seakale.Request ( query , query_ , queryWith , execute , execute_ , executeMany , executeMany_ , returning , returningWith , returning_ , returningWith_ , MonadRequest , throwSeakaleError , getBackend ) where import Database.Seakale.Request.Internal (MonadRequest...
thoferon/seakale
src/Database/Seakale/Request.hs
bsd-3-clause
4,084
0
13
977
1,211
622
589
69
2
module General.GetOpt( OptDescr(..), ArgDescr(..), getOpt, fmapFmapOptDescr, showOptDescr, mergeOptDescr, removeOverlap, optionsEnum, optionsEnumDesc ) where import qualified System.Console.GetOpt as O import System.Console.GetOpt hiding (getOpt) import qualified Data.HashSet as Se...
ndmitchell/shake
src/General/GetOpt.hs
bsd-3-clause
2,509
0
15
665
1,094
573
521
48
6
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ParallelListComp #-} {-# LANGUAGE MultiParamTypeClasses #-} module KMC.SymbolicSST.ActionSST(ActionSST, ConstOrAnyLab(..), actionToSST) where import Data.Functor.Identity import qualified Data.M...
diku-kmc/repg
src/KMC/SymbolicSST/ActionSST.hs
mit
5,408
1
19
1,479
2,062
1,101
961
98
5
-- This Source Code Form is subject to the terms of the Mozilla Public -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. {-# LANGUAGE ApplicativeDo #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} modul...
tel/haskell-maia
maia-aeson/test/Spec/Serializations.hs
mpl-2.0
7,751
0
25
3,093
2,015
1,029
986
165
1
module Main where import Graphics.UI.WXCore import Graphics.UI.WX main :: IO () main = start gui gui :: IO () gui = do f <- frame [text := "Process test"] p <- panel f [] -- panel for tab-management etc. input <- comboBox p [processEnter := True, text := "cmd"] ...
jacekszymanski/wxHaskell
samples/wx/Process.hs
lgpl-2.1
2,164
0
17
774
716
340
376
46
2
{-# LANGUAGE CPP #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} ----------------------------------------------------------------------------- -- | -- Copyright : (C) 2013-15 Edward Kmett -- License : BSD-style (see the file LICENSE) -- Maintainer : Edward Kmett <ekmett@gmail.com>...
Gabriel439/succinct
src/Succinct/Dictionary/Partitioned.hs
bsd-2-clause
2,697
0
17
689
1,070
532
538
65
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : Arrow.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:47 Warning : this file is machine generated - do not mod...
uduki/hsQt
examples/DiagramScene/Arrow.hs
bsd-2-clause
5,701
0
24
1,523
2,183
1,114
1,069
161
7
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} module Data.HashTable.Weak.Internal.Linear.Bucket ( Bucket, newBucketArray, newBucketSize, emptyWithSize, growBucketTo, snoc, size, lookup, delete, toList, fromList, mapM_, foldM, expandBucketArray, expandArray, nelemsAndOverhead...
cornell-pl/HsAdapton
weak-hashtables/src/Data/HashTable/Weak/Internal/Linear/Bucket.hs
bsd-3-clause
10,951
0
18
3,625
3,123
1,489
1,634
235
2
-- Copyright : Isaac Jones 2003-2004 {- All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and ...
cabrera/ghc-mod
Language/Haskell/GhcMod/Cabal21.hs
bsd-3-clause
2,646
0
10
467
242
153
89
29
0
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} -- | Security specific migration module Distribution.Server.Features.Security.Migration ( migratePkgTarball_v1_to_v2 , migrateCandidatePkgTarbal...
agrafix/hackage-server
Distribution/Server/Features/Security/Migration.hs
bsd-3-clause
9,132
0
20
2,306
1,934
1,001
933
164
4
-- | -- Copyright : Anders Claesson 2017 -- Maintainer : Anders Claesson <anders.claesson@gmail.com> -- License : BSD-3 -- -- Quotient difference algorithm for S- and J-fractions module HOPS.GF.CFrac.QD ( stieltjes , jacobi , jacobi0 , jacobi1 ) where import Data.Function.Memoize import Da...
akc/gfscript
HOPS/GF/CFrac/QD.hs
bsd-3-clause
1,707
0
17
458
626
337
289
35
4
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Data/Text/Internal.hs" #-} {-# LANGUAGE CPP, DeriveDataTypeable, UnboxedTuples #-} {-# OPTIONS_HADDOCK not-home #-} -- | -- Module : Data.Text.Internal -- Copyright : (c) 2008, 2009 Tom Harper, -- ...
phischu/fragnix
tests/packages/scotty/Data.Text.Internal.hs
bsd-3-clause
5,899
2
13
1,811
1,006
567
439
87
1
module BenchmarkTypes where import Criterion type BElem = (Int, Int, ()) data BenchmarkSet = BenchmarkSet { bGroupName :: String , bMinView :: Pure , bLookup :: Pure , bInsertEmpty :: Pure , bInsertNew :: Pure , bInsertDuplicates :: Pure , bDelete ...
ariep/psqueues
benchmarks/BenchmarkTypes.hs
bsd-3-clause
886
0
9
311
253
136
117
20
1
module Main where import Language.Hakaru.Runtime.Prelude import qualified System.Random.MWC as MWC import Control.Monad prog :: MWC.GenIO -> IO Double prog = normal (real_ 0) (prob_ 3) main :: IO () main = do g <- MWC.createSystemRandom forever $ run g prog
zaxtax/hakaru
haskell/Language/Hakaru/Runtime/NormTest.hs
bsd-3-clause
302
0
8
84
97
53
44
10
1
{-# LANGUAGE TemplateHaskell, FlexibleInstances, FlexibleContexts, TypeOperators, GADTs, KindSignatures, IncoherentInstances #-} -- base values module Multi.DataTypes.Comp where import Data.Comp.Derive import Data.Comp.Multi type ValueExpr = HTerm Value type ExprSig = Value :++: Op type Expr = HTerm E...
spacekitteh/compdata
benchmark/Multi/DataTypes/Comp.hs
bsd-3-clause
2,234
0
11
650
1,065
539
526
64
1
module HierarchicalImport where import Hierarchical.Export main :: Fay () main = putStrLn exported
beni55/fay
tests/HierarchicalImport.hs
bsd-3-clause
111
0
6
25
27
15
12
4
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="id-ID"> <title>Report Generation</title> <maps> <homeID>reports</homeID> <mapref locati...
thc202/zap-extensions
addOns/reports/src/main/javahelp/org/zaproxy/addon/reports/resources/help_id_ID/helpset_id_ID.hs
apache-2.0
966
82
52
156
390
206
184
-1
-1
module M1 (g) where import M {- f :: T -> Int -} {- f (C1 x y) = x + y -} g = error "f (C1 1 2) no longer defined for T at line: 4" l = k
kmate/HaRe
old/testing/removeCon/M1_TokOut.hs
bsd-3-clause
144
0
5
47
27
17
10
4
1
{-# LANGUAGE TypeFamilies, GADTs, EmptyDataDecls, FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} module SlowComp where import Control.Monad import Data.Kind ------------------------------------------------------------------------------- -- Usual Peano integers. class NatInt a where natInt :: a -> I...
sdiehl/ghc
testsuite/tests/perf/compiler/T5030.hs
bsd-3-clause
6,608
0
11
1,741
2,554
1,328
1,226
-1
-1
import Test.Cabal.Prelude -- No cabal test because per-component is broken for it main = setupTest $ do withPackageDb $ do withDirectory "p" $ do setup_install ["q"] setup_install ["p"] setup_install ["foo"] runInstalledExe "foo" []
themoritz/cabal
cabal-testsuite/PackageTests/InternalLibraries/setup-per-component.test.hs
bsd-3-clause
276
0
15
76
71
33
38
8
1
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Betfair.APING ( Context(..) , initializeContext -- GetResponse , getDecodedResponse -- Requests -- Login , sessionToken -- Logout , logout -- Place...
joe9/betfair-api
src/Betfair/APING.hs
mit
4,712
0
5
585
714
505
209
144
0
---------------------------------------------------------------- -- -- | Compilation -- Monad and combinators for quickly assembling simple -- compilers. -- -- @Control\/Compilation\/Trees.hs@ -- -- A generic compilation monad for quickly assembling simple -- compilers for target languages that are primarily --...
lapets/compilation
Control/Compilation/Trees.hs
mit
656
0
5
84
40
31
9
3
1
{-# LANGUAGE OverloadedStrings #-} module Ptt.Time.Clock ( hours , minutesOfHours , timeOfDay , secondsToText , secondsToLength , secondsFromText ) where import Prelude as P import qualified Data.Text as T import Control.Applicative import Ptt.Util hours :: Integral a => a -> Integer hours seconds = fro...
jkpl/ptt
src/Ptt/Time/Clock.hs
mit
1,943
0
12
428
730
376
354
52
4
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE CPP #-} {-# LANGUAGE PatternSynonyms #-} module Ringo.Generator.Populate.Dimension (dimensionTablePopulateSQL) where #if MIN_VERSION_base(4,8,0) #else import Control.Applicative ((<$>)) #endif import Control.Monad.Reader (Reader, as...
quintype/ringo
src/Ringo/Generator/Populate/Dimension.hs
mit
2,918
0
25
816
737
389
348
49
2
module OpenWeatherMap.Types ( module OpenWeatherMap.Types.Weather , module OpenWeatherMap.Types.Coordinate ) where import OpenWeatherMap.Types.Coordinate import OpenWeatherMap.Types.Weather
AndrewRademacher/open-weather-map
src/OpenWeatherMap/Types.hs
mit
223
0
5
47
34
23
11
5
0
module Yage.Wire.Resources ( -- * Resource Allocation Wires acquireOnce , allocationOnEvent ) where import Yage.Prelude hiding (any, on) import Yage.Resources import Control.Wire import Control.Wire.Unsafe.Event import Yage.Wire.Types -- | `Y...
MaxDaten/yage
src/Yage/Wire/Resources.hs
mit
1,212
0
16
308
334
178
156
25
1
module BankAccount ( BankAccount , openAccount, closeAccount , getBalance, incrementBalance) where import Control.Concurrent.STM import Control.Applicative import Prelude newtype BankAccount = BankAccount { unBankAccount :: TVar (Maybe Int) } openAccount :: IO BankAccount openAcc...
stevejb71/xhaskell
bank-account/example.hs
mit
777
0
11
155
233
121
112
19
1
module Rascal.API where import Control.Applicative ((<$>)) import Text.Printf (printf) import Control.Exception (handle) import Data.Aeson (parseJSON, FromJSON) import Network.Curl.Aeson (curlAeson, noData, CurlAesonException, errorMsg, curlCode) import Network.Curl.Opts (CurlO...
soli/rascal
src/Rascal/API.hs
mit
2,109
0
14
479
544
284
260
37
2
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, TypeFamilies #-} {-# OPTIONS_GHC -Wall #-} -- {-# OPTIONS_GHC -fno-warn-missing-methods #-} ---------------------------------------------------------------------- -- | -- Module : Data.Dif -- Copyright : (c) Conal Elliott 2008 -- License : BSD3 -- --...
rzil/honours
DeepLearning/Data/Dif.hs
mit
3,440
3
13
837
1,034
564
470
44
2
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} module Agent.PingPong.Manager.Send where import Agent.Generic import AgentSystem.Manager import Agent.PingPong import Control.Monad (when) import Control.Concurrent (yield) import Data.IORef ------------------------------------------------------------...
fehu/h-agents
test/Agent/PingPong/Manager/Send.hs
mit
3,009
0
17
1,114
605
312
293
58
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-inputlambdaprocessor.html module Stratosphere.ResourceProperties.KinesisAnalytic...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/KinesisAnalyticsApplicationInputLambdaProcessor.hs
mit
2,683
0
13
222
267
153
114
29
1
{-# LANGUAGE FlexibleInstances, OverloadedStrings, RankNTypes, ScopedTypeVariables #-} module Main where import Codec.Binary.UTF8.String (encode) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as L import Data.ListLike as ListLike (ListLike(..)) import Data.Maybe (mapMaybe) import Data.Mon...
ddssff/process-listlike-old
Tests/Main.hs
mit
13,726
0
29
4,575
2,759
1,434
1,325
160
5
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.HTMLOListElement (js_setCompact, setCompact, js_getCompact, getCompact, js_setStart, setStart, js_getStart, getStart, js_setReversed, setReversed, js_getReversed, getReversed, js_setType, se...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLOListElement.hs
mit
4,067
56
10
556
931
530
401
55
1
----------------------------------------------------------------------------- -- | -- Module : Data.Spellcheck.UniformLanguageModel -- Copyright : (C) 2013 Yorick Laupa -- License : (see the file LICENSE) -- -- Maintainer : Yorick Laupa <yo.eight@gmail.com> -- Stability : provisional -- Portability :...
YoEight/spellcheck
lib/Data/Spellcheck/UniformLanguageModel.hs
mit
1,512
0
13
332
310
171
139
28
0
module Automata.Helpers where import Data.Set (Set) import qualified Data.Set as S import Automata.Types cartProd :: (Ord a, Ord b) => Set a -> Set b -> Set (a, b) cartProd set1 set2 = S.fromList [(x,y) | x <- S.toList set1, y <- S.toList set2]
terrelln/automata
src/Automata/Helpers.hs
mit
247
0
10
46
122
66
56
6
1
{-# LANGUAGE OverloadedStrings #-} module Process ( process , processPipe , htmlPipeline , mdPipeline , codePipeline ) where import Prelude hiding (readFile, writeFile, getContents, putStr) import Data.Text.IO (writeFile, readFile, getContents, putStr) import System.FilePath.Posix (takeFileName, dropExtension) import ...
tcrs/lit
src/Process.hs
gpl-2.0
2,571
0
17
560
791
408
383
-1
-1
{-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE OverloadedStrings #-} module Web.BitTorrent.Tracker.Handlers.Scrape ( handleScrapeRequest ) where import qualified Data.HashMap.Strict as Map import qualified Data.Sequence as Sequence import qualified Web.BitTorrent.Tracker.Utils as Utils import Web.BitTorren...
greatest-ape/hs-bt-tracker
src/Web/BitTorrent/Tracker/Handlers/Scrape.hs
gpl-3.0
1,435
0
11
298
320
175
145
30
2
module WildFireFrontend where import Graphics.Rendering.OpenGL as GL import Graphics.UI.GLFW as GLFW import Graphics.Rendering.OpenGL (($=)) import Data.IORef import Control.Monad import WildFireBackend as Back winSizeX :: GLsizei winSizeX = 800 winSizeY :: GLsizei winSizeY = 800 winSize :: GL.Size winSize = (GL.S...
thalerjonathan/phd
coding/prototyping/haskell/YampaWildfire/src/WildFireFrontend.hs
gpl-3.0
4,092
0
21
1,036
1,321
675
646
100
3
{-# LANGUAGE NamedFieldPuns, NoImplicitPrelude, OverloadedStrings, ExtendedDefaultRules, RecordWildCards#-} module Main where import BasicPrelude hiding ((</>), (<.>), FilePath) import Filesystem.Path.CurrentOS import Data.Set (Set) import qualified Data.Set as S import qualified Data.Map as M import Contr...
lu-fennell/nix-env-rebuild
src/Nix/Test/EnvRebuild.hs
gpl-3.0
15,581
0
23
5,423
2,645
1,489
1,156
306
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-directconnect/gen/Network/AWS/DirectConnect/DescribeVirtualGateways.hs
mpl-2.0
4,042
0
10
720
417
252
165
54
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Locations/Builds/Create.hs
mpl-2.0
6,083
0
18
1,351
867
507
360
124
1
module Codewars.Fibonacci where fibs = 0 : 1 : (zipWith (+) fibs $ tail fibs) sumFibs :: Int -> Integer sumFibs n = sum $ filter even $ take (n + 1) fibs
ice1000/OI-codes
codewars/101-200/sumfibs.hs
agpl-3.0
156
0
8
35
76
40
36
4
1
{-# LANGUAGE FlexibleInstances #-} module Data.UCI where data MessageIn = UCI | Debug (Maybe Bool) | IsReady | NewGame | Position (Maybe String) [String] | Go | Quit deriving Show data MessageOut = ID String St...
shockkolate/hs-uci
src/Data/UCI.hs
unlicense
2,018
0
16
885
610
336
274
39
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Openshift.V1.RepositoryImportSpec where import GHC.Generics import Openshift.V1.ObjectReference import Openshift.V1.TagImportPolicy import qual...
minhdoboi/deprecated-openshift-haskell-api
openshift/lib/Openshift/V1/RepositoryImportSpec.hs
apache-2.0
880
0
9
132
107
66
41
17
0
module Interactive where import Parse(parseInit, parseQuery) import BackwardChaining(resolve) import Types import Data.List() import System.IO askForChange:: Either String ([Relation], Init, Query) -> IO() askForChange (Right parsed) = do print "Do you want to change the initial facts given? (y/n) :" rep <- getLi...
tmielcza/demiurge
src/Interactive.hs
apache-2.0
1,790
0
14
370
722
371
351
44
2