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 MagicHash #-} ----------------------------------------------------------------------------- -- -- GHCi Interactive debugging commands -- -- Pepe Iborra (supported by Google SoC) 2006 -- -- ToDo: lots of violation of layering here. This module should -- decide whether it is above the GHC API (import GHC ...
forked-upstream-packages-for-ghcjs/ghc
compiler/ghci/Debugger.hs
bsd-3-clause
9,324
14
22
2,975
2,299
1,170
1,129
172
8
import qualified Parser as Parser main :: IO () main = print (iterate Parser.byteParserBadOnce 5 !! 100000)
sdiehl/ghc
testsuite/tests/codeGen/should_run/T15038/test/Main.hs
bsd-3-clause
109
0
9
18
39
21
18
3
1
-- Copyright (c) 2000 Galois Connections, Inc. -- All rights reserved. This software is distributed as -- free software under the license in the file "LICENSE", -- which is included in the distribution. module CSG(module Construct, module Geometry, module Intersections, module Interva...
ezyang/ghc
testsuite/tests/programs/galois_raytrace/CSG.hs
bsd-3-clause
436
0
4
102
45
33
12
10
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE DataKinds #-} module T6129 where data family D a data instance D a = DInt data X a where X1 :: X DInt
ghc-android/ghc
testsuite/tests/polykinds/T6129.hs
bsd-3-clause
213
0
6
55
38
25
13
9
0
module SFML.Audio ( module SFML.Audio.Listener , module SFML.Audio.Music , module SFML.Audio.SFSampled , module SFML.Audio.SFSound , module SFML.Audio.SFSoundRecorder , module SFML.Audio.Sound , module SFML.Audio.SoundBuffer , module SFML.Audio.SoundBufferRecorder , module SFML.Audio.SoundRecorder ,...
SFML-haskell/SFML
src/SFML/Audio.hs
mit
773
0
5
93
164
113
51
26
0
module Reverse where reverse :: [a] -> [a] reverse [] = [] reverse (x:xs) = reverse xs ++ [x]
kaveet/haskell-snippets
modules/lists/Reverse.hs
mit
95
0
7
20
56
31
25
4
1
{-# htermination (seq :: b -> a -> a) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data WHNF a = WHNF a ; enforceWHNF :: WHNF b -> a -> a; enforceWHNF (WHNF x) y = y; seq :: a -> b -> b; seq x y = enforceWHNF (WHNF x) y;
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/seq_1.hs
mit
291
0
8
84
118
66
52
8
1
{-# LANGUAGE OverloadedStrings, TemplateHaskell #-} module Spotify (Spotify(..), search, empty) where import qualified Data.Aeson as Json import Data.Aeson.TH -- import System.IO -- import qualified Data.ByteString.Lazy as L import Data.Char (toLower) import Data.ByteString.Char8 (pack) import qualified Network.HTTP.C...
stefanodacchille/itson
src/backend/Spotify.hs
mit
5,246
1
18
1,974
1,030
584
446
90
2
{-# LANGUAGE Safe #-} {-# LANGUAGE NoImplicitPrelude #-} module Either ( maybeToLeft , maybeToRight , leftToMaybe , rightToMaybe , maybeToEither ) where import Data.Function (const) import Data.Monoid (Monoid, mempty) import Data.Maybe (Maybe(..), maybe) import Data.Either (Either(..), either) leftToMaybe :: Eithe...
ardfard/protolude
src/Either.hs
mit
707
0
8
125
264
141
123
22
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.RTCStatsReport (js_stat, stat, js_names, names, js_getTimestamp, getTimestamp, js_getId, getId, js_getType, getType, js_getLocal, getLocal, js_getRemote, getRemote, RTCStatsReport, castToRTC...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/RTCStatsReport.hs
mit
3,797
44
11
531
908
520
388
57
1
module Cycles.Maxcy where import Cycles.Aux import Data.Bits ( Bits((.&.), (.|.), bit) ) import Data.Function import Data.List ( foldl', sort, sortBy ) import Data.List.Split ( chunksOf ) import Data.String.Utils ( replace ) import Foreign.C.Types ( CULLong ) import Text.Regex ( subRegex, mkRegex ) -- | 'elist' is ed...
michaeljklein/HCy2C
Cycles/Maxcy.hs
mit
24,857
0
17
8,941
4,459
2,516
1,943
313
3
-- | This module contains functions that act on actions. module Game.Cosanostra.Action ( actionTraits , actTurn , actTraceTurn , actPhase , actTracePhase , targetSelectors , messagesFor ) where import Game.Cosanostra.Effect import Game.Cosanostra.Faction import Game.Cosanostra.Lenses im...
rfw/cosanostra
src/Game/Cosanostra/Action.hs
mit
11,689
0
20
3,840
3,375
1,778
1,597
-1
-1
{-# LANGUAGE DoAndIfThenElse #-} {-# LANGUAGE Safe #-} module Control.Concurrent.Transactional.Event ( Event, module Control.Concurrent.Transactional.Event.Class, -- * Synchronization sync, syncID, -- * Swapping swap, -- * Merging and Splitting merge, tee, split, -- * Threading ...
YellPika/Hannel
src/Control/Concurrent/Transactional/Event.hs
mit
3,135
0
17
736
848
456
392
62
1
{-# LANGUAGE ScopedTypeVariables #-} module Query.InsertAnswers where import qualified Data.List as L (head) import Database.PostgreSQL.Simple import Database.PostgreSQL.Simple.Transaction import Import hiding (Query) import ...
ForestPhoenix/FPSurvey
Query/InsertAnswers.hs
mit
2,233
0
17
586
577
310
267
37
2
{-# LANGUAGE NoImplicitPrelude #-} -- {-# LANGUAGE MagicHash #-} module BrodyPrelude where import qualified GHC.Types (Bool(True, False)) import Data.Char -- as Prelude.Data.Char import GHC.Char (eqChar) -- import GHC.Prim (eqChar#) --import GHC.Prim (eqChar#) type String = [Char] data Bool = True | False not :: ...
brodyberg/Notes
FindingSuccessAndFailure/validation-book/lib/BrodyPrelude.hs
mit
776
0
9
180
258
146
112
25
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dax-cluster.html module Stratosphere.Resources.DAXCluster where import Stratosphere.ResourceImports import Str...
frontrowed/stratosphere
library-gen/Stratosphere/Resources/DAXCluster.hs
mit
6,982
0
15
833
1,261
712
549
88
1
module HaskQuest.Game.Objects ( module HaskQuest.Game.Objects.Item , module HaskQuest.Game.Objects.ItemMap , module HaskQuest.Game.Objects.Room , module HaskQuest.Game.Objects.RoomMap ) where import HaskQuest.Game.Objects.Item import HaskQuest.Game.Objects.ItemMap import HaskQuest.Game.Objects.Room...
pdarragh/HaskQuest
src/HaskQuest/Game/Objects.hs
mit
359
0
5
45
69
50
19
9
0
module Caesar (caesar, uncaesar) where import Data.Char caesar, uncaesar :: (Integral a) => a -> String -> String caesar k = map f where f c = case generalCategory c of LowercaseLetter -> addChar 'a' k c UppercaseLetter -> addChar 'A' k c _ -> c uncaesar ...
rickerbh/AoC
AoC2016/src/Caesar.hs
mit
528
0
12
174
212
111
101
13
3
{-# LANGUAGE BangPatterns #-} module ObjectBehavior (aicube, camera) where import Data.Maybe (fromJust) import FRP.Yampa.Core import FRP.Yampa import Camera import IdentityList import MD3 import Matrix import Object import GameInputParser ray :: (Double, Double, Double) -> (Double, Double, Double) -> ILKe...
pushkinma/frag
src/ObjectBehavior.hs
gpl-2.0
61,281
1
40
34,097
16,546
9,728
6,818
1,178
12
-- Author: Maciej Bendkowski -- <maciej.bendkowski@tcs.uj.edu.pl> module BZBW where import Definitions -- Translates the given Black-White tree -- to a corresponding Zigzag free tree. bwToBz :: BWTree -> BZTree bwToBz (Black Leaf Leaf) = Node BZLeaf BZLeaf bwToBz (Black t @ (Black _ _) Lea...
maciej-bendkowski/natural-counting-of-lambda-terms
src/BZBW.hs
gpl-2.0
1,658
5
10
400
631
312
319
24
1
module Flowskell.Viewer where import Control.Monad (when) import Graphics.UI.GLUT hiding (Bool, Float) import Data.Time.Clock (getCurrentTime, diffUTCTime) import System.Directory (getModificationTime, doesFileExist) import Flowskell.State import Flowskell.Interpreter (initSchemeEnv, initPrimitives) import Flowskell.I...
lordi/flowskell
src/Flowskell/Viewer.hs
gpl-2.0
2,070
0
18
362
577
275
302
46
1
#!runghc import Control.Concurrent import System.Environment import GHC.IO.Handle import GHC.IO.Handle.FD main = do [t]<-getArgs getContents>>=mapM_ (\l->(putStrLn l>>hFlush stdout>>threadDelay (read t*1000))).lines
ducis/multitouch-visualizer
slow_print.hs
gpl-2.0
218
0
17
21
90
48
42
7
1
module Experimentation.P14 (p14_test) where import Test.HUnit import Data.List dupli_rec :: [a] -> [a] dupli_rec [] = [] dupli_rec (a:as) = (a : []) ++ (a : []) ++ dupli_rec as dupli_rec_2 :: [a] -> [a] dupli_rec_2 [] = [] dupli_rec_2 (a:as) = doubl a ++ dupli_rec_2 as where doubl a = a : (a : []) {- wrong -} du...
adarqui/99problems-hs
Experimentation/P14.hs
gpl-3.0
2,025
0
13
316
872
472
400
42
1
module LipidHaskell where import Lipid.Blocks import Lipid.FattyAcid import Lipid.Glycerolipid
Michaelt293/Lipid-Haskell
src/LipidHaskell.hs
gpl-3.0
96
0
4
10
19
12
7
4
0
{-# LANGUAGE StandaloneDeriving #-} {-| A simple 'Amount' is some quantity of money, shares, or anything else. It has a (possibly null) 'Commodity' and a numeric quantity: @ $1 £-50 EUR 3.44 GOOG 500 1.5h 90 apples 0 @ It may also have an assigned 'Price', representing this amount's per-unit or total...
Lainepress/hledger
hledger-lib/Hledger/Data/Amount.hs
gpl-3.0
19,823
28
25
4,048
4,626
2,484
2,142
254
4
{-# LANGUAGE TemplateHaskell, TypeFamilies, DeriveDataTypeable, TupleSections, OverloadedStrings #-} import Network.IRC.Bot import Network.IRC (Message) import qualified Network.IRC as IRC import Data.Set as S import Data.Map as M import Data.List as L import Data.Maybe as L (mapMaybe, maybeToList) import Data.ByteSt...
wolftune/snowbot
Main.hs
gpl-3.0
11,922
65
20
3,987
3,134
1,659
1,475
218
22
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Sandbox ( Sandbox, runSandbox, delay, -- * Nodes randomNode, addPeer ) where import Control.Concurrent ( threadDelay ) import Control.Concurrent.STM import Control.Monad.RWS.Strict import System.Random ( StdGen, mkStdGen ) import Logging import Network imp...
waldheinz/ads
src/sandbox/Sandbox.hs
gpl-3.0
1,730
6
16
440
564
293
271
53
1
module Tests.CheckSpec (spec) where import Data.Either (isRight) import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck import Check import Reduce import Representation import Tests.ReprGen import Tests.Util spec :: Spec spec = do describe "checkTerm" $ modifyMaxDiscardRatio (10 *) $ do ...
lambda-11235/ttyped
test/Tests/CheckSpec.hs
gpl-3.0
804
0
21
187
284
148
136
20
1
(,) Int Bool ~ (Int, Bool)
hmemcpy/milewski-ctfp-pdf
src/content/3.2/code/haskell/snippet09.hs
gpl-3.0
26
2
6
5
22
11
11
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.SourceRepo.Types.Sum -- Copyright : (c) 2015-2016 Bren...
brendanhay/gogol
gogol-sourcerepo/gen/Network/Google/SourceRepo/Types/Sum.hs
mpl-2.0
3,693
0
11
848
581
317
264
71
0
module Module.TremRelay (mdl) where import Module hiding (send) import Module.State import Network.Socket import Control.DeepSeq import Control.Exception import Control.Monad import System.IO import Send import Irc.Protocol --import Tremulous.Util mdl :: Module State mdl = Module { modName = "tremrelay" , modInit =...
DDOS-code/rivertam
src/Module/TremRelay.hs
agpl-3.0
2,953
55
19
605
1,152
568
584
-1
-1
module Net.DigitalOcean (module X) where import Net.DigitalOcean.Config as X import Net.DigitalOcean.Actions as X import Net.DigitalOcean.Regions as X import Net.DigitalOcean.Sizes as X import Net.DigitalOcean.Images as X import Net.DigitalOcean.SSHKeys as X import Net.DigitalOcean.Droplets as X
bluepeppers/DigitalOcean
src/Net/DigitalOcean.hs
agpl-3.0
298
0
4
34
68
50
18
8
0
-- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } func = ( lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd , lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd )
lspitzner/brittany
data/Test439.hs
agpl-3.0
225
0
5
24
13
8
5
3
1
-- -- Copyright (C) 2004-5 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...
Changaco/haskell-plugins
src/System/Plugins/Eval.hs
lgpl-2.1
9,771
0
18
2,374
1,141
645
496
81
3
{-#LANGUAGE DeriveDataTypeable#-} module Data.P440.Domain.IZV where import Data.P440.Domain.SimpleTypes import Data.Typeable (Typeable) import Data.Text (Text) -- 3.1 Извещение data Файл = Файл { идЭС :: GUID ,версПрог :: Text ,телОтпр :: Text ,должнОтпр :: Text ,фамОтпр :: Text ...
Macil-dev/440P-old
src/Data/P440/Domain/IZV.hs
unlicense
719
27
7
138
387
211
176
19
0
module Main where import Primes import Digits import Data.List increase = 3330 primePermutations :: [Int] primePermutations = filter isMatchingNum candidates where candidates = [1000..maxPossibleNum] maxPossibleNum = 10000 - (increase*2) isMatchingNum num = isPrimePermutationTrio (num,num+increase,num+...
kliuchnikau/project-euler
049/Main.hs
apache-2.0
654
0
11
104
254
140
114
14
1
module TimeUtils ( lookupLocalTimeZone , startOfDay , justAfter, justBefore , asLocalTime , localTimeText , originTime ) where import Prelude () import Prelude.MH import qualified Data.Text as T import Data.Time.Clock ( UTCTime(..) ) import Data.Time...
aisamanra/matterhorn
src/TimeUtils.hs
bsd-3-clause
2,972
0
11
673
491
276
215
36
1
-- |Module to parse the command line module Commandline ( OutFormat(..) , Options(..) , commandLineOptions ) where import Control.Monad import Data.Char import Data.List import Error import System.Console.GetOpt import System.FilePath import Text.Read -- |Supported output formats data OutFormat = PRG ...
m-schmidt/Asm6502
src/Commandline.hs
bsd-3-clause
4,126
0
14
1,026
1,012
555
457
93
2
{- -O2 provides small, but noticable benefit for qsort. -} module Data.Array.MArray.Sort.Introsort ( qsort , introsort -- internal , introsort' ) where import Control.Monad import Data.Array.IO import Data.Array.MArray.Sort.Heapsort import Data.Array.MArray.Sort.Insertsort insertsortLimit :: Int i...
ppetr/marray-sort
src/Data/Array/MArray/Sort/Introsort.hs
bsd-3-clause
3,480
0
19
1,558
1,117
548
569
84
5
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE NoImplicitPrelude #-} {- | On little-endian machines, IO functions only support little-endian SND format with 1 channel and 64-bit float samples. -} module Sound.IoPtr ( module Sound.Io , module Sound.Ptr , module Sound.Buffer -- * Array-poking , ePokeArra...
edom/sound
src/Sound/IoPtr.hs
bsd-3-clause
4,728
0
22
1,387
1,449
703
746
135
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LAN...
meteogrid/gdal-plugin-hs
src/GDAL/Plugin/CombinatorsAcc.hs
bsd-3-clause
4,229
0
19
1,118
1,330
708
622
97
2
{-# LANGUAGE CPP #-} module BackendTest where #ifndef WithoutBackendDependencies import Test.HUnit import Control.Monad ( forM_ ) import Database.Schema.Migrations.Backend.HDBC () import Database.Schema.Migrations.Migration ( Migration(..), newMigration ) import Database.Schema.Migrations.Backend ( Backend(..) ) i...
anton-dessiatov/dbmigrations
test/BackendTest.hs
bsd-3-clause
5,182
0
12
1,220
1,187
590
597
96
1
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} module Fragment.SystemFw.Helpers ( tyLam , tyLamAnn , tyLamNoAnn , tyApp ) where import Control.Lens (review) import Ast.Kind import Ast.Type import Fra...
dalaing/type-systems
src/Fragment/SystemFw/Helpers.hs
bsd-3-clause
880
0
10
192
339
174
165
17
1
{-# LANGUAGE DeriveFunctor #-} module Foundation.Layout where import qualified Graphics.UI.Threepenny as UI import Graphics.UI.Threepenny.Core hiding (row) import Foundation.Common import Data.Maybe (catMaybes, isJust) -- Row {{{ data Row a = Row { rowCollapse :: Bool , rowColumns :: [Column a] } deriving ...
kylcarte/threepenny-extras
src/Foundation/Layout.hs
bsd-3-clause
4,110
0
16
1,007
1,594
809
785
101
1
{-| Module : Algebra Description : Relational algebra operators Copyright : (c) Janthelme, 2016 License : BDS3 Maintainer : janthelme@gmail.com Stability : experimental Portability : POSIX Implementation of relational algebra and other operators over 'Relvar's as defined in C.J. Date, \"/An Introduction ...
JAnthelme/relation-tool
src/Algebra.hs
bsd-3-clause
12,139
0
16
2,933
3,187
1,698
1,489
169
7
module TPar.Utils where import Control.Distributed.Process debugEnabled :: Bool debugEnabled = False tparDebug :: String -> Process () tparDebug _ | not debugEnabled = return () tparDebug s = say s' where s' = "tpar: "++s
bgamari/tpar
TPar/Utils.hs
bsd-3-clause
232
0
8
45
80
41
39
8
1
-- | Standard pitch representation. module Music.Pitch ( module Data.Semigroup, module Data.VectorSpace, module Data.AffineSpace, module Data.AffineSpace.Point, module Music.Pitch.Augmentable, module Music.Pitch.Alterable, module Music.Pitch.Absolute, m...
music-suite/music-pitch
src/Music/Pitch.hs
bsd-3-clause
1,012
0
5
193
208
142
66
30
0
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. module Duckling.Time.NL.Tests ( tests ) where import Data.String import Prelude import Test.Tasty import Du...
facebookincubator/duckling
tests/Duckling/Time/NL/Tests.hs
bsd-3-clause
1,021
0
12
170
222
126
96
23
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} #if __GLASGOW_HASKELL__ <= 800 && __GLASGOW_HASKELL__ >= 706 -- Work around a compiler bug {-# OPTIONS_GHC -fsimpl-tick-factor=300 #-} #endif -- | -- Module: Data.Aeson.Parser.Internal -- Copyri...
dmjio/aeson
src/Data/Aeson/Parser/Internal.hs
bsd-3-clause
18,321
0
19
4,351
4,211
2,243
1,968
310
7
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE CPP #-} module Facebook.Object.Marketing.AdsPixel where import Facebook.Records hiding (get) import qualified Facebook.Records as Rec imp...
BeautifulDestinations/fb
src/Facebook/Object/Marketing/AdsPixel.hs
bsd-3-clause
2,544
0
13
339
630
375
255
-1
-1
{-# LANGUAGE GADTs, GeneralizedNewtypeDeriving, TypeFamilies, EmptyDataDecls, ScopedTypeVariables, FlexibleContexts, RankNTypes, MultiParamTypeClasses, FlexibleInstances, ViewPatterns, ImplicitParams, TypeOperators, PackageImports #-} module HobbitLib ( InList (..), Nil,Cons,List0,List1,List2,List3,List4,List5,Fir...
eddywestbrook/hobbits
archival/HobbitLib.hs
bsd-3-clause
11,564
4
14
2,332
3,299
1,785
1,514
-1
-1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Haddock.Utils -- Copyright : (c) The University of Glasgow 2001-2002, -- Simon Marlow 2003-2006, -- David Waern 2006-2009 -- License : BSD-like -- -- M...
jwiegley/ghc-release
utils/haddock/src/Haddock/Utils.hs
gpl-3.0
15,848
0
18
3,355
3,835
2,051
1,784
249
4
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.ECS.Types.Product -- Copy...
fmapfmapfmap/amazonka
amazonka-ecs/gen/Network/AWS/ECS/Types/Product.hs
mpl-2.0
63,266
0
22
14,942
11,635
6,792
4,843
1,083
1
module RefErl.BufferServer.Data where import RefErl.BufferServer.Data.Rope import Data.IntMap import Data.Map import System.IO data Buffer = Buffer { fileName :: String , content :: !Rope , undos :: !URList } deriving (Show) data State = State { refactorings :: Refactorings , buffers :: Buffers ...
RefactorErl/refactorerl
refactorerl-0.9.15.04/lib/referl_ui/bufsrv/RefErl/BufferServer/Data.hs
lgpl-3.0
1,478
52
12
318
456
265
191
77
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -------------------...
sinjar666/fbthrift
thrift/compiler/test/fixtures/namespace/gen-hs/My/Namespacing/Extend/Test/ExtendTestService_Client.hs
apache-2.0
3,021
0
14
487
663
431
232
56
1
module Network.BitTorrent.DHT.ContactInfo ( PeerStore , Network.BitTorrent.DHT.ContactInfo.lookup , Network.BitTorrent.DHT.ContactInfo.insert ) where import Data.Default import Data.List as L import Data.Maybe import Data.Monoid import Data.HashMap.Strict as HM import Data.Serialize import...
DavidAlphaFox/bittorrent
src/Network/BitTorrent/DHT/ContactInfo.hs
bsd-3-clause
3,650
0
9
649
350
194
156
29
1
{-# LANGUAGE DeriveGeneric #-} -- | The appearance of in-game items, as communicated to the player. module Game.LambdaHack.Common.Flavour ( -- * The @Flavour@ type Flavour , -- * Constructors zipPlain, zipFancy, stdFlav, zipLiquid , -- * Accessors flavourToColor, flavourToName -- * Assorted , co...
Concomitant/LambdaHack
Game/LambdaHack/Common/Flavour.hs
bsd-3-clause
4,279
0
9
753
881
471
410
-1
-1
-- This program is intended for performance analysis. It simply -- builds a Bloom filter from a list of words, one per line, and -- queries it exhaustively. module Main () where import Control.Monad (forM_, mapM_) import Data.BloomFilter (Bloom, fromListB, elemB, lengthB) import Data.BloomFilter.Hash (cheapHashes) i...
jsa/hs-bloomfilter
examples/Words.hs
bsd-3-clause
1,498
0
15
306
449
236
213
32
1
import Graphics.UI.Gtk main :: IO () main = do initGUI window <- windowNew set window [windowTitle := "Range Controls", windowDefaultWidth := 250 ] mainbox <- vBoxNew False 10 containerAdd window mainbox containerSetBorderWidth mainbox 10 box1 <- hBoxNew False 0 boxPackStart mainbox box1...
mimi1vx/gtk2hs
docs/tutorial/Tutorial_Port/Example_Code/GtkChap4-2.hs
gpl-3.0
4,255
0
14
1,163
1,293
559
734
113
5
module Bugs (bugs) where import Test.Framework import qualified Bugs.Bug2 import qualified Bugs.Bug6 import qualified Bugs.Bug9 import qualified Bugs.Bug35 import qualified Bugs.Bug39 bugs :: [Test] bugs = [ Bugs.Bug2.main , Bugs.Bug6.main , Bugs.Bug9.main , Bugs.Bug35.main , Bugs.Bug39....
omefire/megaparsec
old-tests/Bugs.hs
bsd-2-clause
327
0
6
69
87
57
30
13
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TemplateHaskell #-} {-| Module : Stack.Sig.GPG Description : GPG Functions Copyright : (c) FPComplete.com, 2015 License : BSD3 Maintainer : Tim Dysinger <tim@fpcomplete.com> Stability : experimental...
Heather/stack
src/Stack/Sig/GPG.hs
bsd-3-clause
4,032
0
17
1,304
935
510
425
93
3
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module UnitTests.Distribution.Solver.Modular.QuickCheck (tests) where import Control.Monad (foldM) import Data.Either (lefts) import Data.Function (on) import Data.List (groupBy, isInfixOf, nub, sort) #if !MIN_VERSION_base(4,8,0) import Control.Applicative (...
headprogrammingczar/cabal
cabal-install/tests/UnitTests/Distribution/Solver/Modular/QuickCheck.hs
bsd-3-clause
12,092
0
17
3,213
3,394
1,772
1,622
240
3
module SyntaxExt where import Auxillary import Data.List(nub) import ParserAll -- This for defining parsers -- To import ParserAll you must define CommentDef.hs and TokenDef.hs -- These should be in the same directory as this file. import Data.Char(isLower) import qualified Text.PrettyPrint.HughesPJ as PP import Text...
cartazio/omega
src/SyntaxExt.hs
bsd-3-clause
32,127
6
18
7,722
18,190
9,770
8,420
514
17
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} -- GIMP Toolkit (GTK) UTF aware string marshalling -- -- Author : Axel Simon -- -- Created: 22 June 2001 -- -- Copyright (c) 1999..2002 Axel Simon -- -- This library is free software; you can redistribute it and/or ...
mimi1vx/gtk2hs
glib/System/Glib/UTFString.hs
gpl-3.0
9,544
0
13
2,133
2,473
1,283
1,190
175
2
{-# OPTIONS_GHC -XDeriveDataTypeable -XStandaloneDeriving #-} -- See Trac #1825 module ShouldFail where import Data.OldTypeable data T1 a = T1 a deriving( Typeable1 ) data T2 a b = T2 a b deriving instance (Typeable a, Typeable b) => Typeable (T2 a b) -- c.f. drv021.hs
frantisekfarka/ghc-dsi
testsuite/tests/deriving/should_fail/drvfail014.hs
bsd-3-clause
278
0
7
53
73
43
30
-1
-1
{-# LANGUAGE ParallelArrays #-} {-# OPTIONS_GHC -fvectorise #-} module DefsVect where import Data.Array.Parallel -- {-# VECTORISE SCALAR instance Eq Char #-} -- {-# VECTORISE SCALAR instance Eq Float #-} -- {-# VECTORISE SCALAR instance Ord Char #-} -- {-# VECTORISE SCALAR instance Ord Float #-} data MyBool = MyT...
urbanslug/ghc
testsuite/tests/dph/classes/DefsVect.hs
bsd-3-clause
1,139
16
8
247
379
199
180
28
1
rnd :: Int -> Double -> Double rnd n x = (fromIntegral (floor (x * t))) / t where t = 10^n printLn :: Show a => a -> IO () printLn x = putStrLn $ show x getPooled asuc an bsuc bn = (asuc + bsuc)/(an + bn) getPooledSE asuc an bsuc bn = sqrt $ p*(1 - p)/an + p*(1-p)/bn where p = getPooled asuc an bsuc bn ...
wd0/-stats
pooling.hs
mit
1,958
0
12
558
972
498
474
51
1
module Y2016.M08.D19.Exercise where import Data.Aeson import Data.Set (Set) import Data.MultiMap (MultiMap) import Data.Twitter import Graph.JSON.Cypher.Read.Graphs import Graph.JSON.Cypher.Read.Tweets import Y2016.M08.D15.Exercise (twitterGraphUrl) {-- So, yesterday we extracted URLs from twitter graph-JSON. Toda...
geophf/1HaskellADay
exercises/HAD/Y2016/M08/D19/Exercise.hs
mit
1,775
0
10
297
176
107
69
17
1
{-# LANGUAGE OverloadedStrings #-} module Head where import qualified Args as A import qualified Data.ByteString.Lazy.Char8 as B import Coreutils (bsContents) head :: A.Args -> IO () head a = mapM op (A.files a) >>= B.putStr . B.intercalate "\n" where op f = header f <$> case A.operation a of ...
mrak/coreutils.hs
src/head/Head.hs
mit
1,231
0
12
378
451
227
224
24
5
module Database ( module DatabaseTypes , mkInitialDatabase , users , updateLender , searchLenders , getOwnedItems , getLendedItems , getBorrowedItems , updateItem , searchItem...
Oblosys/webviews
src/exec/BorrowIt/Database.hs
mit
12,253
1
19
4,434
2,292
1,204
1,088
152
8
module Main (main) where import Nauva.Server import Nauva.Product.Template.Catalog (catalogApp) main :: IO () main = devServer catalogApp
wereHamster/nauva
product/template/catalog/dev/Main.hs
mit
141
0
6
20
44
26
18
5
1
-- | Wheat. a library for expressing reversible codecs for binary -- serialisation. module Data.Wheat ( -- * Codecs -- | A codec is conceptually a pair of an encoding function and a -- decoding function. Codecs need to know the concrete types they -- are dealing with: decoding uses lazy -- 'Data.ByteString.L...
barrucadu/wheat
Data/Wheat.hs
mit
1,624
0
5
305
73
58
15
9
0
-- Copyright (c) 2016-present, SoundCloud Ltd. -- All rights reserved. -- -- This source code is distributed under the terms of a MIT license, -- found in the LICENSE file. {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} module Kubern...
soundcloud/haskell-kubernetes
lib/Kubernetes/Model/V1/ObjectMeta.hs
mit
2,562
0
17
819
505
292
213
72
1
----------------------------------------------------------------------------- -- | -- Module : Config -- License : MIT (see the LICENSE file) -- Maintainer : Felix Klein (klein@react.uni-saarland.de) -- -- Configuration of the tool, set up via the command line arguments. -- --------------------------------...
reactive-systems/syfco
src/lib/Config.hs
mit
31,317
0
36
8,498
4,680
2,668
2,012
554
2
module Main where import Control.Monad.IO.Class import Control.Monad.Bayes.Sampler import Control.Monad.Bayes.Weighted import Control.Monad.Bayes.Population import Control.Monad.Bayes.Inference.SMC import Control.Monad.Bayes.Inference.RMSMC import Control.Monad.Bayes.Inference.PMMH as PMMH import Control.Monad.Bayes....
adscib/monad-bayes
benchmark/SSM.hs
mit
935
0
13
172
335
171
164
27
1
str2action :: String -> IO () str2action input = putStrLn $ "Data: " ++ input list2actions :: [String] -> [IO ()] list2actions = map str2action strings = show <$> [1..10] actions :: [IO ()] actions = list2actions strings printall :: IO () printall = runall actions where runall [] = return () runall (x:xs...
sclereid/collections
haskell-learning/actions.hs
mit
467
0
9
125
179
87
92
18
2
{-# LANGUAGE RankNTypes, RecursiveDo, RecordWildCards, GADTs, GeneralizedNewtypeDeriving, ScopedTypeVariables #-} module GMEWriter (writeTipToiFile) where import qualified Data.ByteString.Lazy as B import qualified Data.Binary.Builder as Br import Text.Printf import Control.Monad import Control.Applicative (Applicati...
colinba/tip-toi-reveng
src/GMEWriter.hs
mit
10,993
0
17
2,673
3,828
1,786
2,042
306
6
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE BangPatterns #-} module EDDA.Data.Import.EDDB.Systems where import EDDA.Types import EDDA.Data.Database (query, saveSystems) import EDDA.Schema.Util (getStr, getInt, getDouble) import EDDA.Data.Import.EDDB.Util import Data.IORef import qualified Data.Vector as V import ...
troydm/edda
src/EDDA/Data/Import/EDDB/Systems.hs
mit
5,133
0
19
2,122
1,136
584
552
79
4
{-| Module : Utils.Executable Description : Utilities for reading commandline arguments Copyright : (c) Tessa Belder 2015-2016 This module contains useful functions for reading commandline arguments. It should be used in all executables of the madl toolset. -} module Utils.Executable(parseArgs) where import Co...
julienschmaltz/madl
src/Utils/Executable.hs
mit
3,237
0
17
755
744
393
351
43
3
module Lesson02 where -- Each of our lessons is going to end up reusing a lot of the -- same code, like the definitions of Suit and Rank. Instead of -- copy-pasting all of that, I've created a module called Helper -- that contains that shared code. Then we just need to *import* -- that module to make those data types,...
snoyberg/haskell-impatient-poker-players
src/Lesson02.hs
mit
5,815
0
10
1,224
129
82
47
11
1
{-# LANGUAGE OverloadedStrings #-} module MinionsApi.Config ( Config(..) , Environment(..) , makePool -- IO , lookupSetting -- IO , setLogger , defaultConfig ) where import System.Environment (lookupEnv) import Network.Wai.Middleware.RequestLogger (logStdoutDev, logStdout) import ...
dzotokan/minions-api
src/lib/MinionsApi/Config.hs
mit
2,466
0
11
529
603
328
275
60
2
----------------------------------------------------------------------------- -- -- Module : Language.TypeScript.Docs -- Copyright : (c) DICOM Grid Inc. 2013 -- License : MIT -- -- Maintainer : Phillip Freeman <paf31@cantab.net> -- Stability : experimental -- Portability : -- -- | -- ----------------...
paf31/typescript-docs
src/Language/TypeScript/Docs.hs
mit
1,040
0
11
136
164
102
62
15
1
module Solution ( Observation(..) , solution ) where ---------------------------------------- -- STDLIB ---------------------------------------- import Data.Ratio import Data.Bits import Data.List import Data.Word import Safe import Debug.Trace type ObsHash = Word8 data Observation = Observation { obs_...
ekarayel/SetDifferenceEstimator
Solution.hs
mit
804
0
8
150
114
73
41
18
1
data Something = Something String String
haskellbr/meetups
09-2016/programas-como-linguagens/haskell-web-repl/tmp.hs
mit
42
0
6
7
12
6
6
2
0
----------------------------------------------------------------------------- -- -- Module : Language.TypeScript.Parser -- Copyright : (c) DICOM Grid Inc. 2013 -- License : MIT -- -- Maintainer : Phillip Freeman <paf31@cantab.net> -- Stability : experimental -- Portability : -- -- | -- --------------...
paf31/language-typescript
src/Language/TypeScript/Parser.hs
mit
8,024
0
15
1,212
2,095
1,075
1,020
113
2
-- Project Euler Problem 6 - Sum square difference -- -- difference between the sum of squares and square of the sum of the first one hundred natural numbers -- -- main = do let n = 100 let sumsquare = sum [ x^2 | x <- [1..n]] let squaresum = (sum [1..n])^2 print (squaresum - sumsquare)
yunwilliamyu/programming-exercises
project_euler/p006_sumsquare.hs
cc0-1.0
293
0
14
62
89
46
43
5
1
-- -- Copyright (c) 2014 Citrix Systems, Inc. -- -- 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 your option) any later version. -- -- This progra...
crogers1/manager
xenmgr/Vm/Queries.hs
gpl-2.0
40,784
0
41
10,514
10,334
5,183
5,151
807
7
module Fenfire.Latex2Png where -- Copyright (c) 2007, Benja Fallenstein, Tuukka Hastrup -- This file is part of Fenfire. -- -- Fenfire 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 t...
timthelion/fenfire
Fenfire/Latex2Png.hs
gpl-2.0
3,003
0
15
569
584
306
278
50
2
module Math.REPL.Prim.Definitions ( unaryOps , binaryOps , defVars , defFuns , defBinds ) where -------------------------------------------------------------------------------- import Math.REPL.Prim.Bindings (Bindings, mkBind) import Math.REPL.Prim.Expr (Operator (..))...
sumitsahrawat/calculator
src/Math/REPL/Prim/Definitions.hs
gpl-2.0
2,141
0
8
547
453
293
160
41
1
main = putStrLn "hello, world" --IO
YPBlib/NaiveFunGame_hs
cw/cli.hs
gpl-3.0
36
0
5
6
10
5
5
1
1
{- Constructs the set of LR(0) parse table items from a deterministic context-free grammar. This was created as Project 2 for EECS 665 at the University of Kansas. Author: Ryan Scott -} module Main (main) where import Data.Text.IO (putStr) import LR0ItemSet.Algorithm import LR0ItemSet.Data import LR0ItemSet.Parse ...
RyanGlScott/lr0-item-set
src/Main.hs
gpl-3.0
740
0
11
166
127
70
57
13
2
module Main where import System.Console.GetOpt import System.Environment import qualified Options as O import qualified GPSDClient as G main :: IO () main = do args <- getArgs -- Parse options, getting a list of option actions let (actions, nonOptions, errors) = getOpt Permute O.optionDescriptions ar...
jefflasslett/gpstime
Main.hs
gpl-3.0
590
0
11
120
139
75
64
14
1
module Main where import Control.Monad (when) import Data.ByteString.Lazy (ByteString) import qualified Data.ByteString.Lazy as BS import System.Environment (getArgs) minimalPNG :: ByteString minimalPNG = BS.pack [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, ...
Tuplanolla/ties341-unsafe
Truncate.hs
gpl-3.0
939
0
10
179
370
223
147
25
1
{-# LANGUAGE PackageImports #-} {- This module provides the public interface to the Archivemount library. It provides both standard archivemount calls(mount/unmount) as well as portable versions which can unpack a tarbal rather than mounting it, when mounting is impossible. GPL3. License info is at the bottom of the f...
timthelion/archivemount-hs
src/System/Directory/Archivemount.hs
gpl-3.0
12,246
0
15
1,995
2,549
1,365
1,184
313
2
module Amoeba.View.Language where import Amoeba.View.Output.Types data GameNode = TitleScreen | Screen2 | Screen3 | Screen4 deriving (Ord, Eq, Show, Enum) data Command = Finish | Render | StartViewPointMoving ScreenPoint | ViewPointMoving ScreenPoint | StopV...
graninas/The-Amoeba-World
src/Amoeba/View/Language.hs
gpl-3.0
373
0
6
102
89
53
36
10
0
{-# LANGUAGE OverloadedStrings #-} module Endpoints.AuthEndpoints where import qualified Data.Text.Lazy as LT (fromStrict) import Data.Text import Auth import Control.Monad.IO.Class (liftIO) import Control.Monad (when) import Network.HTTP.Types import qualified Web.Scotty as S import qualified Web.Scotty.Cookie as ...
DunderRoffe/sjolind.se
src/Endpoints/AuthEndpoints.hs
gpl-3.0
666
0
11
151
187
103
84
18
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-swf/gen/Network/AWS/SWF/TerminateWorkflowExecution.hs
mpl-2.0
7,523
0
9
1,478
726
447
279
78
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Files/List.hs
mpl-2.0
6,262
0
23
1,659
1,118
642
476
154
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.IAM.Types.Sum -- Copyrigh...
olorin/amazonka
amazonka-iam/gen/Network/AWS/IAM/Types/Sum.hs
mpl-2.0
14,013
0
12
3,199
2,604
1,307
1,297
346
0
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances #-} {- Copyright (C) 2010, 2011, 2012 Jeroen Ketema and Jakob Grue Simonsen This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foun...
jeroenk/iTRSsImplemented
Omega.hs
agpl-3.0
3,376
0
12
835
668
344
324
63
1