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 DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TupleSections #-} -------------------------------------------------------------------------------- -- | -- Module : Network.MQTT.Message -- Copyright : (...
lpeterse/haskell-mqtt
src/Network/MQTT/Message.hs
mit
21,696
0
26
6,031
5,640
2,892
2,748
504
11
module Database.HLINQ(module Database.HLINQ.Info) where import Database.HLINQ.Info
juventietis/HLINQ
Database/HLINQ.hs
mit
84
0
5
7
21
14
7
2
0
{-# LANGUAGE OverloadedStrings #-} module CabalDelete.Parse ( parsePkgId , parseGhcPkgList ) where import Control.Applicative import Data.Attoparsec.Text import Data.List import Data.Monoid (mempty) import qualified Data.Text as T import Data.Version import...
iquiw/cabal-delete
src/CabalDelete/Parse.hs
mit
1,820
0
19
463
621
316
305
46
2
import System.IO import Data.List enumerate = zip [0..] discatenate :: [a] -> [[a]] discatenate xs = map (\a -> [a]) xs parseAud :: String -> [(Int, Int)] parseAud aud = enumerate $ (map read (discatenate aud) :: [Int]) run :: ([(Int, Int)], Int, Int) -> ([(Int, Int)], Int, Int) run ([], up, extras) = ([], up, ext...
davidrusu/Google-Code-Jam
2015/qualifiers/A/standingOvation.hs
mit
1,053
3
11
230
539
296
243
25
1
{-# LANGUAGE TupleSections, OverloadedStrings #-} module Handler.Home where import Import -- This is a handler function for the GET request method on the HomeR -- resource pattern. All of your resource patterns are defined in -- config/routes -- -- The majority of the code you will write in Yesod lives in these handl...
ShaneKilkelly/YesodExample
Handler/Home.hs
mit
605
0
12
123
63
34
29
9
1
module Exploration.Algebra.Lattice ( module Exploration.Algebra.Lattice.Definition ) where import Exploration.Algebra.Lattice.Definition
SamuelSchlesinger/Exploration
Exploration/Algebra/Lattice.hs
mit
142
0
5
14
24
17
7
4
0
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE StandaloneDeriving #-} ----------------------------------------------------------------------------- -- | -- Module : Distributed.Data.Map -- Copyright : (c) Phil Hargett 2014 -- L...
hargettp/distributed-containers
src/Distributed/Data/Map.hs
mit
3,404
0
15
721
1,173
620
553
69
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE QuasiQuotes #-} module Shakespeare.Dynamic.Adapter where import Control.Applicative import Control.Monad import qualified Data.Traversable as TR import VDOM.Adapter import GHCJS.Foreign import GHCJS.Marshal impor...
plow-technologies/shakespeare-dynamic
ghcjs-shakespeare-dynamic/src/Shakespeare/Dynamic/Adapter.hs
mit
2,768
0
12
660
707
359
348
48
5
module DoesItCompile where -- fixed functions bigNum arg = (^) 5 $ arg wahoo = bigNum $ 10 x arg = print arg y = print "woohoo!" z = x "hello world" a = (+) b = 5 c = a b 10 d = a c 200 a1 = 12 + b1 where b1 = 10000 * c1 c1 = 1
Numberartificial/workflow
haskell-first-principles/haskell-from-first-principles-master/05/05.08.03-does-it-compile.hs
mit
243
0
7
77
115
63
52
13
1
{-# LANGUAGE ViewPatterns #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE MultiWayIf #-} {-# OPTIONS_GHC -...
jaccokrijnen/leksah
src/IDE/Pane/SourceBuffer.hs
gpl-2.0
67,511
0
40
25,999
16,409
7,901
8,508
1,324
22
module Main where import HOpenCV.OpenCV import HOpenCV.HighImage import HOpenCV.HCxCore import HOpenCV.HVideo import Control.Monad import Data.Maybe (isNothing) showFrames :: String -> IplImage -> Capture -> IO () showFrames win target cap = do let step 0 = return () step n = do frame <- queryFrame...
juanmab37/HOpenCV-0.5.0.1
src/examples/cannyVideo.hs
gpl-2.0
985
0
17
274
353
163
190
32
3
-- Copyright (C) 2006-2013 Angelos Charalambidis <a.charalambidis@di.uoa.gr> -- -- Adapted from the paper -- Backtracking, Interleaving, and Terminating Monad Transformers, by -- Oleg Kiselyov, Chung-chieh Shan, Daniel P. Friedman, Amr Sabry -- (http://www.cs.rutgers.edu/~ccshan/logicprog/LogicT-icfp2005.pdf) -- -...
acharal/hopes
src/prover/Infer/Class.hs
gpl-2.0
1,420
0
10
258
130
80
50
12
0
-- implements Spec128/128 - as defined in http://eprint.iacr.org/2013/404.pdf -- Frank Recker, 2013 module Speck(self_test,key_expansion,encryption,decryption) where import Data.Bits import Data.Word -- Tests the test vector self_test | cipher /= cipher' = error "encryption failed" | plain /= plain' = error "decr...
frecker/speck
Speck.hs
gpl-2.0
1,597
0
17
375
542
299
243
32
1
module Utility where import Control.Applicative if' :: Bool -> a -> a -> a if' True x _ = x if' False _ y = y ifF :: (a -> Bool) -> (a -> b) -> (a -> b) -> a -> b ifF = liftA3 if'
kmandelbaum/kamisado
src/Utility.hs
gpl-2.0
182
0
9
49
100
54
46
7
1
-- -- Copyright (c) 2014 Nicola Bonelli <nicola@pfq.io> -- -- 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. -- -- Thi...
pandaychen/PFQ
Development/SimpleBuilder.hs
gpl-2.0
14,129
0
32
4,876
4,066
2,113
1,953
287
9
module IdempotenceTest where import Data.List import Lib -- Use QuickCheck and the following helper functions to demonstrate -- idempotence for the following: twice f = f . f fourTimes = twice . twice -- 1. f :: String -> Bool f x = (capitalizeWord x == twice capitalizeWord x) && (capitalizeWord x == f...
nirvinm/Solving-Exercises-in-Haskell-Programming-From-First-Principles
Testing/quickcheck-testing/test/IdempotenceTest.hs
gpl-3.0
448
0
8
108
141
74
67
15
1
module HSParedit.PareditSpec (main, spec) where import Data.Tree import Data.Tree.Pretty import Data.Tree.Zipper import HSParedit import Prelude hiding (last) import System.Console.Terminfo.PrettyPrint import Test.Hspec (hspec, describe, it, Spec) import Test.Hspec.Expectations.Pretty import Text.PrettyPrint.Free ins...
Fuuzetsu/hs-paredit
test/HSParedit/PareditSpec.hs
gpl-3.0
3,010
0
16
1,134
713
373
340
63
2
{-# LANGUAGE OverloadedStrings #-} module Main ( main ) where import Criterion.Main import qualified Data.Text as T import qualified Data.Text.IO as TO import System.Posix.Directory import System.Process import System.Unix.Directory main :: IO () main =...
retep007/security-log
test/performance/Stream.hs
gpl-3.0
1,389
0
17
536
245
134
111
26
1
{-- | This module holds the configuration for the Mixture-of-Musings website and feed, as used by Hakyll -} module Site.Configuration (config, feedConfig) where import Hakyll ignoreFile' :: String -> Bool ignoreFile' ".htaccess" = False ignoreFile' path = ignoreFile defaultConfiguration path config :: Con...
budgefeeney/amixtureofmusings
Site/Configuration.hs
gpl-3.0
967
0
6
239
121
74
47
16
1
-- Haskell Practical 4 Code - Semantics for N1 -- By James Cowgill import Prac4.DomFunc -- N1 Abstract Syntax Tree data E = Plus E E | Minus E E | Times E E | Number Int | Variable String data B = Not B | And B B | Or B B | Equal E E | Less E E ...
jcowgill/cs-work
syac/compilers/Prac4/3N1Semantics.hs
gpl-3.0
2,518
2
16
788
976
510
466
56
1
{-# Language GeneralizedNewtypeDeriving, DeriveDataTypeable, OverloadedStrings, DataKinds, KindSignatures, GADTs, TypeFamilies, ScopedTypeVariables, RankNTypes, TemplateHaskell, EmptyCase ...
k00mi/mqtt-hs
Network/MQTT/Types.hs
gpl-3.0
10,817
0
15
3,359
1,889
1,093
796
205
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Update.hs
mpl-2.0
4,304
0
15
930
466
279
187
78
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-apps-tasks/gen/Network/Google/Resource/Tasks/TaskLists/Patch.hs
mpl-2.0
4,940
0
20
1,226
792
461
331
115
1
module Main ( main ) where import ADNS import ADNS.Base import Control.Concurrent.MVar import System.Environment main :: IO () main = initResolver [NoErrPrint, NoServerWarn] $ \resolver -> do args <- getArgs case args of [name] -> traverseDNSSEC resolver name [t,name] -> work resolver (read t) name ...
peti/hsdns
example/adns-test-and-traverse.hs
lgpl-3.0
1,729
0
17
350
440
227
213
28
3
import Tree import Data.Maybe (mapMaybe) import Data.Set (difference, elems, fromList, Set) solutions :: Set Int solutions = fromList $ mapMaybe evalToInt $ trees $ replicate 4 Four main :: IO () main = print $ elems $ difference (fromList [0..20]) solutions
jmgimeno/haskell-playground
src/FourFours/missing.hs
unlicense
261
0
9
43
105
56
49
7
1
----------------------------------------------------------------------------- -- Copyright 2019, Ideas project team. This file is distributed under the -- terms of the Apache License 2.0. For more information, see the files -- "LICENSE.txt" and "NOTICE.txt", which are included in the distribution. -----------------...
ideas-edu/ideas
src/Ideas/Encoding/RulesInfo.hs
apache-2.0
3,014
0
18
918
810
420
390
49
3
{-# LANGUAGE RecordWildCards #-} module PrivateCloud.Aws.S3 ( downloadFile , uploadFile ) where import Aws.Core (defServiceConfig) import Aws.S3 (getObject, multipartUploadSink, GetObjectResponse(..)) import Conduit import Control.Monad (unless) import Network.HTTP.Client (responseBody) import PrivateClou...
rblaze/private-cloud
src/PrivateCloud/Aws/S3.hs
apache-2.0
2,681
0
14
638
622
315
307
54
1
{-# LANGUAGE ImpredicativeTypes #-} module Types.Agent.Intelligent.Affect.Fragments where import Control.Lens import Control.Monad.Supply import Control.Monad.Writer import qualified Data.Graph as G import qualified Data.HashMap.Strict as HM import qualified Data.HashSet as HS import Types.Agent.Intelligent import T...
jtapolczai/wumpus
Types/Agent/Intelligent/Affect/Fragments.hs
apache-2.0
7,386
0
10
999
1,028
665
363
143
0
module Converter.Data where import ClassyPrelude import qualified Data.Bimap as BM import qualified Data.Map as M import Converter.Types wNames :: BM.Bimap WeightUnit Text wNames = BM.fromList [(MilliGram, "mg"), (Gram, "g"), (KiloGram, "kg"), (MetricTon, "t"), (Ounce, "oz"), (Pound, "lbs"), ...
jtapolczai/Scratchpad
src/Converter/Data.hs
apache-2.0
2,158
0
7
498
827
523
304
90
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE TemplateHaskell #-} module Topical.VSpace.Types ( VSpaceModel , vsmTokenMap , vsmIndexMap , newVSpaceModel , VSpace(VS) , vsVector ...
erochest/topical
src/Topical/VSpace/Types.hs
apache-2.0
1,004
0
10
252
271
152
119
34
1
{-# LANGUAGE RankNTypes #-} module Lycopene.Process.Internal ( Process' , module Lycopene.Process.Internal.Core ) where import Lycopene.Process.Internal.Core -- | Simplified Process type with Domain monad type Process' a = Process a IO ()
utky/lycopene
backup/Process/Internal.hs
apache-2.0
263
0
6
55
45
30
15
6
0
main = do l <- getLine let i = unwords $ filter (\x -> length(x) >= 3 && length(x) <= 6) $ map (filter (\x-> x /= ',' && x /= '.') ) $ words l putStrLn i
a143753/AOJ
0084.hs
apache-2.0
177
0
20
61
107
52
55
4
1
import Control.Concurrent import Control.Monad import qualified Control.Concurrent.BoundedChan as BC import System.Process import Lux.Core import Lux.Inputs.Nagios main = do putStrLn "Starting Lux" putStrLn "Loading config" -- TODO load config channel <- BC.newBoundedChan channelSize putStrLn "Starting...
doismellburning/lux
src/Lux/Main.hs
apache-2.0
1,313
6
13
252
341
167
174
37
1
{-# LANGUAGE PackageImports #-} import "yesod-cwl" Application (getApplicationDev) import Network.Wai.Handler.Warp (runSettings, defaultSettings, settingsPort) import Control.Concurrent (forkIO) import System.Directory (doesFileExist, removeFile) import System.Exit (exitSuccess) import Control.Concurrent (threadDel...
qzchenwl/myweb
devel.hs
bsd-2-clause
703
0
10
123
186
101
85
23
2
module Hassium.Main where import Control.Monad(liftM, when) import Data.Maybe(isJust, fromJust) import System.Environment(getArgs) import System.Exit(exitWith, ExitCode(ExitFailure)) import System.IO(readFile) import Hassium.Args(parseOpt, Flag(..)) _main :: IO () _main = do parsedArgs <- liftM parseOpt getArgs (...
tonosaman/haskell-code-snippets
src/Hassium/Main.hs
bsd-2-clause
987
0
19
209
285
149
136
23
2
{-# LANGUAGE TemplateHaskell, CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Unittests for ganeti-htools. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following c...
apyrgio/snf-ganeti
test/hs/Test/Ganeti/Utils.hs
bsd-2-clause
15,006
0
21
3,471
3,453
1,849
1,604
253
2
{-# OPTIONS -cpp #-} ----------------------------------------------------------------------------- -- | Separate module for HTTP actions, using a proxy server if one exists ----------------------------------------------------------------------------- module Distribution.Client.HttpUtils ( downloadURI, getHTTP,...
IreneKnapp/Faction
faction/Distribution/Client/HttpUtils.hs
bsd-3-clause
7,732
0
20
2,090
1,742
939
803
124
4
----------------------------------------------------------------------------- -- | -- Module : Language.Haskell.Exts.Desugaring -- Copyright : (c) Shayan Najd -- License : BSD-style (see the file LICENSE.txt) -- -- Maintainer : Shayan Najd, shayan@chalmers.se -- Stability : experimental -- Portabilit...
shayan-najd/Haskell-Desugar-Generic
Language/Haskell/Exts/Desugar/Generic.hs
bsd-3-clause
1,576
0
5
185
200
157
43
22
0
module Main where import ARM.Processor.Base import ARM.Assembler.Types import ARM.Assembler.Smart import ARM.Assembler.Pretty main :: IO () main = undefined
tranma/arm-edsl
Main.hs
bsd-3-clause
159
0
6
20
43
27
16
7
1
{-# LANGUAGE OverloadedStrings #-} import Network.Socks5 import Network.Socket hiding (recv, sClose) import Network.Socket.ByteString import Network.BSD import Network import Data.ByteString.Char8 () import qualified Data.ByteString.Char8 as BC import System.IO (hClose, hFlush) import System.Environment (getArgs) mai...
erikd/hs-socks
Example.hs
bsd-3-clause
2,153
0
15
591
448
217
231
41
2
-- | This is the module which binds it all together -- {-# LANGUAGE GeneralizedNewtypeDeriving, OverloadedStrings #-} module Hakyll.Core.Run ( run ) where import Control.Applicative (Applicative, (<$>)) import Control.Monad (filterM, forM_) import Control.Monad.Error (ErrorT, runErrorT, throwError) import Cont...
sol/hakyll
src/Hakyll/Core/Run.hs
bsd-3-clause
7,684
0
22
2,143
1,727
903
824
143
4
{-# LANGUAGE TypeFamilies, UndecidableInstances #-} module PrioritySync.Internal.Receipt (Receipt(..)) where import PrioritySync.Internal.UserData import PrioritySync.Internal.RoomGroup import PrioritySync.Internal.ClaimContext import Control.Concurrent.STM -- | Get a notification when a claim is approved or...
clanehin/priority-sync
PrioritySync/Internal/Receipt.hs
bsd-3-clause
1,151
0
11
229
279
145
134
24
0
{-# LANGUAGE RecordWildCards #-} module Main where import Control.Monad.Except (MonadError(..), runExceptT, withExceptT) import Control.Monad.IO.Class (liftIO) import Data.Monoid ((<>)) import qualified Data.Text as TS import ...
savannidgerinel/mead
scripts/user-manager.hs
bsd-3-clause
3,317
0
19
1,046
709
374
335
55
4
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.EXT.VertexWeighting -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/EXT/VertexWeighting.hs
bsd-3-clause
1,172
0
4
130
91
68
23
19
0
module RandomUniform ( uniform, rejectUniform, fastRejectUniform, recycleUniform, biasedBit, uniformViaReal, randomDecision, efficientDecision, vnUnbias, module Uniform, module RandomValue )where import Bit...
cullina/Extractor
src/RandomUniform.hs
bsd-3-clause
3,544
0
14
1,304
963
507
456
74
5
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, InstanceSigs #-} module Utility.ListMemory where import Spec.Memory import Utility.Utility import Data.Word helpStore mem addr bytes = f ++ bytes ++ drop (length bytes) s where (f,s) = splitAt addr mem instance Memory [Word8] Int where loadByte :: [Word8] -> ...
mit-plv/riscv-semantics
src/Utility/ListMemory.hs
bsd-3-clause
1,119
0
9
228
427
222
205
24
1
{-# LANGUAGE PackageImports #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE DoAndIfThenElse #-} module Hslogic.Solve where import Data.List import Data.Functor.Identity import "mtl" Control.Monad.State import Hslogic.Types import Hslogic.Unify import Hslogic.Parse type Cla...
abailly/hslogic
src/Hslogic/Solve.hs
bsd-3-clause
7,768
0
22
2,160
2,114
1,137
977
102
3
{-# OPTIONS_GHC -fno-warn-orphans #-} module Application ( getApplicationDev , appMain , develMain , makeFoundation -- * for DevelMain , getApplicationRepl , shutdownApp -- * for GHCI , handler , db ) where import Control.Monad.Logger (liftLoc, runLoggingT) i...
roggenkamps/steveroggenkamp.com
Application.hs
bsd-3-clause
6,892
0
16
1,766
1,032
554
478
-1
-1
{- $Id: AFRPTestsUtils.hs,v 1.2 2003/11/10 21:28:58 antony Exp $ ****************************************************************************** * A F R P * * * * Module: ...
eamsden/Animas
tests/AFRPTestsUtils.hs
bsd-3-clause
12,850
14
15
3,699
4,446
2,675
1,771
250
3
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} module Examples where import Data.RDF import Data.Map (Map) import qualified Data.Map as Map import qualified Data.Text as T import Data.FileEmbed import qualified Data.ByteString.Char8 as BS import Text.Pandoc.Definition import Data.Default (def) i...
corajr/scalar-convert
test/Examples.hs
bsd-3-clause
6,375
0
12
1,116
1,440
774
666
76
2
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Sheets where import ClassyPrelude import Codec.Xlsx import Control.Lens import qualified Control.Foldl as F class ToCellValue a where toCellValue :: a -> CellValue instance ToCellValue Double where toCellValue = CellDouble instance To...
limaner2002/EPC-tools
sheets/src/Sheets.hs
bsd-3-clause
499
0
7
79
101
58
43
17
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MonadComprehensions #-} {-# LANGUAGE RebindableSyntax #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE FlexibleInstances #-} -- | A set of DSH examples for the demo session at SIGMOD 2015 -- -- This package contains select...
ulricha/dsh-example-queries
Queries/SIGMOD.hs
bsd-3-clause
973
0
5
182
73
54
19
15
0
module ReadData where import System.IO import Perceptron import Prelude hiding (Bool, True, False) import qualified Prelude as P import Data.Ratio ( (%), numerator, denominator ) import Data.List ( isInfixOf ) -- Assumes string is a string representation of rational or float readRational :: String -> Rational rea...
tm507211/CoqPerceptron
Benchmarks/hs/ReadData.hs
bsd-3-clause
3,746
4
16
1,245
1,604
811
793
108
3
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} #endif #if __GLASGOW_HASKELL__ >= 703 {-# LANGUAGE Trustworthy #-} #endif #if __GLASGOW_HASKELL__ >= 708 {-# LANGUAGE TypeFamilies #-} #endif #include "containers.h" ---------------------------------------------------...
DavidAlphaFox/ghc
libraries/containers/Data/Sequence.hs
bsd-3-clause
97,789
0
23
25,878
33,553
17,204
16,349
-1
-1
{-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE UndecidableInstances #-} module Dynamizer.Module ( computeModules , Modulable (..) , FunName ) where import Control.Arrow ((&&&)) import Control.Monad.Stat...
deyaaeldeen/nAnnotizer
Dynamizer/Module.hs
gpl-3.0
6,039
0
15
1,637
2,332
1,233
1,099
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiWayIf #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Hans.Socket.Handle(makeHansHandle) where import Control.Concurrent(threadDelay) import Control.Exception(throwIO) import qualified Data.ByteString as BSS import qualified Data.By...
GaloisInc/HaNS
src/Hans/Socket/Handle.hs
bsd-3-clause
4,369
0
15
1,271
1,423
714
709
94
1
{-# LANGUAGE GADTs, TypeOperators, DataKinds, TypeFamilies, PolyKinds, TypeFamilyDependencies #-} module T14749 where import Data.Kind data KIND = STAR | KIND :> KIND data Ty :: KIND -> Type where TMaybe :: Ty (STAR :> STAR) TApp :: Ty (a :> b) -> (Ty a -> Ty b) type family IK (k :: KIND) = (res :: Type) whe...
sdiehl/ghc
testsuite/tests/dependent/should_compile/T14749.hs
bsd-3-clause
702
0
10
192
325
176
149
19
1
module Language.Mecha.Assembly ( Assembly , part , assemble , Scene , Camera (..) , view , animate ) where import Control.Monad import qualified Data.ByteString.Char8 as BS import Data.Digest.CRC32 import Language.Mecha.Solid import Language.Mecha.Types import System.Directory import System.Process imp...
tomahawkins/mecha
attic/Assembly.hs
bsd-3-clause
4,171
0
13
983
1,319
678
641
88
2
module Aws.S3.Commands.HeadObject where import Aws.Core import Aws.S3.Core import Control.Applicative import Control.Monad.Trans.Resource (throwM) import Data.ByteString.Char8 ({- IsString -}) import qualified Data.ByteString.Char8 as B8 import qualified Data.Text ...
Soostone/aws
Aws/S3/Commands/HeadObject.hs
bsd-3-clause
2,739
0
13
937
528
297
231
-1
-1
{-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -O2 #-} -- #3437 -- When we do SpecConstr on 'go', we want the specialised -- function to *still* be strict in k. Otherwise we get -- a bad space leak! -- The test is run with +RTS -M10m to limit the amount of heap -- It should run in constant space, but if the function ...
sdiehl/ghc
testsuite/tests/simplCore/should_run/T3437.hs
bsd-3-clause
505
0
8
110
115
66
49
7
1
{- (c) The AQUA Project, Glasgow University, 1993-1998 \section[CoreMonad]{The core pipeline monad} -} {-# LANGUAGE CPP, UndecidableInstances #-} module CoreMonad ( -- * Configuration of the core-to-core passes CoreToDo(..), runWhen, runMaybe, SimplifierMode(..), FloatOutSwitches(..), pprPassDeta...
acowley/ghc
compiler/simplCore/CoreMonad.hs
bsd-3-clause
35,003
0
18
10,746
6,643
3,577
3,066
-1
-1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE AutoDeriveTypeable #-} {-# LANGUAGE StandaloneDeriving #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Complex -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries...
frantisekfarka/ghc-dsi
libraries/base/Data/Complex.hs
bsd-3-clause
6,522
2
14
2,171
1,944
1,036
908
111
1
-- GHC 6.7 at one point said wog's type was: -- -- wog :: forall t e (m :: * -> *). -- (Monad GHC.Prim.Any1, Monad m) => -- t -> Something (m Bool) e -- -- The stupid 'GHC.Prim.Any1' arose because of type ambiguity -- which should be reported, and wasn't. module ShouldFail where data Something ...
ezyang/ghc
testsuite/tests/typecheck/should_fail/tcfail181.hs
bsd-3-clause
457
0
8
115
84
52
32
5
1
{-# LANGUAGE ViewPatterns #-} module Haks.NGram where import BasicPrelude import Data.Foldable hiding (concat) import Haks.Types ngram :: Int -> [Particle] -> [NGram] ngram _ [] = [] ngram n particles = item : (ngram n rest) where item = concat $ toList (take n particles) rest = drop 1 particles
mlitchard/haks
src/Haks/NGram.hs
isc
311
0
10
64
113
62
51
10
1
import Test.Tasty import Test.Tasty.Golden import System.FilePath import qualified Data.ByteString.Lazy.Char8 as LBS all_numbers, non_square_numbers :: [Int] all_numbers = [1..1000] non_square_numbers = filter (\x -> (round . sqrt . fromIntegral) x ^ 2 /= x) all_numbers all_numbers_str = LBS.pack $ unlines $ map show ...
feuerbach/tasty-golden
example/example.hs
mit
1,518
0
16
347
398
212
186
32
4
module Network.Sendgrid.Utils ( urlEncode ) where import Data.Char ( digitToInt, intToDigit, toLower, isDigit, isAscii, isAlphaNum ) urlEncode :: String -> String urlEncode [] = [] urlEncode (ch:t) | (isAscii ch && isAlphaNum ch) || ch `elem` "-_.~" = ch : urlEncode t | not (isA...
owainlewis/sendgrid-hs
src/Network/Sendgrid/Utils.hs
mit
833
0
13
254
396
206
190
20
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.DOMSettableTokenList (js__get, _get, js_setValue, setValue, js_getValue, getValue, DOMSettableTokenList, castToDOMSettableTokenList, gTypeDOMSettableTokenList) where import Prelude ((...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/DOMSettableTokenList.hs
mit
2,422
22
11
356
592
349
243
43
1
{-#LANGUAGE OverloadedStrings #-} module WebServer where import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import qualified Data.Map.Strict as Map import qualified System.FilePath as FP import qualified Network.URL as URL import Data.String.Conversions import Data.Maybe import Data.Lis...
davidfontenot/haskell-hashtag-viewer
src/WebServer.hs
mit
4,597
0
19
947
1,274
652
622
94
4
import qualified Data.Map as M type Index = Int data Load = Get -- going in accepting mode | Set -- using an accepting mode | Known Index -- telling others who is on the air data Message = Message Index Load data Operation = Scanning [Index] | Accepting [Index] | Operation [Index] [...
paolino/touchnet
Message.hs
mit
2,221
0
15
539
642
354
288
24
3
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-} module Data.NGH.Formats.Tests.Gff ( tests ) where import Test.Framework.TH import Test.HUnit import Test.QuickCheck import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 import Data.Maybe import Data.NGH.Annotation import Data.NGH.For...
luispedro/NGH
Data/NGH/Formats/Tests/Gff.hs
mit
4,057
0
11
212
176
109
67
19
1
{-# LANGUAGE OverloadedStrings #-} module Api.ResourceContent ( apiGetResourceContent , apiUpdateResourceContent ) where import qualified Data.ByteString.Lazy as BSL ( fromStrict, toStrict, empty ) import qualified Data.Text as T ( Text ) import qualified Data.Text.Lazy as TL ...
stu-smith/Brandy
src/Api/ResourceContent.hs
mit
1,471
0
11
392
352
193
159
31
2
-- Project: dka-2-mka (FLP 2016/2017) -- Author: Dávid Mikuš (xmikus15) module Parser.Config where import Type.Config parseArguments :: [String] -> Either String Config parseArguments [] = Left $ "Missing arguments" parseArguments [_] = Left $ "Missing arguments" parseArguments [x,y] | x == "-t" = Right $ Config...
Dasio/FIT-Projects
FLP/Parser/Config.hs
mit
510
0
8
102
161
81
80
11
1
module TransportTestSuite ( transportTestSuite, testTransportEndpointSendReceive, testTransportEndpointSend2Receive2, testTransportEndpointSendReceive2SerialServers, testTransportEndpointSendReceive2SerialClients, testTransportOneHearCall, testTransportOneCallHear, testTransportConc...
hargettp/courier
tests/TransportTestSuite.hs
mit
14,842
5
39
4,022
3,874
1,823
2,051
259
4
import Control.Monad (replicateM) import Ann main :: IO () main = print result where width = 10 depth = 10 values = [0, 0.5, 1] ann = fromList (replicate depth width) (sin <$> [1 ..]) inputs = replicateM width values results = execute logsig ann <$> inputs result = sum $ concat results
tysonzero/hs-ann
list/benchmark.hs
mit
319
0
10
85
123
67
56
11
1
{- | Module : $Header$ Description : Handling of simple extended parameters Copyright : (c) Ewaryst Schulz, DFKI Bremen 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : ewaryst.schulz@dfki.de Stability : experimental Portability : portable This module contains a simple extended parame...
nevrenato/Hets_Fork
CSL/SimpleExtendedParameter.hs
gpl-2.0
4,142
0
12
1,157
1,066
558
508
71
8
module MasterGui where
imalsogreg/arte-ephys
arte-decoder/exec/MasterGui.hs
gpl-3.0
23
0
2
3
4
3
1
1
0
-- Join channels module Handlers.JoinChannel ( handler ) where import Network.Socket import Request defaultChannel = "#qwerasdf" joinChannel :: EventHandler joinChannel _ botState = do putStrLn "Setting channel" send socket (formatRequest (Nothing, "JOIN", [defaultChannel])) return (botState {botChannels = ...
UndeadMastodon/ShrubBot
Handlers/JoinChannel.hs
gpl-3.0
431
0
11
74
115
63
52
13
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module RunSchedule ( -- types Scheduler(..) -- functions , runWorkScheduler , newSchedulerState , runWork ) where import RunAuxiliary import RunEnvironment import RunNode import RunProcess import RunWor...
hexenroehrling/hs-scheduler
src/RunSchedule.hs
gpl-3.0
17,617
0
17
4,147
3,893
2,003
1,890
307
3
{- Copyright (C) 2015-2016 Ramakrishnan Muthukrishnan <ram@rkrishnan.org> This file is part of FuncTorrent. FuncTorrent 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 you...
vu3rdd/functorrent
src/FuncTorrent/MagnetURI.hs
gpl-3.0
3,852
0
18
968
505
279
226
43
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-s3/gen/Network/AWS/S3/UploadPartCopy.hs
mpl-2.0
15,168
0
19
3,461
1,980
1,165
815
209
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/ReplaceRoute.hs
mpl-2.0
5,870
0
9
1,350
760
457
303
86
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} module CountdownGame.State.Rounds ( )where import GHC.Generics (Generic) import Control.Concurrent.Async (Async, async, wait, poll, asyncThreadId, waitBoth) import Control.Concurrent (forkIO, threadDelay, ThreadId) import Data.Aeson (T...
CarstenKoenig/DOS2015
CountdownGame/src/web/CountdownGame/State/Rounds.hs
unlicense
3,075
0
11
536
789
414
375
63
2
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, UnicodeSyntax, GADTs, FlexibleInstances, LambdaCase #-} module Sweetroll.Micropub.Request where import Sweetroll.Prelude import Data.Aeson.Types (parseMaybe) import Web.FormUrlEncoded hiding (parseMaybe) type ObjType = [Text] type ObjPr...
myfreeweb/sweetroll
sweetroll-be/library/Sweetroll/Micropub/Request.hs
unlicense
3,653
0
21
1,171
1,094
548
546
-1
-1
----------------------------------------------------------------------------- -- Copyright 2019, Ideas project team. This file is distributed under the -- terms of the Apache License 2.0. For more information, see the files -- "LICENSE.txt" and "NOTICE.txt", which are included in the distribution. -----------------...
ideas-edu/ideas
src/Ideas/Text/XML.hs
apache-2.0
12,711
0
15
3,312
4,243
2,232
2,011
-1
-1
-- Copyright (c) 2013-2015 PivotCloud, Inc. -- -- Aws.Kinesis.Client.Internal.Queue -- -- Please feel free to contact us at licensing@pivotmail.com with any -- contributions, additions, or other feedback; we would love to hear from -- you. -- -- Licensed under the Apache License, Version 2.0 (the "License"); you may --...
alephcloud/hs-aws-kinesis-client
src/Aws/Kinesis/Client/Internal/Queue.hs
apache-2.0
5,396
11
26
1,303
1,060
535
525
-1
-1
{-# LANGUAGE LambdaCase #-} module Neovim.EmbeddedRPCSpec where import Test.Hspec import Test.HUnit import Neovim import Neovim.Test import qualified Neovim.Context.Internal as Internal import Neovim.Quickfix import Neovim.RPC.Common import ...
lslah/nvim-hs
test-suite/Neovim/EmbeddedRPCSpec.hs
apache-2.0
2,403
0
19
747
580
296
284
56
1
factorial n = product [1..n]
WillianLauber/haskell
fat.hs
apache-2.0
30
0
6
6
17
8
9
1
1
{-# LANGUAGE RankNTypes #-} module Lycopene.Process ( runCommand -- , buildProcess -- , runProcess -- , Chunk -- , module Lycopene.Process.Internal ) where import Lycopene.Option (LycoCommand(..), Command(..)) import Lycopene.Configuration (Configuration(..)) import ...
utky/lycopene
backup/Process.hs
apache-2.0
2,402
0
17
707
630
336
294
40
10
module System.EtCetera.Internal.Utils where import Data.Char (toLower, toUpper) capitalize :: String -> String capitalize [] = [] capitalize (c:cs) = toUpper c:cs
paluh/et-cetera
src/System/EtCetera/Internal/Utils.hs
bsd-3-clause
175
0
7
33
64
36
28
5
1
{-# LANGUAGE FlexibleContexts #-} module Languages.FILL.Parser.Tokenizer (module Languages.FILL.Parser.Token, triv, inT, be, void, ...
heades/Agda-LLS
Source/ALL/Languages/FILL/Parser/Tokenizer.hs
bsd-3-clause
2,294
0
11
932
857
437
420
60
2
{-# LANGUAGE TemplateHaskell #-} -- | -- Module: CommandWrapper.Subcommand.Options -- Description: Command line option parser for Command Wrapper subcommand. -- Copyright: (c) 2018-2020 Peter Trško -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com -- Stability: experimental -- Portability: GHC spec...
trskop/command-wrapper
command-wrapper-subcommand/src/CommandWrapper/Subcommand/Options.hs
bsd-3-clause
12,597
0
15
2,373
2,101
1,195
906
-1
-1
{-# LANGUAGE RecordWildCards #-} module Main where import Control.Monad import CoreSyn import Data.List import DynFlags import GHC import GHC.Paths (libdir) import GhcMonad import DataCon import HscTypes import Var import Outputable import Name hiding (varName) import Literal main = do forever $ do defaultError...
chrisdone/corebot
src/Main.hs
bsd-3-clause
2,433
0
21
683
874
441
433
63
4
{-# LANGUAGE ForeignFunctionInterface #-} module LV2 ( Desc(..) , Handle , exportDesc , getPort , readPort , writePort , registerDesc ) where import Language.Haskell.TH import Foreign.C.Types import Foreign.C.String import Foreign.Ptr import Foreign.StablePtr import Foreign.Storab...
mmartin/haskell-lv2
src/LV2.hs
bsd-3-clause
3,656
0
14
1,005
1,384
695
689
78
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} module Data.Pairing ( Zap(..) , pairEffect ) where import Control.Comonad (Comonad, extract) import Control.Comonad.Cofree (Cofree (..), unwrap) import Co...
isovector/rpg-gen
src/Data/Pairing.hs
bsd-3-clause
1,093
0
10
344
467
249
218
29
1
{-# Language RecordWildCards #-} {-# Language OverloadedStrings #-} {-# Language DataKinds #-} {-# Language TypeFamilies #-} {-# Language FlexibleContexts #-} {-# Language ScopedTypeVariables #-} {-# Language TemplateHaskell #-} module Network.IRC.Runner where import Hooks.Algebra import Network.IRC import Network.Soc...
MasseR/FreeIrc
src/Network/IRC/Runner.hs
bsd-3-clause
3,243
0
23
701
1,119
579
540
83
3
-- | For updating XMonad. module DevelMain where import Control.Concurrent import Foreign.Store import Main import System.Process -- | Start or restart xmonad. update = do callCommand "killall xmonad" forkIO (callCommand "dist/build/xmonad/xmonad")
chrisdone/chrisdone-xmonad
src/DevelMain.hs
bsd-3-clause
259
0
9
41
47
26
21
8
1
{-# LANGUAGE OverloadedStrings, PackageImports #-} import Control.Applicative import Control.Monad import Data.IORef import Data.List import Data.Monoid import Data.Vec.LinAlg.Transform3D import Data.Vec.Nat import FRP.Elerea.Param import GPipeEffects import GPipeUtils import Utils as U import Graphics.GPipe import qua...
csabahruska/GFXDemo
gpipeDemo.hs
bsd-3-clause
5,002
0
14
1,370
1,477
771
706
94
2
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FunctionalDependencies, UnicodeSyntax, KindSignatures, OverlappingInstances, FlexibleInstances, ScopedTypeVariables, FlexibleContexts #-} module Data.Protobuf ( protobuf , protobuf' , readProtobuf , writeProtobuf , Protobuf , ProtobufValue(..) , modul...
NICTA/protobuf-native
src/Data/Protobuf.hs
bsd-3-clause
15,333
0
35
5,061
5,978
3,050
2,928
361
8
{-# LANGUAGE DataKinds,GADTs #-} module Network.EasyBitcoin.Internal.Signatures ( detSignMsg , Signature() , checkSig )where import Network.EasyBitcoin.Keys import Network.EasyBitcoin.Internal.Keys import Network.EasyBitcoin.Internal.Words import Network.EasyBitcoin.Internal.CurveConstants import Network.EasyBit...
vwwv/easy-bitcoin
Network/EasyBitcoin/Internal/Signatures.hs
bsd-3-clause
5,794
0
16
2,228
1,265
689
576
97
4
{-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} module Startups.Interpreter where import Startups.Base import Startups.Cards import Startups.GameTypes import Control.Monad.Operational import Control.Monad.State.Strict import Data.List.NonEmpty data Strategy p m = Strategy { _doPlayerDecision :: Age -> Turn -> Pla...
bitemyapp/7startups
Startups/Interpreter.hs
bsd-3-clause
2,352
0
18
853
711
356
355
45
8