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 FlexibleInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE PatternGuards #-} -- | See <https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst> module Distribution.Backpack.Id( computeComponentId, computeCompatPackageKey, computeCompatPackageName, ) where import P...
mydaum/cabal
Cabal/Distribution/Backpack/Id.hs
bsd-3-clause
6,341
0
18
1,798
733
410
323
76
4
import Data.List () import Data.List hiding () infixl 1 `f` -- infixr 2 `\\\` infix 3 :==> infix 4 `MkFoo` data Foo = MkFoo Int | Float :==> Double x `f` y = x (\\\) :: (Eq a) => [a] -> [a] -> [a] (\\\) xs ys = xs g x = x + if True then 1 else 2 h x = x + 1::Int {-# SPECIALISe j :: Int -> Int ...
sdiehl/ghc
testsuite/tests/printer/Ppr024.hs
bsd-3-clause
743
6
9
229
359
202
157
-1
-1
-- !!! Test file positioning module Main(main) where import Control.Monad import System.Directory (removeFile, doesFileExist) import System.IO import System.IO.Error main = do hIn <- openFile "hGetPosn001.in" ReadMode f <- doesFileExist "hGetPosn001.out" when f (removeFile "hGetPosn001.out") hOut <- openFile...
urbanslug/ghc
libraries/base/tests/IO/hGetPosn001.hs
bsd-3-clause
750
2
11
150
260
124
136
23
2
{-# Language CPP, TemplateHaskell #-} {-| Module : Harness Description : Comparison functions for data type info used in tests Copyright : Eric Mertens 2017 License : ISC Maintainer : emertens@gmail.com This module provides comparison functions that are able to check that the computed 'DatatypeInfo' value...
glguy/th-abstraction
test/Harness.hs
isc
5,585
0
20
1,381
1,353
684
669
95
3
{-# LANGUAGE DeriveDataTypeable #-} module Veva.Resources.User ( resource ) where import Control.Monad.Reader (ReaderT) import Control.Monad.Except (ExceptT) import Control.Monad.Trans (lift) import Data.Typeable (Typeable) import Veva.Types.Api (VevaApi, query) import Veva.Types.NewUser (NewUser...
L8D/veva
lib/Veva/Resources/User.hs
mit
1,870
0
12
472
596
322
274
44
2
module Matrix ( Matrix , cols , column , flatten , fromList , fromString , reshape , row , rows , shape , transpose ) where import Control.Arrow ((&&&)) import Data.Maybe (fromMaybe) import Data.Vector (Vector) import qualified Data.Vec...
genos/online_problems
exercism/haskell/matrix/src/Matrix.hs
mit
1,173
0
12
324
529
284
245
38
1
module Files where import System.IO readMyFile :: FilePath -> IO () readMyFile file = do handle <- openFile file ReadMode contents <- hGetContents handle putStr contents hClose handle readMyFileWithLambda :: FilePath -> IO () readMyFileWithLambda file = do withFile file ReadMod...
aquatir/remember_java_api
code-sample-haskell/hello_world/io/files.hs
mit
541
0
13
144
159
73
86
17
1
-- | A type checker instance with term graphs. {-# LANGUAGE FlexibleContexts, FlexibleInstances, OverlappingInstances, IncoherentInstances, UndecidableInstances, PatternGuards, TupleSections, TypeSynonymInstances, MultiParamTypeClasses #-} module TGChecker where import Control.Applicative import Control.Mona...
andreasabel/helf
src/TGChecker.hs
mit
4,636
0
14
977
1,038
548
490
83
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} -------------------------------------------------------------------------------- -- | -- Module : Network.MQTT.Broker.Authentication -- Copyright : (c) Lars Petersen 2016 ...
lpeterse/haskell-mqtt
src/Network/MQTT/Broker/Authentication.hs
mit
4,690
0
14
1,059
514
318
196
53
0
import Data.List import Fibonacci main :: IO () main = readLn >>= print . solve -- [002/explanation.tex] solve :: Integer -> Integer solve p = sum $ takeWhile (<= p) $ filter even fibs
NorfairKing/project-euler
002/haskell/solution.hs
gpl-2.0
207
0
8
56
70
37
33
6
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE...
leksah/yi
src/library/Yi/Buffer/Misc.hs
gpl-2.0
36,675
0
24
8,918
9,265
4,885
4,380
827
4
{- emacs2nix - Generate Nix expressions for Emacs packages Copyright (C) 2016 Thomas Tuegel 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 3 of the License, or (at your option) any l...
ttuegel/emacs2nix
src/Distribution/Emacs/Name.hs
gpl-3.0
949
0
6
164
70
44
26
6
0
module Types where import Data.Word import Enum import Data.Bits ((.&.), testBit) import qualified Data.Map as M import Prelude hiding (Right) data File = Device | Settings | Sport | Activity | Workout | Course | Schedules | Weight | T...
stappit/fit-parser
library/Types.hs
gpl-3.0
36,783
0
11
9,716
10,187
5,879
4,308
1,770
2
-- Copyright (C) 2017 Matthew Harm Bekkema -- -- This file is part of passman-core -- -- passman-core 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 option) ...
PasswordManager/passman-core
src/Passman/Core/Version.hs
gpl-3.0
1,130
0
5
183
43
36
7
3
0
{-# LANGUAGE TemplateHaskell #-} import Control.Applicative import Options import Data.List import Data.List.Split import System.IO import Data.Char import Control.Exception import System.IO.Error data MainOptions = MainOptions { optDatabase :: Maybe String, optAddFiles :: Maybe String, optFreque...
collia/032015_FP
src/Main.hs
gpl-3.0
10,795
0
26
4,581
2,873
1,470
1,403
167
5
import System.Environment import System.FilePath import System.Directory import qualified Data.List import qualified Data.Text.Lazy as T import Text.ParserCombinators.Parsec import Text.Printf import Debug.Trace import Definition import FileName {- TODO replaceStrByStr replaceStrByFile generateDir checklinks {-...
FiskerLars/worst
worst.hs
gpl-3.0
4,910
4
16
1,863
1,310
705
605
70
3
module Routes ( entryPoint , routes ) where import Happstack.Server import Control.Monad ( msum ) import Control.Monad.IO.Class ( liftIO ) import DB.Conn ( getConn ) import DB.Types ( DBConn ) import Auth.Session ( SessionServerPart ) import qualified View.Views as Views import qualifie...
MortimerMcMire315/sparkive
src/Routes.hs
gpl-3.0
1,612
0
14
583
350
188
162
38
2
{-# LANGUAGE OverloadedStrings #-} module P50MovieSpec (main,spec) where import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck((==>)) import P50Movie hiding (main) import Data.Text (unpack) import Control.Lens ((^.),(^?)) main :: IO () main = hspec spec spec :: Spec spec = it "Won't be implemente...
ciderpunx/57-exercises-for-programmers
test/P50MovieSpec.hs
gpl-3.0
395
0
6
64
110
67
43
14
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Datafeeds/Update.hs
mpl-2.0
3,974
0
15
939
577
338
239
83
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.FirebaseRemoteConfig.Types.Sum -- Copyright : (c) 2015...
brendanhay/gogol
gogol-firebaseremoteconfig/gen/Network/Google/FirebaseRemoteConfig/Types/Sum.hs
mpl-2.0
3,844
0
11
1,033
565
315
250
74
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-doubleclick-bids/gen/Network/Google/Resource/DoubleClickBidManager/Lineitems/Uploadlineitems.hs
mpl-2.0
5,031
0
18
1,151
713
416
297
105
1
----------------------------------------------------------------------------- -- | -- Module : Finance.Hqfl.Instrument.Currency -- Copyright : (C) 2016 Mika'il Khan -- License : (see the file LICENSE) -- Maintainer : Mika'il Khan <co.kleisli@gmail.com> -- Stability : stable -- Portability : portable...
cokleisli/hqfl
src/Finance/Hqfl/Instrument/Currency.hs
apache-2.0
540
0
6
75
43
31
12
3
0
-- Collection of safe version of standard functions module Tools where import qualified Data.List as List import qualified Data.Map as Map import qualified Data.Set as Set import Types -- head is dangerous stringHead :: [String] -> String stringHead [] = "" stringHead xs = head xs -- tail is dangerous.... safeTai...
montefra/email_compare
src/Tools.hs
bsd-2-clause
1,044
0
12
251
323
176
147
20
2
module Glazier.React.Component ( Component(..) , ElementComponent -- constructor not exported , elementComponent -- constructor not exported , WidgetComponent -- constructor not exported , widgetComponent , WidgetRef -- constructor not exported , rerenderWidget , batchWidgetRerender ...
louispan/glazier-react
src/Glazier/React/Component.hs
bsd-3-clause
369
0
5
75
48
34
14
10
0
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveFunctor #-} module Interp where import Control.Applicative import Data.Functor import Term as T data Result t = Step t -- ^ The term reduces. | Stop -- ^ The term is HNF. | Stuck -- ^ The term is stuck. deriving (Show, Functor) step :: Te...
thsutton/cha
lib/Interp.hs
bsd-3-clause
5,804
0
23
2,622
2,202
1,027
1,175
102
33
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} module Optimisation.Stochastic.Common ( Stochastic, ORange, StartOptions(..), OptimState(..), Dimension(..), Optim, optimise, info, checkEnd, checkRunning, calcNGrad...
nionita/Sopt
Optimisation/Stochastic/Common.hs
bsd-3-clause
6,370
0
18
2,105
1,880
949
931
148
4
module Language.Interpreter.StdLib.Shapes ( addShapesStdLib ) where import Control.Monad.Except import Gfx.Context ( drawShape ) import Language.Ast ( Value(Null, Number, Symbol) ) import Language.Interpreter.Types ( InterpreterProce...
rumblesan/improviz
src/Language/Interpreter/StdLib/Shapes.hs
bsd-3-clause
830
0
12
322
179
100
79
15
2
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE AllowAmbiguousTypes #-} module CannyImage ( cannyImage ) where import Utils import Control.Monad ( void ) import Control.Monad.Except import qualified Data.ByteString as B import Data.Word import Data.Proxy import qualified Open...
Chuck-Aguilar/haskell-opencv-work
src/CannyImage.hs
bsd-3-clause
992
0
12
169
360
203
157
-1
-1
module Cataskell.GameData.PlayerView where import Control.Lens import Control.Exception (assert) import Cataskell.Game import Cataskell.GameData.Actions import Cataskell.GameData.Board import Cataskell.GameData.Player import Data.Set (Set) import qualified Data.Set as Set import Data.Map.Strict (Map) import qualified...
corajr/cataskell
src/Cataskell/GameData/PlayerView.hs
bsd-3-clause
1,275
0
14
262
382
226
156
35
1
module Text.Highlighter.Lexers.Brainfuck (lexer) where import Text.Regex.PCRE.Light import Text.Highlighter.Types lexer :: Lexer lexer = Lexer { lName = "Brainfuck" , lAliases = ["brainfuck", "bf"] , lExtensions = [".bf", ".b"] , lMimetypes = ["application/x-brainfuck"] , lStart = root' , lFla...
chemist/highlighter
src/Text/Highlighter/Lexers/Brainfuck.hs
bsd-3-clause
913
0
9
204
279
156
123
27
1
import System.Environment import Data.Digest.OpenSSL.MD5 import qualified Data.ByteString as B main = do [f] <- getArgs putStrLn . md5sum =<< B.readFile f
Axiomatic-/nano-md5
tests/Demo.hs
bsd-3-clause
188
2
9
50
47
24
23
-1
-1
{-# LANGUAGE FlexibleContexts, ScopedTypeVariables #-} module Sandbox.Util where import Sandbox.SafePrint import Control.Concurrent import Control.Concurrent.STM import Control.Exception import Control.Monad import Control.Monad.Base import Control.Monad.IO.Class import Control.Monad.Trans.Resource im...
AaronFriel/hyhac
sandbox/src/Sandbox/Util.hs
bsd-3-clause
4,739
0
14
1,179
1,479
743
736
102
2
import Control.Concurrent import Control.Exception import Control.Monad.IO.Class import Control.Monad.Trans.Maybe import qualified Sound.ALUT as AL import System.IO import MusDrive.OpenAL import MusDrive.Types import MusDrive.Keyboard import MusDrive.Manager import MusDrive.OpenAL.Types hiding (pitch) main :: IO () m...
c000/mus-drive
Main.hs
bsd-3-clause
1,028
0
16
285
330
165
165
34
2
module Search ( solvePuzzle , solvePuzzleThreaded ) where import Control.Concurrent import Control.Monad import Data.PQueue.Prio.Min(MinPQueue) import qualified Data.PQueue.Prio.Min as PQueue import Data.Set(Set) import qualified Data.Set as Set import Node(Node(..)) import qualified Node import qualified Puzz...
mamapanda/8-Puzzle-Solver
src/Search.hs
bsd-3-clause
3,001
0
17
712
732
370
362
59
3
module PScheme.Eval where import PScheme.Reader import PScheme.Env import Data.Traversable (sequence) import Data.Foldable (traverse_) import Control.Applicative (liftA2, (<*>)) import Control.Monad (foldM) import qualified Data.Map.Strict as M import Control.Monad.Trans.Class (lift) import Control.Monad.IO.Class (lif...
lkitching/PScheme
src/PScheme/Eval.hs
bsd-3-clause
14,022
0
19
3,564
5,439
2,727
2,712
341
16
module Network.UDP.Pal.Binary where import Data.Binary import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy as L -- | Encode a value to a strict bytestring encode' :: Binary a => a -> ByteString encode' = L.toStrict . encode -- | Decode a value from a strict bytestring de...
lukexi/udp-pal
src/Network/UDP/Pal/Binary.hs
bsd-3-clause
390
0
6
85
88
52
36
8
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Dependency.Types -- Copyright : (c) Duncan Coutts 2008 -- License : BSD-like -- -- Maintainer : cabal-devel@haskell.org -- Stability : provisional -- Portability : portable -- -- Common...
yihuang/cabal-install
Distribution/Client/Dependency/Types.hs
bsd-3-clause
4,238
0
14
950
558
333
225
52
3
-- | -- Module : Data.Git.Delta -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unix -- module Data.Git.Revision ( Revision(..) , RevModifier(..) , revFromString ) where import Control.Applicative( (<$>), (<*>), (*>), (...
Twinside/hit-simple
Data/Git/Revision.hs
bsd-3-clause
2,343
0
12
784
480
276
204
35
2
{-# LANGUAGE Arrows #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} module RoleApi ( create_role , remove_role , read_roles_for_tenant ) where import Control.Arrow import ...
meditans/haskell-webapps
SpockOpaleye/src/RoleAPi.hs
mit
1,736
1
13
433
450
238
212
46
2
{- | Module : ./GMP/Main.hs - Description : Implementation of main file for the prover - Copyright : (c) Georgel Calin & Lutz Schroeder, DFKI Lab Bremen - License : GPLv2 or higher, see LICENSE.txt - Maintainer : g.calin@jacobs-university.de - Stability : provisional - Portability : portable -...
spechub/Hets
GMP/Main.hs
gpl-2.0
4,215
0
21
1,615
695
347
348
70
8
module Type.Infer where -- $Id$ import Type.Data import Type.Tree import Autolib.Reporter.Type hiding ( result ) import Autolib.ToDoc import Autolib.TES.Term import Autolib.TES.Identifier import Control.Monad ( guard ) type Exp = Term Identifier Identifier infer :: Signature -> Exp -> Reporter Type infer sig ex...
florianpilz/autotool
src/Type/Infer.hs
gpl-2.0
1,665
24
35
554
528
258
270
42
6
isFixedPoint :: (Eq a) => (a -> a) -> a -> Bool isFixedPoint function argument = function argument == argument
evolutics/haskell-formatter
testsuite/resources/source/handles_optional_parentheses/class_constraints/with/Output.hs
gpl-3.0
111
0
8
20
47
24
23
2
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-iam/gen/Network/AWS/IAM/DeleteInstanceProfile.hs
mpl-2.0
3,633
3
9
704
338
209
129
46
1
module GLView where -- OpenGL import Graphics.Rendering.OpenGL as GL import Graphics.GLUtil import Graphics.GLUtil.Camera3D import Linear.V3 import Linear.V4 import Linear.Matrix initGL :: IO (ShaderProgram, GL.VertexArrayObject, GL.VertexArrayObject) initGL = do -- texture Texture2D $= Enabled shadeModel ...
lukexi/bindings-Oculus
test/case2/GLView.hs
apache-2.0
5,701
0
16
1,507
1,874
1,024
850
141
2
{-# LANGUAGE QuasiQuotes, TemplateHaskell #-} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Handler.User ( getUserR , getByIdentR , getFlagR , postFlagR , adminControls ) where import Import import Handler.Root (gravatar) import Data.List (sortBy, intercalate) import Data.Ord (...
danse/haskellers
tests/Handler/User.hs
bsd-2-clause
5,916
0
21
1,831
1,860
941
919
152
8
module Distribution.Client.Dependency.Modular.IndexConversion ( convPIs ) where import Data.List as L import Data.Map as M import Data.Maybe import Data.Monoid as Mon import Prelude hiding (pi) import qualified Distribution.Client.PackageIndex as CI import Distribution.Client.Types import Distribution.Client....
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/Dependency/Modular/IndexConversion.hs
bsd-3-clause
10,752
0
18
2,618
2,775
1,462
1,313
132
9
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE GADTs #-} module Haskell.Ide.Engine.Types where import Data.Aeson import Control.Concurrent.STM.TChan import Haskell.Ide.Engine.PluginDescriptor -- ----------------------------------------------------------------...
ankhers/haskell-ide-engine
src/Haskell/Ide/Engine/Types.hs
bsd-3-clause
927
0
9
233
142
89
53
21
0
{-# LANGUAGE OverloadedStrings #-} module KAT_HMAC (tests) where import qualified Crypto.MAC.HMAC as HMAC import Crypto.Hash (MD5(..), SHA1(..), SHA256(..) , Keccak_224(..), Keccak_256(..), Keccak_384(..), Keccak_512(..) , SHA3_224(..), SHA3_256(..), SHA3_384(..), SHA3_512(..) ...
vincenthz/cryptonite
tests/KAT_HMAC.hs
bsd-3-clause
7,624
0
17
1,229
1,580
817
763
113
1
{-# LANGUAGE CPP #-} -- ---------------------------------------------------------------------------- -- | Base LLVM Code Generation module -- -- Contains functions useful through out the code generator. -- module LlvmCodeGen.Base ( LlvmCmmDecl, LlvmBasicBlock, LiveGlobalRegs, LlvmUnresData, L...
oldmanmike/ghc
compiler/llvmGen/LlvmCodeGen/Base.hs
bsd-3-clause
20,501
0
19
4,658
4,146
2,221
1,925
285
6
----------------------------------------------------------------------------- -- | -- Module : Translation/Component.hs -- Copyright : (c) 2015-2018, Tuura authors -- License : BSD (see the file LICENSE) -- Maintainer : jonathan.r.beaumont@gmail.com -- Stability : experimental -- -- Plato is a tool which embed...
tuura/concepts
translate/Component.hs
bsd-3-clause
6,456
0
12
1,187
1,005
558
447
74
2
{-# LANGUAGE ScopedTypeVariables #-} module Test where import Prelude hiding (id,(.),(<*>),(<$>),pure,(*>),(<*),foldl,print) import qualified Prelude as P import Lojban import OpenCog.Lojban import OpenCog.Lojban.Util import OpenCog.Lojban.Syntax import OpenCog.Lojban.Syntax.Util import OpenCog.Lojban.Syntax.Types i...
leungmanhin/opencog
opencog/nlp/lojban/HaskellLib/test/Test.hs
agpl-3.0
1,431
0
12
363
486
286
200
42
2
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="fr-FR"> <title>Front-End Scanner | ZAP Extension</title> <maps> <homeID>top</homeID> <m...
thc202/zap-extensions
addOns/frontendscanner/src/main/javahelp/org/zaproxy/zap/extension/frontendscanner/resources/help_fr_FR/helpset_fr_FR.hs
apache-2.0
978
78
67
159
417
211
206
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Keter ( keter ) where import Data.Yaml import qualified Data.HashMap.Strict as Map import qualified Data.Text as T import System.Exit import System.Process import Control.Monad import System.Directory hiding (findFiles) import Data.Maybe (mapMaybe) import Data.Monoid i...
MaxGabriel/yesod
yesod-bin/Keter.hs
mit
4,212
0
21
1,488
1,211
609
602
100
20
-- | -- Module : Data.Text.Internal.Encoding.Utf32 -- Copyright : (c) 2008, 2009 Tom Harper, -- (c) 2009, 2010 Bryan O'Sullivan, -- (c) 2009 Duncan Coutts -- -- License : BSD-style -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : portable -- -- /W...
fpco/text-stream-decode
text/Data/Text/Internal/Encoding/Utf32.hs
mit
765
0
9
178
81
54
27
7
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Main where import Control.Concurrent.Async import Control.Monad.IO.Class import Data.Aeson hiding (json) import Data.List (sort) import Data.Maybe ...
sumeetchhetri/FrameworkBenchmarks
frameworks/Haskell/spock/src/Main.hs
bsd-3-clause
3,953
0
13
1,008
1,014
511
503
93
2
{-# LANGUAGE DataKinds, PolyKinds, GADTs, TypeOperators, TypeFamilies, ScopedTypeVariables #-} ----------------------------------------------------------------------------- -- | -- Module : Language.Glambda.Exp -- Copyright : (C) 2015 Richard Eisenberg -- License : BSD-style (see LICENSE) --...
bwmcadams/lambdaconf-2015
speakers/goldfirere/src/Language/Glambda/Exp.hs
artistic-2.0
4,417
0
9
999
1,273
670
603
63
1
{-# LANGUAGE OverloadedStrings #-} module Main where import Network.Wai.Handler.CGI import Network.Wai import Control.Applicative ((<$>)) import Data.Maybe (mapMaybe, fromMaybe) import Network.HTTP.Types.Status (status200) import Network.HTTP.Types.Header (hContentType) import Network.HTTP.Types.URI (queryToQueryText) ...
gbataille/pandoc
trypandoc/trypandoc.hs
gpl-2.0
4,687
0
18
1,691
1,061
575
486
93
7
{-# LANGUAGE ConstraintKinds, FlexibleInstances, TypeFamilies, MultiParamTypeClasses, FlexibleContexts, UndecidableInstances, ScopedTypeVariables #-} module T5515 where class ctx (Arg ctx) => Bome ctx where type BArg ctx instance ctx a => Bome ctx where type BArg ctx = a class C f a class C f (Arg f) => S...
urbanslug/ghc
testsuite/tests/indexed-types/should_fail/T5515.hs
bsd-3-clause
397
0
8
87
118
60
58
-1
-1
{-# LANGUAGE TypeFamilies #-} module ShouldFail where type family T a type instance T (a, [b]) = T (b, b) -- var occurs more often type instance T (a, Maybe b) = T (a, Maybe b) -- not smaller type instance T (a, IO [b]) = T (a, T b) -- nested tyfam application
urbanslug/ghc
testsuite/tests/indexed-types/should_fail/TyFamUndec.hs
bsd-3-clause
281
0
7
74
107
64
43
6
0
{-# LANGUAGE OverloadedStrings #-} -- | -- Module: FizzInput -- Copyright: Copyright (C) 2016 Michael Litchard -- License: LGPL-3 -- Maintainer: Michael Litchard <michael@schmong.org> -- Stability: experimental -- Portability: portable -- Input handling functions module FizzInput ( -- | -- These functions...
mlitchard/swiftfizz
src/FizzInput.hs
isc
1,357
0
10
336
257
143
114
23
2
{-# htermination readLn :: IO (Ratio Int) #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_readLn_7.hs
mit
46
0
2
8
3
2
1
1
0
module ExercisesSpec (spec) where import Test.Hspec import Exercises spec :: Spec spec = do describe "myLast" $ do it "myLast" $ do myLast [1..10] `shouldBe` (10 :: Int) describe "myButLast" $ do it "myButLast" $ do myButLast [1..10] `shouldBe` (9 :: Int) describe "insertAt" $ do it "in...
FunctionalThinking/ninety-nine
tests/ExercisesSpec.hs
mit
466
0
15
123
195
97
98
17
1
module OpenBrain.CSV where import Control.Monad import Control.Applicative import Control.Monad.Trans import Data.List import qualified Data.Csv as CSV import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString as B import qualified Data.Vector as V import qualified Data.HashMap.Strict as HM import ...
openbrainsrc/obutils
OpenBrain/CSV.hs
mit
1,991
0
10
286
707
386
321
36
1
module Parsing where import Data.Array.Repa (ix2) import Language.Haskell.Interpreter import Control.Monad import System.IO import Task fromInterpreter :: FilePath -> String -> Interpreter a -> IO a fromInterpreter file moduleName intf = do res <- runInterpreter intf' case res of Left err -> fail $ show err...
NCrashed/radio-problem
src/solver/Parsing.hs
mit
2,158
0
15
448
690
340
350
46
2
module NGrams where import Control.Applicative import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BSC data NGram = NGram { ngFreq :: Double , ngWord :: BS.ByteString , ngPartOfSpeech :: BS.ByteString } readNGrams :: FilePath -> IO [NGram] readNGrams f = map readNGramLine...
dancor/melang
src/NGrams.hs
mit
640
0
9
125
206
115
91
16
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Text.Inflections.TitleizeSpec (spec) where import Test.Hspec import Text.Inflections #if !MIN_VERSION_base(4,8,0) import Control.Applicative #endif spec :: Spec spec = describe "titleize" $ do it "converts two words to title case" $ do ...
stackbuilders/inflections-hs
test/Text/Inflections/TitleizeSpec.hs
mit
620
0
13
119
143
74
69
15
1
{-# LANGUAGE RecordWildCards , TypeApplications , MultiWayIf , OverloadedStrings , BlockArguments #-} module XMonad.Javran.SysInfoBar.MemUsage ( MemUsage ) where import Control.Concurrent import Control.Monad import Data.Attoparsec.ByteString.Char8 import Data.Char import Data.String import Data.Word...
Javran/xmonad-javran
src/XMonad/Javran/SysInfoBar/MemUsage.hs
mit
1,564
0
16
340
430
230
200
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE Templ...
smurphy8/contraption
dev/contraption/src/Language/Contraption/Internal.hs
mit
740
0
8
241
76
48
28
19
1
-- | Pairing heap implementation of a priority queue -- TODO: modernize for GHC 7.10 - might just mean modifying these pragmas / imports, -- maybe change fold name in pairing? {-# LANGUAGE DeriveFunctor, DeriveFoldable #-} module PairingHeap where import Data.Functor import Data.Monoid -- import Data.Foldable import Da...
sergsr/algos-and-data-structs
haskell/misc/PairingHeap.hs
mit
1,931
0
10
474
584
310
274
34
2
module Example.Todo where import Control.Category hiding ((<<<), (>>>)) import Melchior.Control import Melchior.Data.String import Melchior.Dom import Melchior.Dom.Events import Melchior.Dom.Html import Melchior.Dom.Selectors import Melchior.EventSources.Mouse import Melchior.Time import Prelude hiding ((.), id, head...
kjgorman/melchior
example/assets/hs/todo.hs
mit
2,128
0
16
537
637
331
306
37
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ViewPatterns #-} module Web.Notebook.Dispatch where import Dat...
lhoghu/intranet
Web/Notebook/Dispatch.hs
mit
801
0
8
174
131
77
54
21
0
{- Copyright (c) 2015 Nils 'bash0r' Jonsson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
project-horizon/framework
src/lib/Language/Transformation/Semantics/Scope.hs
mit
1,797
0
10
319
62
38
24
5
0
{-| Module : Main Description : Main entrypoint for Pansite spec tests Copyright : (C) Richard Cook, 2017-2018 Licence : MIT Maintainer : rcook@rcook.org Stability : experimental Portability : portable -} {-# OPTIONS_GHC -F -pgmF hspec-discover #-}
rcook/pansite
spec/Spec.hs
mit
264
0
2
52
4
3
1
1
0
module Common.SrcLoc where import Data.Word8 import Data.Char import Common.Pretty import qualified Text.PrettyPrint.HughesPJ as PP -- | Source location information data SrcLoc = SrcLoc { srcFilename :: String , srcLine :: !Int , srcColumn :: !Int } -- ^ ...
QuickChick/Luck
luck/src/Common/SrcLoc.hs
mit
1,236
0
11
412
402
211
191
33
1
{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses , ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module Hablog.Admin.Pages.Login ( login , loginRequired ) where import Prelude hiding (head) import Control.Applicative import Control.Monad.Trans.Class (lift) import Datab...
garrettpauls/Hablog
src/Hablog/Admin/Pages/Login.hs
mit
3,325
0
20
737
974
519
455
76
3
module Walnut.Sources ( module Source ) where import Walnut.Sources.ZMQ as Source
Reisen/Walnut
lib/walnut-core/src/Walnut/Sources.hs
mit
87
0
4
16
20
14
6
3
0
module Music.UtilsTest where import Control.Monad import Data.Either.Combinators (isRight, fromRight') import Data.List (findIndex, elemIndex, sort, group) import Data.Maybe (fromJust) import qualified Data.Vector as DV import Music.RealSimpleMusic.Music.Data import Music.RealSimpleMusic.Music.Utils import Test.HUnit ...
tomtitchener/RealSimpleMusic
tests/Music/UtilsTest.hs
cc0-1.0
6,395
0
15
1,225
1,787
961
826
129
2
{- - The Lambda Shell, an interactive environment for evaluating pure untyped lambda terms. - Copyright (C) 2005-2011, Robert Dockins - - 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 Founda...
robdockins/lambda-shell
src/LambdaCmdLine.hs
gpl-2.0
11,207
0
16
3,080
2,844
1,475
1,369
205
21
module LoanUserInterface where import BWLib import Loans import LoanCalculator import LoanConfiguration import LoanConfigurationType -- ============================= -- Functions to be given to user -- ============================= -- Create full classical calculator for some predefined types of loans. ...
bartoszw/elca
LoanUserInterface.hs
gpl-2.0
27,665
5
18
10,683
5,518
2,892
2,626
245
12
module HLinear.NormalForm.PLE ( ple, HasPLE , PLEHook(..) ) where import HLinear.Utility.Prelude import HFlint.FMPQ import HLinear.Hook.PLEHook ( PLEHook(..) ) import HLinear.Matrix.Definition ( Matrix ) import HLinear.NormalForm.FoldUnfold.PLE.DivisionRing ( ple, HasPLE ) -- import qualified HLinear.NormalFor...
martinra/hlinear
src/HLinear/NormalForm/PLE.hs
gpl-3.0
623
0
6
108
82
57
25
8
0
{-# LANGUAGE CPP #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad import Control.Concurrent.Async import System.Environment import System.Console.GetOpt import System.Directory import System.Pusher import System.Exit import Network.HTTP.Client import Networ...
schell/pusher
src/Pusher.hs
gpl-3.0
3,644
0
22
1,265
998
506
492
76
3
{- Copyright (C) 2015 Leon Medvinsky 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 3 of the License, or (at your option) any later version. This program is distributed in the hope t...
raymoo/NEET
src/Neet/Network.hs
gpl-3.0
5,800
0
16
1,773
1,338
728
610
78
2
{-# OPTIONS_GHC -XRecordWildCards #-} module Main where import System (getArgs,getProgName) import System.Exit (exitSuccess) import System.IO import Control.Monad (join, forM_, liftM) import Char (toLower) import Data.List ( isInfixOf, isPrefixOf, sortBy, inte...
xcthulhu/lambda-geda
vhdl-to-sym.hs
gpl-3.0
12,098
1
22
4,438
4,063
2,282
1,781
-1
-1
import Hledger.Cli (tests_Hledger_Cli) import Test.Framework.Providers.HUnit (hUnitTestToTests) import Test.Framework.Runners.Console (defaultMain) main :: IO () main = defaultMain $ hUnitTestToTests tests_Hledger_Cli
kmels/hledger
hledger/tests/suite.hs
gpl-3.0
219
0
6
20
57
33
24
5
1
module FrSIRSSpatial.Run ( runFrSIRSSpatialWithRendering, runFrSIRSSpatialTimeAndRender, runFrSIRSSpatialTimeAndWriteToFile, runFrSIRSSpatialReplicationsAndWriteToFile, debugFrSIRSSpatialWithRendering ) where import FRP.Yampa import FrSIRSSpatial.Init import FrSIRSSpatial.Model import FrSIRSSp...
thalerjonathan/phd
coding/libraries/chimera/examples/ABS/SIRExamples/FrSIRSSpatial/Run.hs
gpl-3.0
5,936
0
18
1,644
1,066
569
497
106
1
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE RecordWildCards #-} module VirMat.Types where import qualified Data.IntMap as IM import DeUni.DeWall import VirMat.Core.VoronoiMicro data Simulat...
lostbean/VirMat
src/VirMat/Types.hs
gpl-3.0
480
0
11
118
84
52
32
15
0
{-# LANGUAGE OverloadedStrings #-} -- Copyright (c) 2011, Diego Souza -- 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...
dgvncsz0f/tiktok
src/main/TikTok/Plugins/Bitly.hs
gpl-3.0
6,247
0
14
1,810
1,571
847
724
89
2
module Means ( ostTest , tstTest ) where import Dispersion ostTest :: (Fractional a, Floating a) => [a] -> a -> a ostTest vals testmean = let mx = mean vals s = standardDev vals sample = fromIntegral((length vals) - 1) in (mx - testmean) / (s / sqrt sample) tstTest :: (Fractional a, Floating...
R-Morgan/hasStat
Means.hs
gpl-3.0
503
0
14
141
241
127
114
15
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Settings/SendAs/List.hs
mpl-2.0
3,429
0
14
759
315
197
118
53
1
module Main where import qualified HLol.API.MatchHistory as MatchHistory import qualified HLol.API.Match as Match import qualified HLol.API.Summoner as Summoner import qualified HLol.API.Champion as Champion import qualified HLol.API.Game as Game import qualified HLol.API.League as League import qualified HLol.API.Lol...
tetigi/hlol
test/Main.hs
agpl-3.0
6,749
0
10
1,127
1,430
785
645
146
1
pr :: [String] -> IO() pr [] = do putStrLn "" return () pr (s:[]) = do putStrLn s return () pr (s:sx) = do putStr (s++" ") pr sx return () main = do l <- getContents let i = (lines l)!!1 o = reverse $ words i pr o
a143753/AOJ
ITP1_6_A.hs
apache-2.0
241
0
12
78
164
75
89
16
1
-- This file is part of "Loopless Functional Algorithms". -- Copyright (c) 2005 Jamie Snape, Oxford University Computing Laboratory. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- ...
snape/LooplessFunctionalAlgorithms
LooplessGrayRose.hs
apache-2.0
1,443
0
10
348
349
187
162
18
2
module PowerDivisibility.A277803Spec (main, spec) where import Test.Hspec import PowerDivisibility.A277803 (a277803) main :: IO () main = hspec spec spec :: Spec spec = describe "A277803" $ it "correctly computes the first 20 elements" $ take 20 (map a277803 [1..]) `shouldBe` expectedValue where expectedV...
peterokagey/haskellOEIS
test/PowerDivisibility/A277803Spec.hs
apache-2.0
381
0
10
59
160
95
65
10
1
module Text.RSS.Export.Tests where import Test.HUnit (Assertion, assertEqual) import Test.Framework (Test, mutuallyExclusive, testGroup) import Test.Framework.Providers.HUnit (testCase) import Text.RSS.Export import Text.RSS.Syntax import Text.XML.Light as XML import Text.RSS.Utils (createContent, createQName) import ...
danfran/feed
tests/Text/RSS/Export/Tests.hs
bsd-3-clause
10,955
2
20
4,340
2,449
1,414
1,035
229
1
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE...
notae/haskell-exercise
lens/CP.hs
bsd-3-clause
5,851
0
13
1,684
2,006
1,072
934
143
4
{-# LANGUAGE TemplateHaskell #-} module Client.ParticleT where import Data.Int (Int8) import Control.Lens (makeLenses) import qualified Data.Vector.Unboxed as UV import Types data ParticleT = ParticleT { _pColors :: UV.Vector Int8 , _pVertexArray :: UV.Vector Float , _pColorTable :: UV.Vect...
ksaveljev/hake-2
src/Client/ParticleT.hs
bsd-3-clause
409
0
10
101
100
58
42
12
0
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE PartialTypeSignatures #-} {-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-partial-type-signatures #-} {-| Module : AERN2.MP.Ball.Field Description : Field operations on arbitrary precision dyadic balls Copyright : (c) Michal Konecny License ...
michalkonecny/aern2
aern2-mp/src/AERN2/MP/Ball/Field.hs
bsd-3-clause
8,556
0
14
2,046
2,570
1,350
1,220
-1
-1
{-# LANGUAGE PatternGuards, ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {- Find bindings within a let, and lists of statements If you have n the same, error out <TEST_DISABLED_1150> foo = a where {a = 1; b = 2; c = 3} \ bar = a where {a = 1; b = 2; c = 3} -- ??? main = do a; a; a; a main = do a; a; a; a...
ndmitchell/hlint
src/Hint/Duplicate.hs
bsd-3-clause
4,464
0
21
1,208
1,570
855
715
74
4
{-# LANGUAGE OverloadedStrings #-} module AppendInsertBuilder where import Data.List.Split import System.Directory import Data.Maybe import qualified System.IO as IO import Data.Ord import Data.List import qualified Data.Map as M import qualified System.Random.Shuffle as Rand import Control.Monad.Random import Control...
steveshogren/haskell-katas
src/AppendInsertBuilder.hs
bsd-3-clause
1,395
0
15
236
542
297
245
37
2
-- | Description: Literal GraphQL values {-# LANGUAGE PatternSynonyms #-} module GraphQL.Value ( Value , Value'(..) , ConstScalar , UnresolvedVariableValue , pattern ValueInt , pattern ValueFloat , pattern ValueBoolean , pattern ValueString , pattern ValueEnum , pattern ValueList , pattern ValueOb...
jml/graphql-api
src/GraphQL/Value.hs
bsd-3-clause
1,574
0
6
358
344
232
112
74
0