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
{-| Utilities related to randomized computations. -} {- Copyright (C) 2014 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any late...
ribag/ganeti-experiments
src/Ganeti/Utils/Random.hs
gpl-2.0
1,866
0
13
324
260
148
112
20
1
module DocGraph.Directory where import Control.Monad import Data.Tree import System.Directory import System.FilePath import DocGraph.Types import DocGraph.Util traverseDirectory :: FilePath -> IO DocGraph traverseDirectory path = unfoldTreeM dirContents path dirContents :: FilePath -> IO (Item, [FilePath]) dirConte...
wldmr/haskell-docgraph
src/DocGraph/Directory.hs
gpl-3.0
964
0
13
255
284
142
142
23
1
m (x, _, b) = (x, b)
hmemcpy/milewski-ctfp-pdf
src/content/1.5/code/haskell/snippet15.hs
gpl-3.0
20
0
6
6
24
14
10
1
1
module Hob.Command.FindText ( searchCommandHandler, searchNextCommandHandler, searchBackwardsCommandHandler, searchPreview, searchResetPreview, searchMode, ) where import Data.Monoid (mconcat) import Graphics.UI.Gtk import Hob.Context import Hob.Ui.Editor import...
svalaskevicius/hob
src/lib/Hob/Command/FindText.hs
gpl-3.0
1,673
0
11
295
356
191
165
39
1
-- | A simple module for testing the QQ / TH stuff. module FormalLanguage.CFG.Tests where import Data.Vector.Fusion.Stream.Monadic import Data.Array.Repa.Index import FormalLanguage.CFG.QQ import FormalLanguage.CFG.Grammar -- for testing purposes import Language.Haskell.TH import Language.Haskell.TH.Quote import ...
choener/FormalGrammars
FormalLanguage/CFG/Tests.hs
gpl-3.0
523
0
4
88
71
51
20
-1
-1
main :: IO () main = do putStr "Hello " putStr "World!"
hmemcpy/milewski-ctfp-pdf
src/content/3.5/code/haskell/snippet37.hs
gpl-3.0
65
0
7
21
28
12
16
4
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-clouderrorreporting/gen/Network/Google/Resource/CloudErrorReporting/Projects/Groups/Update.hs
mpl-2.0
5,087
0
16
1,143
778
455
323
111
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforDevice/List.hs
mpl-2.0
4,461
0
17
1,012
466
278
188
81
1
-- | Common handler functions. module Handler.Common where import Data.FileEmbed (embedFile) import Import -- These handlers embed files in the executable at compile time to avoid a -- runtime dependency, and for efficiency. getFaviconR :: Handler TypedContent getFaviconR = do cacheSeconds $ 60 * 60 * 24 * 30 -- cac...
Lasokki/omanet
Handler/Common.hs
agpl-3.0
613
0
11
141
113
58
55
10
1
module Digits(digits_list) where digits_list :: Integral x => x -> [x] digits_list 0 = [] digits_list x = digits_list d ++ [r] where (d,r) = quotRem x 10
orbitgray/ProjectEuler
haskell/common/Digits.hs
lgpl-3.0
159
0
7
33
75
40
35
5
1
{-# LANGUAGE TypeFamilies #-} module Math.Topology.KnotTh.Tangle.GaussCode ( toDTCode , fromDTCode , toGaussCode , fromGaussCode ) where import Control.Monad (foldM_, forM, forM_, liftM2, unless, when) import qualified Control.Monad.ST as ST import qualified Data.Array.ST as STArray import qualifie...
mishun/tangles
src/Math/Topology/KnotTh/Tangle/GaussCode.hs
lgpl-3.0
8,174
97
21
3,848
2,534
1,338
1,196
149
14
{- Run DMSS tests specified -} import Turtle import Data.List (intersperse) import Prelude hiding (concat) import Data.Text (concat) import Data.Foldable (traverse_) import System.Process (spawnCommand, waitForProcess) import Data.Text.Conversions (convertText) import Paths_DMSS ( version ) import Data.Version ( showV...
dmp1ce/DMSS
src-bin/dev.hs
unlicense
2,523
21
15
619
744
360
384
50
9
-- | -- Module : Numeric.MaxEnt.Train.Internal -- Copyright : (c) 2010 Daniël de Kok -- License : Apache 2 -- -- Maintainer : Daniël de Kok <me@danieldk.eu> -- Stability : experimental -- -- Non-public data structures for training maximum entropy models. module Numeric.MaxEnt.Train.Internal (FeatureMappi...
creswick/maxent-hs
Numeric/MaxEnt/Train/Internal.hs
apache-2.0
3,349
0
13
1,020
1,008
565
443
59
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Kubernetes.V1.EnvVarSource where import GHC.Generics import Kubernetes.V1.ObjectFieldSelector import qualified Data.Aeson -- | EnvVarSource re...
minhdoboi/deprecated-openshift-haskell-api
kubernetes/lib/Kubernetes/V1/EnvVarSource.hs
apache-2.0
628
0
8
88
81
50
31
14
0
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE CPP #-} module Laborantin.CLI (defaultMain) where import Control.Exception (finally) import Options.Applicative import Data.Time #if...
lucasdicioccio/laborantin-hs
Laborantin/CLI.hs
apache-2.0
23,606
2
20
6,176
6,991
3,605
3,386
493
9
{-# LANGUAGE DeriveGeneric, DeriveFunctor, RecordWildCards, QuasiQuotes, TemplateHaskell, MultiParamTypeClasses, FunctionalDependencies #-} module Network.Protocol.Minecraft.Packet where import Data.Binary import Data.Binary.Get import Data.Binary.Put import Data.ByteString (ByteString) import qualified Data.ByteStrin...
Xandaros/MinecraftCLI
src/Network/Protocol/Minecraft/Packet.hs
bsd-2-clause
4,756
0
8
1,075
157
93
64
18
0
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE DataKinds #-} module Propellor.PropAccum ( host , Props(..) , props , (&) , (&^) , (!) ) where import Propellor.Types import Propello...
ArchiveTeam/glowing-computing-machine
src/Propellor/PropAccum.hs
bsd-2-clause
2,192
45
11
415
578
326
252
51
1
module LearnParsers where import Text.Trifecta import Text.Parser.Combinators import Control.Applicative stop :: Parser a stop = unexpected "stop" one = char '1' one' = one >> stop oneEOF = one >> eof two = char '2' two' = two >> stop twoEOF :: Parser Char twoEOF = two <* eof -- type Parser a = String -> Maybe (...
peterbecich/haskell-programming-first-principles
src/LearnParsers.hs
bsd-3-clause
3,835
0
12
858
994
466
528
100
1
module Paths_data_eval ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName ) where import qualified Control.Exception as Exception import Data.Version (Version(..)) import System.Environment (getEnv) import Prelude catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a catchI...
headprogrammingczar/Data
data-eval/dist/build/autogen/Paths_data_eval.hs
bsd-3-clause
1,113
0
10
167
326
186
140
26
1
dupHead :: [a] -> [a] dupHead (x : xs) = x : x : xs dupHead _ = []
YoshikuniJujo/funpaala
samples/17_define_list/atPattern0.hs
bsd-3-clause
67
0
7
19
49
26
23
3
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} ...
zerobuzz/servant
servant/src/Servant/Utils/Enter.hs
bsd-3-clause
3,197
0
11
770
1,004
548
456
63
1
module SimpleAbstractor.Resolve ( resolve, doDecls, SymTab ) where import qualified Data.Map as Map import Data.Map (Map) import Data.Traversable import Control.Arrow import Data.List import Control.Monad as M import Data.EitherR import Control.Error.Util import SimpleAbstractor.AST import SimpleAbstr...
termite2/simple-abstractor
SimpleAbstractor/Resolve.hs
bsd-3-clause
3,200
0
14
755
1,338
693
645
71
4
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude, ExistentialQuantification #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Exception -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base...
jstolarek/ghc
libraries/base/Control/Exception.hs
bsd-3-clause
14,008
0
10
2,920
564
369
195
66
2
{-# LANGUAGE OverloadedStrings #-} module Network.PeyoTLS.HashSignAlgorithm (SignAlg(..), HashAlg(..)) where import Data.Word (Word8) import qualified Data.ByteString as BS import qualified Codec.Bytable.BigEndian as B import Codec.Bytable.BigEndian () data HashAlg = Sha1 | Sha224 | Sha256 | Sha384 | Sha512 | HARaw...
YoshikuniJujo/forest
subprojects/tls-analysis/server/src/Network/PeyoTLS/HashSignAlgorithm.hs
bsd-3-clause
1,168
2
13
238
445
242
203
34
0
module Day17.Test where import Day17 import Test.Hspec tests :: SpecWith () tests = do describe "Part1" $ do it "Test1" $ do part1 test1 `shouldBe` "DDRRRD" it "Test2" $ do part1 test2 `shouldBe` "DDUDRLRRUDRD" it "Test3" $ do part1 test3 `shouldBe` "DRURDRUDDLLDLUU...
z0isch/aoc2016
test/Day17/Test.hs
bsd-3-clause
643
0
17
192
226
105
121
23
1
module Proof( module Proof.Monad ,module Proof.Language ,module Proof.Derived ) where import Proof.Monad import Proof.Language import Proof.Derived
ulrikrasmussen/Proof
src/Proof.hs
bsd-3-clause
156
0
5
24
39
25
14
7
0
{-# LANGUAGE OverloadedStrings #-} module Parser (module Parser.Base, fetchAndParse) where import Parser.Base import qualified Data.Text as T import Control.Exception import System.Process (shell) import System.Process.Text (readCreateProcessWithExitCode) import System.Exit (ExitCode(..)) import qualified Parser.HTML...
ostronom/pokerstars-audit
src/Parser.hs
bsd-3-clause
1,094
0
13
186
365
194
171
26
2
{-# LANGUAGE OverloadedStrings #-} -- | User-facing messages module Local.Message where import Data.Monoid import Data.Text ( Text ) import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Data.CaseInsensitive as CI import Network.HTTP.Conduit import Network.HTTP.Types emptyQuery :...
kowey/customsearch
customsearch/Local/Message.hs
bsd-3-clause
1,303
0
13
282
318
174
144
31
2
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE FlexibleContexts #-} module MonadicRecursionScheme where import Control.Comonad (Comonad (..)) import Control.Comonad.Cofree (Cofree (..)) import...
cutsea110/aop
src/MonadicRecursionScheme.hs
bsd-3-clause
3,446
0
18
1,025
1,442
756
686
-1
-1
{-| Directory hash database. Respective files stored in a directory of the file system. * Persistence: /persistent/ * Algorithm: /undefined/ * Complexity: /undefined/ * Sequence: /undefined/ * Lock unit: /record (rwlock)/ -} module Database.KyotoCabinet.DB.Dir ( Dir , DirOptions (..) , defaul...
bitonic/kyotocabinet
Database/KyotoCabinet/DB/Dir.hs
bsd-3-clause
2,695
0
12
1,119
549
311
238
54
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE RecordWildCards #-} module Main (main) where import Control.Monad (when) import Data.Version (showVersion) import qualified Data.ByteString as S import System.Console.CmdArgs.Implicit import Paths_python_pickle (version) import Language.Python.Pickle main :: IO () ma...
noteed/python-pickle
bin/pickle.hs
bsd-3-clause
1,922
0
15
444
464
242
222
54
2
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-} module Data.Wavelets.Scaling where import Prelude hiding (length,replicate,map,maximum,minimum) -- import Data.Wavelets import Numeric.Statistics import Statistics.Function import Statistics.Sample import GHC.Generics import Data.Vector.Storable -- hiding (map) impor...
smurphy8/wavelets
src/Data/Wavelets/Scaling.hs
bsd-3-clause
3,709
0
10
860
872
485
387
59
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RankNTypes #-} --{-# LANGUAGE MultiParamTypeClasses #-} --{-# LANGUAGE TypeFamilies #-} -- TODO: Scrap names, just use int...
xicesky/sky-haskell-playground
src/Sky/Util/GraphMonad.hs
bsd-3-clause
5,715
0
15
1,503
1,634
860
774
99
2
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, GeneralizedNewtypeDeriving #-} module Data.Kontiki.MemLog ( Log , MemLog , runMemLog , IntMap.empty , IntMap.insert ) where import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Control.Mona...
NicolasT/kontiki
bin/Data/Kontiki/MemLog.hs
bsd-3-clause
975
0
12
297
277
157
120
28
1
module Web.TwitterStream.Types ( Auth(..) , Stream(..) , ParsedStatus(..) ) where import Web.Twitter.Types (Status(..)) data Auth = BasicAuth String String -- username, password data Stream = Sample | Firehose data ParsedStatus = Ok String Status | Error String | EOF
mariusae/hs-twitterstream
Web/TwitterStream/Types.hs
bsd-3-clause
279
0
6
50
86
55
31
8
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} -------------------------------------------------------------------- -- | -- Module : System.Hclip -- Copyright : (c) Jens Thomas -- License : BSD3 -- -- Maintainer: Jens Thomas <jetho@gmx.de> -- Stability : experimental -- Portability: n...
jetho/Hclip
System/Hclip.hs
bsd-3-clause
6,437
0
17
1,452
1,465
790
675
93
4
runLength [] = [] runLength (x:xs) = helper (x,1) xs where helper (prev, count) [] = [(prev, count)] helper (prev, count) (x:xs) | x == prev = helper (prev, count + 1) xs | otherwise = (prev, count) : helper (x, 1) xs runLength_foldr :: (Eq a, Integral b) => [a] -> [(a, b)...
binesiyu/ifl
examples/ch04/rle.hs
mit
491
0
10
167
293
159
134
11
2
import Control.Monad.State import Control.Monad.Reader {-- snippet Foo --} type Foo = StateT Int (State String) {-- /snippet Foo --} {-- snippet outerPut --} outerPut :: Int -> Foo () outerPut = put {-- /snippet outerPut --} {-- snippet innerPut --} innerPut :: String -> Foo () innerPut = lift . put {-- /snippet inn...
binesiyu/ifl
examples/ch18/StackStack.hs
mit
455
0
7
87
118
67
51
10
1
module HolLight.Sublogic where -- | sublogic data HolLightSL = Top deriving (Show, Eq, Ord)
nevrenato/Hets_Fork
HolLight/Sublogic.hs
gpl-2.0
94
0
6
16
29
17
12
2
0
module Syntax ( Syntax(..), Explicit(..) , RawExpr, PIdent(..) , Clause(..), Con(..), Field(..) , Import, Def(..), Tele(..) , Infix(..), Fixity(..) , Posn, Name(..), PName , nameToString, nameToInfix, nameToPrefix , module Syntax.Term ) where import Data.Void import Syntax.Term da...
bitemyapp/hoq
src/Syntax.hs
gpl-2.0
1,980
0
8
469
754
432
322
62
1
{-# LANGUAGE OverloadedStrings, CPP, ViewPatterns, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} {- Copyright (C) 2006-2015 John MacFarlane <jgm@berkeley.edu> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by t...
infotroph/pandoc
src/Text/Pandoc/Writers/HTML.hs
gpl-2.0
44,119
56
29
17,324
11,315
5,758
5,557
786
58
{-| The @diff@ command compares two diff. -} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Hledger.Cli.Commands.Diff ( diffmode ,diff ) where import Data.List.Extra ((\\), groupSortOn, nubBy, sortBy) import Data.Function (on) import Data.Ord (comparing) import Data.Maybe (fromJust) ...
adept/hledger
hledger/Hledger/Cli/Commands/Diff.hs
gpl-3.0
3,950
2
15
756
1,354
730
624
-1
-1
{- Copyright 2012-2015 Vidar Holen 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...
icyfork/shellcheck
ShellCheck/Parser.hs
gpl-3.0
76,334
0
23
20,636
19,502
9,309
10,193
-1
-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 #-} -- ...
fmapfmapfmap/amazonka
amazonka-codedeploy/gen/Network/AWS/CodeDeploy/ListOnPremisesInstances.hs
mpl-2.0
6,778
0
13
1,407
867
522
345
106
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-swf/gen/Network/AWS/SWF/Types.hs
mpl-2.0
387,246
0
107
81,909
44,068
25,298
18,770
-1
-1
module Counting ( Color(..), territories, territoryFor ) where import Data.Array.IArray ((!), Array) import qualified Data.Array.IArray as Array import Data.Maybe (catMaybes, mapMaybe) import Data.Set (Set) import qualified Data.Set as Set -- | A board is an efficient dense m...
pminten/xhaskell
go-counting/example.hs
mit
4,580
0
16
1,263
1,229
673
556
73
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} -- Module : Test.AWS.Data.List -- Copyright : (c) 2013-2015 Brendan Hay <brendan.g.hay@gmail.com> -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License...
kim/amazonka
core/test/Test/AWS/Data/List.hs
mpl-2.0
2,582
0
12
756
283
171
112
40
1
-- -- Copyright (c) 2014 Citrix Systems, Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This progra...
jean-edouard/manager
xenmgr/Main.hs
gpl-2.0
16,703
1
25
4,571
3,808
1,870
1,938
333
7
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnliftedFFITypes #-} module Main where import GHC.Exts foreign import ccall "add_all_int8" add_all_int8 :: Int8# -> Int8# -> Int8# -> Int8# -> Int8# -> Int8# -> Int8# -> Int8# -> Int8# -> Int8# -> Int8# mai...
sdiehl/ghc
testsuite/tests/ffi/should_run/PrimFFIInt8.hs
bsd-3-clause
687
0
15
229
207
106
101
24
1
----------------------------------------------------------------------------- -- -- Pretty-printing assembly language -- -- (c) The University of Glasgow 1993-2005 -- ----------------------------------------------------------------------------- module PprBase ( castFloatToWord8Array, castDoubleToWord8A...
mcschroeder/ghc
compiler/nativeGen/PprBase.hs
bsd-3-clause
3,700
0
13
826
829
418
411
77
7
{- (c) The GRASP Project, Glasgow University, 1994-1998 \section[TysWiredIn]{Wired-in knowledge about {\em non-primitive} types} -} {-# LANGUAGE CPP #-} -- | This module is about types that can be defined in Haskell, but which -- must be wired into the compiler nonetheless. C.f module TysPrim module TysWiredIn ( ...
siddhanathan/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
38,255
0
14
10,023
6,246
3,423
2,823
539
10
module B where import D b x = d x
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/ghci/prog003/B.hs
bsd-3-clause
36
0
5
12
18
10
8
3
1
module A033 where
siddhanathan/ghc
testsuite/tests/driver/A033.hs
bsd-3-clause
18
0
2
3
4
3
1
1
0
{-# htermination elemIndices :: (Eq a, Eq k) => (Either a k) -> [(Either a k)] -> [Int] #-} import List
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/List_elemIndices_11.hs
mit
104
0
3
21
5
3
2
1
0
{-# LANGUAGE OverloadedStrings #-} module Server.Routes ( routes , onError ) where import Control.Monad.Except (throwError) import Control.Monad.Trans.Class (lift) import Data.Text (Text) import Network.HTTP.Types (StdMethod (..)) import qualified Server.Controller as Cont import qualified Server.Error as Err import...
Jonplussed/url-text-histogram
src/Server/Routes.hs
mit
830
0
9
137
235
135
100
22
1
{-# htermination listToFM :: [((),b)] -> FiniteMap () b #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_listToFM_2.hs
mit
77
0
3
12
5
3
2
1
0
compress :: Eq a => [a] -> [a] compress (x:ys@(y:_)) | x == y = compress ys | otherwise = x : compress ys compress ys = ys
tamasgal/haskell_exercises
99questions/Problem08.hs
mit
134
0
10
39
85
42
43
5
1
-- | This file defines 'Plain', the base type used for the calculation trees. -- -- Author: Thorsten Rangwich. See file <../LICENSE> for details. {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} module Data.Plain ( -- * Base Data Types supported in Tree Plain(..), -- * Type Classes for Ba...
tnrangwi/grill
src/Data/Plain.hs
mit
3,148
0
11
796
442
248
194
48
2
module Philed.Control.Monad.Stream (Stream, run, delay, fix, toDepth, ofList, thenD, diff ,fixDiff, fixDiffBy, nubStream, nubStreamBy) where import Control.Applicative import Control.Monad ((>=>), liftM, liftM2, MonadPlus, mzero, mplus, join, msum) import Data.List hiding (inits,iterate) import Data....
Chattered/PhilEdCommon
Philed/Control/Monad/Stream.hs
mit
2,618
1
15
712
1,383
713
670
65
3
import System.Environment ( getArgs ) import Prelude hiding (readFile) import ReceivedSnapshots (Snapshot, readFile, printSnapshots) main = do [nodeId_string, filename] <- getArgs let nid = read $ nodeId_string snapshots <- readFile nid filename :: IO [Snapshot] printSnapshots snapshots
DanielAtSamraksh/checkReceivedSnapshots
printReceivedSnapshots.hs
mit
309
0
10
58
92
49
43
8
1
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.WebGLActiveInfo (getSize, getType, getName, WebGLActiveInfo(..), gTypeWebGLActiveInfo) where impor...
ghcjs/jsaddle-dom
src/JSDOM/Generated/WebGLActiveInfo.hs
mit
1,825
0
12
225
471
291
180
28
1
-------------------------------------------------------------------------------- -- Haskell bindings for the Monzo API -- -- Written by Michael B. Gale (michael.gale@cl.cam.ac.uk) -- --------------------------------------------------------------------------...
mbg/mondo
test/Monzo/Server.hs
mit
2,628
0
10
502
544
299
245
-1
-1
{- | Module : Xcode.FileType License : MIT Maintainer : shea@shealevy.com Stability : unstable Portability : portable An Xcode file type -} module Xcode.FileType ( FileType( .. ) ) where -- | An Xcode file type -- File types will be added as they are encountered data FileType = Text | M...
shlevy/xcode-types
src/Xcode/FileType.hs
mit
412
0
5
110
46
31
15
10
0
-- School of Haskell "Basics of Haskell" Chapter 1 -- https://www.schoolofhaskell.com/school/starting-with-haskell/basics-of-haskell/function-application -- Exercise 2 -- Make the code below compile: -- pyth' (a, b) = a * a + b * b -- main = print $ -- pyth' 3 * 2 pyth' -1 8 pyth' :: (Int, Int)-> Int pyth' (a, b...
chsm/code
hs/soh/basics/01-02.hs
mit
397
0
10
84
92
53
39
4
1
{-| Module: Flaw.Havok Description: Havok integration. License: MIT -} module Flaw.Havok ( Havok(..) , havokRun , havokForkOS , havokCreateVDB , havokStepVDB ) where import Control.Concurrent import Control.Monad import Foreign.Ptr import Flaw.FFI.COM import Flaw.FFI.Win32 import qualified Flaw.Havok.FFI as FF...
quyse/flaw-havok
Flaw/Havok.hs
mit
1,222
6
12
206
409
204
205
38
2
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} module Test.KMeans ( tests ) where import Control.Monad import Data.Int (Int32) import Data.List import qualified Data.Matrix.Unboxed as MU import Data.Maybe import qualifie...
kaizhang/clustering
tests/Test/KMeans.hs
mit
2,079
0
16
642
565
307
258
47
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-vpcconfig.html module Stratosphere.ResourceProperties.LambdaFunctionVpcConfig where import S...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/LambdaFunctionVpcConfig.hs
mit
2,077
0
13
220
265
151
114
29
1
import Data.Monoid import qualified Data.Foldable as F data Tree a = Empty | Node a (Tree a) (Tree a) deriving (Show, Read, Eq) newtype InOrderTree a = InOrderTree { getInOrderTree :: Tree a } newtype PreOrderTree a = PreOrderTree { getPreOrderTree :: Tree a } newtype PostOrderTree a = PostOrderTree { getPostOrderTre...
afronski/playground-fp
books/learn-you-a-haskell-for-great-good/functors-applicative-functors-and-monoids/foldable.hs
mit
2,387
0
11
1,051
776
408
368
54
1
----------------------------------------------------------------------------- -- | -- Module : DSP.Multirate.Halfband -- Copyright : (c) Matthew Donadio 2003 -- License : GPL -- -- Maintainer : m.p.donadio@ieee.org -- Stability : experimental -- Portability : portable -- -- Halfband interpolators an...
tolysz/dsp
DSP/Multirate/Halfband.hs
gpl-2.0
1,378
0
11
357
428
242
186
23
1
module Macro.Tuple where import Types import Macro.Math import Macro.Text -- * Tuples -- | 2-tuple tuple :: Note -> Note -> Note tuple a b = pars $ commaSeparated [a, b] -- | 3-tuple triple :: Note -> Note -> Note -> Note triple a b c = pars $ commaSeparated [a, b, c] -- | 4-tuple qu...
NorfairKing/the-notes
src/Macro/Tuple.hs
gpl-2.0
1,126
0
11
290
473
259
214
22
1
{-# LANGUAGE DeriveDataTypeable, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses #-} module NFA.Equiv.Challenger where -- $Id$ import Autolib.NFA.Type import Autolib.Exp.Inter import Autolib.Exp.Env import NFA.Equiv.Core import NFA.Equiv.Conf hiding ( alphabet ) import NFA.Equiv.Generate import Auto...
Erdwolf/autotool-bonn
src/NFA/Equiv/Challenger.hs
gpl-2.0
2,472
17
17
730
812
435
377
66
1
-- Test the arbitrated bus with processes that look like the cache controllers. module T where import Data.Maybe ( isJust ) import System.Mem ( performGC ) import Broadcast import ADHOC hiding ( tt ) import ADHOC.NonDet import ADHOC.Control.Kesterel import ADHOC.ModelChecker.CTL as CTL import ADHOC.ModelChecker.Cou...
peteg/ADHOC
Apps/Cache/Tests/021_more_cache_like.hs
gpl-2.0
3,320
0
26
737
1,045
564
481
57
1
module System.Environment.XDG.RecentFiles where
felixsch/xdg
src/System/Environment/XDG/RecentFiles.hs
gpl-3.0
48
0
3
3
8
6
2
1
0
------------------------------------------------------------------------------- -- | -- Module : OpenSandbox.Time -- Copyright : (c) 2016 Michael Carpenter -- License : GPL3 -- Maintainer : Michael Carpenter <oldmanmike.dev@gmail.com> -- Stability : experimental -- Portability : portable -- --------...
oldmanmike/opensandbox
src/OpenSandbox/Time.hs
gpl-3.0
1,056
0
13
166
231
126
105
20
1
module Lambda.Read where import Text.Parsec import Lambda.AST -- read :: String -> Expression read ts = case parse parse_ "" ts of Left _ -> Symbol '\0' Right e -> e parse_ :: Parsec String () Expression parse_ = parseSymbol_ <|> parseAbstraction_ <|> parseEvaluation_ parseSymbol_ :: Parsec...
asakeron/alonzo
src/Lambda/Read.hs
gpl-3.0
765
0
9
166
261
128
133
25
2
module HTCF.PosParser.ParserInterface where import Control.Arrow.ArrowList import Text.XML.HXT.DOM.Interface import Text.XML.HXT.Arrow.XmlArrow import qualified HTCF.PosParser.XmlParsec as XP parseXmlDoc :: ArrowXml a => a (String, String) XmlTree parseXmlDoc = arr...
lueck/htcf
src/HTCF/PosParser/ParserInterface.hs
gpl-3.0
579
0
7
201
125
71
54
11
1
{-# LANGUAGE StandaloneDeriving, TupleSections #-} module Terminal where import Graphics.UI.Gtk import System.Posix.Pty import System.Process import Control.Applicative import Data.ByteString.Char8 (pack, ByteString) import System.Glib.UTFString import Data.Maybe (catMaybes) import Data.Char (toLower) import Debug.Tra...
pscollins/Termonoid
src/Terminal.hs
gpl-3.0
5,539
0
12
1,448
1,514
784
730
112
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/List.hs
mpl-2.0
11,554
0
31
3,460
1,908
1,085
823
266
1
module Main (main) where import Graphics.UI.Gtk import Control.Monad.IO.Class (liftIO) main :: IO () main = do initGUI -- Create a new window window <- windowNew -- Here we connect the "destroy" event to a signal handler. on window objectDestroy mainQuit -- Sets the border width of the window. set wi...
juhp/gtk2hs
gtk/demo/overlay/Overlay.hs
lgpl-3.0
2,028
0
11
426
339
166
173
30
1
{- Copyright (C) 2014 Braden Walters This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the...
meoblast001/3d-mesh-file-kit
src/Data/Mesh3D/MD2.hs
lgpl-3.0
13,480
0
18
3,277
4,193
2,438
1,755
295
3
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, TypeOperators, ScopedTypeVariables #-} module Life.Engine.Acc where import Data.Array.Accelerate as A import Data.Array.Accelerate.CUDA import Life.Types type Board = LifeBoard Config (Acc (A.Array DIM2 Int)) instance Life Board where empty c@(sz, flag) = Lif...
ku-fpg/better-life
Life/Engine/Acc.hs
bsd-2-clause
2,253
0
19
1,002
866
449
417
-1
-1
module Database.Narc.Util where import Data.Maybe (fromJust, isJust) import Data.List as List ((\\), nub, intersperse, groupBy, sortBy, sort) -- -- List Utilities -- dom alist = map fst alist rng alist = map snd alist collate proj = groupBy (\x y -> proj x == proj y) . sortBy (\x y -> proj x `compar...
ezrakilty/narc
Database/Narc/Util.hs
bsd-2-clause
3,102
0
14
773
1,353
718
635
61
2
-- Uppgift 7 – Regering import Data.List import Lib testcases :: [([Int], Int)] testcases = [ ([3, 5, 8, 4, 2], 4) -- Förklaring: Regeringen måste ha minst 12 mandat för majoritet. De fyra möjliga regeringarna har: 3 + 5 + 4 mandat, 5 + 8 mandat, 8 + 4 mandat, 3 + 8 + 2 mandat , ([12, 66, 39, 37, 21, 31, 20, 5...
patrikja/progolymp
skolkval/2015/Uppgift7.hs
bsd-3-clause
4,057
5
13
1,069
1,035
565
470
58
4
{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, GeneralizedNewtypeDeriving #-} ------------------------------------------------------------------------------ -- | -- Module: Database.PostgreSQL.Simple.Types -- Copyright: (c) 2011 MailRank, Inc. -- (c) 2011-2012 Leon P Smith -- License: BSD3 -- ...
avieth/postgresql-simple
src/Database/PostgreSQL/Simple/Types.hs
bsd-3-clause
8,180
0
12
1,802
1,134
704
430
-1
-1
-- |Interface to CouchDB. module Database.CouchDB ( -- * Initialization CouchMonad , runCouchDB , runCouchDB' , runCouchDBURI -- * Explicit Connections , CouchConn() , runCouchDBWith , createCouchConn , createCouchConnFromURI , closeCouchConn -- * Databases , DB , db , isDBString ...
arjunguha/haskell-couchdb
src/Database/CouchDB.hs
bsd-3-clause
9,132
0
19
2,585
2,839
1,505
1,334
229
3
module Sexy.Classes.Monoid (Monoid(..), module X) where import Sexy.Classes.Nil as X import Sexy.Classes.Plus as X import Sexy.Classes.UnconsMay as X class (Nil a, Plus a) => Monoid a where concat :: (UnconsMay l) => l a -> a concat = foldr (+) nil
DanBurton/sexy
src/Sexy/Classes/Monoid.hs
bsd-3-clause
255
0
9
47
101
62
39
7
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. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. module Duckling.A...
rfranek/duckling
tests/Duckling/AmountOfMoney/FR/Tests.hs
bsd-3-clause
618
0
9
96
80
51
29
11
1
{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving, OverloadedStrings, TemplateHaskell, FlexibleContexts, TypeFamilies #-} module Storage where import Control.Monad.Reader (ask) import Control.Monad.State (get, put) import Data.Acid (Update, Query, makeAcidic) import Data....
StanislavKlenin/hoard
src/Storage.hs
bsd-3-clause
6,425
0
21
2,395
1,681
882
799
137
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} module Clicklac.API.User where import Data.Text (Text) import qualified Data.Text as T import Servant imp...
onurzdg/clicklac
src/Clicklac/API/User.hs
bsd-3-clause
2,782
0
22
630
730
387
343
73
2
module Simplex where import Data.Ratio import Data.List(unfoldr,foldl') import ListSet(union) data LinEx = LinEx Rational [(Int, Rational)] deriving Show data Instance = Instance LinEx [(Int, LinEx)] deriving Show zero = 0 % 1 one = 1 % 1 negOne = (-1) % 1 --LinEx manipulations mapSnd f (x,y) = (x, f y) coeff :...
cullina/Extractor
src/Simplex.hs
bsd-3-clause
3,069
0
15
790
1,609
879
730
83
3
{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes, ExistentialQuantification, NoImplicitPrelude #-} module Fold.Core where import Lib hiding (foldM) import Data.Strict.Tuple import Data.Strict.Drive import qualified Fold.Pure as Pure infixl 4 </>, />, </>> data Fold ...
effectfully/prefolds
src/Fold/Core.hs
bsd-3-clause
15,539
0
16
3,946
6,797
3,409
3,388
-1
-1
import Distribution.Simple -- import System.FilePath -- import Distribution.PackageDescription -- import Distribution.Simple.LocalBuildInfo -- import System main = defaultMain -- main = defaultMainWithHooks hooks -- where hooks = simpleUserHooks { runTests = runTests' } -- runTests' :: Args -> Bool -> PackageDesc...
dbueno/funsat
etc/bitset/Setup.hs
bsd-3-clause
469
0
4
75
20
15
5
2
1
{-# LANGUAGE CPP #-} {-# LANGUAGE ForeignFunctionInterface #-} {-# OPTIONS_GHC -fno-warn-missing-import-lists #-} {-# OPTIONS_GHC -fno-warn-implicit-prelude #-} module Paths_ChatServer ( version, getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import ...
mcdonndi/ChatServer
dist/build/ChatServer/autogen/Paths_ChatServer.hs
bsd-3-clause
3,611
0
21
792
917
486
431
77
5
{------------------------------------------------------------------------------- Distributional Memory (c) 2013 Jan Snajder <jan.snajder@fer.hr> -------------------------------------------------------------------------------} module DSem.DMemory where import qualified IdMap import qualified Data.ByteString.UTF8 ...
jsnajder/dsem
src/DSem/DMemory.hs
bsd-3-clause
3,516
0
12
634
1,441
832
609
52
2
-- | Exports a datastructure for the top-level hakyll configuration -- module Hakyll.Core.Configuration ( HakyllConfiguration (..) , shouldIgnoreFile , defaultHakyllConfiguration ) where import System.FilePath (takeFileName) import Data.List (isPrefixOf, isSuffixOf) data HakyllConfiguration = HakyllCo...
sol/hakyll
src/Hakyll/Core/Configuration.hs
bsd-3-clause
2,362
0
10
638
289
181
108
30
1
{-# language CPP #-} -- No documentation found for Chapter "Promoted_From_VK_KHR_descriptor_update_template" module Vulkan.Core11.Promoted_From_VK_KHR_descriptor_update_template ( createDescriptorUpdateTemplate , withDescriptorUpdateTemplate ...
expipiplus1/vulkan
src/Vulkan/Core11/Promoted_From_VK_KHR_descriptor_update_template.hs
bsd-3-clause
38,209
0
18
8,200
4,627
2,737
1,890
-1
-1
module Dominion.Policy.MDP where import Debug.Trace import Dominion.Cards import Dominion.Policy.Simple import Dominion.Rules import Engine.Monad ---------------------------------------- mdp :: Policy mdp = defPolicy { policyName = "mdp" -- , policyBuy = \gs -> trace ("valid buys: "++show (validBuys gs)...
mikeizbicki/dominion
src/Dominion/Policy/MDP.hs
bsd-3-clause
1,058
0
12
330
238
124
114
27
2
module Language.TRM ( module Language.TRM.Base , module Language.TRM.Programs ) where import Language.TRM.Base import Language.TRM.Programs import Prelude hiding (compare)
acfoltzer/text-register-machine
Language/TRM.hs
bsd-3-clause
183
0
5
29
43
29
14
6
0
{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE PatternSynonyms #-}...
mpickering/ghc-exactprint
src/Language/Haskell/GHC/ExactPrint/Annotate.hs
bsd-3-clause
97,368
9
21
23,215
21,924
10,457
11,467
1,605
15
import Happstack.Lite import Happstack.Server (Request(..), askRq) import Network.Anarchy import Network.Anarchy.Client import Network.Anarchy.Server import System.Console.GetOpt import System.Environment import Data.String.Utils data Flag = Port Int | Bootstrap String options :: [OptDescr Flag] options = [ Option...
davidhinkes/anarchy
src/Main.hs
bsd-3-clause
1,097
0
14
220
425
221
204
30
2