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
{- This file is part of ShellCheck. http://www.vidarholen.net/contents/shellcheck ShellCheck 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 op...
Persi/shellcheck
ShellCheck/AST.hs
gpl-3.0
12,595
0
16
4,138
4,547
2,230
2,317
327
92
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/ListParts.hs
mpl-2.0
9,310
0
22
2,038
1,210
724
486
123
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Manufacturers.Types.Sum -- Copyright : (c) 2015-2016 B...
rueshyna/gogol
gogol-manufacturers/gen/Network/Google/Manufacturers/Types/Sum.hs
mpl-2.0
2,662
0
11
673
397
221
176
50
0
{- v-rename rename.txt < pattern.vcd -} {-# LANGUAGE OverloadedStrings #-} module Main where import qualified Data.ByteString.Char8 as B import qualified Data.HashMap.Strict as HashMap import Lib mapNames :: HashMap ByteString ByteString -> Header -> Header mapNames nameMap (Wire n al nm) = Wire n al (Hash...
gitfoxi/vcd-haskell
app/vcd-rename.hs
agpl-3.0
1,671
0
15
416
414
210
204
47
1
{- zeromq3-conduit - Conduit bindings for zeromq3-haskell - - Copyright (C) 2012 Nicolas Trangez - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the Lice...
rgrinberg/zeromq3-conduit
src/System/ZMQ3/Monad.hs
lgpl-2.1
5,811
0
12
1,308
1,263
714
549
78
1
{-# LANGUAGE OverloadedStrings #-} import Network.Reddit.Parse import Network.Reddit.Types import Control.Lens import Data.Aeson import Data.Aeson.Lens import Data.Aeson.Types import Network.Wreq hiding (Link) import qualified Network.Wreq.Session as Session import Data.Text import Data.Tree type URI = String buil...
DR6/reddit-hs
Network/Reddit/actions.hs
lgpl-3.0
2,514
8
19
694
793
389
404
-1
-1
module Main where import Control.Monad (replicateM) import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Char8 as BC import Data.Text.Encoding (decodeUtf8, encodeUtf8) import qualified Data.Text.Lazy as TL import qual...
bitemyapp/shawty
src/Main.hs
apache-2.0
1,529
0
24
330
588
305
283
37
4
module Tables.A342238 (a342238, a342238T) where import Helpers.Table (tableByAntidiagonals) import Tables.A342237 (a342237T) a342238T :: Integer -> Integer -> Integer a342238T n k = n^k - a342237T n k a342238 :: Integer -> Integer a342238 n = case tableByAntidiagonals (n - 1) of (n', k') -> a342238T (n' + 1) (k' + 1)...
peterokagey/haskellOEIS
src/Tables/A342238.hs
apache-2.0
321
0
10
53
132
72
60
7
1
{-# LANGUAGE OverloadedStrings #-} module Model.User where import qualified Data.Text.Lazy as T import qualified Data.ByteString as BS import Database.PostgreSQL.Simple.FromRow import Database.PostgreSQL.Simple.FromField (FromField (fromField)) import Database.PostgreSQL.Simple.ToField (ToField (toField)) {-# ANN mo...
DataStewardshipPortal/ds-wizard
Model/User.hs
apache-2.0
1,333
0
13
226
382
218
164
34
1
{- Original Author: Koen Claesson Original License: BSD (2-clause) Original URL: https://github.com/koengit/grammarfeat Adopted by Herbert Lange for Muste -} module Muste.Feat(Grammar(..),Rule(..),FunType(..),TTree(..),mkFEAT,featCard,featIth,emptyFeat,getRuleType,getAllRules) where import Data.List import Dat...
daherb/Haskell-Muste
muste-lib/Muste/Feat.hs
artistic-2.0
3,775
0
17
972
1,277
715
562
61
7
import Data.Tree import Data.Monoid import Data.Maybe import Control.Monad.Identity data BTree a = Leaf | Branch a !(BTree a) !(BTree a) deriving Show ex1 = Branch 1 (Branch 2 Leaf (Branch 5 (Branch 6 Leaf Leaf) Leaf)) (Branch 3 Leaf (Branch 4 Leaf Leaf)) expand Leaf = return (mempty, []) expand (Branch a l r) = ret...
wangbj/leet
199.hs
bsd-2-clause
629
0
12
113
293
151
142
15
1
{-# LANGUAGE BangPatterns, ScopedTypeVariables #-} -- | -- Module : Statistics.Distribution -- Copyright : (c) 2009 Bryan O'Sullivan -- License : BSD3 -- -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : portable -- -- Types classes for probability distrubutions module Statistics....
00tau/statistics
Statistics/Distribution.hs
bsd-2-clause
6,283
0
16
1,668
1,136
613
523
79
1
{-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE Ty...
sleexyz/haskell-fun
FunctorCategories.hs
bsd-3-clause
4,352
0
16
904
1,033
571
462
-1
-1
module Main where import System.Environment (getArgs) import System.Random import MarkovText main :: IO () main = do args <- getArgs texts <- mapM readFile args rng <- newStdGen putStrLn . takeUntilFullStop $ generate rng texts takeUntilFullStop :: String -> String takeUntilFullStop (char:text) |...
tsujigiri/markov-text
app/Main.hs
bsd-3-clause
396
0
8
80
137
70
67
14
1
module Main where import Test.DocTest main = print "" {-main :: IO () main = doctest [ "--optghc=-packageghc" , "--optghc=-isrc" , "--optghc=-idist/build/autogen/" , "--optghc=-optP-include" , "--optghc=-optPdist/build/autogen/cab...
dmwit/pi-eta-epsilon
tests/doctests.hs
bsd-3-clause
522
0
5
190
18
11
7
3
1
import System.Environment (getArgs) import Data.List.Split (splitOn) multiply :: [[Int]] -> [Int] multiply xs = [x * y | (x, y) <- zip (head xs) (last xs)] main :: IO () main = do [inpFile] <- getArgs input <- readFile inpFile putStr . unlines . map (unwords . map show . multiply . map (map read . words...
nikai3d/ce-challenges
easy/multiply_lists.hs
bsd-3-clause
351
0
16
79
180
92
88
9
1
module Data.Origami.Internal.TestFiles.Qual where data Qual = Qual
nedervold/origami
tests/Data/Origami/Internal/TestFiles/Qual.hs
bsd-3-clause
68
0
5
8
16
11
5
2
0
module Main where import Criterion.Main import qualified Data.Sequence as S lists :: [[Int]] lists = replicate 10 [1..100000] seqs :: [S.Seq Int] seqs = replicate 10 (S.fromList [1..100000]) main :: IO () main = defaultMain [ bench "concatenate lists" $ nf mconcat lists , bench "concatenate sequences" $ ...
dmvianna/strict
src/sequence.hs
bsd-3-clause
343
0
8
72
127
69
58
13
1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGU...
ywata/dynamodb
Aws/DynamoDB/Json/Types.hs
bsd-3-clause
32,621
1
23
7,915
7,890
4,260
3,630
738
13
{-# LANGUAGE FlexibleContexts, RankNTypes #-} module Language.Gator.Ops.General ( nextGateID, nextIdxOf, doOp2N, ) where import Control.Monad.State import Data.Lenses import qualified Data.Map as M import Language.Gator.Logic import Language.Gator.IO nextGateID :: (MonadState Logic m) => m GateID nextGa...
sw17ch/gator
src/Language/Gator/Ops/General.hs
bsd-3-clause
812
0
12
209
364
195
169
23
1
module CommandLine.Helpers where import System.IO import System.Exit (exitFailure, exitSuccess) import Messages.Types (Message(..)) import Messages.Strings (renderMessage) import qualified Reporting.Annotation as RA import qualified Reporting.Report as Report import qualified Reporting.Error.Syntax as Syntax r :: M...
fredcy/elm-format
src/CommandLine/Helpers.hs
bsd-3-clause
1,937
0
13
479
537
270
267
55
3
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DataKinds #-} -------------------------------------------------------------------------------- -- | -- Module : Database.EventStore.Internal.Operation.Transaction.Message -- Copyright : (C) 2015 Yorick Laupa -- License : (see the file LICENSE) -- -- Maintainer : Yorick La...
YoEight/eventstore
Database/EventStore/Internal/Operation/Transaction/Message.hs
bsd-3-clause
4,705
0
11
745
762
429
333
70
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE Arrows #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | This module defines the DSL to construct Streams and Skele...
csic-hs-dsl/hs-skel
src/Control/Parallel/HsSkel/DSL.hs
bsd-3-clause
14,731
9
17
3,121
2,882
1,589
1,293
166
2
import Debug.Trace factorial :: (Num a, Enum a) => a -> a factorial n = product [1..n] c :: (Fractional a, Enum a) => a -> a -> a c n r = (factorial n) / ((factorial r) * (factorial (n - r))) combSelection ncap vmin = go 23 4 0 where go n r count | n > ncap = count | v > vmin = go n (succ r) (s...
JacksonGariety/euler.hs
053.hs
bsd-3-clause
498
0
11
164
277
137
140
14
1
{-# OPTIONS_GHC -Wall -fno-warn-orphans #-} ---------------------------------------------------------------------- -- | -- Module : Data.NumInstances.Util -- Copyright : (c) Conal Elliott 2008 -- License : BSD3 -- -- Maintainer : conal@conal.net -- Stability : experimental -- -- Utilities for number ...
conal/NumInstances
src/Data/NumInstances/Util.hs
bsd-3-clause
568
0
7
91
59
38
21
4
1
{-# LANGUAGE Rank2Types #-} {-# LANGUAGE TemplateHaskell #-} module Machine.Internal.GC.MarkScan where import Control.Lens import Data.List (mapAccumL, find) import qualified Data.Text as T import Machine.Internal.Data import Machine.Internal.Heap (Addr) import qualified Machine.Internal.Heap as U import Machine.Inte...
joelburget/graphreduction
src/Machine/Internal/GC/MarkScan.hs
bsd-3-clause
6,043
0
18
1,880
1,525
790
735
103
11
{-# LANGUAGE NoMonomorphismRestriction, FlexibleContexts, PatternGuards, FlexibleInstances #-} {-# LANGUAGE CPP #-} module PTS.Statics.Typing where import Control.Monad import Control.Monad.Environment import Control.Monad.Errors.Class import Control.Monad.Log import Control.Monad.Reader import Control.Monad.Trans im...
Blaisorblade/pts
src-lib/PTS/Statics/Typing.hs
bsd-3-clause
18,816
0
23
4,597
5,222
2,484
2,738
300
14
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module ETCS.DMI.Windows.DataEntryWindow where import Control.Lens hiding ((*~)) import Data.Proxy import Data.Text ...
open-etcs/openetcs-dmi
src/ETCS/DMI/Windows/DataEntryWindow.hs
bsd-3-clause
3,802
0
15
975
893
470
423
68
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[NameEnv]{@NameEnv@: name environments} -} {-# LANGUAGE CPP #-} module ETA.BasicTypes.NameEnv ( -- * Var, Id and TyVar environments (maps) NameEnv, -- ** Manipulating these environments ...
alexander-at-github/eta
compiler/ETA/BasicTypes/NameEnv.hs
bsd-3-clause
4,685
0
11
1,299
1,269
667
602
74
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} -- | -- Module: $HEADER$ -- Description: TODO -- Copyright: (c) 2014 Peter Trsko -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com -- Stability: experimental -- Portability: DeriveDataTypeab...
trskop/skeletos
src/Skeletos/Type/Config.hs
bsd-3-clause
1,274
0
9
272
316
195
121
26
1
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DatatypeContexts #-} {-# LANGUAGE FlexibleContexts #-} module Data.Sized.Vector ( Vector , empty , (+>) , si...
christiaanb/clash-tryout
src/Data/Sized/Vector.hs
bsd-3-clause
9,562
2
13
2,749
4,180
2,192
1,988
-1
-1
module Data.Text.Serialize.Read( Read(..), read, readEither, ParserPrec(..), ) where import Prelude hiding (Read(..), read) import Control.Applicative import Data.Text.Serialize.Read.Class import Data.Text.Serialize.Read.Generic() import Data.Attoparsec.Text(Parser, parseOnly, decimal, rational, skipSpace, ch...
reinerp/text-serialise
Data/Text/Serialize/Read.hs
bsd-3-clause
5,198
0
11
1,110
717
395
322
44
2
{-# LANGUAGE ScopedTypeVariables #-} import Control.Monad import Control.Concurrent import System.Environment import Foreign import System.LibVirt uri = "qemu:///system" main :: IO () main = do args <- getArgs case args of ["test"] -> initialize >> withConnection uri doTest ["list-nets"] ...
portnov/libvirt-hs
Test.hs
bsd-3-clause
4,389
0
17
1,221
1,189
557
632
103
9
module Main where import ABS (x:n:base:i:next:nn:obj:f:max_val:log_val:the_end) = [0..] main_ :: Method main_ [] this wb k = Assign n (Val (I 500)) $ Assign base (Val (I 2)) $ Assign max_val (Val (I 8)) $ Assign x (Sync logarithm [n,base,max_val]) $ k logarithm :: Method logarithm [pn, pb, pmax] this wb k...
abstools/abs-haskell-formal
benchmarks/1_integer_part_logarithm/progs/500.hs
bsd-3-clause
798
0
20
202
500
253
247
28
1
{-# LANGUAGE ExistentialQuantification #-} module Parakeet.Parser.Stage1 ( stage1 ) where import Control.Monad (forM_, void, mzero, msum, guard, replicateM) import Control.Monad.Choice (foremost, toList, strip) import Control.Monad.Parakeet import Data.Char (toLower, isSpace,...
foreverbell/parakeet
src/Parakeet/Parser/Stage1.hs
mit
6,139
0
19
1,684
2,242
1,133
1,109
144
4
module Orlin.Frontend.Ast ( Prog (..) , Stmt (..) , Expr (..) , Type (..) , exprType , returnType , freeVariables , renameVariable ) where newtype Prog = Prog [Stmt] data Stmt = Def String Expr | Decl String Type data Expr = Int Int | Var String Type Word | Unit | Fn [(String, Type)] ...
nicball/orlin-lang
src/Orlin/Frontend/Ast.hs
mit
3,162
0
13
948
1,450
756
694
97
7
{-# LANGUAGE DeriveDataTypeable #-} {- | Module : ./CspCASL/AS_CspCASL_Process.der.hs Description : Abstract syntax of CSP-CASL processes Copyright : (c) Markus Roggenbach and Till Mossakowski and Uni Bremen 2004 License : GPLv2 or higher, see LICENSE.txt Maintainer : a.m.gimblett@swan.ac.uk Stability...
spechub/Hets
CspCASL/AS_CspCASL_Process.der.hs
gpl-2.0
6,593
0
11
1,524
1,118
647
471
91
1
-- Copyright (c) 1999 Chris Okasaki. -- See COPYRIGHT file for terms and conditions. module TestOrdBag {-# DEPRECATED "This module is unmaintained, and will disappear soon" #-} where import Prelude hiding (concat,reverse,map,concatMap,foldr,foldl,foldr1,foldl1, filter,takeWhile,dropWhile,loo...
FranklinChen/hugs98-plus-Sep2006
fptools/hslibs/data/edison/Coll/TestOrdBag.hs
bsd-3-clause
6,293
3
14
1,639
2,394
1,211
1,183
165
4
-- | -- Module : Data.Vector.Internal.Check -- Copyright : (c) Roman Leshchinskiy 2009 -- License : BSD-style -- -- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au> -- Stability : experimental -- Portability : non-portable -- -- Bounds checking infrastructure -- {-# LANGUAGE MagicHash #-} module Dat...
rleshchinskiy/vector
Data/Vector/Internal/Check.hs
bsd-3-clause
4,114
0
12
841
1,187
639
548
90
2
-- {-# LANGUAGE Haskell201x #-} module Maybe1 where data Maybe' a = Nothing' | Just' a instance Functor Maybe' where fmap f m = m >>= pure . f instance Applicative Maybe' where pure = Just' f1 <*> f2 = f1 >>= \v1 -> f2 >>= (pure . v1) instance Monad Maybe' where Nothing' >>= _ = Nothing' ...
alanz/Hs2010To201x
testcases/H201x/Maybe1.hs
bsd-3-clause
397
0
10
111
140
72
68
12
0
module JVM ( module JVM.Type , module JVM.State ) where -- $Id$ import JVM.Type import JVM.Machine import JVM.State
florianpilz/autotool
src/JVM.hs
gpl-2.0
123
0
5
25
34
22
12
6
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-route53/gen/Network/AWS/Route53/UpdateHostedZoneComment.hs
mpl-2.0
4,422
0
9
925
515
310
205
64
1
{-# LANGUAGE DeriveFunctor #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Types -- Copyright : (c) David Himmelstrup 2005 -- Duncan Coutts 2011 -- License : BSD-like -- -- Maintainer : cabal-devel@haskell.org -- S...
Helkafen/cabal
cabal-install/Distribution/Client/Types.hs
bsd-3-clause
10,370
0
11
2,117
1,442
849
593
139
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} -- | This module contains functions for working with -- 'FFI.ClangString's, which represent strings that are part of the -- libclang AST or managed by its API. -- -- This module is intended to be imported qualified. module Clang.String ( -- * Conversio...
deech/LibClang
src/Clang/String.hs
bsd-3-clause
1,899
0
9
295
266
155
111
23
1
{-# LANGUAGE CPP, ConstraintKinds, DeriveDataTypeable, FlexibleContexts, MultiWayIf, NamedFieldPuns, OverloadedStrings, PackageImports, RankNTypes, RecordWildCards, ScopedTypeVariables, TemplateHaskell, TupleSections #-} -- | Run commands in Docker containers module Stack.Docker (cleanup ...
Heather/stack
src/Stack/Docker.hs
bsd-3-clause
48,938
175
28
15,653
9,677
5,156
4,521
959
22
{-# LANGUAGE CPP #-} {-# OPTIONS_HADDOCK hide #-} module Distribution.Compat.CopyFile ( copyFile, copyFileChanged, filesEqual, copyOrdinaryFile, copyExecutableFile, setFileOrdinary, setFileExecutable, setDirOrdinary, ) where import Distribution.Compat.Exception import Distribution.Compat.Internal.Tem...
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Distribution/Compat/CopyFile.hs
bsd-3-clause
3,670
0
16
890
837
446
391
80
2
{-# LANGUAGE TypeFamilies, GADTs, EmptyDataDecls, FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} module SlowComp where import Control.Monad ------------------------------------------------------------------------------- -- Usual Peano integers. class NatInt a where natInt :: a -> Int data D0 n = D...
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/perf/compiler/T5030.hs
bsd-3-clause
6,213
0
11
1,601
2,569
1,333
1,236
-1
-1
{-# LANGUAGE PartialTypeSignatures #-} {-# LANGUAGE MonomorphismRestriction #-} module Defaulting2MROn where bravo :: _ => _ bravo = 3
siddhanathan/ghc
testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.hs
bsd-3-clause
136
0
6
20
21
13
8
5
1
{-# LANGUAGE MultiParamTypeClasses #-} module Main where class R where f :: Int -> Int g :: a -> a instance R where f = (+1) g = id main = print (g (f 0))
urbanslug/ghc
testsuite/tests/typecheck/should_run/TcNullaryTC.hs
bsd-3-clause
167
0
9
47
70
39
31
9
1
module C where import A import B c :: String c = [a, b]
urbanslug/ghc
testsuite/tests/driver/dynamicToo/dynamicToo004/pkg2/C.hs
bsd-3-clause
60
0
5
18
26
17
9
5
1
{-# LANGUAGE ForeignFunctionInterface #-} -- !!! returning a Bool from a foreign export confused GHCi 6.0.1. import Foreign foreign import ccall "wrapper" mkFoo :: (Int -> IO Bool) -> IO (FunPtr (Int -> IO Bool)) foo :: Int -> IO Bool foo x = return (x == 42) foreign import ccall "dynamic" call_foo :: FunPtr ...
ghc-android/ghc
testsuite/tests/ffi/should_run/ffi011.hs
bsd-3-clause
455
0
12
101
156
77
79
12
1
{-# LANGUAGE OverloadedStrings #-} module Text.Regex.Fuzzy.Gen ( Regex, mkRegex, tryMatch ) where import Control.Applicative import Data.Attoparsec.Text import Data.Text (Text) import qualified Data.Text as T import Text.Regex.Fuzzy.AST import Text.Regex.Fuzzy.Simpl import Text.Regex.Fuzzy.Dis...
pxqr/regex-fuzzy
src/Text/Regex/Fuzzy/Gen.hs
mit
2,627
0
12
694
970
483
487
63
3
-- | -- -- Module : DecisionTrees -- License : MIT -- Stability : dev module DecisionTrees ( Decision(..) , DecisionTree , listChildren , decision2Tree , buildDecisionTree , buildDecisionTreeIterative , classifyWithDecisionTree ) where import Data.Tree import Data.Map (Map) import Data.Set (Set...
fehu/min-dat--decision-trees
src/DecisionTrees.hs
mit
6,688
0
16
2,183
1,430
763
667
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE CPP #-} module CommandArgs ( HDevTools(..) , loadHDevTools ) where import System.Console.CmdArgs.Implicit import System.Environment (getProgName) import System.Info (arch, os) import qualified Config #ifdef CABAL import Data.Version (showVersion) import Pat...
schell/hdevtools
src/CommandArgs.hs
mit
6,634
0
11
2,146
1,701
946
755
170
1
module Y2017.M08.D04.Solution where import Control.Applicative ((<|>)) import Data.Maybe (fromMaybe) -- below import available via 1HaskellADay git repository import Y2017.M08.D01.Exercise {-- Yesterday we looked at a rot13 cypher, but that was unsatifactory for a couple of reasons: 1. it rotted down low on the 13...
geophf/1HaskellADay
exercises/HAD/Y2017/M08/D04/Solution.hs
mit
2,649
0
13
476
255
146
109
18
1
{-| Module : Web.Facebook.Messenger.Types.Callbacks Copyright : (c) Felix Paulusma, 2016 License : MIT Maintainer : felix.paulusma@gmail.com Stability : semi-experimental Callbacks received from Facebook's Messenger API Webhooks -} module Web.Facebook.Messenger.Types.Callbacks ( -- * Callbacks Ca...
Vlix/facebookmessenger
src/Web/Facebook/Messenger/Types/Callbacks.hs
mit
3,152
0
22
784
566
325
241
51
0
{-# LANGUAGE CPP #-} module GHCJS.DOM.HTMLAllCollection ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.HTMLAllCollection #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSF...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/HTMLAllCollection.hs
mit
364
0
5
33
33
26
7
4
0
module Hickory.Math.VectorMatrix where import Hickory.Math.Matrix import Hickory.Math.Vector import Linear (V2(..), V3(..), V4(..), lerp, (^/), _xyz, _w, _z, (!*), inv44) import Foreign.Ptr import Foreign.C.Types import Foreign.Marshal.Utils import Control.Lens v3rotate :: V3 Scalar -> V3 Scalar -> Scalar -> V3 Scal...
asivitz/Hickory
Hickory/Math/VectorMatrix.hs
mit
1,929
0
16
509
786
412
374
35
1
module Helpers.RandID ( randID ) where import System.Random import Data.Text (Text, pack) idLen :: Int idLen = 24 symbols :: String symbols = ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] randID :: IO Text randID = do ind <- sequence $ replicate idLen $ randomRIO (0, length symbols - 1) return $ pack $ map...
cuklev/huseless-pastebin
src/Helpers/RandID.hs
mit
338
0
12
76
139
76
63
12
1
module Y2018.M07.D03.Solution where {-- Yesterday, we translated JSON that was a mapping of String -> String to a Codex that was a mapping Vertex -> Relations where Relations was Map Vertex (Vertex, Strength) and we learned that the keys of the relations were really just indices of the arrayed (Vertex,Strength) pairi...
geophf/1HaskellADay
exercises/HAD/Y2018/M07/D03/Solution.hs
mit
2,565
0
12
481
361
205
156
23
1
import Test.Framework.Providers.API import Test.Framework.Providers.HUnit import Test.Framework.Runners.Console import Test.HUnit main = defaultMain $ [testGroup "Main" tests] tests = [ testCase "a passing test!" $ 5 @?= 5 ,testCase "a failing test!" $ 5 @?= 6 ]
joshcough/HaskellTestingDemo
UnitTestsMain.hs
mit
268
0
8
40
77
44
33
8
1
{-# LANGUAGE TemplateHaskell #-} {-| Implementation of the Ganeti config objects. Some object fields are not implemented yet, and as such they are commented out below. -} {- Copyright (C) 2011, 2012, 2013 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GN...
badp/ganeti
src/Ganeti/Objects.hs
gpl-2.0
25,909
0
16
6,784
5,583
3,193
2,390
534
17
-- -- Copyright (c) 2013 Bonelli Nicola <bonelli@antifork.org> -- -- 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. --...
beni55/cgrep
src/CGrep/Strategy/Levenshtein.hs
gpl-2.0
1,966
0
17
403
342
186
156
27
1
{-# OPTIONS -w -O0 #-} {- | Module : CoCASL/ATC_CoCASL.der.hs Description : generated Typeable, ShATermConvertible instances Copyright : (c) DFKI Bremen 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-portable(overlapp...
nevrenato/Hets_Fork
CoCASL/ATC_CoCASL.der.hs
gpl-2.0
2,221
0
5
257
101
72
29
14
0
module Zepto.Variables where import Control.Monad.Except import Data.IORef import qualified Data.Map import Zepto.Types isObject :: LispVal -> Bool isObject (List _) = True isObject (DottedList _ _) = True isObject (SimpleVal (String _)) = True isObject (Vector _) = True isObject (Pointer _ _) = True isObject _ = Fal...
zepto-lang/zepto
src/Zepto/Variables.hs
gpl-2.0
9,858
0
25
2,832
2,933
1,404
1,529
190
7
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid 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 Lice...
karamellpelle/grid
designer/source/Game/LevelPuzzleMode/Helpers/PlayerPath.hs
gpl-3.0
3,055
0
14
726
706
362
344
58
2
module AmbigRes where import ShrdliteGrammar import HelpFunctions import Data.Maybe import Data.Char -- The data types needed for modelling an ambiguity data AmbType = Source | Dest deriving (Show, Eq, Read) data Ambiguity = Ambiguity AmbType Id [Id] deriving (Show) --------------------------------------------------...
alexandersjosten/AI-shrdlite
haskell/AmbigRes.hs
gpl-3.0
4,473
0
14
1,160
1,279
664
615
81
4
module Handler.SearchSpec (spec) where import TestImport spec :: Spec spec = withApp $ do describe "getSearchR" $ do error "Spec not implemented: getSearchR"
ackao/APRICoT
web/conference-management-system/test/Handler/SearchSpec.hs
gpl-3.0
174
0
11
39
44
23
21
6
1
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid 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 Lice...
karamellpelle/grid
source/Game/LevelPuzzle/Output/Fancy.hs
gpl-3.0
5,402
0
16
1,236
1,115
581
534
100
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dns/gen/Network/Google/Resource/DNS/Changes/List.hs
mpl-2.0
5,049
0
19
1,271
730
426
304
107
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.Analytics -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Pu...
rueshyna/gogol
gogol-analytics/gen/Network/Google/Analytics.hs
mpl-2.0
43,810
0
87
9,229
4,917
3,547
1,370
1,117
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/InitiateJob.hs
mpl-2.0
10,828
0
11
2,085
763
500
263
76
1
-- Copyright 2010 Leonid Movshovich <event.riga@gmail.com> -- This file is part of SPIM. -- SPIM is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your opti...
event/spim
SpimCommon.hs
agpl-3.0
10,891
0
22
2,814
2,933
1,507
1,426
182
5
-- Copyright (c) 2006, Wouter Swierstra -- All rights reserved. -- This code is released under the BSD license -- included in this distribution -- Imports import IO import Maybe import List import Graphics.UI.Gtk import Data.IORef import Control.Monad -- Players, boards and some useful pure functions data Player ...
thiagoarrais/gtk2hs
demo/noughty/Noughty.hs
lgpl-2.1
5,649
4
16
1,362
1,896
928
968
144
2
module Main where import Lib main :: IO () main = putStrLn "Hello"
thewoolleyman/haskellbook
16/10/maor/app/Main.hs
unlicense
69
0
6
15
25
14
11
4
1
module Main where import Control.Monad (liftM) import Data.Array import Data.List (groupBy,nub,sort,sortBy) import Data.Maybe import qualified Data.Map as M import qualified Data.Set as S import System.Environment (getArgs) import Text.ParserCombinators.Parsec import Text.Printf import Sentlex import WordNet import qu...
travisbrown/sentlex
src/Main.hs
apache-2.0
4,254
0
14
963
803
431
372
44
2
{-# LANGUAGE OverloadedStrings #-} module Common where import qualified Data.ByteString as B import qualified Data.Map.Strict as M import qualified Data.Text as T import Data.Text.Encoding (decodeUtf8With) import Data.Text.Encoding.Error (lenientDecode) import Control.Monad (liftM) import Control.Monad.State (State,...
gamelost/pcgen-rules
src/Common.hs
apache-2.0
3,415
0
17
598
1,170
627
543
83
2
-- ProjectEuler.net/problem=1 -- @title: Multiples of 3 and 5 -- @description: If we list all the natural numbers below 10 that are multiples of 3 or 5, -- we get 3, 5, 6 and 9. The sum of these multiples is 23. -- Find the sum of all the multiples of 3 or 5 below 1000.
yuriyshapovalov/Prototypes
ProjectEuler/haskell/prob1.hs
apache-2.0
274
0
2
59
7
6
1
1
0
{-- Haskell complier is GHC (https://haskell.org/ghc/). If you want to test code, go https://www.jdoodle.com/execute-haskell-online. Copy and Ececute code --} -- input two lists, return one sorted list merge :: [Int] -> [Int] ->[Int] -- when first list is empty, return the second list directly merge [] x = x -- Decons...
ccqpein/Arithmetic-Exercises
Merge-Sort/MS.hs
apache-2.0
1,160
0
14
255
322
169
153
14
1
{- Copyright (c) 2008, Scott E. Dillard All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the...
sedillard/Vec
Data/Vec.hs
bsd-2-clause
5,550
0
4
878
46
34
12
5
0
:load ae_is_odd.hs isOdd 9 isOdd 10
wkoszek/haskell_edu
af_inc_odd.hs
bsd-2-clause
36
2
6
6
23
8
15
-1
-1
-- 49 import Euler(toDigitsBase) -- 10^p always has length p+1 countPowers0 p | n == 0 = 0 | otherwise = n + countPowers0 (p+1) where powLen x = length $ toDigitsBase 10 (x^p) n = length $ takeWhile (\x -> p == powLen x) [9,8..1] countPowers = countPowers0 1 main = putStrLn $ show $ countPowers
higgsd/euler
hs/63.hs
bsd-2-clause
320
0
12
81
136
70
66
8
1
module Network.WebSockets.Lite.Emulate ( runWSLite ) where import Data.ByteString (ByteString) import Prelude hiding (catch) import Control.Exception import Control.Monad.IO.Class import Data.Enumerator import Network.WebSockets.Lite runWSLite :: Enumerator ByteString IO () -> (ByteString -> IO ()) -> WSLite () -...
yihuang/websockets-lite
Network/WebSockets/Lite/Emulate.hs
bsd-3-clause
517
0
13
91
182
100
82
13
1
module Aws.Ddb.Config ( ServiceConfiguration, defaultConfiguration, debugConfiguration ) where import Aws.Core.Endpoint (AwsRegion, AwsService (..), regionEndpointUsEast) import Aws.Core.Protocol (Method (..), Protocol (..), awsMimeBS, ...
RayRacine/aws
Aws/Ddb/Config.hs
bsd-3-clause
1,049
0
7
225
205
122
83
26
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE MultiParamTypeClasses #-} ----------------------------------------------------------------------------- -- | -- Module : System.Console.Terminal....
lens/terminal
src/System/Console/Terminal/Color/Intense.hs
bsd-3-clause
1,168
0
8
144
150
95
55
23
0
{-# LANGUAGE BangPatterns #-} {- | This follows the <http://www.ccarh.org/courses/253/handout/smf/ standard MIDI file format>. We want to keep the code under BSD license but Haskell\'s MIDI package is licensed under GPL so we cannot use it here. -} module Sound.Midi ( Smf , readsmf , smfformat , smfn...
edom/sound
src/Sound/Midi.hs
bsd-3-clause
8,161
0
29
2,573
2,314
1,210
1,104
247
16
{-# LANGUAGE StandaloneDeriving #-} module Vis.GHC.SimpleSTGShow where import Vis.GHC.SimpleSTG import StgSyn import CoreSyn (AltCon(..)) import DataCon import Name import Literal import Type import PrimOp import ForeignCall import GHC.Show deriving instance Show PrimCall deriving instance Show ForeignCall deriving...
gergoerdi/sstg
src/Language/SSTG/GHC/SimpleSTGShow.hs
bsd-3-clause
1,221
1
11
279
392
207
185
31
0
{-# OPTIONS_GHC -fno-warn-orphans #-} module System.Exit.Util ( getErrno , resetErrno , getLastError , decodeExitCode , analyseExitCode , exitCodeToIOError , evalExitError , evalExitErrorNote ) where import System.Exit import Foreign.C.Error import System.IO import GHC.IO.Exception import Control.Dee...
jcristovao/process-simple
src/System/Exit/Util.hs
bsd-3-clause
5,463
0
13
1,426
1,257
632
625
96
4
module Control.Exception.Extra where import qualified Control.Exception as E -- | Returns a given computation ignoring an exception anyway :: a -> E.SomeException -> a anyway f _ = f -- | Tries to execute all the IO computations -- until one succeeds trySeq :: [IO ()] -> IO () trySeq [] = return () trySeq (x:xs)...
ivanperez-keera/clean-home
src/Control/Exception/Extra.hs
bsd-3-clause
355
0
9
69
114
62
52
7
1
{-# LANGUAGE DeriveDataTypeable #-} module Control.Distributed.Process.Global.Types ( LockName , LockId , LockRequesterId , ResolutionNotification(..) , ResolutionMethod(..) , NodeDownNotification(..) , ClusterOperation(..) , RegisterSelf(..) , NameEffectuate(..) , NameWhereis(..) , NameOperati...
jepst/distributed-process-global
src/Control/Distributed/Process/Global/Types.hs
bsd-3-clause
9,455
0
13
1,841
1,576
892
684
140
0
module HasOffers.API.Types where import Data.Text -------------------------------------------------------------------------------- data AccountNote = AccountNote { id :: Integer , type_ :: Text , account_id :: Integer , note :: String ...
kelecorix/api-hasoffers
src/HasOffers/API/Types.hs
bsd-3-clause
5,093
0
8
2,222
745
493
252
122
0
{-# LANGUAGE OverloadedStrings #-} module Network.HTTP.ECE ( ECEMethod (..) , KeyStore , newKeyStore , addKey , removeKey , getKey , Params , decodeEncr...
nymacro/http-ece
src/Network/HTTP/ECE.hs
bsd-3-clause
4,265
0
20
1,456
1,001
559
442
92
2
-- permutationgroups.hs module Math.PermutationGroups where import List (sort) import Math.MergeSort import Math.RedBlackTree import Array import Bits (setBit, testBit) import Math.RandomGenerator import Math.CombinatoricsGeneration (permutations) -- GROUP class Group a where identity :: Int -> a ...
nfjinjing/bench-euler
src/Math/PermutationGroups.hs
bsd-3-clause
5,126
16
16
1,299
2,014
1,070
944
-1
-1
module DSL where import Control.Applicative as Appl import Data.Char (isAlpha, isAlphaNum, isDigit, isSpace) import Data.Map as Map (Map, (!), fromList, lookup) import Data.List (partition) import Data.Foldable (fold) import Data.Maybe (isJust, fromMaybe) import Data.Monoid import Data.Set as Set (singleton, union, em...
jwbuurlage/category-theory-programmers
examples/parser/lisp_like_dsl.hs
mit
7,185
0
14
1,588
2,519
1,321
1,198
143
3
{-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTSyntax #-} {-# LANGUAG...
input-output-hk/pos-haskell-prototype
networking/src/Node/Internal.hs
mit
83,204
34
33
28,021
15,932
8,140
7,792
1,218
44
module Data.Wright.RGB.Model.LabGamut (labGamut) where import Data.Wright.Types (Model(..), Primary(..), Gamma(..)) import Data.Wright.CIE.Illuminant.D50 (d50) labGamut :: Model labGamut = d50 { gamma = undefined , red = Primary undefined undefined undefined , green = Primary undefined undefined undefined ,...
fmap-archive/wright
src/Data/Wright/RGB/Model/LabGamut.hs
mit
370
0
7
58
113
71
42
9
1
{-# 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 #-} -- ...
olorin/amazonka
amazonka-autoscaling/gen/Network/AWS/AutoScaling/PutNotificationConfiguration.hs
mpl-2.0
5,099
0
10
916
529
323
206
74
1
{-# LANGUAGE PartialTypeSignatures, NamedWildcards, DatatypeContexts #-} module WildcardInADTContext2 where data (Eq _a) => Foo a = Foo { getFoo :: a }
bitemyapp/ghc
testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.hs
bsd-3-clause
153
0
8
23
30
19
11
3
0
{-# LANGUAGE DeriveDataTypeable , TemplateHaskell , RecordWildCards , TypeFamilies , FlexibleInstances , MultiParamTypeClasses , FlexibleContexts #-} module Distribution.Server.Features.Distro.State where import Distribution.Package (PackageName) import qualified Distribution.Server.Features.Distro...
isomorphism/hackage2
Distribution/Server/Features/Distro/State.hs
bsd-3-clause
4,939
0
13
767
1,208
660
548
104
2
-- ----------------------------------------------------------------------------- -- ALEX TEMPLATE -- -- This code is in the PUBLIC DOMAIN; you may copy it freely and use -- it for any purpose whatsoever. -- ----------------------------------------------------------------------------- -- INTERNALS and main scanner engi...
sol/alex
templates/GenericTemplate.hs
bsd-3-clause
6,560
34
28
1,366
1,566
837
729
94
10