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 GeneralizedNewtypeDeriving #-} -- | Helper module providing a monad that collects lines module Lseed.Geometry.Generator ( GeometryGenerator , translated , rotated , runGeometryGenerator , addLine ) where import Control.Monad.Reader import Control.Monad.Writer type Point = (Double, Double) type Li...
nomeata/L-seed
src/Lseed/Geometry/Generator.hs
bsd-3-clause
1,352
13
16
238
567
308
259
34
1
{-# LANGUAGE TypeFamilies #-} module Hadrian.Utilities ( -- * List manipulation fromSingleton, replaceEq, minusOrd, intersectOrd, lookupAll, chunksOfSize, -- * String manipulation quote, yesNo, zeroOne, -- * FilePath manipulation unifyPath, (-/-), -- * Accessing Shake's type-indexed map ...
bgamari/shaking-up-ghc
src/Hadrian/Utilities.hs
bsd-3-clause
18,183
0
15
4,293
4,146
2,216
1,930
296
5
{-# LANGUAGE QuasiQuotes #-} {-@ LIQUID "--no-termination "@-} import LiquidHaskell import Language.Haskell.Liquid.Prelude [lq| type OList a = [a]<{\fld v -> (v >= fld)}> |] [lq| type DList a = [a]<{\fld v -> (fld >= v)}> |] --------------------------------------------------------------------------- -------...
spinda/liquidhaskell
tests/gsoc15/unknown/pos/GhcListSort.hs
bsd-3-clause
3,923
2
13
979
1,552
835
717
-1
-1
module Core where import Core.Parser import Core.Pretty import Core.Types import Core.Utils bindersOf :: [(a, b)] -> [a] bindersOf defns = [name | (name, rhs) <- defns] rhssOf :: [(a, b)] -> [b] rhssOf defns = [rhs | (name, rhs) <- defns] isAtomicExpr :: Expr a -> Bool isAtomicExpr (EVar v) = True isAtomicExpr (ENu...
Fuuzetsu/hcore
src/Core.hs
bsd-3-clause
1,785
0
15
853
571
322
249
37
1
{- The MIT License Copyright (c) 2010 Korcan Hussein Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use...
plurSKI/euclidOrchard
src/Timer.hs
bsd-3-clause
2,795
0
11
612
566
328
238
26
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Main where import Control.Applicative (optional) import qualified Text.Show.Pretty as PP import qualified Text.XML.Light as XML import qualified Text.XML.Xleb as X data Feed = Feed { feedTitle :: String , feedSubtitle :: Stri...
aisamanra/xleb
examples/atom/Main.hs
bsd-3-clause
2,379
0
12
541
818
425
393
76
4
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} module Test.Tinfoil.Hash.TestVectors where import Data.ByteString (ByteString) import P import Sy...
ambiata/tinfoil
test/Test/Tinfoil/Hash/TestVectors.hs
bsd-3-clause
2,094
0
10
340
238
128
110
60
1
{-# LANGUAGE OverloadedStrings #-} -- | Cgroup support basic managing of linux cgroup controllers -- module System.Linux.Cgroups ( cgroupsSupported -- * Find cgroup utilities -- ** Get all subsystems information , lookupCgroupRoot --, procCgroups --, selfCgroups -- * Lookup functions -- $lookup -- ** ...
qnikst/cgroups-hs
System/Linux/Cgroups.hs
bsd-3-clause
6,485
0
18
1,307
1,643
893
750
109
2
module Main where import Lib import DirectoryServer main :: IO () main = mkApp
Garygunn94/DFS
DirectoryServer/app/Main.hs
bsd-3-clause
81
0
6
16
25
15
10
5
1
{-# LANGUAGE PatternGuards, DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : Text.CSL.Style -- Copyright : (c) Andrea Rossato -- License : BSD-style (see LICENSE) -- -- Maintainer : Andrea Rossato <andrea.rossato@unitn.it> -- Stability...
singingwolfboy/citeproc-hs
src/Text/CSL/Style.hs
bsd-3-clause
17,188
0
17
6,115
5,123
2,780
2,343
389
5
{-# LANGUAGE DerivingVia #-} {-# OPTIONS_GHC -Wno-orphans #-} module Orphans () where import Control.Monad.Trans.Resource import Control.Monad.Trans.Resource.Internal ( ReleaseKey(..) , ReleaseMap(..)...
expipiplus1/vulkan
examples/lib/Orphans.hs
bsd-3-clause
2,573
0
10
667
582
303
279
-1
-1
{-# LANGUAGE CPP, DeriveDataTypeable, MultiWayIf, NamedFieldPuns, OverloadedStrings, RankNTypes, RecordWildCards, TemplateHaskell, TupleSections #-} -- | Run commands in Docker containers module Stack.Docker (checkVersions ,cleanup ,CleanupOpts(..) ,CleanupAction(..) ,dockerCleanupCmdName ,doc...
mietek/stack
src/Stack/Docker.hs
bsd-3-clause
45,744
0
29
14,663
9,711
5,005
4,706
860
21
module Network.Mail.Postie.Address ( Address, -- | Represents an email address address, -- | Returns address from local and domain part addressLocalPart, -- | Returns local part of address addressDomain, -- | Retuns domain part of address toByteString, -- | Resulting ByteString has...
alexbiehl/postie
src/Network/Mail/Postie/Address.hs
bsd-3-clause
4,421
0
13
858
1,412
727
685
123
1
import ForSyDe.Shallow import Test.QuickCheck type Rate = Positive Int instance (Arbitrary a) => Arbitrary (Signal a) where arbitrary = do x <- arbitrary return (signal x) instance Arbitrary a => Arbitrary (AbstExt a) where arbitrary = do x <- arbitrary return (Prst x) countEvent _ NullS = 0...
forsyde/forsyde-shallow
test/Props.hs
bsd-3-clause
2,562
0
13
674
1,058
547
511
53
1
{-# LANGUAGE OverloadedStrings #-} -- | -- Module : Auth.Logout -- Copyright : (C) 2015 Ricky Elrod -- License : MIT (see LICENSE file) -- Maintainer : (C) Ricky Elrod <ricky@elrod.me> -- Stability : experimental -- -- Functions and handlers for logging the user out. module Auth.Logout where import Application import...
meoblast001/quotum-snap
src/Auth/Logout.hs
mit
520
0
7
84
67
42
25
8
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Overload...
vacationlabs/haskell-webapps
ServantPersistent/src/DBTypes.hs
mit
3,713
0
11
955
894
507
387
97
0
-- Nim example from chapter 10 of Programming in Haskell, -- Graham Hutton, Cambridge University Press, 2016. import Data.Char -- Game utilities next :: Int -> Int next 1 = 2 next 2 = 1 type Board = [Int] initial :: Board initial = [5,4,3,2,1] finished :: Board -> Bool finished = all (== 0) valid :: Board -> Int...
thalerjonathan/phd
coding/learning/haskell/grahambook/Code_Solutions/nim.hs
gpl-3.0
2,012
0
14
833
655
318
337
55
3
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Module : Test.AWS.CloudTrail.Internal -- Copyright : (c) 2013-2015 Brendan Hay -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- A copy of the ...
fmapfmapfmap/amazonka
amazonka-cloudtrail/test/Test/AWS/CloudTrail/Internal.hs
mpl-2.0
627
0
4
140
25
21
4
4
0
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Unittests for ganeti-htools. -} {- Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions a...
ganeti-github-testing/ganeti-test-1
test/hs/Test/Ganeti/Query/Filter.hs
bsd-2-clause
8,498
0
19
1,765
1,634
851
783
132
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE RecordWildCards #-} -- Concurrent execution with dependencies. Types currently hard-coded for needs -- of stack, but could be generalized easily. module Control.Concurrent.Execute ( ActionType (..) , ActionId (..) , ActionContext (..) , Action (..) ...
mathhun/stack
src/Control/Concurrent/Execute.hs
bsd-3-clause
5,003
0
33
1,914
1,181
605
576
129
7
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[RnPat]{Renaming of patterns} Basically dependency analysis. Handles @Match@, @GRHSs@, @HsExpr@, and @Qualifier@ datatypes. In general, all of these functions return a renamed thing, and a set of free variables. -} {-# LANGUAGE CPP, RankNTypes, S...
elieux/ghc
compiler/rename/RnPat.hs
bsd-3-clause
33,610
29
23
10,960
6,521
3,534
2,987
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE PolyKinds #-} #ifdef USE_REFLEX_OPTIMIZER {-# OPTIONS_...
ryantrinkle/reflex
src/Reflex/Pure.hs
bsd-3-clause
8,306
0
21
2,038
2,681
1,393
1,288
-1
-1
{-# LANGUAGE Safe, TypeOperators #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Zip -- Copyright : (c) Nils Schweinsberg 2011, -- (c) George Giorgidze 2011 -- (c) University Tuebingen 2011 -- License : BSD-sty...
rahulmutt/ghcvm
libraries/base/Control/Monad/Zip.hs
bsd-3-clause
3,308
0
10
768
545
317
228
43
0
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "dist/dist-sandbox-261cd265/build/System/Posix/Files/Common.hs" #-} {-# LINE 1 "System/Posix/Files/Common.hsc" #-} {-# LANGUAGE Trustworthy #-} {-# LINE 2 "System/Posix/Files/Common.hsc" #-} ----------------------------------------------------------------------------- -- | -- Mo...
phischu/fragnix
tests/packages/scotty/System.Posix.Files.Common.hs
bsd-3-clause
23,125
199
14
4,373
3,570
2,051
1,519
283
14
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "src/System/PosixCompat/Types.hs" #-} {-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-| This module re-exports the types from @System.Posix.Types@ on all platforms. On Windows 'UserID', 'GroupID' and 'LinkCount' ...
phischu/fragnix
tests/packages/scotty/System.PosixCompat.Types.hs
bsd-3-clause
478
0
5
114
27
20
7
7
0
module Baum.Binary.Show where -- $Id$ import Baum.Binary.Type import Data.Tree toTree :: Show a => Baum a -> Tree String toTree Null = Node "-" [] toTree b = Node ( show $ key b ) [ toTree ( left b ) , toTree ( right b ) ]
Erdwolf/autotool-bonn
src/Baum/Binary/Show.hs
gpl-2.0
247
2
9
72
105
54
51
7
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} module Stack.Init ( initProject , InitOpts ...
juhp/stack
src/Stack/Init.hs
bsd-3-clause
24,124
0
22
7,963
4,928
2,510
2,418
463
7
{-# LANGUAGE DeriveGeneric #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.InstalledPackageInfo -- Copyright : (c) The University of Glasgow 2004 -- -- Maintainer : libraries@haskell.org -- Portability : portable -- -- This is the information ...
DavidAlphaFox/ghc
libraries/Cabal/Cabal/Distribution/InstalledPackageInfo.hs
bsd-3-clause
15,921
0
14
5,108
3,094
1,764
1,330
304
2
module TestTime(tests) where import Test.HUnit import Database.HDBC import TestUtils import Control.Exception import Data.Time import Data.Time.LocalTime import Data.Time.Clock.POSIX import Data.Maybe import Data.Convertible import SpecificDB import System.Locale(defaultTimeLocale) import Database.HDBC.Locale (iso8601D...
hdbc/hdbc-sqlite3
testsrc/TestTime.hs
bsd-3-clause
3,583
0
16
1,008
773
399
374
77
2
-- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "License"); you ma...
rkq/cxxexp
third-party/src/thrift-0.9.1/test/hs/DebugProtoTest_Main.hs
mit
6,574
0
12
1,421
1,066
587
479
114
1
module RenameImport where import BarModule
charleso/intellij-haskforce
tests/gold/refactoring/RenameFile/RenameImport-after.hs
apache-2.0
43
0
3
5
7
5
2
2
0
{-# LANGUAGE DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Hooks.ManageDebug -- Copyright : (c) Brandon S Allbery KF8NH, 2014 -- License : BSD3-style (see LICENSE) -- -- Maintainer : allbery.b@gmail.com -- Stability : uns...
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Hooks/ManageDebug.hs
bsd-2-clause
4,185
0
14
1,222
561
315
246
51
2
{-# LANGUAGE OverloadedStrings, RankNTypes #-} module Graphics.UI.Bottle.View ( View, augmentAnimId, backgroundColor, scaled ) where import Data.Vector.Vector2 (Vector2(..)) import Graphics.UI.Bottle.Animation (AnimId, Layer) import qualified Control.Lens as Lens import qualified Data.ByteString.Char8 as SBS8 impo...
schell/lamdu
bottlelib/Graphics/UI/Bottle/View.hs
gpl-3.0
962
0
9
145
319
185
134
20
1
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE RankNTypes, ImplicitParams, UnboxedTuples #-} -- Test two slightly exotic things about type signatures module ShouldCompile where -- The for-all hoisting should hoist the -- implicit parameter to give -- r :: (?param::a) =>...
olsner/ghc
testsuite/tests/typecheck/should_compile/tc145.hs
bsd-3-clause
547
0
8
158
69
44
25
8
1
{-# LANGUAGE GADTs #-} module T5217 where import Language.Haskell.TH $([d| data T a b where { T1 :: Int -> T Int Char ; T2 :: a -> T a a ; T3 :: a -> T [a] a ; T4 :: a -> b -> T b [a] } |])
ezyang/ghc
testsuite/tests/th/T5217.hs
bsd-3-clause
261
0
6
122
22
15
7
-1
-1
import Test.Tasty import qualified Tests.Math.Hclaws.ConservationLaws import qualified Tests.Math.Hclaws.FrontTracking import qualified Tests.Math.Hclaws.Systems.Burgers import qualified Tests.Math.Hclaws.Systems.JenssenYoung2004_31 import qualified Tests.Math.Hclaws.Systems.Linear import qualified Tests.Math.Hclaws....
mikebenfield/hclaws
test/Main.hs
isc
1,277
1
6
104
243
172
71
28
1
{-# LANGUAGE FlexibleContexts #-} module InstaHuskee where import Data.Text import Data.Default (def) import Network.HTTP.Client import Network.HTTP.Client.TLS (tlsManagerSettings) import Control.Monad.Reader import Control.Monad.Trans.Resource import ...
dzotokan/instahuskee
src/InstaHuskee.hs
mit
1,686
0
10
288
412
220
192
-1
-1
module RailFenceCipher (encode, decode) where encode :: Int -> String -> String encode = error "You need to implement this function!" decode :: Int -> String -> String decode = error "You need to implement this function!"
exercism/xhaskell
exercises/practice/rail-fence-cipher/src/RailFenceCipher.hs
mit
224
0
6
39
54
30
24
5
1
-- Problems.Problem011.hs module Problems.Problem011 (p11) where import Data.List main = print p11 p11 :: Int p11 = maximum $ map biggestFromGrid [leftGrid, rightGrid, topGrid, bottomGrid, diagonalLefRightGrid, diagonalRightLeftGrid] biggestFromGrid :: [[Int]] -> Int biggestFromGrid = maximum . map biggestFromRow ...
Sgoettschkes/learning
haskell/ProjectEuler/src/Problems/Problem011.hs
mit
2,726
0
9
698
1,591
1,028
563
42
1
module Main where import PositiveInteger import Text.Trifecta main :: IO () main = do print $ parseString parseDigit mempty "123" print $ parseString parseDigit mempty "abc" -- expected to fail print $ parseString base10Integer mempty "123abc" print $ parseString base10Integer mempty "abc" -- expected to fai...
NickAger/LearningHaskell
HaskellProgrammingFromFirstPrinciples/Chapter24/PostiveInteger/src/Main.hs
mit
429
0
8
73
113
54
59
11
1
import Data.List import Data.Numbers.Primes num :: [Integer] -> Integer num qs = product $ zipWith (^) primes qs kind :: [Integer] -> Integer kind qs = 1 + go qs 1 where go [] _ = 0 go (q:qs) k = q*k + go qs (k*(q*2+1)) primeSumLists k = tail $ go smallPrime 1 k where smallPrime = takeWhile (<k...
jwvg0425/HaskellScratchPad
src/euler110.hs
mit
639
5
13
195
372
189
183
17
2
{-# htermination filterFM :: Ord a => ([a] -> b -> Bool) -> FiniteMap [a] b -> FiniteMap [a] b #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_filterFM_4.hs
mit
116
0
3
23
5
3
2
1
0
----------------------------------------------------------------------------- -- -- Module : Connections.Mash -- Copyright : -- License : AllRightsReserved -- -- Maintainer : -- Stability : -- Portability : -- -- | -- ----------------------------------------------------------------------------- module ...
uvNikita/TopologyCalc
src/Connections/Mash.hs
mit
1,267
0
13
438
375
211
164
24
2
{- | Module : Text.Pandoc.CrossRef Copyright : Copyright (C) 2015 Nikolay Yakimov License : GNU GPL, version 2 or above Maintainer : Nikolay Yakimov <root@livid.pp.ru> Stability : alpha Portability : portable Public interface to pandoc-crossref library Example of use: > import Text.P...
infotroph/pandoc-crossref
lib/Text/Pandoc/CrossRef.hs
gpl-2.0
4,286
0
15
958
594
327
267
58
1
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-} module Graph.VC.Param where -- $Id$ import Autolib.ToDoc import Autolib.Reader import Data.Typeable data Param = Param { knoten :: Int , kanten :: Int , deck_knoten_moeglich :: Int , deck_knoten_maximum :: Int ...
Erdwolf/autotool-bonn
src/Graph/VC/Param.hs
gpl-2.0
617
6
9
200
141
87
54
19
1
{-# LANGUAGE ForeignFunctionInterface, GeneralizedNewtypeDeriving, ExistentialQuantification, TemplateHaskell, TupleSections, ParallelListComp, NamedFieldPuns, NoMonomorphismRestriction, ScopedTypeVariables #-} --module Mapgen.Campus (makeMap, CampusArgs (..)) where module Mapgen.Campus where import Object import Bas...
arirahikkala/straylight-divergence
src/Mapgen/Campus.hs
gpl-3.0
7,866
0
25
1,903
2,427
1,294
1,133
115
4
----------------------------------------------------------------------------- -- Standard Library: List operations -- -- Suitable for use with Helium, derived from Hugs 98 Standard Library -- Modifications: -- * tuple constructors for zip functions -- * 'generic' functions for Integral type class are excluded -- ...
Helium4Haskell/helium
lib/List.hs
gpl-3.0
8,416
0
13
3,368
4,278
2,390
1,888
150
2
--project euler problem 27 {-- Euler published the remarkable quadratic formula: n² + n + 41 It turns out that the formula will produce 40 primes for the consecutive values n = 0 to 39. However, when n = 40, 402 + 40 + 41 = 40(40 + 1) + 41 is divisible by 41, and certainly when n = 41, 41² + 41 + 41 is clearly divisi...
goalieca/haskelling
027.hs
gpl-3.0
1,982
2
15
460
519
277
242
26
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/ListVolumes.hs
mpl-2.0
5,418
0
14
1,230
816
480
336
84
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-spanner/gen/Network/Google/Resource/Spanner/Projects/Instances/Databases/DropDatabase.hs
mpl-2.0
5,503
0
15
1,152
701
411
290
109
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-sqladmin/gen/Network/Google/Resource/SQL/Operations/List.hs
mpl-2.0
4,219
0
16
1,006
572
336
236
84
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.CloudTasks....
brendanhay/gogol
gogol-cloudtasks/gen/Network/Google/CloudTasks/Types/Product.hs
mpl-2.0
98,658
0
21
20,289
12,201
7,202
4,999
1,307
1
module Array where { data Array a = Array [a]; }
jwaldmann/ceta-postproc
CeTA-2.39/generated/Haskell/Array.hs
lgpl-3.0
50
0
7
12
20
14
6
2
0
{-| This package provides test types for Network.Haskoin -} module Network.Haskoin.Test ( -- * Util Arbitrary functions arbitraryBS , arbitraryBS1 , arbitraryBSn , arbitraryUTCTime , arbitraryMaybe -- * Crypto Arbitrary functions , arbitraryHash160 , arbitraryHash256 , arbitraryHash512 , arbitraryCheckSum32 , ...
plaprade/haskoin
haskoin-core/src/Network/Haskoin/Test.hs
unlicense
2,571
0
5
279
358
244
114
105
0
allNumbers = allNumbersFrom 1 allNumbersFrom n = n: allNumbersFrom (n+1) data TimeMachine = TM {manufacturer :: String, year :: Integer } deriving (Eq, Show) timeMachinesFrom :: String -> Integer -> [TimeMachine] timeMachinesFrom mf y = TM mf y : timeMachinesFrom mf (y+1) yxtake _ [] = [] yxtake 0 l = [] yxtake n...
wangyixiang/beginninghaskell
chapter5/src/Chapter5/Infinite.hs
unlicense
574
5
10
117
344
172
172
15
1
module Transformers where {- This is a collection of various monad transformers, independent of the usually used transformer libraries like mtl. -} import TransformerClass import Data.Monoid import Control.Monad (liftM) -- List Transformer newtype ListT m a = ListT { runListT :: m [a] } instance Monad m =...
dermesser/haskell-experiments
Transformers.hs
unlicense
4,790
0
14
1,582
1,966
1,015
951
118
2
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} module Calc where import StackVM import Data.Functor ((<$>)) import qualified ExprT as E import qualified Data.Map as M import Parser -- Exercise #1: eval :: E.ExprT -> Integer eval (E.Lit a) = a eval (E.Add a b) = eval a + eval b ...
parsonsmatt/cis194
hw5/Calc.hs
apache-2.0
2,049
0
9
679
901
455
446
68
1
module BankKata.BankAccount where import BankKata.Natural import Data.List import Data.Time data Transaction = Deposit Day Nat | Withdraw Day Nat deriving (Show, Eq) newtype BankAccount = BankAccount { getTransactions :: [Transaction] } deriving (Show, Eq) emptyAccount :: BankAccount em...
PaNaVTEC/Katas
bank-kata/haskell/src/BankKata/BankAccount.hs
apache-2.0
2,393
0
12
488
919
472
447
49
4
module Main (main) where import Control.Applicative hiding (many) import Data.Text (Text) import qualified Data.Text.IO as T import System.Environment (getArgs) import Text.Parsec hiding ((<|>), parse, State) import Text.Parsec.Expr hiding (Operator) import T...
jystic/language-livescript
src/Main.hs
apache-2.0
2,028
0
12
479
606
327
279
54
2
-- | This module contains the Notifications App. This application allows Tersus applications -- to create topics to which other applications can subscribe and all messages sent to -- this application under a particular topic will be delivered to all applications -- subscribed to that topic module Tersus.Cluster.TersusN...
kmels/tersus
Tersus/Cluster/TersusNotificationsApp.hs
bsd-2-clause
7,514
1
17
1,743
1,531
820
711
108
6
-- -- Copyright (c) 2013, Carl Joachim Svenn -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- 1. Redistributions of source code must retain the above copyright notice...
karamellpelle/MEnv
source/Font/FontColor.hs
bsd-2-clause
2,757
0
9
614
362
205
157
37
1
{-# LANGUAGE NoMonomorphismRestriction #-} module Codec.Baduk.Parser.WBaduk (parseNGF) where import Data.Baduk.Game import Text.Parsec import Text.Parsec.Text import Control.Applicative hiding (optional, (<|>)) import Data.Time.Format import System.Locale import qualified Data.Text as T import qualified Data.Map as M...
frodwith/baduk-formats
src/Codec/Baduk/Parser/WBaduk.hs
bsd-3-clause
2,905
0
15
1,116
874
443
431
71
7
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} module Control.Access.RoleBased.Internal.Types ( module Control.Access.RoleBased.Internal.Role , module Control.Access.RoleBased.Internal.Rule , RoleMonad(..) , RuleChecker(..) ...
sopvop/access-rolebased
src/Control/Access/RoleBased/Internal/Types.hs
bsd-3-clause
1,348
0
9
191
182
118
64
17
0
module Extensions where data Extension = ASFExt ASFExt | FLACExt FLACExt | M4AExt M4AExt | MonkeysAudioExt MonkeysAudioExt | MP3Ext MP3Ext | MusepackExt MusepackExt | OggSpeexExt OggSpeexExt | OggVorbisExt ...
kylcarte/harihara
src/Extensions.hs
bsd-3-clause
1,012
0
6
380
197
120
77
54
0
module Models.Talk where import Control.Monad (liftM, mzero, void) import Data.Aeson import qualified Data.ByteString.Char8 as C import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Read as ...
rnons/ted2srt
backend/src/Models/Talk.hs
bsd-3-clause
4,599
0
20
1,598
1,442
738
704
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} module Data.Csv.Types ( -- * Core CSV types Csv , Record , Header , Name , NamedRecord , Field , toNamedRecord -- * Header handling , HasHeader(..) ) where import qualified Data.ByteString as S import ...
treeowl/cassava
Data/Csv/Types.hs
bsd-3-clause
1,661
0
7
360
268
166
102
30
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple -- Copyright : Isaac Jones 2003-2005 -- License : BSD3 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This is the command line front end to the Simple build sys...
randen/cabal
Cabal/Distribution/Simple.hs
bsd-3-clause
30,711
20
25
7,647
6,206
3,147
3,059
502
8
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} module Bio.Foreign.MACS2 ( makeTagDirectory , FindPeakOpt , style , control , findPeaks , pos2bed ) where import...
kaizhang/bioinformatics-toolkit-foreign
src/Bio/Foreign/MACS2.hs
bsd-3-clause
1,002
2
12
229
228
139
89
-1
-1
{-+ This module defines the parser monad, and the function #parseFile#, which is the only way to invoke a parser. -} module ParseMonad(thenPM,PM,HToken,returnPM,parseError,getSrcLoc, State,get,set,setreturn,eof,eoftoken, parseFile,parseTokens) where import HsTokens(Token(GotEOF)) import HsLexerPass1(lexe...
forste/haReFork
tools/base/parse2/ParseMonad.hs
bsd-3-clause
2,385
9
14
594
832
471
361
-1
-1
module MyDoc where import Text.PrettyPrint import EnvM import MUtils import Monad import Char(isSpace) type Heading = (Int,String) data TxtDec = Plain | Emph | Code | Math deriving (Eq,Show) type DecString = (TxtDec,String) type Code = [String] type TxtBlock = [Paragraph] data Paragraph = Txt [...
forste/haReFork
tools/hs2html/MyDoc.hs
bsd-3-clause
1,562
0
11
486
704
372
332
45
3
module Main(main) where import Game.TicTacToe(client) main :: IO () main = client
peterson/hsttt
src/Main.hs
bsd-3-clause
84
0
6
14
34
20
14
4
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} module Turtle.Line ( Line , lineToText , textToLines , linesToText , textToLine , unsafeTextToLine , NewlineForbidden(..) ) whe...
mitchellwrosen/Haskell-Turtle-Library
src/Turtle/Line.hs
bsd-3-clause
3,036
0
10
546
372
230
142
42
2
module Backend.Interpreter where import qualified Data.Map as Map import qualified Data.Maybe as Maybe import Frontend.Parser type Env = Map.Map String Expr interpret :: [Stmt] -> IO () interpret stmts = interpret' stmts Map.empty interpret' :: [Stmt] -> Env -> IO () interpret' [] _ = return () interpret' (ExprStmt...
JCGrant/JLang
src/Backend/Interpreter.hs
bsd-3-clause
981
0
10
221
442
221
221
23
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} -- | "SDL.Video.Renderer" provides a high-level interface t...
bj4rtmar/sdl2
src/SDL/Video/Renderer.hs
bsd-3-clause
49,276
0
21
10,032
8,524
4,458
4,066
764
4
{-# LANGUAGE PackageImports #-} module Main where import "crypto-random" Crypto.Random import System.Environment import Data.ByteString as B gen :: String -> Int -> IO () gen file sz = do entPool <- createEntropyPool let cprg = cprgCreate entPool :: SystemRNG let (b, _) = cprgGenerate sz cprg B.writ...
vincenthz/hs-crypto-random
Tests/GenerateRandom.hs
bsd-3-clause
489
0
12
125
159
80
79
16
2
{-# LANGUAGE OverloadedStrings #-} module Blockchain.Data.AddressStateDB ( AddressState(..), blankAddressState, getAddressState, getAllAddressStates, putAddressState, deleteAddressState, addressStateExists ) where import Data.Binary import qualified Data.ByteString as B import qualified Data.ByteStrin...
jamshidh/ethereum-data-leveldb
src/Blockchain/Data/AddressStateDB.hs
bsd-3-clause
3,557
0
18
566
905
489
416
72
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Web.Spock.FrameworkSpecHelper where #if MIN_VERSION_hspec_wai(0,8,0) import Test.Hspec.Wai.Matcher #endif #if MIN_VERSION_base(4,11,0) #else import Data.Monoid #endif import qualified Data.ByteString as BS import qualified Data.ByteString.Base64 as B64 ...
agrafix/Spock
Spock-core/test/Web/Spock/FrameworkSpecHelper.hs
bsd-3-clause
9,369
0
20
2,480
2,211
1,174
1,037
191
3
{-# LANGUAGE TemplateHaskell, TypeOperators #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeSynonymInstances #-} module Network.Protocol.Snmp.AgentX.Packet.Types ( PDU(..) , Version , S...
chemist/agentx
src/Network/Protocol/Snmp/AgentX/Packet/Types.hs
bsd-3-clause
11,501
0
11
3,794
2,689
1,496
1,193
325
1
{-# LINE 1 "GHC.Event.Internal.hs" #-} {-# LANGUAGE Unsafe #-} {-# LANGUAGE ExistentialQuantification, NoImplicitPrelude #-} module GHC.Event.Internal ( -- * Event back end Backend , backend , delete , poll , modifyFd , modifyFdOnce -- * Event type , Event , evtRead , ...
phischu/fragnix
builtins/base/GHC.Event.Internal.hs
bsd-3-clause
6,327
0
16
1,784
1,393
774
619
138
3
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-} module HrrDatatypeTest where import Database.HDBC.Query.TH (defineTableFromDB) import Database.HDBC.Schema.Oracle (driverOracle) import Database.Record.TH (derivingShow) import DataSource (connect, owner) defineTableFromDB connect driverOrac...
amutake/haskell-relational-record-driver-oracle
example/src/HrrDatatypeTest.hs
bsd-3-clause
364
0
6
32
68
42
26
7
0
{-# LANGUAGE ConstraintKinds, DataKinds, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, RankNTypes, ScopedTypeVariables, TypeFamilies, TypeOperators #-} -- | Lens utilities for working with 'Record's. mo...
codygman/Frames
src/Frames/RecLens.hs
bsd-3-clause
1,982
0
17
566
790
406
384
48
1
module Data.Honeybee.Types (BValue(..))where import qualified Data.ByteString.Char8 as B import qualified Data.Map as M data BValue = BInteger Integer | BString B.ByteString | BList [BValue] | BDict (M.Map BValue BValue) deriving (Show, Eq, Ord)
DuoSRX/honeybee
src/Data/Honeybee/Types.hs
bsd-3-clause
298
0
9
85
87
54
33
8
0
-- | Keeps our main Language -related logic module Toy.Lang ( module M ) where import Toy.Lang.Data as M import Toy.Lang.Interpreter as M import Toy.Lang.Lib as M import Toy.Lang.Parser as M () import Toy.Lang.Translator as M
Martoon-00/toy-compiler
src/Toy/Lang.hs
bsd-3-clause
313
0
4
123
56
41
15
7
0
module IAU2000.TestEquations where import Astro import Astro.DefaultData import Astro.Time import Astro.Time.Convert import Astro.Time.Sidereal --import IAU2000.Equations import Numeric.Units.Dimensional.Prelude import Test.QuickCheck import qualified Prelude -- | Comparison allowing for inaccuracy. cmpE :: (Ord a, N...
bjornbm/astro
test/IAU2000/TestEquations.hs
bsd-3-clause
1,636
0
12
317
473
242
231
37
1
module PaymentTrackerSpec where import SpecHelper main :: IO () main = hspec spec spec :: Spec spec = do describe "PaymentTracker" $ do context "totalPaid" $ do it "calculates total money paid" $ do totalPaid payments `shouldBe` 41 context "paymentsPerCategory" $ do it "groups payments...
Sam-Serpoosh/WatchIt
test/PaymentTrackerSpec.hs
bsd-3-clause
3,116
0
24
822
884
476
408
54
1
cons :: Integer -> Integer -> Integer cons x y = 2 ^ x * 3 ^ y unpower :: Integer -> Integer -> Integer unpower n x | x `mod` n /= 0 = 0 | otherwise = 1 + unpower n (x `div` n) uncons :: Integer -> (Integer, Integer) uncons xy = (unpower 2 xy, unpower 3 xy)
YoshikuniJujo/funpaala
samples/24_adt_module/tuple23.hs
bsd-3-clause
262
0
9
65
141
73
68
8
1
module Terminal where import System.Console.ANSI colorString :: Color -> String -> String colorString col str = prefix ++ str ++ appendix where prefix = setSGRCode [SetColor Foreground Vivid col, SetConsoleIntensity BoldIntensity] appendix = setSGRCode [Reset] blackString :: String ->...
Frefreak/Gideon
src/Terminal.hs
bsd-3-clause
1,079
0
9
196
294
155
139
29
1
{- DATX02-17-26, automated assessment of imperative programs. - Copyright, 2017, see AUTHORS.md. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at...
DATX02-17-26/DATX02-17-26
libsrc/CoreS/ASTUtils.hs
gpl-2.0
5,884
0
11
1,138
917
515
402
78
7
-- | The all-important theming engine! -- -- Cf -- https://hackage.haskell.org/package/vty/docs/Graphics-Vty-Attributes.html -- http://hackage.haskell.org/package/brick/docs/Brick-AttrMap.html -- http://hackage.haskell.org/package/brick-0.1/docs/Brick-Util.html -- http://hackage.haskell.org/package/brick-0.1/docs/Brick...
adept/hledger
hledger-ui/Hledger/UI/Theme.hs
gpl-3.0
4,912
0
12
1,526
718
441
277
51
1
#! /usr/bin/env nix-shell #! nix-shell ./lineage_hive_generator.hs.nix -i runghc {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} import Data.Functor ((<&>)) import Control.Monad (when) import Control.Arrow ((>>>)) import Data.Proxy (Proxy(..)) import Data.Either (isLef...
mars-lan/WhereHows
contrib/metadata-ingestion/haskell/bin/lineage_hive_generator.hs
apache-2.0
3,489
0
16
793
871
491
380
69
1
module FP_ParserGen where {- =========================================================================== Contains Parser Generator =========================================================================== -} import Types import Data.List -- =========================================================================...
wouwouwou/2017_module_8
src/haskell/PP-project-2017/FP_ParserGen.hs
apache-2.0
4,311
0
20
1,380
1,387
742
645
44
8
{- | This module provides normalized multi-dimensional versions of the transforms in @fftw@. The forwards transforms in this module are identical to those in "Numeric.FFT.Vector.Unnormalized". The backwards transforms are normalized to be their inverse operations (approximately, due to floating point precision). For...
judah/vector-fftw
Numeric/FFT/Vector/Invertible/Multi.hs
bsd-3-clause
1,784
0
12
346
200
125
75
17
1
module Distribution.Solver.Modular.IndexConversion ( convPIs ) where import Data.List as L import Data.Map as M import Data.Maybe import Data.Monoid as Mon import Data.Set as S import Prelude hiding (pi) import Distribution.Compiler import Distribution.InstalledPackageInfo as IPI import Distribution.Package ...
thomie/cabal
cabal-install/Distribution/Solver/Modular/IndexConversion.hs
bsd-3-clause
15,127
0
19
3,782
3,100
1,667
1,433
149
9
{-# LANGUAGE MultiParamTypeClasses #-} module Numeric.Log ( Log(..) ) where import Data.Function (on) import Numeric.Algebra import Prelude hiding ((*),(^),(/),recip,negate,subtract) newtype Log r = Log { runLog :: r } instance Multiplicative r => Additive (Log r) where Log a + Log b = Log (a * b) sumWith...
athanclark/algebra
src/Numeric/Log.hs
bsd-3-clause
1,247
2
9
291
654
327
327
32
0
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.ReadCopyPixels -- Copyright : (c) Sven Panne 2002-2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable ...
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/ReadCopyPixels.hs
bsd-3-clause
3,300
0
12
641
567
322
245
59
3
module Main where test1 :: Int test2 :: a -> a -> Complex a test2 = (:+) test25 :: NFData a => a test25 = undefined test3 :: (b -> b -> c) -> (a -> b) -> a -> a -> c test3 = on test4 = putStrLn "Bar" test5 :: [t] -> () test5 (_:_) = () -- hlint test6 :: [Integer] -> [Integer] test6 = map (+ 1) . map (* 2)
carlohamalainen/ghc-mod
test-elisp/inp.hs
bsd-3-clause
314
0
8
82
171
96
75
13
1
module Infix2 where -- define an infix constructor and attempt to remove it... data T1 a b = a :$: b | b :#: a f x y = x :$: y
kmate/HaRe
old/testing/removeCon/Infix2.hs
bsd-3-clause
130
0
6
35
39
23
16
3
1
{-# LANGUAGE CPP #-} -- This module tests the deprecated properties of Data.Map and Data.IntMap, -- because these cannot be tested in either map-properties or -- intmap-properties, as these modules are designed to work with the .Lazy and -- .Strict modules. import qualified Data.Map as M import qualified Data.Map.Str...
iu-parfunc/containers
tests/deprecated-properties.hs
bsd-3-clause
4,608
0
12
837
1,388
736
652
76
1
import Data.IORef import Control.Monad import Control.Exception import Control.Concurrent.MVar import System.Mem main :: IO () main = do run run run run m <- newEmptyMVar quit m performMajorGC takeMVar m run :: IO () run = do ref <- newIORef () void $ mkWeakIORef ref $ do putStr "." throwI...
sdiehl/ghc
libraries/base/tests/T13167.hs
bsd-3-clause
449
0
11
115
196
89
107
26
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} -- | -- Module : Control.Monad.Fail -- Copyright : (C) 2015 David Luposchainsky, -- (C) 2015 Herbert Valerio Riedel -- License : BSD-style (see the file LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : pro...
tolysz/prepare-ghcjs
spec-lts8/base/Control/Monad/Fail.hs
bsd-3-clause
2,037
0
8
406
193
135
58
17
0