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 RankNTypes #-} {-# OPTIONS_GHC -fglasgow-exts #-} module DBTest where import Database.HaskellDB import Database.HaskellDB.Database import Database.HaskellDB.DBLayout import Database.HaskellDB.DBSpec.DBSpecToDatabase import Control.Exception (bracket_) import Test.HUnit data Conn = Conn { ...
m4dc4p/haskelldb
test/DBTest.hs
bsd-3-clause
1,408
0
13
382
525
272
253
32
2
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP , NoImplicitPrelude , MagicHash , GeneralizedNewtypeDeriving , DataKinds , MultiParamTypeClasses , TypeFamilies #-} {-# LANGUAGE AutoDeriveTypeable, StandaloneDeriving #-} ---------------------------------...
rahulmutt/ghcvm
libraries/base/System/Posix/Types.hs
bsd-3-clause
5,588
0
8
868
866
549
317
-1
-1
{-# OPTIONS_GHC -XGADTs -XNoMonoLocalBinds #-} {-# OPTIONS -fno-warn-tabs #-} -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and -- detab the module (please do the detabbing in a separate patch). See -- http://hackage.haskell.org/trac/ghc/...
mcmaniac/ghc
compiler/cmm/CmmBuildInfoTables.hs
bsd-3-clause
23,999
140
21
6,441
4,876
2,656
2,220
309
10
<?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="hu-HU"> <title>Sequence Scanner | ZAP Extension</title> <maps> <homeID>top</homeID> <ma...
kingthorin/zap-extensions
addOns/sequence/src/main/javahelp/org/zaproxy/zap/extension/sequence/resources/help_hu_HU/helpset_hu_HU.hs
apache-2.0
977
78
66
159
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="zh-CN"> <title>FuzzDB Files</title> <maps> <homeID>fuzzdb</homeID> <mapref location="ma...
thc202/zap-extensions
addOns/fuzzdb/src/main/javahelp/help_zh_CN/helpset_zh_CN.hs
apache-2.0
960
77
66
156
407
206
201
-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="el-GR"> <title>OAST Support Add-on</title> <maps> <homeID>oast</homeID> <mapref locatio...
kingthorin/zap-extensions
addOns/oast/src/main/javahelp/org/zaproxy/addon/oast/resources/help_el_GR/helpset_el_GR.hs
apache-2.0
965
77
67
157
413
209
204
-1
-1
{-# LANGUAGE CPP #-} -- | -- Module : Data.Vector.Internal.Check -- Copyright : (c) Roman Leshchinskiy 2009 -- License : BSD-style -- -- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au> -- Stability : experimental -- Portability : non-portable -- -- Bounds checking infrastructure -- {-# LANGUAGE Mag...
dolio/vector
Data/Vector/Internal/Check.hs
bsd-3-clause
4,136
0
12
846
1,188
640
548
91
2
{-# LANGUAGE BangPatterns, MagicHash, UnboxedTuples #-} {-# OPTIONS_GHC -O2 #-} -- We always optimise this, otherwise performance of a non-optimised -- compiler is severely affected -- -- (c) The University of Glasgow 2002-2006 -- -- Unboxed mutable Ints module FastMutInt( FastMutInt, newFastMutInt, re...
ezyang/ghc
compiler/utils/FastMutInt.hs
bsd-3-clause
1,673
0
11
359
536
290
246
39
1
module A where import Quxbaz
themoritz/cabal
cabal-testsuite/PackageTests/Backpack/Includes5/A.hs
bsd-3-clause
29
0
3
5
7
5
2
2
0
/* PR sanitizer/66343 */ /* { dg-options "-fno-sanitize=undefined" } */ /* Empty. */
mickael-guene/gcc
gcc/testsuite/gcc.dg/pch/pr66343-3.hs
gpl-2.0
87
7
9
15
41
22
19
1
0
module Main where import Control.Concurrent.Async import Control.Monad (forM_) import Data.Maybe (catMaybes) import StackRunAuto import System.Environment import System.IO main :: IO () main = do args <- getArgs hSetBuffering...
yamadapc/stack-run-auto
stack-run-auto/app/ModulePackage.hs
mit
464
0
9
149
107
55
52
14
1
-- file: ch03/Lending.hs -- Changed the behaviour slightly, the reserve is now a percentage -- of the total balance to keep in reserve lend2 amount balance = if amount < balance * (1 - reserve) then Just newBalance else Nothing where reserve = 0.1 ...
imrehg/rwhaskell
ch03/Lending.hs
mit
379
0
8
150
56
31
25
5
2
module Database where import Data.Map (Map) import Data.Maybe import qualified Data.Map as Map import ObloUtils import Types type WV v = WebView Database v type QuestionTag = String type Answer = String type Database = Map QuestionTag (Maybe (Bool, Answer)) -- TODO: use Answered here. We need a version of answere...
Oblosys/webviews
src/exec/WebForms/Database.hs
mit
1,485
0
10
264
396
214
182
30
2
module Graphics.Rendering.NanoVG ( module Internal ) where import Graphics.Rendering.NanoVG.Internal as Internal
duncanburke/nanovg-haskell
src/Graphics/Rendering/NanoVG.hs
mit
119
0
4
17
22
16
6
3
0
{-| Module : Main Description : The NetFlow Tool Copyright : (c) Jan Dvořák License : MIT Maintainer : mordae@mordae.eu Stability : unstable Portability : non-portable (ghc) -} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ...
techlib/netflow
nf/Main.hs
mit
6,471
0
19
2,056
1,665
878
787
157
3
module Main where -- quux contains the birthplaces of famous methematicians main = interact wordCount -- where wordCount input = show (length (lines input)) ++ "\n" -- where wordCount input = show (length (words input)) ++ "\n" where wordCount input = show (length input) ++ "\n"
rglew/rwh
ch1/wc.hs
mit
286
0
10
52
38
21
17
3
1
module ToyRobot.Table where import ToyRobot.Point data Table = Table Point Point deriving (Show) allowsMoveTo :: Table -> Point -> Bool allowsMoveTo (Table llc urc) loc | (llc `le` loc) && (urc `ge` loc) = True | otherwise = False instance Eq Table where (Table llc1 urc1) == (Table llc2 urc2) = llc1 == llc2 &...
lokulin/toy-robot-haskell
src/lib/ToyRobot/Table.hs
mit
335
0
10
68
144
76
68
9
1
module Main where import Test.QuickCheck import Test.QuickCheck.Checkers import Test.QuickCheck.Classes data CountMe a = CountMe Integer a deriving (Eq, Show) instance Functor CountMe where fmap f (CountMe i a) = CountMe (i + 1) (f a) instance Applicative CountMe where pure = CountMe 0 CountMe n f <*> Cou...
NickAger/LearningHaskell
HaskellProgrammingFromFirstPrinciples/Chapter18/BadMonad/src/Main.hs
mit
811
0
11
179
339
170
169
26
1
import qualified Data.Set import Data.List a :: [Integer] a = [2..ceiling (sqrt 25)::Integer] factorial :: Integer -> Integer factorial n | n == 1 = 1 | n > 1 = n * factorial (n - 1) | otherwise = -1 isPrime :: Integer -> Bool isPrime n | n == 1 = False | n > 1 = and [ mod n i /= 0 | i <- [2..n], i*i...
mino2357/Hello_Haskell
innsuubunnkai.hsproj/Main.hs
mit
1,629
0
10
401
860
437
423
51
2
{-# LANGUAGE OverloadedStrings #-} module Crypto.Elligator ( elligator , elligatorInv ) where {- slow implementation using Integer. based on the reference implementation and description presented here https://www.imperialviolet.org/2013/12/25/elligator.html -} import Crypto.Curve25519 import Crypto.Number.Ser...
danoctavian/helligator
src/Crypto/Elligator.hs
mit
2,060
0
14
503
480
269
211
34
3
{-# OPTIONS_GHC -Wno-orphans #-} module UnliftIO.Except () where import Control.Monad.Except import UnliftIO instance (MonadUnliftIO m, Exception e) => MonadUnliftIO (ExceptT e m) where withRunInIO exceptToIO = ExceptT $ try $ do withRunInIO $ \runInIO -> exceptToIO (runInIO . (either thr...
thoughtbot/yesod-auth-oauth2
src/UnliftIO/Except.hs
mit
347
0
16
74
100
54
46
9
0
{-# LANGUAGE DeriveLift #-} module Ohua.Types.Annotated where import Universum import Control.Lens.Plated import Language.Haskell.TH.Syntax (Lift) import Control.Comonad import Data.Bitraversable import Data.Bifoldable import Ohua.LensClasses -- | Generic way of attaching arbitrary, alterable data to some type. -- ...
ohua-dev/ohua-core
core/src/Ohua/Types/Annotated.hs
epl-1.0
1,868
0
9
344
517
267
250
-1
-1
{-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Lib.NonEmptyList ( NonEmptyList(..) , head , tail , singleton , cons...
sinelaw/buildsome
src/Lib/NonEmptyList.hs
gpl-2.0
1,268
0
10
339
427
233
194
39
2
module Sound.SC3.Server.Allocator.BlockAllocator.FreeList ( FreeList , Sorting(..) , empty , singleton , fromList , insert , alloc , coalesce ) where import Data.Ord (comparing) import qualified Data.List as List import Sound.SC3.Server.Allocator.Range (Range) import qualified...
kaoskorobase/hsc3-server
Sound/SC3/Server/Allocator/BlockAllocator/FreeList.hs
gpl-2.0
2,123
0
14
522
922
473
449
53
3
module Category where import Data.List import Data.Char import Network.Curl import Control.Monad import qualified Utilities as T type App = String category :: App -> IO String category app = do app `T.shouldHaveType` T.app let app' = map toLower . T.remove $ app let url = "http://localhost:5001/category" ...
bogwonch/SecPAL
functions/Category.hs
gpl-3.0
472
0
12
101
155
83
72
17
2
Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" -- , borderColor = "lightgreen" , bgColor = "black" -- , font = "xft:Bitstream Vera Sans Mono:size=9:bold:antialias=true" , fgColor = "grey" , position = TopSize C 100 20 , commands = [ Run DynNetwork ["-L","0","-H","100",...
siddhanathan/dotfiles
src/shared/xmonad/xmobar.hs
gpl-3.0
2,891
0
10
1,437
410
253
157
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-blogger/gen/Network/Google/Resource/Blogger/BlogUserInfos/Get.hs
mpl-2.0
5,299
0
19
1,301
876
505
371
127
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-monitoring/gen/Network/Google/Resource/Monitoring/Services/Delete.hs
mpl-2.0
4,378
0
15
1,015
698
408
290
99
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/GetStoreLayout.hs
mpl-2.0
5,225
0
18
1,158
708
413
295
106
1
module Interpret where import AbsRWHILE import ErrM import Control.Monad(when) import Data.List(nub) import Debug.Trace type Store = [(Ident,Val)] emptyS :: Store emptyS = [] insertS :: Store -> Ident -> Val -> Store insertS st x v = (x, v) : st updateS :: Store -> Ident -> Val -> Store updateS [] x' v' = ...
tyoko-dev/rwhile-A-haskell
src/Interpret.hs
agpl-3.0
4,361
57
14
1,923
1,543
784
759
97
9
module Data.Monster where import Data.Define import qualified Data.Map as M import System.Random (StdGen) -- | random monster generator type MonsterGen = StdGen -> (Monster, StdGen) -- | interface to get list of units from the world units :: World -> M.Map (Int, Int) Monster units = list . units' -- | 'fmap' analo...
green-orange/trapHack
src/Data/Monster.hs
unlicense
980
4
10
205
342
188
154
21
2
{-# LANGUAGE OverloadedStrings #-} module Data.Geometry.DouglasPeuckerSpec where import qualified Data.Geospatial as Geospatial import qualified Data.Sequence as Sequence import Test.Hspec (Spec, describe, it, ...
sitewisely/zellige
test/Data/Geometry/DouglasPeuckerSpec.hs
apache-2.0
2,134
0
16
425
985
619
366
34
1
-- Copyright (C) 2013 Fraser Tweedale -- -- 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 agr...
frasertweedale/hs-jose
src/Crypto/JOSE/JWA/JWE.hs
apache-2.0
6,836
0
14
1,529
1,319
690
629
116
1
{-# LANGUAGE RecordWildCards #-} -- | Alternative representation of TAG trees. module NLP.TAG.Vanilla.Tree.Other ( -- * Tree Tree , SomeTree , Node (..) -- * Conversion , encode , decode -- * Utils , isTerm , isFinal , isInitial , isAuxiliary , hasRoot , proj ) where -- import Control.Applicative ((...
kawu/tag-vanilla
src/NLP/TAG/Vanilla/Tree/Other.hs
bsd-2-clause
3,965
0
11
919
1,187
626
561
79
3
-- extensions {{{ {-# LANGUAGE GADTs, RankNTypes #-} -- }}} -- exports {{{ module Database.AODB.Struct -- re-exports. ( Word(..), Word8(..), Word32(..) -- types. , Struct() , Branch(..) -- front-end. , encode , decode -- simple structs. , word8 , word32 , natural ...
fperleta/aodb
src/Database/AODB/Struct.hs
bsd-3-clause
4,818
3
19
1,688
2,109
1,110
999
-1
-1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-| Module : Numeric.AERN.RealArithmetic.Interval.Floating Description : Floating instance using outer rounding Copyright ...
michalkonecny/aern
aern-interval/src/Numeric/AERN/RealArithmetic/Interval/Floating.hs
bsd-3-clause
8,554
0
16
2,320
1,970
1,046
924
188
0
module GraphBitSet where import Data.Array.Unboxed (UArray) type GraphBitSet = UArray (Int,Int) Bool
BlairArchibald/bones
apps/maxclique/src/GraphBitSet.hs
bsd-3-clause
104
0
6
15
32
20
12
3
0
{-# LANGUAGE GADTs, TypeFamilies, TypeOperators, EmptyDataDecls, FlexibleInstances, MultiParamTypeClasses, RankNTypes, QuasiQuotes, TemplateHaskell, ViewPatterns, FlexibleContexts, UndecidableInstances #-} ------------------------------------------------------------------------- -- lambda lifting for the lambda calcul...
eddywestbrook/hobbits
archival/LambdaLifting_2cont.hs
bsd-3-clause
8,676
8
17
2,076
2,472
1,284
1,188
-1
-1
-------------------------------------------------------------------------------- -- -- Test suite for the textwrap module. -- -- Original tests written by Greg Ward <gward@python.net>. -- Converted to PyUnit by Peter Hansen <peter@engcorp.com>. -- Converted to Hspec by Leif Grele <lgrele@gmail.com>. -- Currently mainta...
Hrothen/textwrap
test/Spec.hs
bsd-3-clause
25,313
17
27
7,700
4,927
2,489
2,438
525
2
{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE PatternGuards #-} ----------------------------------------------------------------------------- -- | -- Copyright : (C) 2012-2013 Edward Kmett -- License : BSD-style (see the file LICENSE) -- -- Maintainer : Edward Kmett <ekmett...
treeowl/bound
src/Bound/TH.hs
bsd-3-clause
11,668
0
22
3,255
2,886
1,567
1,319
12
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE CPP, DeriveDataTypeable, ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types] ...
gcampax/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
78,917
0
15
22,207
13,855
7,262
6,593
887
9
-- | Register coalescing. module RegAlloc.Graph.Coalesce ( regCoalesce, slurpJoinMovs ) where import GhcPrelude import RegAlloc.Liveness import Instruction import Reg import GHC.Cmm import Bag import Digraph import UniqFM import UniqSet import UniqSupply -- | Do register coalescing on this top level...
sdiehl/ghc
compiler/nativeGen/RegAlloc/Graph/Coalesce.hs
bsd-3-clause
2,746
0
14
900
562
286
276
56
3
{-# LANGUAGE OverloadedStrings #-} module Declarations where import Types import Modules.JSON () import Database.PipesGremlin (PG,scatter) import Web.Neo (NeoT,newNode,addNodeLabel,setNodeProperty,newEdge) import Language.Haskell.Names.SyntaxUtils (dropAnn) import qualified Language.Haskell.Exts.Annotated as HSE (Mo...
phischu/cabal-analysis
src/Declarations.hs
bsd-3-clause
1,244
0
11
171
365
197
168
26
1
module Interpreter.Interpreter ( interpret ) where import Interpreter.Internal
bus000/latex-calculator
src/Interpreter/Interpreter.hs
bsd-3-clause
80
0
4
9
16
10
6
2
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} module Registry where import Data.Aeson import GHC.Generics (Generic) data Registry = Registry { url :: String , templateName :: String } deriving (Show, Generic) instance ToJSON Reg...
dbushenko/trurl
src/Registry.hs
bsd-3-clause
353
0
8
110
67
39
28
10
0
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNT...
achirkin/easytensor
dimensions/test/Numeric/Dimensions/DimTest.hs
bsd-3-clause
5,707
0
18
1,651
1,697
847
850
117
3
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module Mantle.Synchronous where import Mantle.Prelude import Control.Monad.Reader import Data.Monoid import Mantle.RTL import Mantle.Bits import Mantle.Circuit import Mantle.Logic import Mantle.Interface ne...
aninhumer/mantle
src/Mantle/Synchronous.hs
bsd-3-clause
1,913
0
15
425
753
377
376
62
1
module Network.CrawlChain.CrawlChains ( executeCrawlChain, CrawlDirective(..), DirectiveChainResult, lastResult, resultHistory, showResultPath, (>>+), combineAbsoluteUrl) where import Data.List (intersperse) import Data.List.Split (splitOn) import System.IO.Unsafe as Unsafe (unsafeInterleaveIO) import Net...
michaxm/crawlchain
src/Network/CrawlChain/CrawlChains.hs
bsd-3-clause
10,531
0
19
2,049
1,784
936
848
113
13
{-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} ----------------------------------------------------------------------------- -- | -- Module : Geometry.TwoD.Types -- Copyright : (c) 2011-2017 diagrams team (see LICENSE) -- License : BSD-style (see LICENSE) -- Maintainer : diagrams-...
cchalmers/geometry
src/Geometry/TwoD/Types.hs
bsd-3-clause
2,347
0
11
585
689
389
300
53
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Setup -- Copyright : Isaac Jones 2003-2004 -- Duncan Coutts 2007 -...
themoritz/cabal
Cabal/Distribution/Simple/Setup.hs
bsd-3-clause
88,129
0
50
23,636
17,723
9,983
7,740
1,683
10
-- -- Copyright (C) 2004 Don Stewart - http://www.cse.unsw.edu.au/~dons -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 of the License, or (at your option) a...
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/src/System/Eval/Utils.hs
bsd-3-clause
2,472
0
12
573
402
240
162
34
1
{-# LANGUAGE OverloadedStrings #-} module Main where import Data.Aeson import Data.Aeson.Types import Data.Monoid ((<>)) import GitHub.Auth import GitHub.Data.Webhooks import GitHub.Data.Webhooks.Validate import Data.Default.Class (def) import Network.HTTP.Types.Status import Control.Monad.Reader (runReaderT, asks, l...
amir/ghc-dashboard
src/Main.hs
bsd-3-clause
1,664
0
13
329
525
279
246
48
3
module Dynamic (module Data.Dynamic) where import Data.Dynamic
OS2World/DEV-UTIL-HUGS
oldlib/Dynamic.hs
bsd-3-clause
64
0
5
8
17
11
6
2
0
{-# LANGUAGE RecordWildCards #-} -- | Restartable, STM-based dynamic timer build on top of `Pos.Util.Timer.Timer`. module Pos.Util.Timer ( Timer , newTimer , waitTimer , startTimer ) where import Control.Concurrent.STM (readTVar, registerDelay, retry) import Data.Time.Units (TimeUnit, t...
input-output-hk/pos-haskell-prototype
util/src/Pos/Util/Timer.hs
mit
1,062
0
11
214
247
136
111
20
1
{-- snippet mySum --} mySum xs = helper 0 xs where helper acc (x:xs) = helper (acc + x) xs helper acc _ = acc {-- /snippet mySum --} {-- snippet foldlSum --} foldlSum xs = foldl step 0 xs where step acc x = acc + x {-- /snippet foldlSum --} {-- snippet niceSum --} niceSum :: [Integer] -> Intege...
binesiyu/ifl
examples/ch04/Sum.hs
mit
483
0
9
116
147
80
67
9
2
{- | Module : ./CASL/Qualify.hs Description : Code out overloading and qualify all names Copyright : (c) Christian Maeder, DFKI GmbH 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable Code out overloading and qualif...
spechub/Hets
CASL/Qualify.hs
gpl-2.0
3,718
0
23
1,016
1,397
721
676
83
2
{-# LANGUAGE FlexibleContexts #-} module SugarScape.Agent.Dying ( agentDies , handleInheritance ) where import Control.Monad.Random import Control.Monad.State.Strict import SugarScape.Agent.Common import SugarScape.Agent.Loan import SugarScape.Core.Common import SugarScape.Core.Discrete import SugarScape.Core....
thalerjonathan/phd
thesis/code/sugarscape/src/SugarScape/Agent/Dying.hs
gpl-3.0
4,329
0
19
1,349
873
444
429
88
2
{-# LANGUAGE CPP #-} {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE Trustworthy #-} ----------------------------...
Keyholder/log-domain
src/Numeric/Log.hs
bsd-2-clause
16,082
0
17
3,691
4,651
2,471
2,180
356
3
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHask...
anton-dessiatov/stack
src/Stack/Config.hs
bsd-3-clause
41,931
0
27
11,874
7,842
3,937
3,905
753
14
{-# LANGUAGE OverloadedStrings #-} module Util.Blaze (toStylesheet, toScript, toLink, mdToHTML) where import Text.Blaze ((!)) import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A import Text.Markdown (markdown, def) import Data.Text.Lazy (Text) toStyle...
tamaralipowski/courseography
hs/Util/Blaze.hs
gpl-3.0
894
0
10
226
256
142
114
22
1
{- Copyright 2015 Google Inc. 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 applicable law or a...
Ye-Yong-Chi/codeworld
codeworld-base/src/GHC/Exts.hs
apache-2.0
731
0
4
136
23
17
6
4
0
{-# LANGUAGE BangPatterns, ScopedTypeVariables #-} {- | -- borrowed from snap-server. Check there periodically for updates. -} module Happstack.Server.Internal.Timeout where import Control.Concurrent (ThreadId, forkIO, killThread, threadDelay, threadWaitWrite) import Control.Exception ...
arybczak/happstack-server
src/Happstack/Server/Internal/Timeout.hs
bsd-3-clause
5,230
0
14
1,534
1,055
579
476
99
3
module Main where {-| Module : Main Description : Unit tests for biotool-hs Copyright : (c) Bernie Pope, 2016 License : MIT Maintainer : bjpope@unimelb.edu.au Stability : experimental Portability : POSIX Intended to be used in conjunction with stack test. -} import Test.Hspec (hspec, describe, it, ...
bjpop/biotool
haskell/test/Test.hs
mit
2,988
0
16
790
488
275
213
38
1
{-# LANGUAGE FlexibleContexts #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.UI.Utils -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable -- -- Utilities shared by various UIs module Yi.UI.Utils where import Pr...
TOSPIO/yi
src/library/Yi/UI/Utils.hs
gpl-2.0
5,268
0
14
1,449
1,699
919
780
82
3
{-# LANGUAGE BangPatterns #-} module Process.PieceMgr ( PieceMgrMsg(..) , PieceMgrChannel , Blocks(..) , start , createPieceDb ) where import Control.Applicative import Control.Concurrent import Control.Concurrent.STM import Control.DeepSeq import Control.Monad.Reader import Control.Monad.Stat...
rethab/combinatorrent
src/Process/PieceMgr.hs
bsd-2-clause
22,669
2
23
7,148
5,686
2,861
2,825
419
6
module Snap.Snaplet.Session ( SessionManager , withSession , commitSession , setInSession , getFromSession , deleteFromSession , csrfToken , sessionToList , resetSession , touchSession -- * Utilities Exported For Convenience , module Snap.Snaplet.Session.Common , module Snap.Snaplet.Session.S...
snapframework/snap
src/Snap/Snaplet/Session.hs
bsd-3-clause
3,922
0
11
712
708
373
335
71
1
haskell comment {-| haskell comment This module contains some functions that are useful in several places in the haskell comment program and don't belong to one specific other module. haskell comment -} haskell code module Gnutella.Misc where haskell blank haskell code import Data.ByteString(ByteString) haskell co...
scriptum/ohcount
test/expected_dir/haskell1.hs
gpl-2.0
6,043
367
12
1,701
1,512
803
709
-1
-1
module HN.Data (module Data.List ,module Data.Time ,module Data.Maybe ,module Data.String.Extra ,module Data.Char ,module Data.Default ,module Data.Pagination ,module Data.String ,module Data.Ord ,fi ) where import Data.List hiding (head,span) import Data.Time import Data.Maybe import Data.Stri...
jwaldmann/haskellnews
src/HN/Data.hs
bsd-3-clause
491
0
6
83
155
97
58
22
1
{-# LANGUAGE UnboxedSums, UnboxedTuples, MagicHash #-} module Main where type UbxBool = (# (# #) | (# #) #) {-# NOINLINE packBool #-} packBool :: UbxBool -> Bool packBool (# _ | #) = True packBool (# | _ #) = False {-# NOINLINE unpackBool #-} unpackBool :: Bool -> UbxBool unpackBool True = (# (# #) | #) unpackBool...
ezyang/ghc
testsuite/tests/unboxedsums/unboxedsums9.hs
bsd-3-clause
638
0
12
128
200
105
95
20
1
module Main where main = do putStrLn "Hello, world."
AndreasPK/stack
test/integration/tests/32-unlisted-module/files/src/main/Main.hs
bsd-3-clause
54
0
7
10
15
8
7
2
1
-- safe infered, with requirement base is trusted module Check07_B where import Prelude b :: Int -> Int b n = n + 1
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/safeHaskell/check/Check07_B.hs
bsd-3-clause
119
0
5
27
29
17
12
4
1
-- Tests grouping WITH a using clause but WITHOUT a by clause {-# OPTIONS_GHC -XTransformListComp #-} module Main where import Data.List(inits) main = putStrLn (show output) where output = [ x | y <- [1..3] , x <- "hello" , then group using inits ]
urbanslug/ghc
testsuite/tests/deSugar/should_run/mc04.hs
bsd-3-clause
298
0
10
94
67
38
29
8
1
module ProgramInfo where programName :: String programName = "pet" versionInfo :: String versionInfo = unlines [ programName ++ " - Personal Expense Tracker - version 0.2" , "Copyright (c) 2012-2013 - Fred Morcos <fred.morcos@gmail.com>" , "https://github.com/fredmorcos/pet...
fredmorcos/attic
projects/pet/archive/pet_haskell_20131209/ProgramInfo.hs
isc
430
0
7
118
58
34
24
9
1
module PokerTests where import Poker import Test.Hspec import Test.QuickCheck main :: IO () main = hspec $ do describe "Poker.identifyHand" $ do it "works for pair" $ do (identifyHand $ HandCards (Card A Hearts) (Card A Clubs) (Card Eight Spades) (Card J Hearts) (Card Ten Spades)) `shoul...
tomgi/poker_hands
PokerTests.hs
mit
337
0
19
83
131
67
64
9
1
import Data.Array import Text.Regex.PCRE h = 6 w = 50 size = ((0, 0), (h - 1, w - 1)) initScreen = listArray size (repeat '.') rect b a screen = screen // [((i, j), '#') | i <- [0 .. a - 1], j <- [0 .. b - 1]] rotateRow a b screen = screen // [((a, j), screen ! (a, (j - b) `mod` w)) ...
lzlarryli/advent_of_code_2016
day8/part1.hs
mit
1,537
0
12
598
662
355
307
-1
-1
module Language.Jass.Parser.AST.Import( Import(..) ) where import Language.Jass.Parser.SourcePos import Language.Jass.ShowIndent data Import = Import { importSourcePos :: SrcPos, importModuleName :: String } instance Show Import where show = showIndent 0 instance ShowIndent Import where showIndent...
NCrashed/hjass
src/library/Language/Jass/Parser/AST/Import.hs
mit
458
0
8
86
139
77
62
13
0
module Leankit.Types.Credentials where data Credentials = Credentials { _company :: String, _username :: String, _password :: String } instance Show Credentials where show cred = "Credentials " ++ _company cred ++ " " ++ _username cred ++ " *****"
dtorok/leankit-hsapi
Leankit/Types/Credentials.hs
mit
254
6
10
45
78
43
35
7
0
{-# OPTIONS_HADDOCK hide, prune #-} module Handler.Mooc.SubmitProposal ( postSubmitProposalR ) where import Control.Monad.Trans.Maybe import qualified Data.Text as Text (pack) import Import import qualified Data.ByteString.Base64 as BSB (decodeLenient) import Appli...
mb21/qua-kit
apps/hs/qua-server/src/Handler/Mooc/SubmitProposal.hs
mit
5,615
0
22
1,847
1,056
511
545
-1
-1
module Main where import Control.Monad import Parser import Eval import System.Environment import System.IO import LispVal flushStr :: String -> IO () flushStr str = putStr str >> hFlush stdout readPrompt :: String -> IO String readPrompt prompt = flushStr prompt >> getLine evalAndPrint :: Env -> String -> IO () ev...
diminishedprime/.org
programmey_stuff/write_yourself_a_scheme/ch_07/wyas/app/Main.hs
mit
1,103
0
12
272
411
203
208
31
3
{-# LANGUAGE OverloadedStrings #-} module Ringo ( -- | The examples in this module assume the following code has been run. -- The :{ and :} will only work in GHCi. -- $setup module Ringo.Types , extractFactTable , extractDimensionTables , extractDependencies ...
quintype/ringo
src/Ringo.hs
mit
25,197
0
10
7,708
973
791
182
36
1
--typeInference1.hs module TypeInference2 where f x y = x + y + 3
deciduously/Haskell-First-Principles-Exercises
2-Defining and combining/5-Types/code/typeInference2.hs
mit
66
0
6
13
23
13
10
2
1
-- Find the greatest product of five consecutive digits in the 1000-digit number. -- -- 73167176531330624919225119674426574742355349194934 -- 96983520312774506326239578318016984801869478851843 -- 85861560789112949495459501737958331952853208805511 -- 12540698747158523863050715693290963295227443043557 -- 668966...
carletes/project-euler
problem-8.hs
mit
2,709
0
23
356
228
127
101
27
1
module Graphics.Urho3D.Graphics.Internal.Octree( Octree , Octant , octreeCntx ) where import qualified Language.C.Inline as C import qualified Language.C.Inline.Context as C import qualified Language.C.Types as C import qualified Data.Map as Map data Octree data Octant octreeCntx :: C.Context octreeCntx...
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Graphics/Internal/Octree.hs
mit
465
0
11
93
125
85
40
-1
-1
module Main where import Yusic import qualified Data.Text.IO as TIO main :: IO () main = do TIO.putStrLn yusic
haskellGardener/yusic
src/Main.hs
mit
118
0
8
26
39
23
16
6
1
{-# LANGUAGE OverloadedStrings #-} module Gratte.Command.Add ( archive , sendToES , createDocuments ) where import Control.Monad import Control.Monad.Gratte import Control.Monad.Trans import Data.Aeson import Data.Char import Data.Maybe import quali...
ostapneko/gratte-papier
src/Gratte/Command/Add.hs
mit
4,797
0
15
1,302
1,348
680
668
114
2
{-# LANGUAGE GADTs #-} {-# LANGUAGE FlexibleInstances #-} module BinaryTree where import Test.QuickCheck import Control.Monad data BinaryTree a where Leaf :: a -> BinaryTree a Node :: a -> BinaryTree a -> BinaryTree a -> BinaryTree a deriving (S...
amal029/haskell-tests
binaryTree.hs
mit
1,222
1
12
478
374
195
179
19
1
{-# OPTIONS_GHC -Wall #-} -- Copyright (C) 2006 Benedikt Schmidt -- see LICENSE.BSD3 for license module Shim.Utils ( processGetContents , splitBy , unSplit , splitElem , chomp , commonPrefix , dropPrefix , dropSuffix , fst3 , snd3 , setLogAction , setLogfile , getLogfile , equating ,...
codemac/yi-editor
src/Shim/Utils.hs
gpl-2.0
4,854
0
13
1,308
2,055
1,084
971
140
17
{-| A suite of data types describing the abstract syntax of Dizzy models. As usual for compilation target languages this does not attempt to be a complete abstract syntax for dizzy models only the fragment to which we compile Pepa models (though naturally it could be extended). -} module Language.Dizzy.Synt...
allanderek/ipclib
Language/Dizzy/Syntax.hs
gpl-2.0
886
0
7
159
84
57
27
10
0
{- | Module : $Header$ Description : pretty printing data types of BASIC_SPEC Copyright : (c) Christian Maeder and Uni Bremen 2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : experimental Portability : portable Pretty printing data types of 'BASIC_...
nevrenato/Hets_Fork
CASL/ToDoc.hs
gpl-2.0
19,407
0
29
5,473
6,896
3,477
3,419
455
17
-- #hide ----------------------------------------------------------------------------- -- | -- Module : Language.Haskell.ParseUtils -- Copyright : (c) The GHC Team, 1997-2000 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : experimen...
dec9ue/jhc_copygc
src/FrontEnd/ParseUtils.hs
gpl-2.0
17,193
80
18
4,155
5,998
2,980
3,018
-1
-1
module Main (main) where import Parser import System.Environment import System.Console.GetOpt import Control.DeepSeq options :: [OptDescr ScopeConfig] options = [ Option [] ["dynamic-deep","dd"] (NoArg dynDeepScope) "Use Dynamic Scoping with Deep Binding", Option [] ["static-deep","sd"] (NoArg staticDeepScope)...
Dymanik/dymscope
src/Main.hs
gpl-2.0
1,180
10
15
206
434
236
198
22
4
module Fib(fib) where import Control.Parallel import Control.Monad import Text.Printf cutoff = 35 fib' :: Int -> Integer fib' 0 = 0 fib' 1 = 1 fib' n = fib' (n-1) + fib' (n-2) fib :: Int -> Integer fib n | n < cutoff = fib' n | otherwise = r `par` (l `pseq` l + r) where l = fib (n-1) r = fib (n-2...
heathweiss/Tricad
parallelProcess/Fib.hs
gpl-2.0
322
0
9
89
176
94
82
14
1
-- same as 'length' myLength :: [a] -> Int myLength (x:xs) = 1 + myLength xs myLength _ = 0 -- same as 'null' myNull :: [a] -> Bool myNull [] = True myNull _ = False -- same as 'head' myHead :: [a] -> a myHead (x:xs) = x myHead _ = error "myHead takes a non-empty list" safeHead :: [a] -> Maybe a safeHead (x:xs) = Ju...
Chasego/nie
proj/lang/C++/cpp_primer_5th/[SUPPORT] learning-master/real-world-haskell/ch4/myListFunctions.hs
gpl-3.0
1,935
0
10
463
945
506
439
60
2
module Main where import Filesystem.Path.CurrentOS import System.Environment import Config import Master import Util main :: IO () main = do getArgs >>= \case [configFilePath] -> parseConfig (decodeString configFilePath) >>= runMaster _ -> abort "Usage: boron CONFIG.json"
ktvoelker/boron
src/Main.hs
gpl-3.0
288
0
14
51
79
43
36
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-cloudmonitoring/gen/Network/Google/Resource/CloudMonitoring/Timeseries/List.hs
mpl-2.0
8,882
0
23
2,156
1,164
686
478
154
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Kubernetes.Unversioned.ListMeta where import GHC.Generics import Data.Text import qualified Data.Aeson -- | ListMeta describes metadata that s...
minhdoboi/deprecated-openshift-haskell-api
kubernetes/lib/Kubernetes/Unversioned/ListMeta.hs
apache-2.0
1,104
0
9
159
93
56
37
15
0
----------------------------------------------------------------------------- -- Copyright 2012 Microsoft Corporation. -- -- This is free software; you can redistribute it and/or modify it under the -- terms of the Apache License, Version 2.0. A copy of the License can be -- found in the file "license.txt" at the ...
lpeterse/koka
src/Core/Uniquefy.hs
apache-2.0
6,901
0
18
2,265
2,088
1,012
1,076
147
10
module Pattern where {- Encode this imperative pattern: def foo(x,y): x = f(x) if a(x) if c(x): x = g(x) else: x = h(x) x = f(x) y = f(y) if a(y) x = g(x) if b(y) return [x,y] -} import Control.Arrow (first, second, (>>>)) if' :: (a -> Bool) -> (a -> a) -> (a -> a) -> a ...
jtapolczai/Scratchpad
src/Pattern.hs
apache-2.0
899
0
14
352
351
189
162
25
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE LambdaCase #-} module HERMIT.Kure.Universes ( -- * Universes Core(..) , TyCo(..) , LCore(..) , LCoreTC(..) ...
beni55/hermit
src/HERMIT/Kure/Universes.hs
bsd-2-clause
24,159
0
11
5,576
5,360
2,822
2,538
519
6
{-# LANGUAGE DeriveFoldable #-} module Test.SimpleCheck.Gen.Internal ( RoseTree(..) , roseRoot , roseChildren , joinRose , integralRoseTree , uniqueRose , shrinkIntegral ) where import Data.Traversable ( Traversable(..) ) import Data.Monoid ( mappend , Monoid(..) ) import Contr...
reiddraper/haskell-simple-check
src/Test/SimpleCheck/Gen/Internal.hs
bsd-3-clause
2,608
0
15
631
997
531
466
67
4