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 FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module Text.Md.HtmlParser ( HtmlParseContext(..) , pBlockElement , pInlineElement , pHtmlEscape , pHtmlEscapeForce ) where import Control.Monad import Debug.Trace import System.IO import qualified Text.HTML...
tiqwab/md-parser
src/Text/Md/HtmlParser.hs
bsd-3-clause
3,792
0
16
865
1,012
527
485
62
4
{-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Flexi...
michael-swan/quick-quiz
src/Quiz/Web.hs
bsd-3-clause
16,345
4
30
5,625
2,855
1,489
1,366
200
4
{-# LANGUAGE GeneralizedNewtypeDeriving, OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : Hasmin.Types.Numeric -- Copyright : (c) 2017 Cristian Adrián Ontivero -- License : BSD3 -- Stability : experimental -- Portability : non-portable -- ...
contivero/hasmin
src/Hasmin/Types/Numeric.hs
bsd-3-clause
4,700
0
12
876
817
445
372
63
2
#!/usr/bin/env runhaskell {-# LANGUAGE NamedFieldPuns #-} -- This script generates gnuplot plots. -- Give it a .dat file as input... (or it will try to open results.dat) import Text.PrettyPrint.HughesPJClass import Text.Regex import Data.List import Data.Function import Control.Monad import System import System.IO...
rrnewton/Haskell-CnC
scaling.hs
bsd-3-clause
15,215
86
21
3,656
3,134
1,693
1,441
186
7
{-# LANGUAGE FlexibleInstances #-} module Data.LFSR.Tap ( Tap (..), bitsOfTap, next, list, tap2, tap4 ) where import Data.List (foldl', sort, group) import Data.Array (Array, array, (!)) import Data.Bits (Bits, complementBit, xor, (.&.)) import Data.LFSR.Bits (unsignedShiftR) class TapBits a where ...
khibino/haskell-lfsr
src/Data/LFSR/Tap.hs
bsd-3-clause
1,932
0
14
540
909
530
379
66
1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- -- Pretty-printing assembly language -- -- (c) The University of Glasgow 1993-2005 -- ----------------------------------------------------------------------------- {-# OPTIONS_GHC -fno-warn-orphans #-} module X86.Ppr...
jstolarek/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
44,154
0
28
13,455
13,074
6,509
6,565
855
97
module Main where import Control.Monad (forM_) import Control.Monad.Free import Data.List (intersperse) import System.Console.ANSI data Tree next = Branch Int next | Trunk next | Done deriving (Functor) data STree = Pad Int | Peak | LBranch Int | STrunk | RBranch Int sTree Peak = "/...
imccoy/xmast
app/Main.hs
bsd-3-clause
1,749
0
13
427
781
394
387
56
5
{-# Options_GHC -Wno-unused-do-bind #-} {-# Language OverloadedStrings #-} {-| Module : Client.Network.Async Description : Event-based network IO Copyright : (c) Eric Mertens, 2016 License : ISC Maintainer : emertens@gmail.com This module creates network connections and thread to manage those connections. ...
glguy/irc-core
src/Client/Network/Async.hs
isc
11,745
0
22
3,161
2,543
1,266
1,277
248
6
{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-unused-binds #-} {- | Module : ./Scratch.hs Description : ghci test file Copyright : (c) C. Maeder, DFKI GmbH 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : experimental Portability : non-portab...
spechub/Hets
Scratch.hs
gpl-2.0
6,098
0
13
1,388
1,167
620
547
109
3
test1 :: Bool -> Bool test1 (-3) = True test2 :: Bool -> Bool test2 (-. 3.0) = True
roberth/uu-helium
test/typeerrors/Examples/NewNegationPat.hs
gpl-3.0
87
1
7
22
46
24
22
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Database.Migrate where import Control.Applicative import Control.Monad (when) import Control.Monad.Reader import Control.Monad.Trans (lift, liftIO) import Data.Maybe (fromJust, fromMaybe) imp...
dbp/migrate
src/Database/Migrate.hs
gpl-3.0
4,234
0
18
1,587
1,258
622
636
73
2
{-# LANGUAGE OverloadedStrings #-} module Tests.DataForms where import Network.Xmpp.Xep.DataForms import qualified Data.Text.Lazy as TL import qualified Text.XML.Stream.Elements as Elements import qualified Data.XML.Types as XML import Data.XML.Pickle exampleXML1 = TL.concat $ ["<x xmlns='jabber:x:data' t...
Philonous/pontarius-xmpp
tests/DataForms.hs
bsd-3-clause
5,207
0
9
1,511
432
283
149
120
1
-- | A renderer that produces pretty HTML, mostly meant for debugging purposes. -- module Text.Blaze.Renderer.Pretty ( renderMarkup , renderHtml ) where import Text.Blaze.Internal import Text.Blaze.Renderer.String (fromChoiceString) -- | Render some 'Markup' to an appending 'String'. -- renderString :: Ma...
FranklinChen/blaze-markup
src/Text/Blaze/Renderer/Pretty.hs
bsd-3-clause
2,254
0
16
605
729
386
343
43
11
module Settings.Builders.Configure (configureBuilderArgs) where import Rules.Gmp import Rules.Libffi import Settings.Builders.Common configureBuilderArgs :: Args configureBuilderArgs = do gmpPath <- expr gmpBuildPath libffiPath <- expr libffiBuildPath mconcat [ builder (Configure gmpPath) ? do ...
izgzhen/hadrian
src/Settings/Builders/Configure.hs
mit
1,049
0
16
362
209
105
104
22
1
{-# LANGUAGE OverloadedStrings #-} module FuncTorrent.Tracker (TrackerResponse(..), tracker, mkArgs, mkTrackerResponse, urlEncodeHash ) where import Prelude hiding (lookup, splitAt) import Data.ByteString (ByteString) import Data.ByteString.Char8 as BC (pack, unpack, splitAt) import Data.C...
harshavardhana/functorrent
src/FuncTorrent/Tracker.hs
gpl-3.0
3,327
0
15
972
977
547
430
71
3
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="da-DK"> <title>Revisit | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref loc...
0xkasun/security-tools
src/org/zaproxy/zap/extension/revisit/resources/help_da_DK/helpset_da_DK.hs
apache-2.0
969
80
66
159
413
209
204
-1
-1
listPrinters = [(''[] ,\(typeVariable:_) _automaticPrinter -> (let presentVar = varE (presentVarName typeVariable) in lamE [varP (presentVarName typeVariable)] [|(let typeString = "[" ++ fst $(presentVar) ++ "]" in (typeString ,\xs -> ...
lunaris/hindent
benchmarks/listprinters.hs
bsd-3-clause
1,351
0
15
752
76
41
35
-1
-1
-- | -- Module : $Header$ -- Copyright : (c) 2013-2015 Galois, Inc. -- License : BSD3 -- Maintainer : cryptol@galois.com -- Stability : provisional -- Portability : portable -- -- This module defines the scoping rules for value- and type-level -- names in Cryptol. module Cryptol.Parser.Names where ...
iblumenfeld/cryptol
src/Cryptol/Parser/Names.hs
bsd-3-clause
10,145
0
14
2,941
3,995
1,960
2,035
207
19
{- This test checks that specialisations can apply inside wrappers. In particular, the wrapper for 'foo' should look like Tmpl= \ (n_aal [Occ=Once!] :: GHC.Types.Int) -> case n_aal of _ { GHC.Types.I# ipv_smZ [Occ=Once] -> case Roman.foo_$s$wgo ipv_smZ 6 of ww_spp { __...
ezyang/ghc
testsuite/tests/simplCore/should_compile/spec-inline.hs
bsd-3-clause
924
0
16
374
266
135
131
13
2
module PackageTests.PathsModule.Executable.Check (suite) where import PackageTests.PackageTester (PackageSpec(..), SuiteConfig, assertBuildSucceeded, cabal_build) import System.FilePath import Test.Tasty.HUnit suite :: SuiteConfig -> Assertion suite config = do let spec = PackageSpec { directory =...
trskop/cabal
Cabal/tests/PackageTests/PathsModule/Executable/Check.hs
bsd-3-clause
518
0
13
117
121
69
52
13
1
import Break020b line1 _ = return () line2 _ = return () in_another_decl _ = do line1 0 line2 0 main = do line1 0 line2 0 in_another_decl 0 in_another_module 0 line2 1 return ()
wxwxwwxxx/ghc
testsuite/tests/ghci.debugger/scripts/break020.hs
bsd-3-clause
215
0
8
72
93
38
55
12
1
{-# LANGUAGE TupleSections, OverloadedStrings, ScopedTypeVariables #-} module Handler.Swag ( getSwagR , postSwagBuyR ) where import Import import Utils import Handler.SwagForms getSwagR :: Handler Html getSwagR = do (LdapUser _ _ _ _ fina) <- getLdapUser swags <- map entityVal `fmap` (runDB $ sel...
dgonyeo/lambdollars
Handler/Swag.hs
mit
3,419
0
35
1,707
768
377
391
-1
-1
module Util.Vector2 where import Text.Printf data Vector2 = Vector2 Float Float fromAngle :: Float -> Vector2 fromAngle a = Vector2 (cos a) (sin a) vadd :: Vector2 -> Vector2 -> Vector2 vadd (Vector2 x1 y1) (Vector2 x2 y2) = Vector2 (x1 + x2) (y1 + y2) vsub :: Vector2 -> Vector2 -> Vector2 vsub (Vector2 x1 y1) (Ve...
kaisellgren/ankka
src/Util/Vector2.hs
mit
965
0
12
212
496
255
241
23
1
{-| Implementation of peer discovery using using Kademlia Distributed Hash Table. For more details regarding DHT see this package on hackage: <https://hackage.haskell.org/package/kademlia> -} module Pos.Infra.DHT.Real ( module Pos.Infra.DHT.Real.CLI , module Pos.Infra.DHT.Real.Param , modu...
input-output-hk/pos-haskell-prototype
infra/src/Pos/Infra/DHT/Real.hs
mit
570
0
5
133
79
60
19
9
0
{-| - Module : StermsParser - Description : S-term parser - Copyright : (c) Maciej Bendkowski - - Maintainer : maciej.bendkowski@gmail.com - Stability : experimental -} module StermsParser where import ParserUtils import Sterms -- S-term grammar -- <combinator> := "S" ...
maciej-bendkowski/blaz
src/StermsParser.hs
mit
1,550
0
12
553
334
171
163
30
3
{-# LANGUAGE TupleSections #-} module Hashiwokakero where import Control.Applicative import Data.Attoparsec.ByteString import Data.Attoparsec.ByteString.Char8 import Data.Char (ord) import Data.SBV import Control.Monad.Writer import Data.Map (Map, (!)) import Data.List (transpose, findIndices) import Data.Maybe (from...
tjhance/logic-puzzles
src/Hashiwokakero.hs
mit
4,869
0
27
1,617
1,932
1,025
907
110
8
-- -- -- ------------------ -- Exercise 13.17. ------------------ -- -- -- module E'13'17 where {- GHCi> :t 37 :t True -} -- 37 :: Num a => a -- -- True :: Bool --------------------------- -- f n = 37 + n -- 1 -- f True = 34 -- 2 --------------------------- -- -- I see an ambiguity in the argumen...
pascal-knodel/haskell-craft
Chapter 13/E'13'17.hs
mit
2,445
0
2
736
78
77
1
1
0
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE OverloadedStrings #-} module Database.Persist.MySQL.Extra ( rawSqlSource , selec...
circuithub/persistent-mysql-extra
Database/Persist/MySQL/Extra.hs
mit
22,872
0
27
6,441
5,170
2,659
2,511
347
7
{-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} module Numeric.Sampling ( -- * Without replacement sample , sampleIO -- * With replacement , resample , resampleIO -- * Unequal probabil...
jtobin/sampling
lib/Numeric/Sampling.hs
mit
4,691
0
19
1,249
1,502
783
719
94
2
module Job.Common ( mailchimpPostRequest , mailchimpPatchRequest ) where import Import import qualified Crypto.Hash as CH import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Network.HTTP.Simple as HTTP hexMD5 :: Text -> String hexMD5 s = show (...
Tehnix/campaigns
Job/Common.hs
mit
1,886
0
15
339
532
266
266
32
3
-- a block is just an integer type Block = Int -- a pile is a list of blocks from top to bottom type Pile = [Block] -- a configuration is a list of piles type Config = [Pile] -- a board gives you the next block to discard plus a configuration data Board = B (Int,Config) deriving Eq -- a state is just a board typ...
fultonms/artificial-intelligence
a2/blockA.hs
mit
4,775
0
13
997
1,398
786
612
62
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} module Stackage.Database.Query ( -- * Snapshot newestSnapshot , newestLTS , newestLTSMajor , newestNightly , getSnapshots ...
fpco/stackage-server
src/Stackage/Database/Query.hs
mit
49,026
0
24
14,874
12,709
6,466
6,243
958
4
Right (fromList [((νx. x) + (μy. (νx. x) + y),fromList [ (κ₁ 〈〉,κ₁ 〈〉), (κ₂ (α (κ₁ 〈〉)),κ₂ (α (κ₁ 〈〉))) ] ), (μy. (νx. x) + y,fromList [ (α (κ₁ 〈〉),α (κ₁ 〈〉)), (α (κ₂ (α (κ₁ 〈〉))),α (κ₂ (α (κ₁ 〈〉)))) ] ), ((μy. (νx. x) + y) × (νy. (μy....
hbasold/Sandbox
OTTTests/Tmp.hs
mit
1,397
43
21
484
852
459
393
-1
-1
module Ch20.IdentityFold where data Identity a = Identity a deriving (Eq, Show) -- Identity foldable less about combining values into a summary value -- more about consuming the value inside the Identity constructor instance Foldable Identity where foldr f x (Identity a) = f a x foldl f x (Identity a) = f x a...
andrewMacmurray/haskell-book-solutions
src/ch20/IdentityFold.hs
mit
352
0
8
74
102
53
49
8
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkaclentry-portrange.html module Stratosphere.ResourceProperties.EC2NetworkAclEntryPortRange where ...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EC2NetworkAclEntryPortRange.hs
mit
1,924
0
12
205
264
151
113
27
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-budgetdata.html module Stratosphere.ResourceProperties.BudgetsBudgetBudgetData where import S...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/BudgetsBudgetBudgetData.hs
mit
4,793
0
13
457
690
394
296
57
1
module Main where import NLP.GenI.Test main = runTests
kowey/GenI
geni-test/MainTest.hs
gpl-2.0
57
0
4
10
15
10
5
3
1
{-# LANGUAGE TemplateHaskell #-} module H7 where import Test.QuickCheck import Test.QuickCheck.All data NestedList a = Elem a | List [NestedList a] deriving (Show, Eq) instance Arbitrary a => Arbitrary (NestedList a) where arbitrary = do n <- choose (1, 3) :: Gen Int case n of ...
hsinhuang/codebase
h99/H7.hs
gpl-2.0
888
0
22
311
367
181
186
27
1
{-# OPTIONS_GHC -fno-warn-name-shadowing #-} module Property (Property(..), showPropertyName, renameProperty, PropertyType(..), PropertyContent(..), Formula(..), Op(..), Term(..), PropResult(..), resultAnd, resultOr, resultNot, resultsAnd, resultsOr)...
cryptica/slapnet
src/Property.hs
gpl-3.0
4,478
0
11
1,342
1,670
860
810
122
2
module FPIS where fib :: Int -> Int fib 1 = 0 fib 2 = 1 fib n = go 3 0 1 where go n' l m = if n' == n then m' else go (succ n') m m' where m' = l + m isSorted :: [a] -> (a -> a -> Bool) -> Bool isSorted [] _ = True isSorted (_:[]) _ = True isSorted (x:y:xs) f = f x y && isSorted (y:xs) f main :: IO () ma...
Szczyp/fpis
Main.hs
gpl-3.0
379
0
10
114
248
130
118
15
2
import System.Console.GetOpt import Control.Monad import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL import qualified Data.ByteString.Lazy.UTF8 as BUL import Hellnet import Hellnet.Crypto import Hellnet.ExternalChunks import Hellnet.Meta import Hellnet.Network import Hellnet.Storage imp...
Voker57/hellnet
hell-fsck.hs
gpl-3.0
4,704
36
26
970
1,712
843
869
139
5
module Mudblood.Mapper ( module Mudblood.Mapper.Map , module Mudblood.Mapper.Walk ) where import Mudblood.Mapper.Map import Mudblood.Mapper.Walk
talanis85/mudblood
src/Mudblood/Mapper.hs
gpl-3.0
158
0
5
27
34
23
11
5
0
-- | -- Module : BlastItWithPiss.CaptchaServer -- Copyright : 2013 kudah -- License : GPL-3 -- Maintainer : kudah <kudahkukarek@gmail.com> -- Stability : experimental -- Portability : ghc-only -- -- 1. решаем по капче для каждого агента -- 2. меряем скорость -- 3. постоянно обновляем скорость -- 4. правим...
exbb2/BlastItWithPiss
src/BlastItWithPiss/CaptchaServer.hs
gpl-3.0
15,055
0
46
5,455
2,997
1,496
1,501
-1
-1
module Test.Parser where import Text.ParserCombinators.Parsec as P import Text.ParserCombinators.Parsec.Char as Ch import Text.ParserCombinators.Parsec.Combinator as Co import Text.ParserCombinators.Parsec.Prim as Pr import Text.ParserCombinators.Parsec.Token as T import Parsecy import Types {- cmdMap = [("comm", pz...
blippy/sifi
test/Parsecy.hs
gpl-3.0
808
0
10
148
167
100
67
17
1
import SimpleGraphics tree1 :: Int -> Graphic tree1 0 = withStroke Green 1 $ line (0,0) (0,3) tree1 n = withStroke Black (fromIntegral n) (line (0,0) (0,len)) `overGraphic` translate (0,len) (rotate angle subTree) `overGraphic` translate (0,len) (rotate (-angle) subTree) where angle = 3 + 6 * fromIntegral...
xkollar/handy-haskell
svg-graphic-teach/examples/frac-tree.hs
gpl-3.0
2,127
0
15
507
1,043
560
483
46
3
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ParallelListComp #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeSynonymInstances #-} {-# O...
mzini/TcT
source/Tct/Method/Poly/NaturalPI.hs
gpl-3.0
26,850
0
24
9,357
6,943
3,617
3,326
-1
-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/Folders/Get.hs
mpl-2.0
4,789
0
15
1,077
704
414
290
99
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Folders/Get.hs
mpl-2.0
3,976
0
16
885
465
278
187
77
1
module Main (main) where import Test.Erd.Render (testRender) import Test.Tasty import Test.Text.Parsec.Erd.Parser (testEr) main :: IO () main = defaultMain $ testGroup "Erd Tests" tests tests :: [TestTree] tests = [testEr, testRender]
BurntSushi/erd
test/Spec.hs
unlicense
291
0
6
87
81
49
32
10
1
import Data.Monoid mzip :: (Monoid a, Monoid b) => [a] -> [b] -> [(a, b)] mzip (a:as) (b:bs) = (a, b) : mzip as bs mzip [] (b:bs) = (mempty, b) : mzip [] bs mzip (a:as) [] = (a, mempty) : mzip as [] mzip _ _ = []
seckcoder/lang-learn
haskell/test.hs
unlicense
236
0
9
73
172
93
79
6
1
-- import Char (toLower) import Data.Char (toLower) import Control.Monad (filterM, forM, liftM) import System.Directory (doesDirectoryExist, getDirectoryContents, Permissions(..), getModificationTime, getPermissions) -- import System.Time (ClockTime(..)) -- deprecated import Data.Time.Clock import System.FilePath (t...
haroldcarr/learn-haskell-coq-ml-etc
haskell/book/2009-Real_World_Haskell/FoldDir.hs
unlicense
2,557
0
20
756
629
330
299
48
5
module Kornel.LineHandler.Clojure ( setup ) where import Data.Aeson import qualified Data.Attoparsec.Text as P import Kornel.Common import Kornel.LineHandler import qualified Network.HTTP.Client.TLS as HTTPS import Network.HTTP.Simple import Prelude ...
michalrus/kornel
src/Kornel/LineHandler/Clojure.hs
apache-2.0
1,458
0
16
348
425
227
198
-1
-1
module Main where import CodeJam import System.Environment import Data.List import QR.Beam readFileToCases:: String -> IO (Int, [String]) readFileToCases x = do s <- readFile x let (x:xs) = lines s caseCount = read x::Int return (caseCount,xs) readCaseAndToOutputV2 :: (CodeJam a) => (a -> String) -> (Int...
lihlcnkr/codejam
app/Main.hs
apache-2.0
1,185
0
15
229
293
155
138
20
1
{-# LANGUAGE GADTs, TypeFamilies, TypeOperators, FlexibleInstances, ScopedTypeVariables, FlexibleContexts, MultiParamTypeClasses, BangPatterns #-} module Flow.Builder ( -- * Abstract data flow Flow, flow -- * Strategy , Strategy , runStrategy , uniq, implementing, calculate ...
SKA-ScienceDataProcessor/RC
MS5/dna/flow/Flow/Builder.hs
apache-2.0
15,761
0
27
3,927
3,993
2,035
1,958
236
4
{-# LANGUAGE TemplateHaskell, DeriveFunctor #-} {-| Some common Ganeti types. This holds types common to both core work, and to htools. Types that are very core specific (e.g. configuration objects) should go in 'Ganeti.Objects', while types that are specific to htools in-memory representation should go into 'Ganeti....
ganeti/ganeti
src/Ganeti/Types.hs
bsd-2-clause
35,265
0
11
6,923
8,183
4,597
3,586
719
2
{-# LANGUAGE OverloadedStrings #-} import qualified System.Environment as Env import qualified System.Exit as Exit import qualified System.Directory as Dir import qualified Data.ByteString as B import qualified Control.Monad as M import qualified Data.Text as T import qualified Data.Text.IO as T import Data.Maybe (fro...
geekingfrog/geekingfrog.com
src/FileImport.hs
bsd-3-clause
2,618
0
17
508
850
445
405
60
3
module Language.DemonL.AST where import Data.List (intercalate, find) import qualified Data.Map as M import Language.DemonL.Types data Decl = Decl { declName :: String, declType :: Type } deriving (Eq, Ord) declsToMap = foldr ( \ d -> M.insert (declName d) (declType d)) M.empty instance Show Decl wh...
scottgw/demonL
Language/DemonL/AST.hs
bsd-3-clause
2,840
0
12
976
1,057
567
490
109
1
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.SMT.SMT -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Abstraction of SMT solvers ---------------------------------------------...
dylanmc/cryptol
sbv/Data/SBV/SMT/SMT.hs
bsd-3-clause
24,941
0
33
8,262
5,878
3,117
2,761
325
8
{-# LANGUAGE NoImplicitPrelude #-} -- | -- Module: $HEADER$ -- Description: All test cases aggregated and exported as tests :: [Test]. -- Copyright: (c) 2013, 2014 Peter Trsko -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com -- Stability: stable -- Portability: NoImplicitPrelude -- -- All t...
trskop/pkg-version
test/TestCase.hs
bsd-3-clause
638
0
7
116
73
51
22
8
1
{-# LANGUAGE CPP #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} import Prelude hiding ((**)) import Data.Monoid.Ave...
music-suite/music-preludes
tests/instances.hs
bsd-3-clause
13,245
0
14
2,739
3,152
1,689
1,463
185
1
module Rules.IntegerGmp ( integerGmpRules, integerGmpObjects, integerGmpLibraryH, integerGmpDependencies ) where import Base import Expression import GHC import Oracles.Config.Setting import Rules.Actions import Settings.User integerGmpBase :: FilePath integerGmpBase = "libraries/integer-gmp/gmp" integerGmpB...
quchen/shaking-up-ghc
src/Rules/IntegerGmp.hs
bsd-3-clause
5,162
0
19
1,219
958
483
475
87
2
{-# OPTIONS_HADDOCK hide #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE Typ...
kcsongor/generic-lens
generic-lens-core/src/Data/Generics/Internal/GenericN.hs
bsd-3-clause
1,809
0
9
423
450
267
183
46
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. {-# LANGUAGE OverloadedStrings #-} module Duckling.Distance.DE.Corpus ( corpus ) where import Data.String i...
facebookincubator/duckling
Duckling/Distance/DE/Corpus.hs
bsd-3-clause
1,917
0
10
748
348
203
145
49
1
-- 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. {-# LANGUAGE NoRebindableSyntax #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Api.Tests ( tests ) w...
facebookincubator/duckling
tests/Duckling/Api/Tests.hs
bsd-3-clause
4,813
0
20
1,303
1,414
764
650
103
2
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE DefaultSignatures #-} #endif module Generics.Deriving.Traversable ( -- * GTraversable class GTraversable(..) -- * Default method , gtraversedefault ) where im...
ekmett/generic-deriving
src/Generics/Deriving/Traversable.hs
bsd-3-clause
2,604
0
13
583
915
469
446
45
1
module Library.Page.EditPatron where import Graphics.UI.Threepenny.Core hiding (row) import Foundation.Common import Foundation.Input -- import Foundation.Layout import Library import Library.DB.Types import Library.Page.PatronInfo import Library.Page.PatronSearch import Database.SQLite.Simple import Control.Mona...
kylcarte/threepenny-extras
src/Library/Page/EditPatron.hs
bsd-3-clause
2,486
0
16
649
738
359
379
68
4
module Parser.Lexer where import Parser.Data ( Parser ) import qualified Text.Megaparsec.Char.Lexer as L import Control.Monad ( void ) import Text.Megaparsec.Char ( alphaNumChar, char, letterChar, lowerChar, upperChar, spaceChar ) import Text.Megaparsec ( (<|>), between, many, MonadParsec(try) ) import Text.Printf...
kajigor/uKanren_transformations
src/Parser/Lexer.hs
bsd-3-clause
1,678
0
9
316
617
330
287
41
1
module Language.Verilog.Parser ( parseFile , preprocess ) where import Language.Verilog.AST import Language.Verilog.Parser.Lex import Language.Verilog.Parser.Parse import Language.Verilog.Parser.Preprocess import Language.Verilog.Parser.Tokens -- | Parses a file given a table of predefined macros, the file name...
tomahawkins/verilog
Language/Verilog/Parser.hs
bsd-3-clause
636
0
11
104
172
97
75
13
1
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | A nonoptimising interpreter for Futhark. It makes no assumptions of -- the form of the input program, and in particular permits shadowing. -- This interpreter should be considered the primary benchmark for -- judging the correctness of a prog...
mrakgr/futhark
src/Futhark/Interpreter.hs
bsd-3-clause
30,501
0
27
8,309
9,978
4,901
5,077
-1
-1
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.SGIS.PointLineTexgen -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portabi...
haskell-opengl/OpenGLRaw
src/Graphics/GL/SGIS/PointLineTexgen.hs
bsd-3-clause
920
0
5
119
82
57
25
14
0
module Cauterize.Specification ( module X ) where import Cauterize.Specification.Types as X import Cauterize.Specification.Parser as X import Cauterize.Specification.Compile as X
cauterize-tools/cauterize
src/Cauterize/Specification.hs
bsd-3-clause
180
0
4
20
36
26
10
4
0
{-# LANGUAGE LiberalTypeSynonyms, ImplicitParams, TypeOperators, CPP #-} module Data.TrieMap.TrieKey.SetOp ( IsectM, UnionM, DiffM, isectM, unionM, diffM, Isect, Union, Diff, SetOp(..)) where import Data.TrieMap.Sized import Data.TrieMap.TrieKey.Subset type IsectM f a b c = f a -> f b -> Maybe (f c) type Unio...
lowasser/TrieMap
Data/TrieMap/TrieKey/SetOp.hs
bsd-3-clause
1,498
0
9
394
745
386
359
41
1
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSectio...
jwiegley/hnix
src/Nix/Utils.hs
bsd-3-clause
5,544
0
18
1,898
2,033
1,069
964
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} mo...
louispan/data-diverse
test/Data/Diverse/ManySpec.hs
bsd-3-clause
18,822
0
25
6,558
6,989
3,598
3,391
-1
-1
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE InstanceSigs #-} module PFDS.Sec9.Ex13_2 where -- リストを使ってTreeの数に関する明示的な制約を犠牲に実装を簡素にしたバージョン import PFDS.Commons.RandomAccessList import Prelude hiding (head, tail, lookup) data Tree a = Leaf a | Node I...
matonix/pfds
src/PFDS/Sec9/Ex13_2.hs
bsd-3-clause
3,150
0
12
737
1,632
835
797
81
2
import Hsbot import Hsbot.Config main :: IO () main = hsbot defaultConfig
adyxax/hsbot
Main.hs
bsd-3-clause
76
0
6
14
27
14
13
4
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE TemplateHaskell #-} module Application ( makeApplication , getApplicationDev , makeFoundation ) where import Control.Monad.Logger (runLoggingT) import Data.Default (def) import qualified Datab...
Codas/campaign-next
Application.hs
bsd-3-clause
4,371
0
13
1,428
702
393
309
73
2
module Settings where {- Functions below defines a settings of classic GoL. -} -- Minimal number of neighbours to be alive. aliveCellsMin :: Int aliveCellsMin = 2 -- Maximum number of neighbours to be alive. aliveCellsMax :: Int aliveCellsMax = 3 -- Number of neihbours required to spawn a new cell. spawnCells...
wowofbob/gol
src/Settings.hs
bsd-3-clause
349
0
4
67
38
25
13
7
1
{- | Module : ./GUI/hets_cgi.hs Copyright : (c) Uni Magdeburg 2004-2017 License : GPLv2 or higher, see LICENSE.txt Maintainer : till@iks.cs.ovgu.de Stability : provisional Portability : non-portable(imports Logic.Logic) Interface for web page with WASH/CGI -} module Main where import WASH.CGI.CG...
spechub/Hets
GUI/hets_cgi.hs
gpl-2.0
11,754
0
22
3,696
2,812
1,375
1,437
257
6
{-# LANGUAGE ExistentialQuantification #-} -- |This module provides wrapper widgets for fixing the size of child -- widgets in one or more dimensions in rows or columns, respectively. -- This differs from the ''limit'' widgets in the Limits module in -- that Limits enforce an upper bound on size. module Graphics.Vty.Wi...
KommuSoft/vty-ui
src/Graphics/Vty/Widgets/Fixed.hs
bsd-3-clause
4,885
0
24
1,629
1,352
673
679
104
2
{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable, StandaloneDeriving #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Server.Packages.Types -- Copyright : (c) David Himmelstrup 2005 -- License : BSD-like -- -- Maintainer : lemmih@...
isomorphism/hackage2
Distribution/Server/Packages/Types.hs
bsd-3-clause
5,987
0
13
1,217
1,073
605
468
126
1
{-# LANGUAGE CPP, ScopedTypeVariables #-} module TcErrors( reportUnsolved, reportAllUnsolved, warnAllUnsolved, warnDefaulting, solverDepthErrorTcS ) where #include "HsVersions.h" import TcRnTypes import TcRnMonad import TcMType import TcType import RnEnv( unknownNameSuggestions ) import TypeR...
TomMD/ghc
compiler/typecheck/TcErrors.hs
bsd-3-clause
81,630
1
21
25,035
16,475
8,415
8,060
-1
-1
module Tests.Arbitrary where import Tests.Arbitrary.Xml () import Tests.Arbitrary.Xmpp () -- $derive makeArbitrary IQRequestType
Philonous/pontarius-xmpp
tests/Tests/Arbitrary.hs
bsd-3-clause
132
0
4
16
25
17
8
3
0
-- | This implements a watchdog process. It calls mueval with all the -- user-specified arguments, sleeps, and then if mueval is still running -- kills it. -- Even an out-of-control mueval will have trouble avoiding 'terminateProcess'. -- Note that it's too difficult to parse the user arguments to get the timeo...
bitemyapp/mueval
watchdog.hs
bsd-3-clause
1,633
0
25
559
301
158
143
22
3
-- | Utility functions module Language.Haskell.Ghcid.Util( dropPrefixRepeatedly, chunksOfWord, outWith, outStrLn, outStr, allGoodMessage, getModTime, getModTimeResolution ) where import Control.Concurrent.Extra import System.Time.Extra import System.IO.Unsafe import System.IO.Extra import Syst...
JPMoresmau/ghcid
src/Language/Haskell/Ghcid/Util.hs
bsd-3-clause
2,978
0
22
631
753
401
352
60
3
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "src/System/IO/Unsafe/Compat.hs" #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} module System.IO.Unsafe.Compat ( module Base , unsafeFixIO , unsafeDupablePerformIO ) where import System.IO.Unsafe as Base
phischu/fragnix
tests/packages/scotty/System.IO.Unsafe.Compat.hs
bsd-3-clause
292
0
4
82
31
23
8
8
0
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Hpc -- Copyright : Thomas Tuegel 2011 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This module provides functions for locating various HPC-related paths and -- a f...
jwiegley/ghc-release
libraries/Cabal/cabal/Distribution/Simple/Hpc.hs
gpl-3.0
7,693
0
15
1,986
1,176
637
539
108
2
module ModuleRecordClash.R where import Prelude i :: Double i = 1
beni55/fay
tests/ModuleRecordClash/R.hs
bsd-3-clause
68
0
4
13
19
12
7
4
1
{-# LANGUAGE ScopedTypeVariables, ExistentialQuantification #-} -- |The primary entrypoint to the ROS client library portion of -- roshask. This module defines the actions used to configure a ROS -- Node. module Ros.Node (Node, runNode, advertise, advertiseBuffered, subscribe, getShutdownAction, runHa...
bitemyapp/roshask
src/Ros/Node.hs
bsd-3-clause
10,821
0
16
3,180
2,731
1,416
1,315
170
9
{- | Module : GUI.Glade.%s Description : Glade xmlstring for %s Copyright : (c) Thiemo Wiedemeyer, Uni Bremen 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : raider@informatik.uni-bremen.de Stability : provisional Portability : portable This module provides a string containing the xm...
mariefarrell/Hets
GUI/Glade/Template.append.hs
gpl-2.0
510
1
6
100
51
30
21
-1
-1
module Lamdu.GUI.ExpressionEdit.HoleEdit.Open.ShownResult ( ShownResult(..) , srPick ) where import Data.Store.Guid (Guid) import qualified Data.Store.Transaction as Transaction import qualified Graphics.UI.Bottle.Widget as Widget import qualified Lamdu.GUI.ExpressionEdit.HoleEdit.Results as HoleResults import q...
schell/lamdu
Lamdu/GUI/ExpressionEdit/HoleEdit/Open/ShownResult.hs
gpl-3.0
732
0
11
120
187
115
72
18
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} -- | Compile a 'GPUMem' program to imperative code with kernels. -- This is mostly (but not entirely) the same process no matter if we -- are targeting OpenCL or CUDA. The important di...
HIPERFIT/futhark
src/Futhark/CodeGen/ImpGen/GPU.hs
isc
14,947
0
17
3,676
4,052
2,074
1,978
342
4
{-# LANGUAGE OverloadedStrings, RankNTypes, PatternSynonyms, ViewPatterns, BangPatterns #-} module Data.CSS.Syntax.Tokens ( Token(..) , NumericValue(..) , HashFlag(..) , Unit , tokenize , serialize ) where import Control.Applicative import Control.Monad ...
wereHamster/haskell-css-syntax
src/Data/CSS/Syntax/Tokens.hs
mit
25,606
0
25
10,149
8,659
4,278
4,381
639
48
{-# LANGUAGE OverloadedStrings, CPP #-} {-# LANGUAGE NamedFieldPuns, RecordWildCards #-} {-# LANGUAGE BangPatterns #-} module Network.Wai.Handler.Warp.HTTP2.Types where import Control.Concurrent (forkIO) import Control.Concurrent.STM import Control.Exception (SomeException, bracket) import qualified Data.ByteString a...
creichert/wai
warp/Network/Wai/Handler/Warp/HTTP2/Types.hs
mit
10,741
0
19
2,691
2,543
1,351
1,192
306
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} -- For type-level functions {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} -- For HList instances {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeApplica...
ChrisCoffey/haskell_sandbox
DependentTypes.hs
mit
3,635
1
12
1,004
1,661
878
783
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} module Main where import Control.Applicative import Control.Monad (when) import Options.Applicative import qualified Data.ByteString as B import qualified Data.ByteString.UTF8 as U import Control.Exception (try, IOException) import Data.Either (either) import System.FilePath (repl...
sshastry/litany
Main.hs
mit
1,681
0
17
541
498
263
235
43
4
ordenadacola :: (ord a) => Cola a -> Bool ordenadacola CV = True; ordenadacola (CV :. x) = True ordenadacola (c :. y :. x) = if y<=x then ordenadacola (c :. y) else False
josegury/HaskellFuntions
Colas/Boolean-Ordenada.hs
mit
171
0
8
35
87
46
41
-1
-1
{-# LANGUAGE RankNTypes #-} module Firestone.Database ( lookupMinion , lookupMinionM , lookupMinions , lookupCard , lookupCards ) where import Firestone.Types import Firestone....
Jinxit/firestone
src/Firestone/Database.hs
mit
3,594
0
15
922
1,322
705
617
73
2
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Models where import Control.Applicative import Data.Aeson import Data.Validation.Aeson import Data.Validation.Historical import Valida...
danclien/validation-aeson-history
src/Models.hs
mit
1,372
0
13
512
307
166
141
34
1
module GCD where -- If `b > a` we'll just swap them on the first run. myGCD a b = if remainder == 0 then b else myGCD b remainder where remainder = a `mod` b myRecGCD a b = goMyRecGCD a b 1 goMyRecGCD a b 0 = a goMyRecGCD a b _remainder = goMyRecGCD b remainder remainder where rema...
raventid/coursera_learning
haskell/will_kurt/7.1_myGCD.hs
mit
338
0
7
103
106
57
49
9
2