code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveTraversable #-} module Jade.Decode.Types where import GHC.Generics import qualified Data.Vector as V import qualified Data.Map as DM import qualified Data.List as DL import qualified Data.ByteString as ...
drhodes/jade2hdl
jade-decode/src/Jade/Decode/Types.hs
bsd-3-clause
9,368
0
11
3,219
2,637
1,479
1,158
186
0
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE PolyKinds #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Se...
zerobuzz/servant
servant/test/Servant/API/ContentTypesSpec.hs
bsd-3-clause
9,237
14
27
2,905
2,265
1,181
1,084
152
2
module Handler.ProjectShowCommit where import Import import Data.Git import Data.Git.Diff import Data.Git.Storage import Data.Git.Ref import Data.Git.Repository import Data.Git.Types import Data.List as L (head, tail) import Data.List.Split as L (splitOn) import Data.Text as T (pack,unpack) import Data.ByteString.Cha...
NicolasDP/hitweb
Handler/ProjectShowCommit.hs
bsd-3-clause
1,909
0
26
584
518
269
249
-1
-1
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[RnSource]{Main pass of renamer} -} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE CPP #-} module RnTypes ( -- Type related stuff rnHsType, rnLHsType, rnLHsTypes, rnContext, rnHsKind, rnLHsKind, rnHsSigType, rnHsW...
vTurbine/ghc
compiler/rename/RnTypes.hs
bsd-3-clause
70,339
1
23
21,427
16,832
8,595
8,237
1,074
23
-------------------------------------------------------------------------------- -- Copyright ยฉ 2011 National Institute of Aerospace / Galois, Inc. -------------------------------------------------------------------------------- -- | Main Copilot language export file. {-# LANGUAGE Trustworthy #-} module Copilot.Lang...
leepike/copilot-language
src/Copilot/Language.hs
bsd-3-clause
2,137
0
8
224
375
256
119
50
1
-- | Pitch class theory (also known as Musical Set Theory). module Music.Pitch.Class where -- TODO import Music.Prelude -- import TypeUnary.Nat import Data.Modular import Data.Set (Set) import qualified Data.Set as Set import qualified Data.List as List -- newtype Modulo type PitchClass = Semitones `Mod` 12 type ...
music-suite/music-pitch
src/Music/Pitch/Class.hs
bsd-3-clause
906
0
10
158
236
140
96
-1
-1
module PBIL where import qualified Data.Sequence as S import Data.Function import Data.Random import qualified Data.Traversable as T import qualified Data.Foldable as F import Control.Applicative import UtilsRandom import Utils import Types {- Population Based Incremental Learning -} genInd :: (Monad m, T.Travers...
nsmryan/Misc
src/PBIL.hs
bsd-3-clause
2,173
0
14
476
900
465
435
56
2
module Servant.Foreign.Inflections ( concatCase , snakeCase , camelCase -- lenses , concatCaseL , snakeCaseL , camelCaseL ) where import Control.Lens hiding (cons) import qualified Data.Char as C import Data.Monoid import Data.Text hiding (map) import Prelude ...
zerobuzz/servant
servant-foreign/src/Servant/Foreign/Inflections.hs
bsd-3-clause
1,316
0
11
282
303
169
134
29
3
{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} module Update where import Control.Monad import Data.Char import Database.Esqueleto import qualified Database.Persist as P import Database.Persist.Sqlite (runSqlite) import D...
nrolland/persistentBHStyle
src/Update.hs
bsd-3-clause
1,654
0
19
462
400
210
190
32
1
-- TODO add more langs module Language.LaTeX.Builder.Babel (Lang, BabelOpt ,useBabel ,langName ,otherlanguage -- langs ,francais ,french -- last resort ,customLang ,customBabelOpt ,pkg ) where import Data.String import Language.LaTeX.Types import qualified Language.LaTeX.Builder.Int...
np/hlatex
Language/LaTeX/Builder/Babel.hs
bsd-3-clause
1,069
0
12
217
278
162
116
30
1
{-# LANGUAGE ViewPatterns, TupleSections, ScopedTypeVariables, DeriveDataTypeable, ForeignFunctionInterface, GADTs #-} module Output.Names(writeNames, searchNames) where import Data.List.Extra import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Unsafe as BS import qualified Data.Vector.Stora...
ndmitchell/hoogle
src/Output/Names.hs
bsd-3-clause
2,641
38
13
555
768
416
352
47
3
{-# LANGUAGE ForeignFunctionInterface, CPP #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.Internal.GetProcAddress -- Copyright : (c) Sven Panne 2009 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : sven....
Laar/OpenGLRawgen
BuildSources/GetProcAddress.hs
bsd-3-clause
1,852
0
10
270
199
116
83
15
1
module Module2.Task8 where -- system part ip = show a ++ show b ++ show c ++ show d -- solution part a = 12 b = 7.22 c = 4.12 d = 0.12
dstarcev/stepic-haskell
src/Module2/Task8.hs
bsd-3-clause
137
0
8
36
57
31
26
6
1
{- | Module : $Header$ Description : Describes the functions used to load and write CSV files Copyright : None License : None Maintainer : tydax@protonmail.ch Stability : unstable The $Header$ module describes the different functions used to load the database files under the CSV fo...
Tydax/ou-sont-les-femmes
src/CSVPlayer.hs
bsd-3-clause
3,677
0
16
735
736
392
344
63
3
{-# LANGUAGE ForeignFunctionInterface #-} {-| Module : Numeric.ER.Real.Base.MachineDouble Description : enabling Double's as interval endpoints Copyright : (c) Michal Konecny License : BSD3 Maintainer : mikkonecny@gmail.com Stability : experimental Portability : non-por...
michalkonecny/polypaver
src/Numeric/ER/Real/Base/MachineDouble.hs
bsd-3-clause
3,069
0
13
847
573
295
278
65
2
{-| Module : Idris.Parser Description : Idris' parser. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE GeneralizedNewtypeDeriving, ConstraintKinds, PatternGuards #-} {-# OPTIONS_GHC -O0 #-} module Idris.Parser(module Idris.Parser, module Idris.Parser.Expr, ...
enolan/Idris-dev
src/Idris/Parser.hs
bsd-3-clause
72,918
483
26
30,188
15,231
8,304
6,927
1,257
27
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} module SpoilyBot ( startApp ) where import SpoilyBot.Config import Control.Monad.IO.Class (liftIO) import Data.Text (Text, append, pack) import Network.HTTP.Client (newManager) import Network.HTTP.Client.TLS (tlsManagerSettings) import Network....
kirikaza/spoily_bot
src/SpoilyBot.hs
bsd-3-clause
1,150
0
14
204
378
209
169
31
2
{-# language PatternSignatures #-} module Main where import Wurf import Spieler import Bank import Network.Wai.Handler.Warp import qualified Network.Wai.Frontend.MonadCGI import Network.HTTP.Types (statusOK) import Network.Wai (responseLBS) import Network.CGI import Network.XmlRpc.Server import Network.XmlRpc.Clie...
jwaldmann/mex
src/Client2.hs
gpl-3.0
3,644
1
15
1,137
1,250
650
600
99
3
{-#LANGUAGE GADTs, TypeOperators, ScopedTypeVariables, ExplicitForAll, ImpredicativeTypes, MultiParamTypeClasses, FlexibleContexts, PatternSynonyms #-} module Carnap.Core.Unification.FirstOrder (founify, foUnifySys) where import Carnap.Core.Data.Classes import Carnap.Core.Unification.Unification (Left x) .<. f = Lef...
opentower/carnap
Carnap/src/Carnap/Core/Unification/FirstOrder.hs
gpl-3.0
1,341
0
11
351
523
259
264
24
2
module Foo where data Foo2 a = <resolved>Foo a | Bar a deriving (Show)
carymrobbins/intellij-haskforce
tests/gold/resolve/Data00001/Foo.hs
apache-2.0
72
4
7
15
34
19
15
-1
-1
module Card (module X, searchBy, exactSearchBy, MonadCardsDB, printCards, priority, processCard, Cards) where import Card.Parser as X import Card.Type as X import Card.Json as X import Data.Char import Data.List import Control.Monad.Trans import Control.Monad.Ether.Implicit import qualified Data.Map as Map import qual...
hithroc/hsvkbot
src/Card.hs
bsd-3-clause
2,860
0
20
677
1,288
693
595
59
2
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE Trustworthy #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Functor.Compose -- Copyright : (c) Ross Paterson 20...
rahulmutt/ghcvm
libraries/base/Data/Functor/Compose.hs
bsd-3-clause
3,670
0
12
776
1,126
610
516
59
0
{-# LANGUAGE GADTs, RankNTypes, FlexibleInstances, FlexibleContexts #-} ----------------------------------------------------------------------------- -- Copyright 2017, GRACeFUL project team. This file is distributed under the -- terms of the Apache License 2.0. For more information, see the files -- "LICENSE.txt" ...
GRACeFUL-project/GRACe
src/Types.hs
bsd-3-clause
12,361
51
26
4,180
4,932
2,543
2,389
-1
-1
{-# OPTIONS_GHC -fllvm -O2 #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ScopedTypeVariables #-} import Criterion import Criterion.Main import Prelude (IO, toRational) import qualified Data.Vector.Storable as VS import SubHask import SubHask.Algebra.HMatrix import HLearn.History import HLearn.History.DisplayMe...
iamkingmaker/HLearn
examples/criterion/historyOverhead.hs
bsd-3-clause
5,090
0
17
1,608
1,248
619
629
71
1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Data/Text/Internal/Lazy.hs" #-} {-# LANGUAGE BangPatterns, DeriveDataTypeable #-} {-# OPTIONS_HADDOCK not-home #-} -- | -- Module : Data.Text.Internal.Lazy -- Copyright : (c) 2009, 2010 Bryan O'Sullivan -- -- License : BSD-style -- Maintainer : bos@serpentine.com -- S...
phischu/fragnix
tests/packages/scotty/Data.Text.Internal.Lazy.hs
bsd-3-clause
3,790
0
12
854
715
399
316
68
2
{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable, StandaloneDeriving #-} {-# OPTIONS_GHC -fno-warn-orphans #-} ----------------------------------------------------------------------------- -- | -- Module : Haddock.Types -- Copyright : (c) Simon Marlow 2003-2006, -- ...
DavidAlphaFox/ghc
utils/haddock/haddock-api/src/Haddock/Types.hs
bsd-3-clause
18,462
0
13
4,700
3,382
1,940
1,442
345
5
{-# LANGUAGE PackageImports #-} module HLint () where import "hint" HLint.Default import "hint" HLint.Dollar
rubik/moodle-to-latex
HLint.hs
bsd-3-clause
111
0
4
16
20
14
6
4
0
{-# language FunctionalDependencies, ViewPatterns, ExistentialQuantification #-} module Object.Types where import Data.Dynamic import Data.SelectTree import Graphics.Qt as Qt import Physics.Chipmunk hiding (Position, collisionType) import Utils import Base mkSortsSelectTree :: [Sort_] -> SelectTree Sort_ mkSor...
geocurnoff/nikki
src/Object/Types.hs
lgpl-3.0
2,555
0
12
592
700
357
343
41
4
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE CPP #...
psibi/yesod
yesod-core/test/Hierarchy.hs
mit
6,737
0
19
1,765
1,857
985
872
149
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Taken quite directly from the Peyton Jones/Lester paper. -} {-# LANGUAGE CPP #-} -- | A module concerned with finding the free variables of an expression. module CoreFVs ( -- * Free variables of expressions and bi...
snoyberg/ghc
compiler/coreSyn/CoreFVs.hs
bsd-3-clause
33,073
0
14
8,778
5,920
3,199
2,721
445
12
{-# OPTIONS_GHC -Wwarn #-} ----------------------------------------------------------------------------- -- | -- Module : Haddock.Interface.ParseModuleHeader -- Copyright : (c) Simon Marlow 2006, Isaac Dupree 2009 -- License : BSD-like -- -- Maintainer : haddock@projects.haskell.org -- Stability : ex...
Acidburn0zzz/haddock
haddock-api/src/Haddock/Interface/ParseModuleHeader.hs
bsd-2-clause
5,048
0
18
1,489
1,139
616
523
92
12
-- (c) The University of Glasgow 2006 -- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -- -- Storage manager representation of closures {-# LANGUAGE CPP,GeneralizedNewtypeDeriving #-} module SMRep ( -- * Words and bytes WordOff, ByteOff, wordsToBytes, bytesToWordsRoundUp, r...
tjakway/ghcjvm
compiler/cmm/SMRep.hs
bsd-3-clause
19,295
0
14
4,626
3,857
2,021
1,836
322
27
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE FlexibleInstances, UndecidableInstances, FunctionalDep...
ezyang/ghc
testsuite/tests/polykinds/T12055a.hs
bsd-3-clause
1,430
0
12
368
534
304
230
-1
-1
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} {-# LANGUAGE ScopedTypeVariables, FlexibleContexts #-} -- Trac #1783 -- Like Trac #1781 you could argue that this one should succeed -- but we stick with the old behaviour for now. When we do -- fundeps properly it'll probably start to work module Should...
olsner/ghc
testsuite/tests/typecheck/should_compile/FD2.hs
bsd-3-clause
842
0
13
224
226
119
107
-1
-1
{-# LANGUAGE TypeFamilies #-} module Ccfail005 where type family F a type instance F Bool = D -> IO Int type instance F Char = Int -> IO D data D = D -- These should be rejected as D isn't a type we can use with the FFI. -- Note that, in the signature the user writes, there aren't an -- "argument type" and "result ...
sdiehl/ghc
testsuite/tests/ffi/should_fail/ccfail005.hs
bsd-3-clause
422
0
6
90
81
47
34
8
0
module ForkExperiments where import Control.Concurrent import Control.Monad import System.IO main = do hSetBuffering stdout NoBuffering forkIO (replicateM_ 10 (putChar 'A')) replicateM_ 10 (putChar 'B')
NickAger/LearningHaskell
ParallelConcurrent/ForkExperiments.hsproj/ForkExperiments.hs
mit
216
0
11
37
66
33
33
8
1
module ASTGenerator where import AMPLParserMeta --import Language.LBNF.Runtime import Language.LBNF.Compiletime import qualified TypesAMPL as T failure x = Bad $ "Undefined case: " ++ show x --transIdent :: Ident -> Result transIdent x = case x of Ident str -> str --transUIdent :: UIdent -> Result transUIde...
prashant007/AMPL
myAMPL/src/test_del/ConvAMPLTypes.hs
mit
9,244
0
12
2,636
1,846
930
916
120
33
module BasicIO where import System.IO main = do putStrLn "Input file name:" inf <- getLine putStrLn "Output file name:" outf <- getLine inh <- openFile inf ReadMode outh <- openFile outf WriteMode mainloop inh outh hClose inh hClose outh mainloop :: Handle -> Handle -> IO () mainloop inh ...
rockdragon/julia-programming
code/haskell/BasicIO.hs
mit
471
0
11
130
164
72
92
19
2
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable, ScopedTypeVariables, LambdaCase #-} module Test.Tasty.ExpectedFailure (expectFail, expectFailBecause, ignoreTest, ignoreTestBecause, wrapTest) where import Test.Tasty.Options import Test.Tasty.Runners import Test.Tasty.Providers #if MIN_VERSION_tasty(1,3,1) import ...
nomeata/tasty-expected-failure
Test/Tasty/ExpectedFailure.hs
mit
7,983
1
23
2,106
1,238
685
553
77
5
module FractalMusic where import HaskoreExamples import Random type Vector = [Float] type Matrix = [Vector] type AT = Vector -> Vector type IFS = [AT] -- First define some general matrix operations. -- These will facilitate moving to higher dimensions later. vadd :: Vector -> Vector -> Vector vad...
Zolomon/edan40-functional-music
Fractals.hs
mit
1,737
0
11
394
611
361
250
33
1
{-# LANGUAGE FlexibleContexts #-} module GitParsers where import Control.Applicative ((<*>),(<$>)) import Control.Monad.Identity import Text.Parsec import Data.Maybe (fromMaybe) import Types fromBaseN :: (Num a, Ord a, Read a) => a -> String -> a fromBaseN base = foldl (\a x -> a * 8 + (read [x])) 0 fromOctal :: (N...
blast-hardcheese/git-dag-graph
src/GitParsers.hs
mit
5,462
0
20
1,559
2,112
1,080
1,032
-1
-1
{-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildC...
mitchellwrosen/hpack
src/Hpack/Config.hs
mit
32,909
0
24
5,988
8,611
4,621
3,990
672
9
module Galua.Micro.Translate.ComputeInputs(computeBlockInputs) where import Data.Set(Set) import qualified Data.Set as Set import qualified Data.Map as Map import qualified Data.Vector as Vector import Data.List(mapAccumL) import Data.Foldable(foldl') import Data.Graph.SCC impor...
GaloisInc/galua
galua-jit/src/Galua/Micro/Translate/ComputeInputs.hs
mit
5,186
0
12
1,702
1,816
911
905
121
21
{-# LANGUAGE JavaScriptFFI #-} -- | An implementation of the NodeJS Stream API, as documented -- <https://nodejs.org/api/stream.html here>. module GHCJS.Node.Stream ( module GHCJS.Node.Stream -- FIXME: specific export list ) where import GHCJS.Array import GHCJS.Foreign.Callback import ...
taktoa/ghcjs-electron
src/GHCJS/Node/Stream.hs
mit
1,188
0
8
234
194
114
80
27
0
isBalanced xs = null $ foldl f [] xs where f ('(':ys) ')' = ys f ('[':ys) ']' = ys f ('{':ys) '}' = ys f ys x = x:ys main = do content <- getContents print $ length $ filter isBalanced $ lines content
MAPSuio/spring-challenge16
balanced_brackets/larstvei.hs
mit
248
0
9
92
122
60
62
8
4
{-# LANGUAGE NoImplicitPrelude #-} module Rx.Observable.Maybe where import Prelude.Compat import Control.Concurrent.MVar (newEmptyMVar, takeMVar, tryPutMVar) import Control.Monad (void) import Rx.Disposable (dispose) import Rx.Scheduler ...
roman/Haskell-Reactive-Extensions
rx-core/src/Rx/Observable/Maybe.hs
mit
830
0
12
265
202
107
95
21
1
module GCompiler where import Types import Heap import Utilities import Language gmCompile:: CoreProgram -> GMState gmCompile program = ([], initialCode, [], [], heap, globals, statInitial) where (heap, globals) = buildInitialHeap program initialCode = [PushGlobal "main", Eval, Print] statInitia...
typedvar/hLand
hcore/GCompiler.hs
mit
6,109
0
13
1,516
2,537
1,370
1,167
129
2
import Control.Monad import Data.List.Extra import Data.Maybe import Data.Bits import qualified Data.Char as C import qualified Data.Map as Map import qualified Data.Set as Set import Debug.Trace ------ iread :: String -> Int iread = read answer :: (Show a) => (String -> a) -> IO () answer f = interact $ (++"\n") ....
msullivan/advent-of-code
2018/A16a.hs
mit
1,861
0
12
432
870
487
383
48
3
{-# LANGUAGE OverloadedStrings #-} module Gratte.Command.Encryption where import Control.Applicative import Control.Monad import Control.Monad.Trans import Control.Monad.Gratte import Data.Maybe import Data.Monoid import Gratte.Options import Gratte.Options.Encryption import Gratte.Utils import Filesystem.Path.Curren...
ostapneko/gratte-papier
src/Gratte/Command/Encryption.hs
mit
6,022
0
19
1,593
1,554
774
780
129
3
----------------------------------------------------------------------------- -- | -- Module : UseCaseModel.Parsers.XML.XmlUseCaseModel -- Copyright : (c) Rodrigo Bonifacio 2008, 2009 -- License : LGPL -- -- Maintainer : rba2@cin.ufpe.br -- Stability : provisional -- Portability : portable ...
hephaestus-pl/hephaestus
willian/hephaestus-integrated/asset-base/uc-model/src/UseCaseModel/Parsers/XML/XmlUseCaseModel.hs
mit
5,378
42
15
1,202
955
538
417
78
3
module H.Parse where import H.Data import Control.Applicative import Control.Monad import Data.Time import Text.Parsec (modifyState) import Text.Parsec.String import Text.ParserCombinators.Parsec as P hiding ((<|>), many) parseTask :: String -> Either ParseError Task parseTask = P.runParser taskParser emptyTask "tas...
josuf107/H
H/Parse.hs
gpl-2.0
2,800
0
13
744
944
453
491
97
1
{-| Module : Setseer.Color Description : Conversion and generation Copyright : Erik Edlund License : GPL-3 Maintainer : erik.edlund@32767.se Stability : experimental Portability : POSIX -} module Setseer.Color where import Codec.Picture import Data.Complex import Data.Fixed import Data.List import Data....
edlund/setseer
sources/Setseer/Color.hs
gpl-3.0
2,995
0
16
1,037
1,184
617
567
118
3
-- -*-haskell-*- -- Vision (for the Voice): an XMMS2 client. -- -- Author: Oleg Belozeorov -- Created: 18 Jun. 2010 -- -- Copyright (C) 2010, 2011, 2012 Oleg Belozeorov -- -- This program is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public License as -- publis...
upwawet/vision
src/Medialib.hs
gpl-3.0
6,940
0
37
2,185
2,062
1,024
1,038
-1
-1
module Test.Lamdu.Db ( ramDB ) where import qualified Control.Lens as Lens import Data.IORef (IORef, newIORef, modifyIORef, readIORef) import qualified Data.Map as Map import Data.UUID.Types (UUID) import qualified Lamdu.Data.Db.Init as DbInit import Lamdu.Data.Db.Layout (DbM(..))...
lamdu/lamdu
test/Test/Lamdu/Db.hs
gpl-3.0
1,479
0
17
430
412
229
183
30
1
-- HsParser: A Parsec builder, a toy for experimenting things: -- @2013 Angel Alvarez, Felipe Zapata, from The ResMol Group -- Common types to use with Parsec 3.0 style parsers module ParsecCommon where import Data.Functor.Identity import Text.Parsec -- A parsecT based parser carring state of type "a" and returni...
AngelitoJ/HsParser
src/ParsecCommon.hs
gpl-3.0
390
0
6
71
39
26
13
4
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/PlacementGroups/List.hs
mpl-2.0
14,089
0
32
4,068
2,074
1,186
888
289
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-consumersurveys/gen/Network/Google/Resource/ConsumerSurveys/Surveys/Update.hs
mpl-2.0
3,204
0
13
700
387
234
153
61
1
{-# LANGUAGE CPP #-} -- | -- Module : System.Info.Health -- Copyright : (c) 2013 Brendan Hay <brendan.g.hay@gmail.com> -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- A copy of the MPL can be found in the LICENSE file or -- ...
brendanhay/czar
system-info/src/System/Info/Health.hs
mpl-2.0
712
0
5
165
46
36
10
6
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Sites/List.hs
mpl-2.0
5,760
0
18
1,370
887
515
372
125
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-bigquery/gen/Network/Google/Resource/BigQuery/TableData/InsertAll.hs
mpl-2.0
4,486
0
18
1,085
552
328
224
93
1
-- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } func :: a -> (a -> a)
lspitzner/brittany
data/Test363.hs
agpl-3.0
136
0
7
18
18
10
8
1
0
module ViperVM.Platform.ProcessorCapabilities where data ProcessorCapability = DoubleFloatingPoint deriving (Eq,Ord,Show)
hsyl20/HViperVM
lib/ViperVM/Platform/ProcessorCapabilities.hs
lgpl-3.0
129
0
6
16
29
17
12
4
0
{- Copyright 2015 Martin Buck This file is part of H2D. H2D 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. H2D is distributed in the ...
I3ck/H2D
src/Moveable.hs
lgpl-3.0
987
0
8
181
118
62
56
10
0
import Control.Monad.Writer --import Data.Monoid gcd' :: Int -> Int -> Writer [String] Int gcd' a b | b == 0 = do tell ["Finished with " ++ show a] return a | otherwise = do tell [show a ++ " mod " ++ show b ++ " = " ++ show (a `mod` b)] gcd' b (a `mod` b) newtype DiffList a...
aniketd/learn.haskell
LYAH/euclid.hs
unlicense
1,325
0
16
373
611
304
307
37
1
{- Created : 2014 Jun 19 (Thu) 10:59:09 by Harold Carr. Last Modified : 2014 Jun 19 (Thu) 18:44:44 by Harold Carr. -} module HW10_HC_AParser where import Control.Applicative import Data.Char import Data.Maybe (fromJust) import qualified Test.HUnit as T import qu...
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2014-06-upenn/cis194/src/HW10_HC_AParser.hs
unlicense
8,675
0
23
2,745
2,631
1,401
1,230
136
3
import Helpers.ConvexHull (convexHull) import Data.List (nub, (\\)) -- Create a walk of steps sqrt(1), sqrt(4), sqrt(5), sqrt(8), sqrt(9), sqrt(10), sqrt(12) -- minimizing the perimeter of the convexHull. -- Slow, but it works for now. stepsOfLengthSqrtN :: Int -> [(Int, Int)] stepsOfLengthSqrtN n = filter (\(a, b) ->...
peterokagey/haskellOEIS
src/Sandbox/PlaneFigure.hs
apache-2.0
2,308
0
14
530
1,133
633
500
38
4
-- bubble sort iter :: [Int] -> (Bool,Int,[Int]) iter [] = (False,0,[]) iter (x:[]) = (False,0,(x:[])) iter (x0:x1:xs) = let (f,n,x) = if x0 > x1 then iter (x0:xs) else iter (x1:xs) in if x0 > x1 then (True,n+1,x1:x) else (f, n ,x0:x) ans n x = let (f,n',x') = ...
a143753/AOJ
0167.hs
apache-2.0
595
0
12
212
406
218
188
25
3
{-# LANGUAGE TemplateHaskell #-} module Topical.Text.Types ( Tokenizer , PlainTokenizer , Tree(..) , _EmptyTree , _Node , nodeData , nodeLeft , nodeRight , unfoldTree , nlr , lnr ) where import Control.Lens import Taygeta.Types (PlainTokenizer, ...
erochest/topical
src/Topical/Text/Types.hs
apache-2.0
1,317
0
10
476
530
277
253
41
1
-- |Contract test-cases. The .js files in the contracts directory are -- parsed as: -- -- tests ::= test ; -- | test ; tests -- -- test ::= succeeds { typedjs-statement* } { untypedjs-statement* } -- -- Note that there is a trailing ';' at the end of a list of tests. -- JavaScript-style comments are permitted ...
brownplt/strobe-old
tests/Contracts.hs
bsd-2-clause
5,166
0
27
1,319
1,320
658
662
-1
-1
module Network.Mail.SMTP.Auth where import Data.Digest.MD5 import Codec.Utils import qualified Codec.Binary.Base64.String as B64 (encode, decode) import Data.List import Data.Bits import Data.Array type UserName = String type Password = String data AuthType = PLAIN | LOGIN | CRAM_MD5 ...
jtdaugherty/smtp
src/Network/Mail/SMTP/Auth.hs
bsd-3-clause
2,002
0
12
534
725
387
338
48
2
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds, PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FlexibleContexts #-} {-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -Wno-redundant-constraints #-} -- {-# LANGU...
AaronFriel/eff-experiments
src/Data/Iota/Tagged/OpenUnion51.hs
bsd-3-clause
5,918
0
10
1,356
1,800
947
853
-1
-1
{-# LANGUAGE FlexibleContexts #-} module Math.Integrators.ImplicitMidpointRule ( imr ) where import Linear import Math.Integrators.Implicit eps :: Floating a => a eps = 1e-14 imr :: (Metric f, Floating a, Ord a) => (f a -> f a) -> a -> f a -> f a imr f = \h y -> fixedPoint (\x -> y ^+^ h *^ ( f ( (y^+^x)^...
qnikst/numeric-ode
src/Math/Integrators/ImplicitMidpointRule.hs
bsd-3-clause
395
0
15
112
176
95
81
13
1
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RecordWildCards #-} module Test.TorCell(torCellTests) where #if !MIN_VERSION_base(4,8,0) import Control.Applicative #endif import Control.Monad import Crypto.Hash import Data.ASN1.OID import Data.Binary.Get import Data.Binary.Put impo...
GaloisInc/haskell-tor
test/Test/TorCell.hs
bsd-3-clause
13,072
0
17
3,899
3,196
1,651
1,545
272
6
-- Many extensions. I overload many things from Haskell Prelude in the style -- of Awesome Prelude. Also you may need a Template Haskell transformations -- on declarations, which derives classes and type families instances, etc, etc. {-# LANGUAGE TypeFamilies, TypeOperators, FlexibleContexts, RecursiveDo #-} {-# LANGUA...
thesz/hhdl
src/Hardware/HHDL/Examples/RunningSumMaybes.hs
bsd-3-clause
2,902
12
16
588
359
204
155
20
1
module Main where import TestUtil import Test.HUnit hiding (path) import Database.TokyoCabinet import qualified Database.TokyoCabinet.BDB as B import Data.Maybe (catMaybes) import Data.List (sort) import Control.Monad import Control.Exception import Control.Monad.Trans (liftIO) withoutFileM :: String -> (String -> ...
tom-lpsd/tokyocabinet-haskell
tests/TCDBTest.hs
bsd-3-clause
9,420
0
18
3,100
3,511
1,786
1,725
227
1
{-# LANGUAGE DeriveDataTypeable, NamedFieldPuns #-} module Main where import Prelude () import Air.Env import Air.Extra import Text.JSON.Generic import Text.JSON.Pretty (pp_value) import Data.List (isInfixOf, find) import Data.Maybe (fromMaybe) import Network.Curl import System.Directory import Text.Printf imp...
nfjinjing/human-rights-ios
src/Sync.hs
bsd-3-clause
4,497
1
26
1,095
1,179
628
551
117
3
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} #include "Circat/AbsTy....
conal/shaped-types
src/ShapedTypes/Types/Vec.hs
bsd-3-clause
5,054
1
10
1,287
432
260
172
-1
-1
-- Copyright (c) 1998-1999 Chris Okasaki. -- See COPYRIGHT file for terms and conditions. module LeftistHeap ( -- type of leftist heaps Heap, -- instance of Coll/CollX, OrdColl/OrdCollX -- CollX operations empty,single,fromSeq,insert,insertSeq,union,unionSeq,delete,deleteAll, deleteSeq,null,size...
OS2World/DEV-UTIL-HUGS
oldlib/LeftistHeap.hs
bsd-3-clause
12,838
0
18
4,005
5,960
3,015
2,945
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} ------------------------------------------------------------------------------ -- | -- Module: Control.Concurrent.STM.TChan.Split.Implementation -- Copyright: (c) 2013 Leon P Smith -- License: BSD3 -- Maintainer: Leon P Smith <leon@melding-monads.com> -- Stability: exp...
lpsmith/split-tchan
src/Control/Concurrent/STM/TChan/Split/Implementation.hs
bsd-3-clause
3,248
0
14
795
1,091
510
581
92
2
module Examples.Example1 where import Graphics.UI.VE import ErrVal import Examples.Utils(testC) data Person = Person { st_name :: String, st_age :: Int } deriving (Show) instance HasVE Person where mkVE = mapVE toStruct fromStruct ( label "Name" mkVE .*. label "Age" mkVE ) ...
timbod7/veditor
demo/Examples/Example1.hs
bsd-3-clause
456
0
10
132
158
87
71
15
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE BangPatterns #-} {- | A witness for arbitrary recursive ADTs that expresses finiteness without ...
xicesky/sky-haskell-playground
src/Sky/Ideas/FiniteRecursiveType.hs
bsd-3-clause
1,848
0
10
406
303
164
139
24
1
-- {-# OPTIONS_GHC -fplugin=Monomorph.Plugin -O -fobject-code -dcore-lint #-} {-# OPTIONS_GHC -fforce-recomp -fplugin=ReifyCore.Plugin -O -fobject-code -dcore-lint #-} {-# LANGUAGE CPP, TupleSections, GADTs, TypeOperators, Rank2Types #-} {-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP ...
conal/reify-core
test/Tests.hs
bsd-3-clause
1,523
0
8
242
151
101
50
16
1
module Data.Singular where import Data.Countable import Data.Searchable class (Finite a, AtLeastOneCountable a) => Singular a where single :: a instance Singular () where single = () instance (Singular a, Singular b) => Singular (a, b) where single = (single, single)
AshleyYakeley/countable
src/Data/Singular.hs
bsd-3-clause
284
0
6
56
102
57
45
9
0
{-# LANGUAGE TemplateHaskell #-} module LimitedHashMap where import Control.Arrow ((&&&)) import Control.Concurrent.MVar (MVar, modifyMVar_, readMVar) import Control.Monad (forM_, liftM, when, (>=>)) import Data.Maybe (fromJust) import ...
sulami/hcached
src/LimitedHashMap.hs
bsd-3-clause
7,246
0
19
1,921
2,245
1,134
1,111
-1
-1
-- for mtl {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} -- for hoist and inputThrough {-# LANGUAGE Rank2Types #-} module Control.Yield ( -- * Types Producing, resume, fromStep, Consuming(Consuming, provide), ProducerState(Produced, Done),...
DanBurton/yield
Control/Yield.hs
bsd-3-clause
22,587
0
21
5,271
5,425
2,908
2,517
-1
-1
module Sublist (Sublist(..), sublist) where import Data.List (isInfixOf) data Sublist = Equal | Sublist | Superlist | Unequal deriving (Eq, Show) sublist :: Eq a => [a] -> [a] -> Sublist sublist xs ys | xs == ys = Equal | xs `isInfixOf` ys = Sublist |...
pminten/xhaskell
sublist/example.hs
mit
383
0
8
135
138
76
62
13
1
import Data.Char inRange :: Int -> Int -> [Int] -> [Int] inRange _ _ [] = [] inRange a b (x:xs) = if x >= a && x<=b then x : inRange a b xs else inRange a b xs countPositives :: [Int] -> Int countPositives [] = 0 countPositives (x:xs) = if x > 0 then 1 + countPositives xs else countPositives xs capitalis...
martrik/COMP101
Term1/COMP101/Lab2/LabSheet2.hs
mit
2,192
0
11
561
1,151
591
560
75
2
-- | 'StateLockMetrics' for txp. module Pos.DB.Txp.MemState.Metrics ( recordTxpMetrics ) where import Universum import Data.Aeson.Types (ToJSON (..)) import Formatting (sformat, shown, (%)) import qualified System.Metrics as Metrics import qualified System.Metrics.Gauge as Metri...
input-output-hk/pos-haskell-prototype
db/src/Pos/DB/Txp/MemState/Metrics.hs
mit
5,389
0
20
1,523
931
485
446
76
7
{-# 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-route53-domains/gen/Network/AWS/Route53Domains/DisableDomainAutoRenew.hs
mpl-2.0
4,406
0
13
919
500
303
197
69
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} -- | Extract loop-invariant "complex" expressions from comprehensions module Database.DSH.CL.Opt.LoopInvariant ( loopInvariantR ) where import Data.List imp...
ulricha/dsh
src/Database/DSH/CL/Opt/LoopInvariant.hs
bsd-3-clause
5,180
0
17
1,357
1,050
541
509
70
5
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE GADTs #-} module Language.Embedded.Hardware.Command ( -- Regular hardware compilers. compile , icompile , ru...
markus-git/imperative-edsl-vhdl
src/Language/Embedded/Hardware/Command.hs
bsd-3-clause
4,188
0
10
838
1,050
609
441
-1
-1
module Series (slices) where import Data.Char (digitToInt) import Data.List (tails) slices :: Int -> String -> [[Int]] slices n s = map (take n) . take (length s - n + 1) . tails $ numberSeries where numberSeries = map digitToInt s
pminten/xhaskell
series/example.hs
mit
237
0
12
47
108
58
50
6
1
{-# LANGUAGE CPP #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ViewPatterns #-} {-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- this file adds missing ...
noughtmare/yi
yi-frontend-pango/src/Yi/Frontend/Pango.hs
gpl-2.0
35,005
260
20
9,538
9,015
4,638
4,377
654
8
-- | A circuit is a standard one of among many ways of representing a -- propositional logic formula. This module provides a flexible circuit type -- class and various representations that admit efficient conversion to funsat -- CNF. -- -- The implementation for this module was adapted from -- <http://okmij.org/ftp/...
alessandroleite/hephaestus-pl
src/funsat-0.6.2/src/Funsat/Circuit.hs
lgpl-3.0
29,446
45
21
9,570
8,584
4,529
4,055
548
27
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, PatternGuards #-} -- | Fetch URL page titles of HTML links. module Plugin.Url (theModule) where import Plugin import Network.URI import qualified Text.Regex as R -- legacy $(plugin "Url") instance Module UrlModule Bool where moduleHelp _ "url-title" = "u...
zeekay/lambdabot
Plugin/Url.hs
mit
4,775
0
17
1,296
1,144
586
558
76
1
module CombinatorParser (module CombinatorParser, module Control.Applicative) where import Control.Monad import Control.Applicative newtype Parser t a = Parser ([t] -> [([t], a)]) parse :: Parser t a -> [t] -> [a] parse (Parser p) ts = [a | ([], a) <- p ts] instance Functor (Parser t) where fmap f (Parser p) ...
carlostome/shrdlite
haskell/CombinatorParser.hs
gpl-3.0
1,154
0
14
307
639
340
299
25
2
{-# LANGUAGE Rank2Types #-} module Opaleye.SQLite.Internal.PackMap where import qualified Opaleye.SQLite.Internal.Tag as T import qualified Opaleye.SQLite.Internal.HaskellDB.PrimQuery as HPQ import Control.Applicative (Applicative, pure, (<*>), liftA2) import qualified Control.Monad.Trans.State as State i...
bergmark/haskell-opaleye
opaleye-sqlite/src/Opaleye/SQLite/Internal/PackMap.hs
bsd-3-clause
4,785
0
12
1,065
1,139
632
507
59
1
import Test.Cabal.Prelude main = cabalTest $ withRepo "repo" $ forM_ ["--new-freeze-file", "--freeze-file"] $ \arg -> do cabal' "outdated" [arg] >>= (\out -> do assertOutputContains "base" out assertOutputContains "template-haskell" out) cabal' "outdated" [arg, "--ignore=base,template-h...
themoritz/cabal
cabal-testsuite/PackageTests/Outdated/outdated_freeze.test.hs
bsd-3-clause
633
0
14
133
164
80
84
15
1
----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.RotSlaves -- Copyright : (c) Hans Philipp Annen <haphi@gmx.net>, Mischa Dieterle <der_m@freenet.de> -- License : BSD3-style (see LICENSE) -- -- Maintainer : Hans Philipp Annen <haphi@gmx.net> --...
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Actions/RotSlaves.hs
bsd-2-clause
2,367
0
13
460
556
311
245
20
1
-- | Create a tiled map given a generated map module Game.World.Gen.Compile where import Game.World.Gen.Types
mfpi/q-inqu
Game/World/Gen/Compile.hs
mit
112
0
4
17
16
12
4
2
0