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
module Main ( main ) where import Data.LinearProgram import Control.Monad.LPMonad import Data.LinearProgram.GLPK import Control.Monad.State import qualified Data.Map as Map loadPattern = Map.fromList [ ("night",5),("morning",25),("evenings",100) ] -- on-demand instances cost/hour onDemandHo...
softwaremechanic/Miscellaneous
Haskell/linear_prog_aws.hs
gpl-2.0
4,236
0
16
1,523
1,014
562
452
56
2
{-# OPTIONS_GHC -O3 -optc-O3 #-} --idea 0 fib=zipWith (+) (0:(1:fib)) (0:fib) main=print.sum.takeWhile (<=4000000).filter even$ fib
kumar0ed/euler
2.hs
gpl-2.0
133
0
9
16
62
35
27
3
1
import Test.Framework (defaultMain, testGroup) import Test.Framework.Providers.HUnit import Test.AllTests import Test.HUnit main = defaultMain tests tests = [ testGroup "primitiveParsers" [ testCase "parseNumber" parseNumber , testCase "parseNumberNegative" parseNumberNegative , ...
VictorDenisov/vim-netbeans
src/Test/ByFramework.hs
gpl-2.0
4,384
0
8
1,245
636
322
314
79
1
{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2006-2014 John MacFarlane <jgm@berkeley.edu> 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) a...
rgaiacs/pandoc
src/Text/Pandoc/Readers/RST.hs
gpl-2.0
43,516
657
34
11,936
11,504
6,045
5,459
889
27
module Main where import Misc import Tree import ParseCss (parseCss) import Control.Exception as CE -- CE.try import Data.Either.Utils import Data.Attoparsec.Text.Lazy (eitherResult) import qualified Data.Text.Lazy.IO as T import qualified Data.Text.Lazy as TL import Text.Taggy (run) import Text.Taggy.Types {- han...
mackenzie-tcc-arthur-gabriel/CSS-Applier
src/Main.hs
gpl-3.0
2,147
0
15
937
263
141
122
34
2
----------------------------------------------------------------------------- -- | -- Module : Numerical.PETSc.Internal.PutGet.PC -- Copyright : (c) Marco Zocca 2015 -- License : LGPL3 -- Maintainer : zocca . marco . gmail . com -- Stability : experimental -- -- | PC Mid-level interface -- ----------...
ocramz/petsc-hs
src/Numerical/PETSc/Internal/PutGet/PC.hs
gpl-3.0
677
0
8
90
85
56
29
7
1
module Print3Broken where printSecond :: IO () printSecond = do putStrLn greeting main :: IO () main = do putStrLn greeting printSecond where greeting = "Yarrr" -- greeting :: String -- greeting = "Yarrrr"
dkensinger/haskell
haskellbook/print3broken.hs
gpl-3.0
219
0
7
47
58
30
28
9
1
{-- An simple todolist manager: - Planned features : replace , prioritise --} module Main( main ) where import System.Environment import System.Directory import System.Console.GetOpt import System.IO import Data.Maybe( fromMaybe ) import Data.List import System.Exit fileName="" main = do args <- getArgs let ...
jelly/TodoList
todo.hs
gpl-3.0
2,947
29
15
604
787
411
376
68
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} module Lambia.Interactive (interactive) where import Prelude hiding (getLine, putStr, putStrLn, filter) import Data.Char (isSpace) import Data.ByteString.Char8 hiding ( append, map, splitAt, init, dropWhile, head, null, isPrefixOf) import Data.List...
phi16/Lambia
src/Lambia/Interactive.hs
gpl-3.0
4,163
37
25
1,197
1,882
950
932
117
7
{-# LANGUAGE OverloadedStrings #-} module Teatros.Types where data Entidad = EntidadPeriodico | EntidadProgramaMano | EntidadAfiche | EntidadFotografia | EntidadAudiovisual | EntidadBibliografia | EntidadPremio | EntidadObraGraf...
arpunk/jfdb
src/Teatros/Types.hs
gpl-3.0
404
0
5
147
41
27
14
12
0
{-# LANGUAGE ExistentialQuantification, FlexibleInstances #-} -- module Mescaline.EngineSF where import Control.Applicative import Control.Arrow ((>>>), first, second) import Control.Concurrent (ThreadId, forkIO, forkOS, threadDelay) import qualified Control.Concurrent.Chan as Chan import...
kaoskorobase/mescaline
lib/mescaline/Mescaline/EngineSF.hs
gpl-3.0
8,840
0
21
2,557
2,181
1,205
976
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-streetviewpublish/gen/Network/Google/Resource/StreetViewPublish/Photo/Get.hs
mpl-2.0
5,786
0
18
1,346
873
512
361
120
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-sqladmin/gen/Network/Google/Resource/SQL/Users/Insert.hs
mpl-2.0
5,115
0
20
1,320
864
502
362
125
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Operations/Get.hs
mpl-2.0
4,609
0
15
1,057
701
411
290
99
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/PlacementStrategies/Delete.hs
mpl-2.0
5,282
0
19
1,234
825
476
349
116
1
module Util where import Prelude () import BasicPrelude import Control.Concurrent import Control.Concurrent.STM (STM, atomically) import Data.Word (Word16) import Data.Bits (shiftL, (.|.)) import Data.Char (isDigit) import Control.Applicative (many) import Control.Error (hush) import Data.Time (getCurrentTime) import ...
singpolyma/cheogram
Util.hs
agpl-3.0
10,295
192
22
1,646
3,837
1,982
1,855
235
2
{-# LANGUAGE OverloadedStrings #-} module Static.Service ( Static(..) , initStatic ) where import qualified Crypto.Hash.Algorithms as Hash import Crypto.MAC.HMAC (HMAC, hmac) import qualified Data.ByteString as BS import Data.Maybe (fromMaybe) import qualified Network.HTTP.Client as HC import Network.HTTP.Types ...
databrary/databrary
src/Static/Service.hs
agpl-3.0
1,150
0
17
218
330
193
137
37
1
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleContexts #-} module IntegrationTests ( integratio...
ghorn/dynobud
dynobud/tests/IntegrationTests.hs
lgpl-3.0
7,379
0
21
2,083
2,642
1,424
1,218
-1
-1
module Network.Haskoin.Wallet.Transaction ( -- *Database transactions txPage , addrTxPage , getTx , getAccountTx , importTx , importNetTx , signKeyRingTx , createTx , signOfflineTx , getOfflineTxData , killTxs , reviveTx , getPendingTxs -- *Database blocks , importMerkles , getBestBlock -- *Database coins and balan...
plaprade/haskoin-wallet
Network/Haskoin/Wallet/Transaction.hs
unlicense
55,944
0
25
17,651
13,283
6,823
6,460
-1
-1
-- Geoffrey Corey -- Eric Timmerman module Hw5 where -- 1.) -- 0 [] -- 1 [x:?] -- 2 [y:?, x:?] -- 3 [y:1, x:?] -- 11 [f:{}, y:1, x:?] -- 11 >> -- 5 [x:2, f:{}, y:1, x:?] -- 8 [x:2, f:{}, y:1, x:?] -- 4 >> -- 5 [x:1, x:2, f:{}, y:1, x:?] -- 8 [x:1, x:2, f:{}, y:1, x:?] -- ...
stumped2/school
CS381/hw5/Hw5.hs
apache-2.0
2,722
0
2
924
104
103
1
1
0
import Control.Concurrent.CachedIO (cachedIO) import Data.List (isInfixOf) crawlTheInternet :: IO [String] crawlTheInternet = do putStrLn "Scanning pages.." putStrLn "Parsing HTML.." putStrLn "Following links.." return ["website about Haskell", "website about Ruby", "slashdot.org", "The Mon...
glasserc/haskell-cached-io
test/test-cachedIO.hs
apache-2.0
699
0
9
135
189
95
94
18
1
{-# LANGUAGE MultiParamTypeClasses #-} module FloydWarshallTest where import FloydWarshall import Test.HUnit import Data.List (nub) import Data.Map (Map,keys) import qualified Data.Map as Map import Data.Array import Data.Maybe (catMaybes) data Unit = A | B | C | D | E | F | G deriving (Read,Show,Ord,I...
fffej/haskellprojects
arbitrage/FloydWarshallTest.hs
bsd-2-clause
2,850
0
13
788
1,103
638
465
73
1
module AppleBlas(blasMMult) where import Foreign hiding (unsafePerformIO) import Foreign.C.Types import Unsafe.Coerce import Prelude hiding (replicate) --import Data.Storable import System.IO.Unsafe import Data.Vector.Storable.Mutable import GHC.Ptr (castPtr) import Numerics.Simple.Util foreign import ccall uns...
ekmett/sparse
benchmarks/AppleBlas.hs
bsd-2-clause
1,150
0
12
257
384
197
187
21
1
{-# 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 Network.Wai.Middleware.RequestLogger import ...
pbrisbin/devsite
Application.hs
bsd-2-clause
3,073
0
12
574
547
298
249
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DeriveDataTypeable #-} module Propellor.Property.Apt where import Data.Maybe import Data.List import Data.Typeable import System.IO import Control.Monad import Control.Applicative import Prelude import Propellor.Base import qualified Propellor.Property.File as File impo...
ArchiveTeam/glowing-computing-machine
src/Propellor/Property/Apt.hs
bsd-2-clause
17,105
156
19
2,868
4,329
2,307
2,022
-1
-1
{-# LANGUAGE TemplateHaskell #-} -- | Contains basic operations related to the GUI module View ( module View , module Exported ) where -- External libraries import Control.Monad import Graphics.UI.Gtk import Hails.MVC.View.GtkView import Graphics.UI.Gtk.Extra.BuilderTH import Hails.MVC.View.GladeView import Ha...
ivanperez-keera/SoOSiM-ui
src/View.hs
bsd-3-clause
4,011
0
9
708
638
331
307
70
1
------------------------------------------------------------------------------ -- CPP macros for common instances ------------------------------------------------------------------------------ -- XXX use template haskell instead and include Monoid and IsStream instances -- as well. #define MONADPARALLEL , MonadAsync ...
harendra-kumar/asyncly
src/Streamly/Streams/Instances.hs
bsd-3-clause
8,334
0
2
4,431
35
34
1
1
0
{-# LANGUAGE DeriveDataTypeable, RecordWildCards #-} {-# OPTIONS -Wall #-} module Main where import Control.Concurrent (forkIO,threadDelay) import Control.Concurrent.Chan (Chan,writeChan,newChan,getChanContents) import Control.Monad (forever, unless) import Data.Data (Data,Typeable) import...
paul-r-ml/throttle
src/Main.hs
bsd-3-clause
3,227
0
21
887
1,046
539
507
80
1
-- Copyright 2019 Google LLC -- -- Use of this source code is governed by a BSD-style -- license that can be found in the LICENSE file or at -- https://developers.google.com/open-source/licenses/bsd {-# LANGUAGE CPP #-} module GHC.SourceGen.Binds.Internal where #if MIN_VERSION_ghc(9,0,0) import GHC.Types.Basic (Origi...
google/ghc-source-gen
src/GHC/SourceGen/Binds/Internal.hs
bsd-3-clause
3,661
0
11
819
601
359
242
52
1
module Automaton.NFA ( NFA(..) , isAcceptState , step' , alphabets , reachableStateSets , module Automaton ) where import qualified Data.Map as M import qualified Data.Set as S import Automaton -- 非決定性有限オートマトン data NFA state alpha = NFA { nfaTransTable :: M.Map (state, alpha) (S.Set state) , nf...
monamonamonad/RegexDSL
src/Automaton/NFA.hs
bsd-3-clause
1,948
0
12
424
659
338
321
-1
-1
module Syntax where import Data.List ------------------------------------------------------------------ -- Abstract syntax ----------------------------------------------- ------------------------------------------------------------------ -- info for all primops; the totality of the info in primops.txt(.pp) data Info...
nomeata/ghc
utils/genprimopcode/Syntax.hs
bsd-3-clause
4,448
0
16
1,352
993
545
448
86
3
module AD where import AD.Server
hlian/afterdark
src/AD.hs
bsd-3-clause
34
0
4
6
9
6
3
2
0
{-# LANGUAGE FlexibleInstances #-} module Database.Redis.RedisT where import Control.Monad import Control.Monad.Trans import Data.Conduit import Database.Redis data RedisT r m a = RedisT { runRedisT :: r -> m a } instance (Functor m) => Functor (RedisT r m) where fmap f v = RedisT $ \ r -> fmap f (runRed...
ppp4ppp/test3
src/Database/Redis/RedisT.hs
bsd-3-clause
1,054
0
12
268
429
224
205
27
1
{-# LANGUAGE RecordWildCards #-} module Math.Algebra.AbGroupPres.IsoClass ( IsoClass(..), invariantFactorsToElementaryDivisors, elementaryDivisorsToInvariantFactors ) where import Data.List (intercalate, group, groupBy, sort, transpose) import Data.Function (on) data IsoClass = IsoClass { rank :: Integ...
mvr/at
src/Math/Algebra/AbGroupPres/IsoClass.hs
bsd-3-clause
1,910
0
16
661
605
332
273
39
1
{-| Module : AERN2.Real Description : Exact real numbers Copyright : (c) Michal Konecny License : BSD3 Maintainer : mikkonecny@gmail.com Stability : experimental Portability : portable Exact real numbers represented by Cauchy sequences of MPBalls. -} module AERN2.R...
michalkonecny/aern2
aern2-real/src/AERN2/Real.hs
bsd-3-clause
1,582
0
10
325
294
181
113
-1
-1
; ; HSP help manager—p HELPƒ\[ƒXƒtƒ@ƒCƒ‹ ; (æ“ª‚ªu;v‚̍s‚̓Rƒƒ“ƒg‚Æ‚µ‚ďˆ—‚³‚ê‚Ü‚·) ; %type “à‘ –½—ß %ver 3.5 %note ver3.5•W€–½—ß %date 2016/07/13 %author onitama %url http://hsp.tv/ %port Win Cli Let %index getstr ƒoƒbƒtƒ@‚©‚ç•¶Žš—ñ“ǂݏo‚µ %group •¶Žš—ñ‘€ì–½—ß %prm p1,p2,p3,p...
zakki/openhsp
package/hsphelp/i_string.hs
bsd-3-clause
17,870
6,849
14
2,085
14,311
8,361
5,950
-1
-1
{- - Hacq (c) 2013 NEC Laboratories America, Inc. All rights reserved. - - This file is part of Hacq. - Hacq is distributed under the 3-clause BSD license. - See the LICENSE file for more details. -} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasse...
ti1024/hacq
src/Data/Quantum/Circuit/QC.hs
bsd-3-clause
7,149
0
22
1,558
2,253
1,157
1,096
150
2
module Handler.Admin ( getAdminR , postAdminR ) where import Import import Utils import qualified Handler.Media as Media (adminWidget) getAdminR :: Handler Html getAdminR = do at <- (liftM2 (,) `on` lookupGetParam) "action" "target" case at of (Just "noapprove_user", Just u) -> setApprove...
SimSaladin/rnfssp
Handler/Admin.hs
bsd-3-clause
1,906
0
18
602
540
273
267
44
5
module Exercises1110 where -- Exercises: Pity the Bool -- 1. Cardinality: 4. Bool is 2 and sum type is addition. -- 2. The cardinality is 2 + 256 = 258. -- If you try to create a numeric literal less than -128 -- or greater than 127, you get an error: -- "Literal 130 is out of the Int8 range -128..127"...
pdmurray/haskell-book-ex
src/ch11/Exercises11.10.hs
bsd-3-clause
595
0
6
139
45
31
14
5
0
{-# LANGUAGE FlexibleInstances, UndecidableInstances, DuplicateRecordFields #-} module Main where helloWorldNTimes :: [String] -> [String] helloWorldNTimes xs = xs >>= (\s -> replicate (read s :: Int) "Hello World") main :: IO () main = interact (unlines . helloWorldNTimes . lines)
everyevery/programming_study
hackerrank/functional/HelloWorldNTimes/solution.hs
mit
288
0
10
45
83
46
37
6
1
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} {- | Module : ./HasCASL/MatchingWithDefinitions.hs Description : matching of terms modulo definition expansion Copyright : (c) Ewaryst Schulz, DFKI Bremen 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : ewaryst.schulz@dfki.de Stabil...
spechub/Hets
HasCASL/MatchingWithDefinitions.hs
gpl-2.0
15,049
0
16
4,698
4,036
2,073
1,963
251
13
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Lamdu.Data.Db.Layout ( DbM(DbM), runDbTransaction , ViewM, runViewTransaction , GuiAnchors, guiAnchors, guiIRefs , CodeAnchors, codeAnchors, codeIRefs , RevisionProps, revisionProps, revisionIRefs , guiState , dbSchemaVersion, curDbSchemaVer...
lamdu/lamdu
src/Lamdu/Data/Db/Layout.hs
gpl-3.0
2,739
0
11
515
744
427
317
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE Safe #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE UndecidableInstances #-} -- | Monad class for caching of combined keys module Network.Tox.Crypto.Keyed where import Control.Monad.RWS ...
iphydf/hs-toxcore
src/Network/Tox/Crypto/Keyed.hs
gpl-3.0
1,874
0
9
487
494
277
217
38
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-sts/gen/Network/AWS/STS/GetSessionToken.hs
mpl-2.0
8,101
0
13
1,505
767
476
291
87
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-directconnect/gen/Network/AWS/DirectConnect/ConfirmConnection.hs
mpl-2.0
3,849
0
9
773
451
275
176
57
1
{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleContexts, OverloadedStrings #-} module Futhark.Pipeline ( CompileError (..) , Pipeline , PipelineConfig (..) , Action (..) , FutharkM , runFutharkM , compileError , compileErrorS , compileFail , oneP...
CulpaBS/wbBach
src/Futhark/Pipeline.hs
bsd-3-clause
4,604
0
14
1,329
1,306
673
633
117
2
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, PatternGuards, TypeSynonymInstances #-} -- | Lambdabot base module. Controls message send and receive module Plugin.Base (theModule) where import Plugin import IRCBase (IrcMessage, timeReply, errShowMsg) -- import Message (getTopic, nick, joinChannel, body, fullNam...
zeekay/lambdabot
Plugin/Base.hs
mit
12,329
0
42
4,085
2,624
1,343
1,281
173
9
module Propellor.Property.Systemd.Core where import Propellor import qualified Propellor.Property.Apt as Apt -- dbus is only a Recommends of systemd, but is needed for communication -- from the systemd inside a container to the one outside, so make sure it -- gets installed. installed :: Property NoInfo installed = A...
sjfloat/propellor
src/Propellor/Property/Systemd/Core.hs
bsd-2-clause
353
0
6
52
47
31
16
5
1
module Distribution.Client.Init.Licenses ( License , bsd2 , bsd3 , gplv2 , gplv3 , lgpl21 , lgpl3 , agplv3 , apache20 , mit , mpl20 , isc ) where type License = String bsd2 :: String -> String -> License bsd2 authors year = unlines [ "Copyright (c) " ++ year ++ ", " ++ authors , "All...
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/Init/Licenses.hs
bsd-3-clause
179,709
0
9
45,222
9,318
6,174
3,144
3,041
1
import Messente smsSend = send "api-username" "api-password" main = do -- If from is Nothing then messente default 'From' is used -- (configured from API setup at messente.com) result <- smsSend Nothing "+00000000000" "my first sms" putStrLn $ case result of Right id -> "sms sent, id: " ++ id Left (err...
kaiko/messente-haskell
test.hs
mit
801
0
14
185
190
93
97
14
3
largeNonMersennePrime :: Integer largeNonMersennePrime = let a = 28433 * 2^7830457 + 1 b = 10000000000 in a `mod` b -- *Main> largeNonMersennePrime -- 8739992577 -- (0.08 secs, 5,885,008 bytes)
samidarko/euler
problem097.hs
mit
250
0
11
86
48
27
21
4
1
-- | A minimal Haskbot server can be run via: -- -- > {-# LANGUAGE OverloadedStrings #-} -- > -- > import Network.Haskbot -- > import Network.Haskbot.Config -- > import Network.Haskbot.Plugin -- > import qualified Network.Haskbot.Plugin.Help as Help -- > -- > main :: IO () -- > main = haskbot config registry -- > -- > ...
bendyworks/haskbot-plugins
haskbot-core-0.2/src/Network/Haskbot.hs
mit
1,568
0
8
324
104
76
28
10
1
{-# Language OverloadedStrings #-} module Unison.Config where import qualified Data.Configurator as Config import Data.Configurator.Types (Config) import qualified Unison.Util.Logger as L import System.IO (Handle, stderr, stdout) -- | Load the config load :: IO Config load = Config.load [Config.Required "config", Co...
nightscape/platform
node/src/Unison/Config.hs
mit
785
0
11
120
229
124
105
19
1
----------------------------------------------------------------------------- -- -- Module : Graphics.GPipe.PrimitiveStream -- Copyright : Tobias Bexelius -- License : MIT -- -- Maintainer : Tobias Bexelius -- Stability : Experimental -- Portability : Portable -- -- | -- A 'Graphics.GPipe.PrimitiveA...
Teaspot-Studio/GPipe-Core
src/Graphics/GPipe/PrimitiveStream.hs
mit
994
0
5
169
71
54
17
14
0
{-# LANGUAGE DeriveGeneric #-} module NginxInterface where import GHC.Generics import Data.Time.Clock.POSIX import Data.Aeson import Data.Maybe import qualified Data.ByteString.Lazy.Char8 as B import MonitorCommon --parser-printer imports import NginxPrettyPrinter import NginxSourceCreator import TreeConfigNginxFille...
prl-tokyo/bigul-configuration-adaptation
Transformations/NginxInterface.hs
mit
2,199
0
18
411
570
297
273
55
2
{-# LANGUAGE OverloadedStrings #-} module KirstieHooksArchivePageSpec where import Test.Hspec import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BL import System.Directory import System.FilePath import System.Posix.Files import Web.Kirstie.Model im...
hekt/blog-system
test/KirstieHooksArchivePageSpec.hs
mit
2,969
0
21
965
637
335
302
63
1
{-# OPTIONS_GHC -fno-warn-missing-fields #-} module KNXd.Client.Internal.TH where import Language.Haskell.TH import Language.Haskell.TH.Quote import Data.Char import Data.List defineTypes :: QuasiQuoter defineTypes = QuasiQuoter { quoteDec = parseHeader } splitOn' :: Eq a => a -> [a] -> [[a]] splitOn' = go [] whe...
KaneTW/knxd-native-client
src-old/GenFromDefine.hs
mit
2,043
0
17
570
861
448
413
36
4
{-# LANGUAGE OverloadedStrings #-} module Config where import Control.Applicative import Data.Maybe import System.Directory import System.FilePath import qualified Data.Yaml.Config as Yaml type Config = (String, [String], [String]) load :: FilePath -> IO Config load path = do ...
sol/depends
src/Config.hs
mit
638
0
13
149
189
101
88
17
1
{-| Module : Data.Dson.Octal Copyright : (c) Ezequiel Alvarez 2014 License : MIT Maintainer : welcometothechango@gmail.com Stability : provisional Portability : portable Parser for octal numbers. -} module Data.Dson.Octal (octal) where import Data.Dson.Lexer import Control.Applicative import Data.Char...
alvare/dson-parsec
Data/Dson/Octal.hs
mit
1,798
0
12
358
517
283
234
26
1
{-| A DSL for declaration of result decoders. -} module Hasql.Private.Decoders where import Hasql.Private.Prelude hiding (maybe, bool) import qualified Data.Vector as Vector import qualified PostgreSQL.Binary.Decoding as A import qualified PostgreSQL.Binary.Data as B import qualified Hasql.Private.Decoders.Results as ...
nikita-volkov/hasql
library/Hasql/Private/Decoders.hs
mit
12,244
0
13
1,943
2,553
1,360
1,193
-1
-1
{-# LANGUAGE TypeFamilies #-} module Hadrian.Oracles.ArgsHash ( TrackArgument, trackAllArguments, trackArgsHash, argsHashOracle ) where import Control.Monad import Development.Shake import Development.Shake.Classes import Hadrian.Expression hiding (inputs, outputs) import Hadrian.Target import Hadrian.Utiliti...
izgzhen/hadrian
src/Hadrian/Oracles/ArgsHash.hs
mit
2,519
0
14
450
419
228
191
26
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE DuplicateRecordFields #-} module Language.LSP.Types.ServerCapabilities where import Data.Aeson import Data.Aeson.TH import Data.Text (Text) import Language.LSP.Types.CodeAction import Language.LSP.Types.CodeLens import Language...
alanz/haskell-lsp
lsp-types/src/Language/LSP/Types/ServerCapabilities.hs
mit
6,128
0
12
1,371
732
452
280
69
0
module Y2017.M04.D07.Solution where -- below module available via 1HaskellADay git repository import Control.Logic.Frege ((<<-)) {-- From the Mensa Genius Quiz-a-Day Book by Dr. Abbie F. Salny Problem for April 7th: "You are decorating for Spring," the problem begins, and I'm like: I am? Dr. Salny responds: "CHUT...
geophf/1HaskellADay
exercises/HAD/Y2017/M04/D07/Solution.hs
mit
4,190
0
10
884
293
182
111
20
1
#!/usr/bin/env runhaskell {-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE UnicodeSyntax #-} import Control.Applicative ((<$>)) import Data.Maybe (catMaybes) import Data.Monoid ((<>)) import Control.Lens import qualified Data.Aeson.Lens as L import Netw...
supki/libstackexchange
examples/rep-watcher.hs
mit
599
7
9
98
167
89
78
-1
-1
module Helpers where import qualified Data.Vector as V import Data.Geometry.Geos.Geometry makePoint (c1, c2) = point $ coordinate2 c1 c2 makePointGeo c = PointGeometry (makePoint c) Nothing makeLinearRing :: [(Double, Double)] -> Either GeometryConstructionError LinearRing makeLinearRing = linearRing . V.map (uncu...
ewestern/geos
tests/Helpers.hs
mit
1,326
0
9
193
433
225
208
22
1
module Language.Jass.Parser.AST.FunctionDecl( FunctionDecl(..), getFuncDeclName, getFuncDeclParameters, getFuncDeclReturnType ) where import Language.Jass.Parser.SourcePos import Language.Jass.ShowIndent import Language.Jass.JassType import Language.Jass.Parser.AST.Parameter type Name = String data Functi...
NCrashed/hjass
src/library/Language/Jass/Parser/AST/FunctionDecl.hs
mit
1,323
0
11
212
348
189
159
25
1
module WallFollower where import Frob import RobotSim --import MyRobotModel emptyWorld = maybeReadWorldFromPath "as31" maybeReadWorldFromPath p = do w <- readWorldFromPath p case w of Right w' -> return w' Left s -> return [] wheelSpeedsT :: WheelControl o => Behavior i Speed -> Behavior i Sp...
jatinshah/autonomous_systems
as3/first.hs
mit
2,299
19
11
527
749
377
372
47
2
-- | Data.Graph is sorely lacking in several ways, This just tries to fill in -- some holes and provide a more convinient interface {-# LANGUAGE RecursiveDo #-} module Util.Graph( Graph(), fromGraph, newGraph, newGraph', newGraphReachable, reachableFrom, Util.Graph.reachable, fromScc, ...
dec9ue/jhc_copygc
src/Util/Graph.hs
gpl-2.0
7,728
6
21
2,137
3,519
1,823
1,696
-1
-1
module TestLexer where import Test.HUnit import Test.Framework.Providers.HUnit import Definitions import Lexer commentTest :: Assertion commentTest = assertEqual "Comments should not become tokens" expected actual where actual = lexer "; a comment\nmov rax, 60; another\n; one more" expected = [Line ...
briansteffens/basm
testsuite/TestLexer.hs
gpl-2.0
2,590
0
11
1,313
420
242
178
52
1
{-# LANGUAGE FlexibleContexts #-} module Exp.Roll where -- $Id$ import Autolib.Exp import Autolib.NFA import Autolib.Exp.Some import Exp.Property roll :: NFAC c Int => [ Property c ] -> IO ( RX c, NFA c Int ) roll props = do let [ alpha ] = do Alphabet alpha <- props ; return alpha let [ s ]...
Erdwolf/autotool-bonn
src/Exp/Roll.hs
gpl-2.0
399
0
13
112
155
78
77
13
1
{-# language DeriveDataTypeable #-} {-# language TemplateHaskell #-} module NFA.Epsilon.Data where import Autolib.NFA ( NFAC ) import qualified Autolib.Relation import Autolib.Set import Autolib.FiniteMap import Autolib.ToDoc import Autolib.Reader import Data.Typeable data NFAC c s => ENFA c s = ENFA { nfa_i...
marcellussiegburg/autotool
collection/src/NFA/Epsilon/Data.hs
gpl-2.0
624
0
11
169
175
102
73
20
0
{-# OPTIONS -O2 -Wall #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Data.Store.Rev.View (View, curVersion, branch, setBranch, move, new, store) where import Control.Monad (liftM, (<=<)) import Data.Store.Rev.Branch (Branch) import Data.Store.Rev.Change(Change(..)) import Data.Store.Rev.Version (Version) i...
alonho/bottle
src/Data/Store/Rev/View.hs
gpl-3.0
3,365
0
14
517
1,036
551
485
60
1
{- Copyright (C) 2015 Michael Dunsmuir 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 3 of the License, or (at your option) any later version. This program i...
mdunsmuir/routequery-service
src/RoutequeryService/GTFSRealtime/TH.hs
gpl-3.0
1,503
0
9
263
182
109
73
24
1
{-# LANGUAGE OverloadedStrings #-} module System.DevUtils.Base.Cloud.Amazon.EC2.Reserved ( EC2Root (..), EC2Config (..), EC2Region (..), EC2InstanceType (..), EC2Size (..), EC2ValueColumns (..) ) where import System.DevUtils.Base.Cloud.Amazon.Misc import System.DevUtils.Base.Currency import Data.Aeson import Co...
adarqui/DevUtils-Base
src/System/DevUtils/Base/Cloud/Amazon/EC2/Reserved.hs
gpl-3.0
1,765
0
11
317
580
327
253
65
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Insert.hs
mpl-2.0
3,092
0
14
728
388
234
154
61
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/Create.hs
mpl-2.0
6,594
0
18
1,429
862
502
360
135
1
{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.StorageGateway -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintaine...
fmapfmapfmap/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway.hs
mpl-2.0
14,737
0
5
2,741
1,196
887
309
208
0
-- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } func = do x <- stmt stmt x
lspitzner/brittany
data/Test442.hs
agpl-3.0
145
1
7
23
23
9
14
3
1
{- arch-tag: FTP protocol parser Copyright (C) 2004 John Goerzen <jgoerzen@complete.org> This program 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) ...
icetortoise/ftphs
src/Network/FTP/Client/Parser.hs
lgpl-2.1
8,975
0
19
3,073
1,848
936
912
156
5
module Main where import Criterion.Config import Criterion.Main import Data.Queue.RealtimeBench import Data.Queue.SeqBench import Data.Queue.SimpleBench main = defaultMainWith myConfig (return ()) [ simpleBench , realtimeBench , seqBench ] myConfig = defa...
isturdy/q
bench/Benchmarks.hs
unlicense
427
0
8
145
78
47
31
12
1
-- Copyright 2016 TensorFlow authors. -- -- 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 agree...
tensorflow/haskell
tensorflow-ops/tests/GradientTest.hs
apache-2.0
31,360
13
20
9,164
10,895
5,576
5,319
-1
-1
{-# LANGUAGE CPP #-} module Actions.Logout.Url (url) where url :: String url = "/logout"
DataStewardshipPortal/ds-wizard
DSServer/app/Actions/Logout/Url.hs
apache-2.0
92
0
4
17
23
15
8
4
1
module HelperSequences.A035516 (a035516, a035516_list, a035516_row) where import HelperSequences.A000045 (a000045_list) a035516 :: Int -> Integer a035516 = (a035516_list !!) a035516_list :: [Integer] a035516_list = concatMap a035516_row [0..] a035516_row :: Integer -> [Integer] a035516_row 0 = [0] a035516_row n = h ...
peterokagey/haskellOEIS
src/HelperSequences/A035516.hs
apache-2.0
432
0
10
71
153
87
66
11
2
module Camfort.Transformation.CommonSpec (spec) where import System.Directory import System.FilePath import Test.Hspec import Camfort.Analysis.Logger (LogLevel (..)) import Camfort.Functionality samplesBase :: FilePath samplesBase = "tests" </> "fixtures" </> "Trans...
dorchard/camfort
tests/Camfort/Transformation/CommonSpec.hs
apache-2.0
1,534
0
15
411
350
177
173
38
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedStrings #-} module Model where import Control.Applicative (pure) import Prelude import Yesod import Data.Text (Text, pack, unpack) import Database.Persist.Quasi import Data.Typeable (Typeabl...
rennyhernandez/pure-mu
Model.hs
apache-2.0
1,213
0
9
176
274
164
110
-1
-1
-- pp/Main.hs -- -- Copyright 2014 Jesse Haber-Kucharsky -- Released under the terms of the Apache License Version 2.0. -- See /pulsar/LICENSE or http://www.apache.org/licenses/ module Main where import qualified Pulsar.FrontEnd as FrontEnd import qualified Pulsar.FrontEnd.Options as FrontEnd.Options import ...
hakuch/Pulsar
src/pp/Main.hs
apache-2.0
1,791
0
14
431
405
212
193
42
1
module TestXmlInternal where import Test.HUnit import Text.Proton.XmlTypes import Text.Proton.XmlInternal import Text.Proton.Xml matchesTest = TestCase (do let test1 = matches "" 'a' let test2 = matches "abc" 'a' let test3 = matches "abc" 'c' let test4 = matches "abc" 'z' assertEqual "Test ...
jasonrbriggs/proton
haskell/testsuite/TestXmlInternal.hs
apache-2.0
3,072
0
13
684
856
429
427
58
1
{-# LANGUAGE TemplateHaskell, FunctionalDependencies #-} {-| Implementation of the Ganeti config objects. -} {- Copyright (C) 2011, 2012, 2013, 2014 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions...
mbakke/ganeti
src/Ganeti/Objects.hs
bsd-2-clause
27,427
0
19
7,338
5,385
3,146
2,239
-1
-1
module CVSU.Moments ( Moments(..) , calculateMoments , quadTreeMoments ) where import CVSU.QuadForest data Moments = Moments { momentCenter :: (Float,Float) , momentArea :: Float , momentOrientation :: Float , momentEccentricity :: Float } calculateMoments :: [(Int,Int)] -> Moments calculateMoments cs = ...
amnipar/hs-cvsu
CVSU/Moments.hs
bsd-3-clause
1,459
0
13
422
656
364
292
49
1
module Main where import System.Environment (getProgName, getArgs) import System.Exit (die) import Control.Monad import Data.Monoid import qualified Y2015.Day01 as D01 import qualified Y2015.Day02 as D02 import qualified Y2015.Day03 as D03 import qualified Y2015.Day04 as D04 import qualified Y2015.Day05 as D05 import...
geekingfrog/advent-of-code
src/Main.hs
bsd-3-clause
7,999
0
15
1,804
2,195
1,245
950
257
50
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} -- | -- Module : Snap.Snaplet.ReCaptcha -- Copyright : ...
lpeterse/snaplet-recaptcha
src/Snap/Snaplet/ReCaptcha.hs
bsd-3-clause
9,185
0
22
2,134
1,703
919
784
174
3
module T453 where import Control.Monad.Trans.Class import Data.Kind import Data.Singletons.TH import Data.Singletons.TH.Options $(withOptions defaultOptions{genSingKindInsts = False} $ singletons [d| type T1 :: forall k. k -> Type data T1 a type T2 :: k -> Type data T2 a |])
goldfirere/singletons
singletons-base/tests/compile-and-dump/Singletons/T453.hs
bsd-3-clause
299
0
10
62
58
36
22
-1
-1
{-# LANGUAGE MultiParamTypeClasses ,FunctionalDependencies ,FlexibleInstances ,FlexibleContexts ,GeneralizedNewtypeDeriving ,TypeSynonymInstances ,TypeOperators ,ParallelListComp ,BangPatterns #-} {- This file is part ...
dbueno/funsat
src/Funsat/Types.hs
bsd-3-clause
11,327
0
12
2,972
2,391
1,301
1,090
186
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Taken quite directly from the Peyton Jones/Lester paper. -} {-# LANGUAGE CPP #-} -- | A module concerned with finding the free variables of an expression. module CoreFVs ( -- * Free variables of expressions and bi...
ezyang/ghc
compiler/coreSyn/CoreFVs.hs
bsd-3-clause
30,461
0
14
7,640
5,449
2,933
2,516
408
11
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Pickle.Template ( myBlogPost , myPage , myIndexPage , assemble ) where import qualified Data.Text.Lazy as T import Prelude hiding (head, id, div) import Data.Monoid import Data.Maybe import Text.Blaze.Html5 ((!)) import Text.Blaze....
themattchan/pickle
src/Pickle/Template.hs
bsd-3-clause
4,513
0
24
908
1,171
573
598
95
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} module Main where import Data.Bits import Data.List import Data.Time import GHC.Prim import GHC.Word data BW1 = BW1 {-# UNPACK #-}!Word {-# UNPACK #-}!Word data BW2 = BW2 {-# UNPACK #-}!BW1 {-# UNPACK #-}!BW1 overAddWord !(W# x...
ryanreich/bigint
test/BadPerformanceExample.hs
bsd-3-clause
1,397
0
13
371
647
325
322
44
1
module Graphics.HsCharts.Helpers where import Numeric -- | Shows a Float with the least number of decimals possible, with a maximum -- of d decimals. -- -- >>> showFFloat' 3 2.0000001 -- "2" -- >>> showFFloat' 3 2.1234567 -- "2.123" -- >>> showFFloat' 3 10.000001 -- "10" showFFloat' :: Int -> Float -> String sho...
maciej-wichrowski/HsCharts
source/Graphics/HsCharts/Helpers.hs
bsd-3-clause
1,854
0
14
486
507
276
231
22
2
{-# LANGUAGE CPP, NondecreasingIndentation, TupleSections #-} {-# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE #-} ----------------------------------------------------------------------------- -- -- GHC Driver program -- -- (c) The University of Glasgow 2005 -- ----------------------------------------...
siddhanathan/ghc
ghc/Main.hs
bsd-3-clause
36,623
3
27
10,195
7,481
3,854
3,627
575
17
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} module Main where import qualified Data.List as L import qualified Data.Set as Set import qualified Data.Map as M import Data.Set (Set) import Text.Printf (printf) import EFA2.Solver.Equation import EFA2.Solver.EquationOrder (order) import EFA...
energyflowanalysis/efa-2.1
attic/examples/elementary/additive_terms/Main.hs
bsd-3-clause
6,556
0
17
2,153
1,730
933
797
144
1
module Paint ( module Paint.DisplayCommand , module Paint.Rect , module Paint.Text , paint ) where import Paint.DisplayCommand import Paint.Rect import Paint.Text paint :: SDLContext -> [DisplayCommand] -> IO () paint ctx = mapM_ ($ ctx)
forestbelton/orb
src/Paint.hs
bsd-3-clause
260
0
8
57
78
46
32
10
1