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
{-# OPTIONS_GHC -fno-warn-orphans #-} module Application ( makeApplication , getApplicationDev , makeFoundation ) where import Import import Settings import Yesod.Auth import Yesod.Default.Config import Yesod.Default.Main import Yesod.Default.Handlers import Yesod.Logger (Logger, logBS, toProduction) i...
hce/lights
Application.hs
bsd-2-clause
2,366
0
11
434
448
244
204
-1
-1
module GameSpec ( spec , completeGame , incompleteGame ) where import Control.Exception (evaluate) import Test.Hspec import Test.QuickCheck import Game import PartialBoard (emptyBoard, flipTileAtWith) import PartialBoardSpec (completePartialBoard, consistentPartialBoard, incompletePartialBoard, inconsistentP...
jameshales/voltorb-flip
test/GameSpec.hs
bsd-3-clause
2,140
0
18
487
632
321
311
48
1
import System.Environment import Text.ICalendar.Folding {- - The aim of this test is to ensure that lines get unfolded correctly. - For now, taking two input file names it should tell us wether or not one is the unfolded version - of the other and vice versa. -} arg_count = 2 main :: IO () main = do args <-...
robertmassaioli/hICalendar
test/FoldingCheck.hs
bsd-3-clause
1,082
0
14
421
159
78
81
18
4
{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Ivory.Language.Syntax.AST where import Prelude () import Prelude.Compat import Ivory.Language.Syntax.Concrete.Location import Ivory.La...
GaloisInc/ivory
ivory/src/Ivory/Language/Syntax/AST.hs
bsd-3-clause
12,914
0
13
3,429
2,598
1,498
1,100
269
2
{-# OPTIONS_GHC -fwarn-incomplete-patterns -Werror #-} {-| Binary instances for the core datatypes -} module Idris.Core.Binary where import Data.Binary import Data.Vector.Binary import qualified Data.Text as T import Idris.Core.TT instance Binary ErrorReportPart where put (TextPart msg) = do putWord8 0 ; put msg ...
andyarvanitis/Idris-dev
src/Idris/Core/Binary.hs
bsd-3-clause
21,546
0
22
12,915
6,307
2,783
3,524
521
0
import Codec.Crypto.RSA import Control.Monad import Data.ByteString.Lazy(ByteString) import qualified Data.ByteString.Lazy as BS import Data.Digest.Pure.SHA import Data.Word import System.Random import Test.QuickCheck import Test.Framework (defaultMain, testGroup, Test) import Test.Framework.Providers.QuickCheck2 (tes...
soenkehahn/RSA
Test.hs
bsd-3-clause
7,320
150
9
1,675
1,930
1,019
911
145
1
{-# LANGUAGE RecordWildCards, ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} module All(runNinja) where import System.Process (system) import System.Exit import Control.Exception (throwIO) import Type import Parse import B.Shake hiding (Rule) --import Development.Shake.Command import B.Shake.FilePath --i...
strager/b-shake
examples/Ninja/All.hs
bsd-3-clause
5,543
0
22
1,680
1,770
875
895
90
4
module BookingRequestSpec (main, spec) where import Test.Hspec import qualified BookingRequest import qualified Date import qualified Seats import Data.Validation main :: IO () main = hspec spec spec :: Spec spec = do describe "Failing" $ do it "junk" $ do let now = Date.Date 2 BookingRequest.mak...
pittsburgh-haskell/data-validation-demo-haskell
test/BookingRequestSpec.hs
bsd-3-clause
820
0
21
216
285
145
140
24
1
{-# LANGUAGE ScopedTypeVariables #-} {-- Copyright (c) 2006, Peng Li 2006, Stephan A. Zdancewic 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...
Tener/HaNS
src/Network/TCP/Aux/Misc.hs
bsd-3-clause
13,719
0
23
4,255
3,324
1,848
1,476
240
7
{-# LANGUAGE OverloadedStrings #-} module Arbitrary where import Control.Monad import qualified Data.Text as T import Test.QuickCheck import qualified Filesystem.Path.CurrentOS as P newtype AFilePath = AFilePath { unAFP :: P.FilePath } deriving Show instance Arbitrary AFilePath where arbitrary = sized $ \i -> ...
philopon/hassistant.vim
test/Arbitrary.hs
bsd-3-clause
1,054
0
15
304
357
195
162
24
0
{-# LANGUAGE StandaloneDeriving #-} {-| JSON datatype definition. -} module Text.JSONb.Simple where import Data.ByteString import Data.Trie {-| A monomorphic JSON datatype, backed with 'Rational', strict 'ByteString' and 'ByteString' 'Trie'. -} data JSON = Object (Trie JSON) | Array [JSON] | ...
solidsnack/JSONb
Text/JSONb/Simple.hs
bsd-3-clause
987
0
12
325
248
129
119
22
0
module Main where import System.IO import Hs import Control.Concurrent.STM.TChan import Control.Concurrent.STM import Control.Concurrent import Control.Monad import Network.Socket import System.Random worldDimension :: Dimension worldDimension = Dimension 40 30 data Colour = Black | Red | Green | Yellow ...
PeterHajdu/hs
app/Main.hs
bsd-3-clause
6,449
0
18
1,645
2,312
1,172
1,140
178
16
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Network.API.Subledger.Client.HttpStreams ( subledger , subledgerConn , withConnection , SubledgerRequest(..) , SubledgerError(..) , SubledgerConfig(..) -- * lo...
whittle/subledger
subledger-http-streams/src/Network/API/Subledger/Client/HttpStreams.hs
bsd-3-clause
5,069
0
20
1,181
1,131
611
520
86
3
module Text.XML.SpreadsheetML.Types where {- See http://msdn.microsoft.com/en-us/library/aa140066%28office.10%29.aspx -} import Data.Word ( Word64 ) -- | Only implement what we need data Workbook = Workbook { workbookDocumentProperties :: Maybe DocumentProperties , workbookStyles :: Maybe Styles ,...
dagit/SpreadsheetML
src/Text/XML/SpreadsheetML/Types.hs
bsd-3-clause
6,591
0
9
1,619
1,519
878
641
149
0
module PlatformDB ( release, deltaFrom, incGHC, incGHCLib, incGHCTool, incLib, incTool, notWindows, onlyWindows, allPackages, corePackages, platformPackages, packagesByIncludeFilter, isGhc, isWindows, isNotWindows, isLib, isTool ) where import Data.List (partition) ...
ardumont/haskell-platform
hptool/src/PlatformDB.hs
bsd-3-clause
3,404
0
13
677
894
483
411
67
4
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} ---------------------------------------------------...
spl/generic-deriving-extras
src/Generics/Deriving/Fold.hs
bsd-3-clause
3,214
0
12
686
1,195
624
571
55
0
{-# LANGUAGE DeriveGeneric, StandaloneDeriving, DeriveAnyClass, OverloadedStrings #-} -- Utility to dump all of the release information as JSON. module Main where import GHC.Generics import Data.Aeson import Types import ReleaseFiles import Releases import qualified Data.Vector as V import qualified Data.ByteStrin...
erantapaa/haskell-platform
hptool/src/DataMain.hs
bsd-3-clause
2,008
0
10
461
543
288
255
50
1
module MyLittlePrelude ( module X , undefined , error , trace , traceShow , traceShowM , traceM , traceIO , notImplemented , whenM , unlessM , ifM , guardM ) where import Prelude as X hiding ((.), id, undefined, error) import Control.Applicative as X ((<|>), liftA, liftA2) import Contr...
zudov/purescript-inspection
src/MyLittlePrelude.hs
bsd-3-clause
2,644
0
9
539
912
551
361
99
2
-- ----------------------------------------------------------------------------- -- -- AbsSyn.hs, part of Alex -- -- (c) Chris Dornan 1995-2000, Simon Marlow 2003 -- -- This module provides a concrete representation for regular expressions and -- scanners. Scanners are used for tokenising files in preparation for pars...
alanz/Alex
src/AbsSyn.hs
bsd-3-clause
14,064
0
24
3,651
3,320
1,758
1,562
213
14
module Main where import App main :: IO () main = appMain
lslah/kis-proto
app/Main.hs
bsd-3-clause
60
0
6
14
22
13
9
4
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} module Aws.Swf.Commands.PollForDecisionTask where -- import qualified Data.HashMap.Strict as HM import Control.Applicative ((<$>), (<*>)) import Control.Monad (mzero) import Data.Aeson ...
RayRacine/aws
Aws/Swf/Commands/PollForDecisionTask.hs
bsd-3-clause
4,178
0
20
1,559
675
405
270
-1
-1
module Problem7 where import Prime main :: IO () -- First prime is 2 so we find 10 000th (also 9999 because 0-based indexing) main = print . (!! 9999) . filter isPrimeNaive $ [3, 5 ..]
adityagupta1089/Project-Euler-Haskell
src/problems/Problem7.hs
bsd-3-clause
188
0
8
40
49
29
20
4
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} -- | Messages used for communication in SSC. module Pos.Chain.Ssc.Message ( MCCommitment (..) , MCOpening (..) , MCShares (..) , MCVssCertificate (..) , _MCCommitment , _MCOpeni...
input-output-hk/pos-haskell-prototype
chain/src/Pos/Chain/Ssc/Message.hs
mit
2,253
0
9
518
565
315
250
70
0
{-| Module : Translation.Constants Description : Define CUDA constants Maintainer : Josh Acay<cacay@cmu.edu> Stability : experimental -} module Translation.Constants (defineIndicies) where import Control.Monad.State (State, execState, modify) import qualified Data.Set as Set import AST.AST import AST.Operatio...
oulgen/CudaPy
py2cuda/src/Translation/Constants.hs
mit
2,642
0
15
596
1,106
558
548
57
11
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Module : Test.AWS.ELB.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 MPL can...
fmapfmapfmap/amazonka
amazonka-elb/test/Test/AWS/ELB/Internal.hs
mpl-2.0
613
0
4
140
25
21
4
4
0
<?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="tr-TR"> <title>Hızlı Başlat | ZAP Uzantıları</title> <maps> <homeID>top</homeID> <mapr...
veggiespam/zap-extensions
addOns/quickstart/src/main/javahelp/org/zaproxy/zap/extension/quickstart/resources/help_tr_TR/helpset_tr_TR.hs
apache-2.0
987
80
66
160
431
217
214
-1
-1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} module Run.Config where import qualified Data.Configurator as Conf import qualified Data.Configurator.Types as Conf import System.Directory import System.FilePath import System.Log.Logger ...
Philonous/pontarius-xmpp
tests/Run/Config.hs
bsd-3-clause
1,287
0
16
315
310
153
157
30
10
{-# LANGUAGE CPP, RecordWildCards, NamedFieldPuns, RankNTypes #-} -- | Planning how to build everything in a project. -- module Distribution.Client.ProjectPlanning ( -- * elaborated install plan types ElaboratedInstallPlan, ElaboratedConfiguredPackage(..), ElaboratedPlanPackage, ElaboratedSharedCon...
bennofs/cabal
cabal-install/Distribution/Client/ProjectPlanning.hs
bsd-3-clause
102,575
0
28
29,461
13,098
7,152
5,946
1,387
7
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- Module : Gen.Orphans -- Copyright : (c) 2013-2015 Brendan Hay <brendan.g.hay@gmail.com> -- License : This Source Code Form is subject to the terms of -- the Mozilla Public Lice...
kim/amazonka
gen/src/Gen/Orphans.hs
mpl-2.0
1,449
0
14
360
251
146
105
22
0
{-# LANGUAGE OverloadedStrings #-} -- Module : Network.AWS.Data.Internal.URI -- Copyright : (c) 2013-2015 Brendan Hay <brendan.g.hay@gmail.com> -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- A copy of the MPL can be found i...
kim/amazonka
core/src/Network/AWS/Data/Internal/URI.hs
mpl-2.0
1,582
0
12
538
425
218
207
34
4
{-# LANGUAGE ScopedTypeVariables, EmptyDataDecls #-} module Engine where import FRP.Sodium import Control.Applicative import Control.Monad import Data.List import Graphics.Rendering.OpenGL as GL hiding (Triangle, Rect, translate) import qualified Graphics.Rendering.OpenGL as GL import qualified Graphics.UI.GLUT as GL...
kevintvh/sodium
haskell/examples/games/Engine.hs
bsd-3-clause
6,300
0
22
2,026
2,052
1,053
999
149
4
{- (c) The University of Glasgow 2006 Functions for working with the typechecker environment (setters, getters...). -} {-# LANGUAGE CPP, ExplicitForAll, FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module TcRnMonad( module TcRnMonad, module TcRnTypes, module IOEnv ) where #...
fmthoma/ghc
compiler/typecheck/TcRnMonad.hs
bsd-3-clause
54,147
63
25
17,111
12,574
6,548
6,026
879
5
module Hadrian.BuildPath where import Base import Data.Functor import qualified Text.Parsec as Parsec -- | A path of the form -- -- > <build root>/stage<N>/<path/to/pkg/from/ghc/root>/build/<something> -- -- where @something@ describes a library or object file or ... to be built -- for the given package. -- -- @a@, ...
sdiehl/ghc
hadrian/src/Hadrian/BuildPath.hs
bsd-3-clause
6,249
0
20
1,480
1,266
658
608
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ViewPatterns #-} -- | Con...
harendra-kumar/stack
src/Stack/Build/ConstructPlan.hs
bsd-3-clause
28,155
0
31
10,403
6,699
3,365
3,334
591
11
<?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="az-AZ"> <title>Revisit | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref loca...
thc202/zap-extensions
addOns/revisit/src/main/javahelp/org/zaproxy/zap/extension/revisit/resources/help_az_AZ/helpset_az_AZ.hs
apache-2.0
968
78
66
158
411
208
203
-1
-1
import Test.HUnit (Test(TestList), runTestTT, (~=?), Counts(errors, failures)) import Utils (stringsFromStatus, Hash(MkHash)) import Control.Applicative ((<$>)) import System.Exit (exitFailure) import Control.Monad (when) type TestData = (String, String, [Int]) tests :: [TestData] tests = [ ("## master...ori/master...
TiddoLangerak/zsh-git-prompt
src/TestFunctional.hs
mit
1,075
16
11
181
472
287
185
22
1
{-# OPTIONS_GHC -fdefer-type-errors #-} test :: IO Bool test = return True
sdiehl/ghc
testsuite/tests/ghci/should_run/T14963c.hs
bsd-3-clause
76
0
5
13
18
9
9
3
1
import System.IO (hFlush, stdout) import Control.Monad (mapM) import Control.Monad.Error (runErrorT) import qualified Data.Map as Map import qualified Data.Traversable as DT import Readline (readline, load_history) import Types import Reader (read_str) import Printer (_pr_str) -- read mal_read :: String -> IOThrows M...
nlfiedler/mal
haskell/step2_eval.hs
mpl-2.0
2,798
0
18
827
1,086
543
543
77
5
{-# LANGUAGE TypeFamilies #-} module ColInference where type family Elem c type instance Elem [e] = e class Col c where isEmpty :: c -> Bool add :: c -> Elem c -> c headTail :: c -> (Elem c,c) -- addAll :: (Col c1, Col c2, Elem c1 ~ Elem c2) => c1 -> c2 -> c2 -- addAll c1 c2 -- | isEmpty c1 -- = c...
urbanslug/ghc
testsuite/tests/indexed-types/should_compile/ColGivenCheck2.hs
bsd-3-clause
651
4
10
189
175
95
80
14
1
module Root.Test.Test3 where import Root.Src.P1.C import Test.Hspec import Test.QuickCheck import Control.Exception (evaluate) main :: IO () main = hspec spec spec::Spec spec = do describe "Prelude.head" $ do it "returns the first element of a list" $ do bar head [23 ..] `shouldBe` (25 :: Int)
codeboardio/kali
test/src_examples/haskell/several_files_folders2/Root/Test/Test3.hs
mit
306
0
15
57
107
59
48
13
1
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.ApplicationCache (update, swapCache, abort, pattern UNCACHED, pattern IDLE, pattern CHECKING, pattern DOW...
ghcjs/jsaddle-dom
src/JSDOM/Generated/ApplicationCache.hs
mit
4,264
0
12
451
828
480
348
53
1
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : Postgis.Simple.Field.Default -- Copyright : (c) igor720 -- License : MIT -- -- Maintainer : igor720@gmail.com -- Stability : experimental -- Portability : portable -- --...
igor720/postgis-simple
src/Postgis/Simple/Field/Default.hs
mit
1,059
0
12
217
165
94
71
15
3
module Hash ( runScript , runInteractive ) where import System.IO (hFlush, stdout) import Hash.Language.Exec import Hash.Language.Commands import Hash.Parsing.HashParser (parseToTLExpr) import System.Directory (getCurrentDirectory, getHomeDirectory, doesFileExist) import qualified Data.Map as M import Control.E...
yossarin/hash
src/Hash.hs
mit
2,164
0
19
459
603
303
300
54
4
{- Digit fifth powers Problem 30 Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits: 1634 = 1^4 + 6^4 + 3^4 + 4^4 8208 = 8^4 + 2^4 + 0^4 + 8^4 9474 = 9^4 + 4^4 + 7^4 + 4^4 As 1 = 1^4 is not a sum it is not included. The sum of these numbers is 1634 + 8208 + 9474 ...
bertdouglas/euler-haskell
001-050/30a.hs
mit
1,084
0
13
337
320
166
154
21
1
{-# htermination pi :: Float #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_pi_1.hs
mit
33
0
2
6
3
2
1
1
0
{-# LANGUAGE TemplateHaskell #-} module Data.Git.Types where import Data.ByteString (ByteString) import Data.ByteString.Char8 (isInfixOf) import Data.Lens.Common (getL) import Data.Lens.Template (makeLenses) import Data.Monoid (Sum(..), mappend,...
roman/git-log-stats
src/Data/Git/Types.hs
mit
1,404
0
11
360
373
212
161
42
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} module CheckSkeletonParser ( checkSkeletonParser, main, ) where import Core.System import Core.Text import Technique.Language import Technique.Parser import Technique.Quantity import Test.Hspec import Text.Meg...
oprdyn/technique
tests/CheckSkeletonParser.hs
mit
13,587
0
24
3,963
3,451
1,670
1,781
241
1
-- https://www.reddit.com/r/dailyprogrammer/comments/2xoxum/20150302_challenge_204_easy_remembering_your_lines/ module Main where import Data.Text as T import Data.Text.IO as TIO import Data.List as List import Control.Monad.State data Position = Position { act :: Text , scene :: Text , speaker...
gallais/dailyprogrammer
easy/204/Main.hs
mit
2,020
0
20
551
775
407
368
56
4
import Math.NumberTheory.Primes (primes, isPrime) import Data.List (permutations, subsequences) import Data.List.Unique (sortUniq) -------------------------------------------------------------------------------- -- Return the sorted list of numbers obtained by permuting the digits of the -- function argument. ------...
dpieroux/euler
0/0049.hs
mit
1,562
0
13
256
308
172
136
16
2
{-# LANGUAGE MultiWayIf #-} {-# LANGUAGE NumericUnderscores #-} module ConstructDatabase where import qualified Data.Array.Unboxed as A import Data.Bits import Data.Char import Data.Word import PrepareDatabase type GCDatabase = (A.UArray Int Word32, A.UArray Int Word32, A.UArray Int Word8) {- TODO: which way is f...
Javran/misc
unicode-data/src/ConstructDatabase.hs
mit
5,826
0
16
1,653
1,499
803
696
116
5
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} module RAExpr.RASet (RASet, fromList, fromSet, empty, attributes, RAExpr.RASet.filter, project, union, intersection, difference, crossProduct, renameColumn, renameColumns, natualJoin) where import Control.Exception.Base (assert) import qualified Data.Set a...
cameronbwhite/RelationalAlgebra
src/RAExpr/RASet.hs
mit
10,563
0
13
1,680
2,090
1,135
955
91
2
{-# LANGUAGE UnicodeSyntax #-} module Pixs.Operations.Geometric where
ayberkt/pixs
src/Pixs/Operations/Geometric.hs
mit
71
0
3
8
8
6
2
2
0
module Feature.AuthSpec where -- {{{ Imports import Test.Hspec import Test.Hspec.Wai import Test.Hspec.Wai.JSON import Network.HTTP.Types import qualified Hasql.Connection as H import SpecHelper import PostgREST.Types (DbStructure(..)) -- }}} spec :: DbStructure -> H.Connection -> Spec spec struct c = around (withA...
motiz88/postgrest
test/Feature/AuthSpec.hs
mit
3,568
0
14
514
564
287
277
-1
-1
{-# LANGUAGE TypeFamilies #-} module SoOSiM.Components.Scheduler.Interface where import Control.Concurrent.STM.TQueue (TQueue) import Control.Concurrent.STM.TVar (TVar) import Data.HashMap.Strict (HashMap) import SoOSiM import SoOSiM.Components.Common import SoOSiM.Components.ResourceDescriptor import SoOSiM.Componen...
christiaanb/SoOSiM-components
src/SoOSiM/Components/Scheduler/Interface.hs
mit
1,864
0
16
341
536
287
249
56
2
import Test.Hspec import RaytracerEtapa2_1113331018 main :: IO () main = hspec $ do describe "Setup of .ppm image" $ do it "returns a string with x, y and z" $ do pixelToString (1, 2, 3) `shouldBe` "1 2 3\n" it "returns the value of p3" $ do p3 `shouldBe` "P3\n" it "return a line of commen...
lipemorais/haskellando
RaytracerEtapa2_1113331018Spec.hs
mit
1,514
0
18
400
493
262
231
31
1
module Sparklines where import Data.Char (chr) --import Data.List.Split (splitOneOf) toSparkLine :: [Double] -> [Char] toSparkLine xs = map cl xs where top = maximum xs bot = minimum xs range = top - bot cl x = chr $ 0x2581 + round ((x - bot) / range * 7) makeSparkLine :: [Doubl...
kejace/alto
src/Sparklines.hs
mit
1,055
0
13
284
362
195
167
23
1
{-# LANGUAGE LambdaCase, DeriveGeneric #-} module Intervals where --import qualified Data.ByteString.Lazy as BS --import Text.Printf import Data.List hiding (union, intersect) import Data.Monoid ((<>)) --import Data.Yaml (ToJSON, FromJSON) --import GHC.Generics (Generic) import Data.Function import Data.Int import Pr...
antalsz/hs-to-coq
examples/intervals/Intervals.hs
mit
3,471
0
14
988
1,207
621
586
56
3
{-# LANGUAGE OverloadedStrings #-} module IndexControllerSpec where import Test.Hspec (Spec, describe, it) import Test.Hspec.Wai (get, shouldRespondWith, with) import qualified Web.Scotty as S import IndexController (app) spec :: Spec spec = with (S.scottyApp app) $ do describe "GET /" $ do ...
robertjlooby/scotty-story-board
test/controllers/IndexControllerSpec.hs
mit
400
0
15
98
111
63
48
11
1
{-# LANGUAGE DeriveDataTypeable #-} module Queue (Queue, empty, null, singleton, size, enqueue, enqueueList, dequeue, peek, take, drop, splitAt, fromList, toList) where import Prelude hiding (take, drop, splitAt, null) import Data.List (genericLength) import Data.Foldable as F hiding (toList) import Data.Traversa...
3of8/haskell_playground
queue/Queue.hs
gpl-2.0
3,244
0
12
899
1,622
842
780
82
2
module LexML.URN.Atalhos where import LexML.URN.Types import Data.Maybe (fromJust,maybe) import qualified Data.Map as M import Data.List import System.IO.Unsafe (unsafePerformIO) leiFederal :: [Integer] -> Dia -> Mes -> Ano -> URNLexML leiFederal numLei dia mes ano = URNLexML (Local Brasil Nothing) (Documento (A_Conv...
lexml/lexml-linker
src/main/haskell/LexML/URN/Atalhos.hs
gpl-2.0
11,936
0
26
2,308
4,404
2,287
2,117
141
7
{-# LANGUAGE DeriveDataTypeable, TypeSynonymInstances, MultiParamTypeClasses #-} -- -*- mode: haskell -*- module JVM.Check where import JVM.Type import JVM.Builtin import Machine.Numerical.Config import Autolib.Reporter import Autolib.ToDoc import Autolib.Reader import Autolib.Set import Data.Typeable data Chec...
Erdwolf/autotool-bonn
src/JVM/Check.hs
gpl-2.0
1,961
8
14
701
542
265
277
49
0
module Network.Counting.Picture where import Network.Counting.Data import Autolib.ToDoc import qualified Data.Map as M import qualified Data.Array as A xscale :: Int -> Int xscale x = 4 * x yscale :: Wire -> Int yscale (Wire y) = 3 * y picture net = let ws = 1 : wires net ylo = minimum ws ; yhi = max...
marcellussiegburg/autotool
collection/src/Network/Counting/Picture.hs
gpl-2.0
1,813
1
15
664
799
418
381
50
2
{-#LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-} module Carnap.Languages.PurePropositional.Logic.Tomassi (parseTomassiPL, parseTomassiPLProof, tomassiPLCalc, TomassiPL(..), tomassiPLNotation) where import Data.Map as M (lookup, Map) import Text.Parsec import Control.Lens (view) import Ca...
gleachkr/Carnap
Carnap/src/Carnap/Languages/PurePropositional/Logic/Tomassi.hs
gpl-3.0
5,477
0
15
1,816
1,492
804
688
106
3
{-# LANGUAGE RecursiveDo, JavaScriptFFI, OverloadedStrings #-} module Estuary.Widgets.ResourceWidget where import Reflex import Reflex.Dom import qualified Reflex.Dom.Widget.Basic as B import qualified Data.Sequence as S import qualified Data.Text as T import qualified Data.Foldable as F import Data.Map import D...
d0kt0r0/estuary
client/src/Estuary/Widgets/ResourceWidget.hs
gpl-3.0
10,045
0
5
2,030
255
232
23
12
0
{-# LANGUAGE DeriveGeneric, ExistentialQuantification, FlexibleContexts #-} -- | This module ties "Ltc.Diff" to "Ltc.Store". module Ltc.Store.VersionControl ( -- * Getting history DiffPack(..), KeyHistory(..), getDiffPack, getKeyHistory, -- * Selecting history versionsFromToInc...
scvalex/ltc
src/Ltc/Store/VersionControl.hs
gpl-3.0
8,182
0
17
1,969
2,161
1,126
1,035
-1
-1
{-| A reader for CSV data, using an extra rules file to help interpret the data. -} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGU...
ony/hledger
hledger-lib/Hledger/Read/CsvReader.hs
gpl-3.0
33,895
0
23
7,874
6,665
3,479
3,186
494
7
{-# LANGUAGE Arrows #-} module Main where import System.IO import Control.Monad.Random import FRP.Yampa import SIR type SIRAgent = SF [SIRState] SIRState agentCount :: Int agentCount = 1000 infectedCount :: Int infectedCount = 1 rngSeed :: Int rngSeed = 42 dt :: DTime dt = 0.01 -- 0.0025 t :: Time t = 150 sir...
thalerjonathan/phd
coding/papers/pfe/Step2_Yampa/src/Main.hs
gpl-3.0
4,704
6
23
1,333
1,501
781
720
115
4
{-# LANGUAGE FlexibleInstances #-} module HW08.Main where import Test.HUnit import Test.Framework as TF (defaultMain, testGroup, Test) import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.QuickCheck import HW08.Employee import HW08.Party main :: IO () main = T...
martinvlk/cis194-homeworks
tests/HW08/MainT.hs
gpl-3.0
1,241
0
7
317
124
76
48
14
1
module Chap03.Exercise09 where import Chap03.Data.RedBlackTree fromOrdList :: Ord a => [a] -> RedBlackTree a fromOrdList xs = let go :: Int -> [a] -> (RedBlackTree a, Int, [a]) go 0 xs' = (E, -1, xs') go 1 (x:xs') = (T B E x E, 0, xs') go len xs' = let mid = len `div` 2 ...
stappit/okasaki-pfds
src/Chap03/Exercise09.hs
gpl-3.0
564
0
15
211
303
166
137
15
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-analytics/gen/Network/Google/Resource/Analytics/Management/UnSampledReports/Insert.hs
mpl-2.0
4,875
0
19
1,155
552
327
225
96
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-accesscontextmanager/gen/Network/Google/Resource/AccessContextManager/AccessPolicies/ServicePerimeters/Patch.hs
mpl-2.0
6,876
0
17
1,433
864
506
358
130
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferOperations/Get.hs
mpl-2.0
4,822
0
15
1,068
698
409
289
100
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/AcknowledgeNotificationSet.hs
mpl-2.0
3,769
0
13
718
313
193
120
53
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/InventoryItems/Get.hs
mpl-2.0
3,722
0
16
889
520
304
216
76
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/DicomStores/Studies/Series/RetrieveSeries.hs
mpl-2.0
8,249
0
17
1,423
794
471
323
126
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dlp/gen/Network/Google/Resource/DLP/Organizations/Locations/StoredInfoTypes/Create.hs
mpl-2.0
7,252
0
17
1,444
797
472
325
124
1
{- LANGUAGE CPP -} module Files where import System.FilePath configFile = etcdir </> "kvm-in-a-box.cfg" stateFile = varlibdir </> "state" rootRel root path = root </> makeRelative "/" path homedir = "/home" varrundir uid = "/run/user" </> show uid varlibdir = "/var/lib/kib/" etcdir = "/etc" usrsharedir = "/usr/sha...
DanielG/kvm-in-a-box
src/Files.hs
agpl-3.0
337
0
6
52
82
45
37
10
1
{- Copyright 2015 Martin Buck This file is part of H2D. H2D 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 3 of the License, or (at your option) any later version. H2D is distributed in the ...
I3ck/H2D
src/Mirrorable.hs
lgpl-3.0
1,335
0
9
293
272
139
133
16
0
module HW02 where import Words import Data.List -- Though a Scrabble hand is the same Haskell type as a Scrabble word, they -- have different properties. Specifically, a hand is unordered whereas a word -- is ordered. We denote this distinction by using a type synonym to talk -- about hands, even though we could just...
romanofski/codesnippets
haskellCIS194/homework2/HW02.hs
unlicense
3,909
0
8
697
633
360
273
36
1
{- Copyright 2014 David Farrell <shokku.ra@gmail.com> - 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...
shockkolate/lambdircd
plugins.old/Part.hs
apache-2.0
2,630
0
16
607
710
380
330
42
4
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Quasar.Api.Http.Response where import Control.Lens import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Lazy.Char8 as LBS import Data.CaseInsensitive import Network.HTTP.Types.Status import Network.HTTP.Types.Header imp...
xdcrafts/Quasar
src/Quasar/Api/Http/Response.hs
apache-2.0
1,621
0
10
292
436
244
192
37
2
{-# LANGUAGE CPP #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS -Wall #-} ---------------------------------------------------------------------- -- | -- Module ...
kfish/zoom-cache
Data/ZoomCache/Write.hs
bsd-2-clause
17,819
0
20
4,812
4,397
2,295
2,102
319
5
{-# LANGUAGE PackageImports #-} import "BottleStory" Application (withDevelAppPort) import Data.Dynamic (fromDynamic) import Network.Wai.Handler.Warp (run) import Data.Maybe (fromJust) import Control.Concurrent (forkIO) import System.Directory (doesFileExist, removeFile) import System.Exit (exitSuccess) import Control...
konn/BottleStory
dist/devel.hs
bsd-2-clause
707
0
11
104
215
116
99
22
2
{-# OPTIONS_HADDOCK hide, prune, ignore-exports #-} {-# LANGUAGE FlexibleContexts #-} {-| Module : Silver.Compiler.Lexer Description : The lexer using parser combinators for silver. Copyright : (c) Nicholas Dujay, 2016 License : MIT Maintainer : nickdujay@gmail.com Stability : experimental Portability : P...
silver-lang/silver
src/Silver/Compiler/Lexer.hs
bsd-3-clause
2,133
0
13
402
642
344
298
49
2
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module SyntaxHighlighting.Renderer where import TypeSystem import Utils.Utils import SyntaxHighlighting.Coloring import Text.PrettyPrint.ANSI.Leijen class Renderer renderer where create :: FullColoring -> SyntaxStyle -> renderer name ::...
pietervdvn/ALGT
src/SyntaxHighlighting/Renderer.hs
bsd-3-clause
595
14
9
87
144
80
64
15
0
{-# language CPP #-} {-# language QuasiQuotes #-} {-# language TemplateHaskell #-} #ifndef ENABLE_INTERNAL_DOCUMENTATION {-# OPTIONS_HADDOCK hide #-} #endif -- | Interface between OpenCV (extra modules) and inline-c(pp) (Haskell) module OpenCV.Extra.Internal.C.Inline ( openCvExtraCtx ) where import "base" Data.Monoi...
lukexi/haskell-opencv
opencv-extra/src/OpenCV/Extra/Internal/C/Inline.hs
bsd-3-clause
1,309
0
9
172
190
134
56
-1
-1
{-# LANGUAGE TypeFamilies #-} module LOGL.Mesh ( Mesh, createMesh, drawMesh, Vertex(..), deleteMesh, Texture(..), TextureType(..) ) where import Linear.V2 import Linear.V3 import Graphics.Rendering.OpenGL.GL as GL hiding (Vertex, normalize, position) import Foreign.Storable import Foreign.Ptr import Graphics.GLUti...
atwupack/LearnOpenGL
src/LOGL/Mesh.hs
bsd-3-clause
3,535
0
13
695
1,266
653
613
71
1
-- -- (c) The University of Glasgow 2002-2006 -- -- The IO Monad with an environment -- -- The environment is passed around as a Reader monad but -- as its in the IO monad, mutable references can be used -- for updating state. -- {-# LANGUAGE UndecidableInstances #-} module IOEnv ( IOEnv, -- Instance of Monad ...
ekmett/ghc
compiler/utils/IOEnv.hs
bsd-3-clause
6,839
0
13
1,392
1,781
942
839
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FunctionalDependencies #-} #ifdef TRUSTWORTHY {-# LANGUAGE Trustworthy #-} #endif #include...
ddssff/lens
src/Control/Lens/Each.hs
bsd-3-clause
8,548
0
15
1,615
3,006
1,678
1,328
-1
-1
{-# LANGUAGE DeriveGeneric #-} -- | Ring buffers. module Game.LambdaHack.Common.RingBuffer ( RingBuffer , empty, cons, toList, length ) where import Prelude () import Game.LambdaHack.Core.Prelude hiding (length, uncons) import Data.Binary import qualified Data.Foldable as Foldable import qualified Da...
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Common/RingBuffer.hs
bsd-3-clause
1,303
0
12
272
420
229
191
-1
-1
-- Copyright (c) 2009, Bjoern B. Brandenburg <bbb [at] cs.unc.edu> -- -- 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 --...
ivanperez-keera/Binpack
Data/BinPack.hs
bsd-3-clause
12,919
0
13
3,575
804
478
326
78
3
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -Wno-unused-imports #-} {-# OPTIONS_GHC -Wno-unused-matches #-} {-# OPTIONS_GHC -Wno-type-defaults #-} module Test where import Test.HUnit import qualified Arch import Data.Text (Text) import CompareForm import CompareFormTemplate testGetComparePackage :: IO Text te...
chrissound/ArchPackageCompareStats
src/Test.hs
bsd-3-clause
970
0
19
186
243
124
119
32
3
{-# LANGUAGE OverloadedStrings #-} module TimeParseSpec where import Control.Monad.Except import Data.Time import Test.Hspec import LuminescentDreams.Text.TimeParsers -- 2016-11-05 13:18:00 CDT -- 2016-11-05 13:18:00 UTC -- 2016-11-05 13:18:00 -- 2016-11-05 13:18 CDT -- ...
savannidgerinel/health
tests/TimeParseSpec.hs
bsd-3-clause
1,377
0
13
289
237
121
116
23
1
module Distribution.ArchLinux.Libalpm.Wrapper.TH ( generateUpdaters, generateEmptyRecord ) where import Debug.Trace import Control.Applicative import Data.Char import Language.Haskell.TH -- | Generate update functions for a certain record. The transformation of field names -- goes as follows: -- -- * @_fieldName@...
netvl/alpmhs
lib/Distribution/ArchLinux/Libalpm/Wrapper/TH.hs
bsd-3-clause
2,374
0
15
540
642
337
305
-1
-1
module T176 where import Data.Kind (Type) import Data.Singletons.TH import Prelude.Singletons $(singletons [d| class Foo1 a where bar1 :: a -> (a -> b) -> b baz1 :: a quux1 :: Foo1 a => a -> a quux1 x = x `bar1` \_ -> baz1 class Foo2 a where bar2 :: a -> b -> b baz2 :: a quux2 :: Foo2 a =...
goldfirere/singletons
singletons-base/tests/compile-and-dump/Singletons/T176.hs
bsd-3-clause
361
0
7
108
39
24
15
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Language.Eiffel.TypeCheck.Generic (resolveIFace, unlike, unlikeType, updateGeneric, updateGenerics) where import Control.Applicative import qualified Data.Text as Text import Data.Text (Text) import Language.Eiffel.TypeCheck.Context impo...
scottgw/eiffel-typecheck
Language/Eiffel/TypeCheck/Generic.hs
bsd-3-clause
2,893
0
14
661
1,044
526
518
65
2
module Idris.REPLParser(parseCmd) where import System.FilePath ((</>)) import System.Console.ANSI (Color(..)) import Idris.Colours import Idris.AbsSyntax import Idris.Core.TT import qualified Idris.Parser as P import Control.Applicative import Control.Monad.State.Strict import Text.Parser.Combinators import Text.Pa...
DanielWaterworth/Idris-dev
src/Idris/REPLParser.hs
bsd-3-clause
10,651
0
61
3,519
4,359
2,126
2,233
174
2
{-# LANGUAGE FunctionalDependencies , RankNTypes , FlexibleContexts , FlexibleInstances , CPP #-} module Sigym4.Geometry.Algorithms ( HasExtent(..) , HasDistance(..) , HasCentroid(..) , HasPredicates(..) ) where import Sigym4.Geometry.Types import qualif...
krisajenkins/sigym4-geometry
Sigym4/Geometry/Algorithms.hs
bsd-3-clause
6,293
0
11
1,458
2,469
1,261
1,208
-1
-1
{-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -Wall #-} ---------------------------------------------...
ekmett/hask
old/src/Hask/Prism.hs
bsd-3-clause
1,877
6
11
403
692
369
323
40
1
-- #!/usr/bin/env runghc -- (,st') in parse -- {-# LANGUAGE TupleSections #-} -- {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} -- {-# OPTIONS_GHC -cpp -DPiForallInstalled #-} -- | -- Copyright : (c) Andreas Reuleaux 2015 -- License : BSD2 -- Maintainer: Andreas Re...
reuleaux/pire
tests/UTests.hs
bsd-3-clause
49,992
0
30
16,529
12,855
6,635
6,220
608
1