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 RecordWildCards #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE BangPatterns #-} module AtnBot.DB ( DBHandle , newDBHandle , commitEvent , getState ) where import Control.Lens import Control.Monad import Data.IORef import Data.Text (Text) import qualifi...
asayers/attendancebot
src/AtnBot/DB.hs
mit
1,762
0
13
365
502
250
252
49
1
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-missing-import-lists #-} {-# OPTIONS_GHC -fno-warn-implicit-prelude #-} module Paths_largest_series_product ( version, getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as...
c19/Exercism-Haskell
largest-series-product/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/autogen/Paths_largest_series_product.hs
mit
2,581
0
10
239
410
238
172
33
1
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} module PostgREST.DbStructure.Relationship ( Cardinality(..) , PrimaryKey(..) , Relationship(..) , Junction(..) , isSelfReference ) where import qualified Data.Aeson as JSON import PostgREST.DbStructure.Table (Column (..), Table (..)) import...
steve-chavez/postgrest
src/PostgREST/DbStructure/Relationship.hs
mit
1,633
0
9
316
315
199
116
37
1
{-# htermination sum :: [Float] -> Float #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_sum_3.hs
mit
45
0
2
8
3
2
1
1
0
#!/usr/bin/env stack -- stack --install-ghc runghc --package turtle {-# LANGUAGE OverloadedStrings #-} import Turtle main = stdout (inproc "awk" ["{ print $1 }"] "123 456")
JoshuaGross/haskell-learning-log
Code/turtle/awk.hs
mit
186
0
8
38
28
16
12
3
1
module DNA (count, nucleotideCounts) where import Data.Map (Map, fromList) count :: Char -> String -> Int count c s = if c `elem` "ACGTU" then count' c s else error ("invalid nucleotide '" ++ [c] ++ "'") count' :: Char -> String -> Int count' c s = length $ filter (== c) s nucleotideCounts :: String -> Map ...
tfausak/exercism-solutions
haskell/nucleotide-count/DNA.hs
mit
390
0
10
85
167
91
76
10
2
{-| Module : Language.Common.Pretty Description : Pretty-printer definition and combinators. Copyright : (c) Jacob Errington and Frederic Lafrance, 2016 License : MIT Maintainer : goto@mail.jerrington.me Stability : experimental The "Pretty" class is essentially a clone of the "Text.Show.Show" class, but...
djeik/goto
libgoto/Language/Common/Pretty.hs
mit
2,483
0
14
561
578
309
269
52
2
--type Parser a = String -> Tree --type Parser a = String -> Maybe (Tree, String) --data Maybe a = Nothing | Just a type Parser a = String -> [(a,String)] -- using a list for convenience item :: Parser Char item = \inp -> case inp of [] -> [] (x:xs) -> [(x, xs)] failure :: Par...
feliposz/learning-stuff
haskell/c9lectures-ch8.hs
mit
955
0
10
268
262
148
114
15
2
module SemiGroup6 where import Data.Semigroup import Test.QuickCheck import SemiGroupAssociativeLaw import Test.HUnit newtype BoolConj = BoolConj Bool deriving (Eq, Show) instance Semigroup BoolConj where BoolConj False <> _ = BoolConj False _ <> x = x instance Arbitrary BoolConj where arbitrary = ...
NickAger/LearningHaskell
HaskellProgrammingFromFirstPrinciples/Chapter15.hsproj/SemiGroup6.hs
mit
880
0
11
155
244
126
118
19
1
{-# OPTIONS_GHC -Wno-partial-fields #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} module GitHubRelease ( Command(..) , main , runCommand , upload , getUploadUrl , ...
tfausak/github-release
source/library/GitHubRelease.hs
mit
10,898
0
17
2,479
2,996
1,533
1,463
-1
-1
module Ch11.Vigenere where import Ch9.Caesar import Data.Char import Data.List -- prompts the user to enter a message and keyword -- shows the encoded message on screen main :: IO () main = do putStrLn "enter your message: " message <- getLine putStrLn "enter a key phrase: " key <- getLine putStrLn $ ...
andrewMacmurray/haskell-book-solutions
src/ch11/vigenere.hs
mit
1,367
0
11
352
434
222
212
39
2
module L4Engine where import Data.Word (Word64) import Data.Bits import Data.List import Data.List.Split import Data.Char import Numeric (showHex) type Bitboard = Word64 data Position = Position { pawns :: Bitboard , rooks :: Bitboard , knights :: Bitboard ...
george-lamperis/l4-engine
src/L4Engine.hs
mit
6,897
0
16
2,197
1,944
1,033
911
152
5
-- -- This code was created by Jeff Molofee '99 (ported to Haskell GHC 2005) -- module Main where -- import Graphics.UI.GLUT import qualified Graphics.UI.GLFW as GLFW -- everything from here starts with gl or GL import Graphics.Rendering.OpenGL.Raw import Graphics.Rendering.GLU.Raw ( gluPerspective ) import Data.Bits...
spetz911/progames
nehe-tuts-0.2.3/lesson01.hs
mit
3,039
0
11
788
545
279
266
62
1
{-# OPTIONS_GHC -Wall #-} module Reporting.Error.Helpers where import Data.Function (on) import qualified Data.List as List import Elm.Utils ((|>)) -- NEARBY NAMES nearbyNames :: (a -> String) -> a -> [a] -> [a] nearbyNames format name names = let editDistance = if length (format name) < 3 then 1 else 2 ...
rgrempel/frelm.org
vendor/elm-format/parser/src/Reporting/Error/Helpers.hs
mit
792
0
17
220
284
156
128
25
2
{-# LANGUAGE DeriveGeneric, TemplateHaskell #-} import Game.Cosanostra.Glue.Instances.JSON () import Game.Cosanostra.Ballot import Game.Cosanostra.Lenses import Game.Cosanostra.Types import Control.Lens import qualified Data.ByteString.Char8 as BS import Data.Aeson.TH import Data.Yaml import GHC.Generics import Syst...
rfw/cosanostra
glue/vote.hs
mit
1,214
4
12
327
329
174
155
33
1
module Types(NumericType, SExpr(..), SFunction) where import Data.List import System.IO -- to easily change it later if necessary type NumericType = Double data SExpr = Atom String | Number NumericType | String String | Boolean Bool | List [SExpr] | Sequence [SExpr] -- | Func String [SExpr] | ExecFunc S...
stefan-j/slang
Types.hs
gpl-2.0
2,604
4
12
572
972
512
460
56
2
-- | "Sound.File.Sndfile" provides a Haskell interface to the libsndfile library by Erik de Castro Lopo (visit the library's website at <http://www.mega-nerd.com/libsndfile/>). -- The API is modeled after the original /C/ API, but type and function identifiers follow Haskell naming conventions. module Sound.File.Sndfil...
kfish/hsndfile
Sound/File/Sndfile.hs
gpl-2.0
1,150
0
5
212
207
146
61
24
0
-- | The core types for the URL application module URLLogs.Types ( -- | This module provides types for handling URL log records -- * Core Types URL(..), Scheme(..), Method(..), SquidLogLine(..), ) where import qualified Data.ByteString.Char8 as S -- | The scheme used to access the resource data Scheme ...
ArthurClune/haskell-urllogs
lib/URLLogs/Types.hs
gpl-3.0
2,350
0
10
625
358
228
130
33
0
{- Rabobank - Convert Rabobank CSV exports to QIF files Copyright (C) 2012 Sander Venema <sander.venema@gmail.com> 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 ...
sandervenema/rabocsv2qif
ListUtils.hs
gpl-3.0
2,430
0
13
498
243
145
98
11
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Parser where import Data.Int import Data.Word import Data.Bits import Data.Binary.Get import Control.Applicative (Applicative) import Control.Monad.Except import Control.Monad.State.Lazy import Control.Monad.Trans.Class () im...
stappit/fit-parser
library/Parser.hs
gpl-3.0
2,591
0
10
672
675
361
314
92
2
module Hadolint.Rule.Shellcheck (rule) where import qualified Data.Set as Set import qualified Data.Text as Text import Hadolint.Rule import Hadolint.Shell (ParsedShell) import qualified Hadolint.Shell as Shell import Language.Docker.Syntax import qualified ShellCheck.Interface rule :: Rule ParsedShell rule = customR...
lukasmartinelli/hadolint
src/Hadolint/Rule/Shellcheck.hs
gpl-3.0
1,866
0
14
369
569
302
267
35
6
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/SetTarget.hs
mpl-2.0
5,570
0
19
1,274
638
380
258
101
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.AlertCenter.Types -- Copyright : (c) 2015-2016 Brendan...
brendanhay/gogol
gogol-alertcenter/gen/Network/Google/AlertCenter/Types.hs
mpl-2.0
9,031
0
7
2,364
1,015
703
312
293
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {- | Description : Haskell server for Facebook's react-tutorial. Copyright : (c) Alexander Berntsen 2016 License : AGPL-3 Maintainer : alexander@plaimi.net -} import Control.Monad.IO.Class (liftIO) import Data.ByteString (readFile) imp...
alexander-b/react-tutorial-haskell-server
server.hs
agpl-3.0
2,029
2
14
426
594
312
282
48
1
{-| This package provides functions for parsing and evaluating bitcoin transaction scripts. Data types are provided for building and deconstructing all of the standard input and output script types. -} module Network.Haskoin.Script ( -- *Scripts -- | More informations on scripts is available here: -- <http:...
plaprade/haskoin
haskoin-core/src/Network/Haskoin/Script.hs
unlicense
1,482
0
5
209
231
162
69
56
0
{-# LANGUAGE UnicodeSyntax #-} module Main where import Control.Applicative ((<|>), (*>), Applicative) import Control.Lens ((%~), (&)) import Control.Monad import Data.Bits import Yi import Yi.FuzzyOpen import Yi.Hoogle import Yi.Style.Mo...
Fuuzetsu/yi-config
yi.hs
unlicense
2,407
0
13
673
718
385
333
58
1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Application ( getApplicationDev , appMain , develMain , makeFoundation , makeLogWare -- * for DevelMain , getApplicationRepl , shutdownApp -- * for GHCI , handler ) where import Control.Monad.Logger (liftLoc) impor...
philipmw/yesod-website
Application.hs
unlicense
5,600
0
13
1,457
879
471
408
-1
-1
{-# LANGUAGE FlexibleInstances,TypeSynonymInstances,MultiParamTypeClasses,NoMonomorphismRestriction #-} {-# OPTIONS_GHC -XUndecidableInstances #-} module LLVM.Slicing.Data.SliceType ( -- * Types LabelType, LabelSet, SliceTable, -- * Constructor lkpSli, mrgSli, updSli, updSli2, updSlices, xtdSli, xtd...
zhangyz/llvm-slicing
src/LLVM/Slicing/Data/SliceType.hs
apache-2.0
3,561
0
15
923
1,071
597
474
-1
-1
import Data.List (tails) import Math.NumberTheory.Powers.Squares (isSquare') import Helpers.ListHelpers (firstDifferences) triangles = map (\n -> n * (n + 1) `div` 2) [1..] squares = map (^2) [1..] pentagons = map (\n -> n*(3*n - 1) `div` 2) [1..] a000404_list :: [Integer] a000404_list = sumOfTwo squares a003325_l...
peterokagey/haskellOEIS
src/Sandbox/OEIS/FigurateSums.hs
apache-2.0
2,501
2
17
473
1,192
656
536
60
1
makeTriangle :: Int -> Int -> IO () makeTriangle wholenum lineInd | lineInd < 0 || wholenum < lineInd = return () | otherwise = do makeALine wholenum lineInd makeTriangle wholenum (lineInd+1) makeALine :: Int -> Int -> IO () makeALine w i = let space = 2 * (w - 1) + 1 taken = ...
ccqpein/Arithmetic-Exercises
Make-Triangle/MT.hs
apache-2.0
827
1
17
350
340
174
166
22
1
{- Bounding.hs - Bounding Volume Heirarchy - - Timothy A. Chagnon - CS 636 - Spring 2009 -} module Bounding where import Primitive import Mesh import Math import Ray data Bounding = BoundingBox !Vec3f !Vec3f | Unbounded deriving (Show, Eq) -- Construct a bounding volume from a primitive boundi...
tchagnon/cs636-raytracer
a6/Bounding.hs
apache-2.0
2,641
0
31
748
1,041
554
487
65
3
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-missing-import-lists #-} {-# OPTIONS_GHC -fno-warn-implicit-prelude #-} module Paths_expressionbook ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception import Data...
xunilrj/sandbox
sources/haskell/expressionbook/.stack-work/dist/b7fec021/build/autogen/Paths_expressionbook.hs
apache-2.0
2,090
0
10
223
371
215
156
31
1
module Problem078 where import Data.Function.Memoize main = print $ head $ filter (\i -> partitions i `rem` 10 ^ 6 == 0) [2..] partitions :: Integer -> Integer partitions = memoize partitions' where partitions' n | n < 0 = 0 | n == 0 = 1 | otherwise = sum $ zipWith (*) cs ps...
vasily-kartashov/playground
euler/problem-078.hs
apache-2.0
552
0
15
188
264
142
122
15
1
{- Copyrights (c) 2016. Samsung Electronics Ltd. All right reserved. 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable l...
ryzhyk/cocoon
cocoon/NS.hs
apache-2.0
4,706
0
11
1,277
1,485
758
727
86
2
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 709 {-# LANGUAGE AutoDeriveTypeable #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Trans.Writer.Lazy -- Copyright : (c) Andy Gill 2001, -- (c) Oregon Graduate Institute of Sci...
holoed/Junior
lib/transformers-0.4.3.0/Control/Monad/Trans/Writer/Lazy.hs
apache-2.0
8,134
0
14
1,760
2,299
1,248
1,051
113
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -------------------...
getyourguide/fbthrift
thrift/compiler/test/fixtures/includes/gen-hs/Module_Types.hs
apache-2.0
6,445
0
18
917
1,675
981
694
90
4
{- xover.hs Description: Random crosses of two random vectors License: GPL-3 This code creates two random boolean vectors and mixes them at random positions by splitting and gluing them. The time elapsed between the first and the last crossing is measured. -} import Prelude hiding (splitAt) import Data.Sequence hiding...
geneura-papers/2016-ea-languages-PPSN
haskell/xover.hs
artistic-2.0
2,137
3
14
461
637
340
297
38
1
{-# LANGUAGE OverloadedStrings #-} module TestUtils (getTWInfo) where import qualified Data.ByteString.Char8 as S8 import System.Environment import Web.Twitter.Conduit getOAuthTokens :: IO (OAuth, Credential) getOAuthTokens = do consumerKey <- getEnv' "OAUTH_CONSUMER_KEY" consumerSecret <- getEnv' "OAUTH_CON...
himura/twitter-conduit
tests/TestUtils.hs
bsd-2-clause
934
0
12
261
207
113
94
25
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QLineEdit.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:36 Warning : this file is machine generated - do not...
uduki/hsQt
Qtc/Enums/Gui/QLineEdit.hs
bsd-2-clause
2,449
0
18
542
623
318
305
57
1
{-# LANGUAGE OverloadedStrings #-} module Main where import Prelude hiding (lookup) import Control.Applicative ((<$>)) import Data.Aeson (decode') import qualified Data.ByteString.Char8 as B8 import qualified Data.ByteString.Lazy.Char8 as L8 import Data.Maybe (fromJust) import Data.Time.Clock (getCurrentTime) import ...
mkscrg/wheresmikecraig
recorder/main.hs
bsd-2-clause
2,075
0
19
428
674
364
310
52
3
module Data.Drasil.Concepts.Documentation where import Language.Drasil hiding (organization, year) import Utils.Drasil import Data.Drasil.Concepts.Math (graph, unit_) import Data.Drasil.IdeaDicts (dataDefn, documentc, genDefn, inModel, softEng, thModel) import Control.Lens ((^.)) doccon :: [NamedChunk] doccon = [ab...
JacquesCarette/literate-scientific-software
code/drasil-data/Data/Drasil/Concepts/Documentation.hs
bsd-2-clause
20,611
0
10
6,805
4,516
2,608
1,908
267
1
{-# LANGUAGE OverloadedStrings #-} module Budget.Core.StoreSpec (spec) where import Test.Hspec import Budget.Core spec :: Spec spec = describe "Control" $ do describe "Store" $ do it "" $ do pending
utky/budget
test/Budget/Core/StoreSpec.hs
bsd-3-clause
243
0
13
74
63
33
30
10
1
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE OverloadedStrings #-} module Serv.Server.Core.Config.Types ( Config(..) , LogAppender(..) , LogConfig(..) , ManagementConfig(..) , Port , ServerConfig(..) , ...
orangefiredragon/bear
src/Serv/Server/Core/Config/Types.hs
bsd-3-clause
1,234
0
9
312
299
188
111
42
0
{-# LANGUAGE TypeSynonymInstances #-} module LaTeXGrapher.Math ( MinMax , mmMin , mmMax , mmUnion , mmContains , mmAdd , mmSub , mmWidth , mmHeight , inOpenInterval , inClosedInterval , includePoints , MinMaxable(..) , Point , dfloor , dceiling ...
fryguybob/LaTeXGrapher
src/LaTeXGrapher/Math.hs
bsd-3-clause
1,993
0
10
527
825
444
381
66
1
{- (c) The University of Glasgow 2006 Functions for working with the typechecker environment (setters, getters...). -} {-# LANGUAGE CPP, ExplicitForAll, FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module TcRnMonad( -- * Initalisation initTc, initTcInteractive, initTcForLookup, initTcRnIf, -- ...
mettekou/ghc
compiler/typecheck/TcRnMonad.hs
bsd-3-clause
67,647
73
25
20,264
14,646
7,722
6,924
1,077
7
module Turbinado.Server.ErrorHandler where import System.IO import Prelude hiding (catch) import Data.Dynamic ( fromDynamic ) import Network.Socket import Turbinado.Controller.Monad import Turbinado.Environment.Types import Turbinado.Environment.Response import Turbinado.Server.Exception import Turbinado.Server.Netwo...
alsonkemp/turbinado-website
Turbinado/Server/ErrorHandler.hs
bsd-3-clause
2,265
0
22
969
430
217
213
39
10
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS -Wall -fno-warn-missing-signatures #-} import Language.LaTeX import qualified Language.LaTeX.Builder as B import Data.String () main = quickView testViewOpts "indented-itemizes" root root = B.root preamb $ B.document doc preamb = B.documentclass (Just (B.pt 11)) (Just B...
np/hlatex
examples/indented-itemizes.hs
bsd-3-clause
794
4
10
177
248
131
117
15
1
{-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE TemplateHaskell #-} {-# options_ghc -Wno-missing-pattern-synonym-signatures #-} module Data.Bifunctor.FoldableSpec where import Test.Hspec hiding (Spec) import qualified Test.Hspec as Test import Data.Bifunctor.Foldable import Data.Bifunctor.TH data ExprF expr val = ...
dorchard/gram_lang
frontend/tests/hspec/Data/Bifunctor/FoldableSpec.hs
bsd-3-clause
1,670
0
23
594
546
283
263
47
5
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-| This library exports two utilities for compiling Dhall expressions to Bash: * `dhallToExpression`, which emits a Bash expression (i.e. a valid right-hand side for an assignment) * `dhallToSta...
Gabriel439/Haskell-Dhall-Bash-Library
src/Dhall/Bash.hs
bsd-3-clause
9,383
3
21
2,287
1,305
683
622
108
10
-- FIXME: lots of code duplication in this module module Handler.Browse where import Import import Handler.Utils import Model.Author import Model.Browse import Model.Collection import Model.Resource import Model.Tag import Model.User import Model.Utils import View.Browse import Database.Esqueleto (asc, desc) import...
mitchellwrosen/dohaskell
src/Handler/Browse.hs
bsd-3-clause
12,460
0
16
3,220
2,802
1,380
1,422
-1
-1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedLists #-} -- | The Earley grammar for every production in -- "Penny.Copper.Grammar". module Penny.Copper.EarleyGrammar where import qualified Penny.Copper.Productions as Productions import qualified Penny.Copper.Types as Types import Penny.Copper.Grammar import...
massysett/penny
penny/lib/Penny/Copper/EarleyGrammar.hs
bsd-3-clause
686
0
8
86
92
60
32
10
1
----------------------------------------------------------------------------- -- | -- Module : Graphics.HGL.Internals.Types -- Copyright : (c) Alastair Reid, 1999-2003 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : internal -- Port...
FranklinChen/hugs98-plus-Sep2006
packages/HGL/Graphics/HGL/Internals/Types.hs
bsd-3-clause
3,368
0
6
573
307
213
94
38
1
-- -- Copyright © 2013-2015 Anchor Systems, Pty Ltd and Others -- -- The code in this file, and the program it is a part of, is -- made available to you by its authors as open source software: -- you can redistribute it and/or modify it under the terms of -- the 3-clause BSD licence. -- -- /Description/ -- This module ...
anchor/ceilometer-common
lib/Ceilometer/Types/Volume.hs
bsd-3-clause
3,123
0
13
1,058
775
452
323
-1
-1
-- | -- This library offers a wrapper around the Mt.Gox API. It focuses, above all, -- on reliability, in that many actions - if they are idempotent - are -- automatically retried for some time in case of errors (using -- "Control.Watchdog"). -- -- The library is able to maintain a copy of the current Mt.Gox order book...
javgh/mtgoxapi
Network/MtGoxAPI.hs
bsd-3-clause
6,236
0
11
1,207
747
434
313
67
1
{-# LANGUAGE CPP #-} module Database.V5.Bloodhound.Types.Class ( Seminearring(..) ) where #if !MIN_VERSION_base(4,8,0) import Data.Monoid #endif class Monoid a => Seminearring a where -- 0, +, * (<||>) :: a -> a -> a (<&&>) :: a -> a -> a (<&&>) = mappend infixr 5 <||> infixr 5 <&&>
bermanjosh/bloodhound
src/Database/V5/Bloodhound/Types/Class.hs
bsd-3-clause
309
0
8
74
90
56
34
10
0
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Monadic type operations This module contains monadic operations over types that contain mutable type variables -} {-# LANGUAGE CPP, TupleSections, MultiWayIf #-} module TcMType ( TcTyVar, TcKind, TcType, TcTauType, Tc...
gridaphobe/ghc
compiler/typecheck/TcMType.hs
bsd-3-clause
51,123
6
21
14,275
9,441
4,919
4,522
-1
-1
fibs = 1:1:(zipWith (+) (tail fibs) fibs) main = print . head $ filter (> 10^1000) fibs
tricorder42/project-euler
25_thousand_digit_fibonacci/25_thousand_digit_fibonacci.hs
bsd-3-clause
88
0
9
17
58
31
27
2
1
module Benchmark.IntervalSet where import Control.DeepSeq import Data.IntervalSet instance NFData Tree where rnf (Node l i r) = seq (rnf l) (seq i (rnf r)) rnf t = seq t () instance NFData IntervalSet where rnf (IntervalSet i t) = seq i (rnf t) rnf s = seq s ()
ian-mi/interval-set
benchmarks/Benchmark/IntervalSet.hs
bsd-3-clause
295
0
10
82
132
66
66
9
0
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} module Trombone.Pipeline ( module Pipe , Connection(..) , Filter(..) , Message(..) , Pipeline(..) , Predicate(..) , Processor(..) , ProcessorId(..) , TransType(..) , Transformer(..) , broadcast , buildJsonRequest , c...
johanneshilden/principle
Trombone/Pipeline.hs
bsd-3-clause
5,787
0
11
1,877
1,640
881
759
138
11
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} -- {-# OPTIONS_GHC -cpp -DPiForallInstalled #-} -------------------------------------------------------------------- -- | -- Copyright : (c) Andreas Reuleaux 2015 -- License : BSD2 -- Maintainer: Andreas Reuleaux <rx@a-rx.info> -- Stability : experimen...
reuleaux/pire
tests/ParserTests/Pcase.hs
bsd-3-clause
2,980
0
22
853
599
333
266
34
1
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE RecordWildCards #-} -- | Unsafe functions for block application/rollback, some constraint sets -- and some utilities. Mostly needed for use in 'Pos.Lrc' -- using lrc -- requires applying and rolling back blocks, but applying man...
input-output-hk/pos-haskell-prototype
db/src/Pos/DB/Block/Logic/Internal.hs
mit
11,609
0
16
3,120
2,150
1,195
955
-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-cloudformation/gen/Network/AWS/CloudFormation/UpdateStack.hs
mpl-2.0
12,812
0
13
2,430
1,462
891
571
158
1
-- | A custom build script for CUDA support. -- -- Copyright (C) 2014 Braam Research, LLC. module Main(main) where import Control.Applicative import Control.Monad import Distribution.Simple import Distribution.Simple.Configure (configure) import Distribution.Simple.Setup import Distribution.Simple.LocalBuildInfo imp...
SKA-ScienceDataProcessor/RC
MS4/Setup.hs
apache-2.0
7,895
0
21
2,029
1,906
966
940
124
5
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE Vie...
rrnewton/accelerate
Data/Array/Accelerate/Trafo/Simplify.hs
bsd-3-clause
21,026
2
19
6,367
5,234
2,672
2,562
260
49
{-# LANGUAGE OverloadedStrings #-} module CreateLabels where import Data.List (intercalate) import qualified Github.Auth as Github import qualified Github.Issues.Labels as Github main = do let auth = Github.BasicAuth "user" "password" possibleLabel <- Github.createLabel auth "thoughtb...
jwiegley/github
samples/Issues/Labels/CreateLabels.hs
bsd-3-clause
625
0
11
163
149
78
71
14
2
{-# LANGUAGE UnliftedNewtypes #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} module UnliftedNewtypesUnassociatedFamily where import GHC.Int (Int(I#)) import GHC.Word (Word(W#)) import GHC.Exts (Int#,Word#) import GHC.Ex...
sdiehl/ghc
testsuite/tests/typecheck/should_compile/UnliftedNewtypesUnassociatedFamily.hs
bsd-3-clause
828
0
10
125
239
147
92
-1
-1
{-# LANGUAGE TupleSections, OverloadedStrings #-} module Controllers ( module Controllers.Types, clientControllerPool , loadClientControllers ) where import Prelude hiding (head,init,last,readFile, tail, writeFile) import Yesod import Foundat...
lhuang7/yesod-basic-web-template
Controllers.hs
mit
905
0
8
260
125
79
46
-1
-1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?> <!--generated by JHelpDev Version: 0.62, 10 November 2006, see jhelpdev.sourceforge.net--><!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="1...
PrepETNA2015/OSCL-Reload
Sources/documentation/OSLC.hs
gpl-3.0
599
37
29
113
175
88
87
-1
-1
{-# LANGUAGE BangPatterns,OverloadedStrings #-} module Expr.Eval ( runCExpr, Callback, CBData(..), exprEvalTests) where import Expr.TExp import Expr.Parse import Expr.Compile import qualified TclObj as T import VarName import Util import RToken (Cmd, subCmdToCmds, RTokCmd) import qualified Data.Map as M import Expr.Uti...
muspellsson/hiccup
Expr/Eval.hs
lgpl-2.1
4,164
0
16
1,711
1,649
840
809
95
9
<?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="ru-RU"> <title>Context Alert Filters | ZAP Extension</title> <maps> <homeID>top</homeID> ...
0xkasun/security-tools
src/org/zaproxy/zap/extension/alertFilters/resources/help_ru_RU/helpset_ru_RU.hs
apache-2.0
983
80
66
161
417
211
206
-1
-1
module Blockchain.VM.Labels ( lcompile, getLabel, getNextLabels ) where import qualified Data.ByteString as B import qualified Data.Map as M import Data.Maybe import Blockchain.ExtWord import Blockchain.Util import Blockchain.VM.Opcodes --import Debug.Trace type Labels = M.Map String Word25...
jamshidh/ethereum-vm
src/Blockchain/VM/Labels.hs
bsd-3-clause
2,700
0
14
548
854
449
405
52
8
-- | Some useful functions if you want to wrap the 'ServerPartT' monad transformer around the 'ErrorT' monad transformer. e.g., @'ServerPartT' ('ErrorT' e m) a@. This allows you to use 'throwError' and 'catchError' inside your monad. module Happstack.Server.Error where import Control.Monad.Error (Error,...
erantapaa/happstack-server
src/Happstack/Server/Error.hs
bsd-3-clause
2,743
0
15
599
432
239
193
24
2
quicksort :: (Ord a) => [a] -> [a] quicksort [] = [] quicksort (x:xs) = smaller ++ [x] ++ larger where smaller = quicksort $ filter (<=x) xs larger = quicksort $ filter (>x) xs
OpenGenus/cosmos
code/divide_conquer/src/quick_sort/quick_sort.hs
gpl-3.0
206
0
9
64
101
55
46
5
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Freeze -- Copyright : (c) David Himmelstrup 2005 -- Duncan Coutts 2011 -- License : BSD-like -- -- Maintainer : cabal-devel@gmail.com -- Stability : provisional -- Por...
mydaum/cabal
cabal-install/Distribution/Client/Freeze.hs
bsd-3-clause
10,029
0
20
2,552
1,770
944
826
185
3
{-@ LIQUID "--no-termination" @-} module Eval (eval) where import Language.Haskell.Liquid.Prelude (liquidError) import Prelude hiding (lookup) import Data.Set (Set (..)) type Val = Int type Bndr = String data Expr = Const Int | Var Bndr | Plus Expr Expr | Let Bndr Expr Expr ty...
abakst/liquidhaskell
docs/slides/NEU14/Eval.hs
bsd-3-clause
1,576
0
9
409
302
168
134
21
1
{-# LANGUAGE CPP #-} module Main where import qualified Data.ByteString as BS import qualified Data.ByteString.Base64 as B64 import qualified Hasql.Pool as P import qualified Hasql.Transaction.Sessions as HT import Control.AutoUpdate (defaultUpdateSettings, mkAutoUpdate, ...
diogob/postgrest
main/Main.hs
mit
13,116
0
22
3,722
2,202
1,135
1,067
210
5
module Main where import Test.Framework.Runners.Console (defaultMain) main = defaultMain $ ["Hello"]
nlim/haskell-playground
test/Main.hs
mit
103
0
6
13
28
18
10
3
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} module Text.Hamlet.Parse ( Result (..) , Content (..) , Doc (..) , parseDoc , HamletSettings (..) , defaultHamletSettings , xhtmlHaml...
myShoggoth/shakespeare
Text/Hamlet/Parse.hs
mit
47,879
0
33
14,832
15,435
7,898
7,537
948
34
module Main where import qualified Data.Map as Map import FirstPass ( checkReturns , makeConstructors , Constructor(..) ) import qualified AST.Expression as E import qualified AST.Declaration as D import qualified AST.Statement as S import qualified AST.Type as T import Types import UnitTest ( Assertion , a...
jmikkola/Athena
src/test-FirstPass.hs
mit
2,847
0
16
507
1,174
617
557
65
1
module Main (main) where import Data.ByteString (ByteString) import qualified Data.ByteString as BS import qualified Data.ByteString.UTF8 as UTF8 import Data.Maybe import System.Environment import System.Random import Internal.AbstractStreams import Network.Protocol.SSH import qualified Network.Protocol.SSH.KeyExchan...
IreneKnapp/direct-crypto-socket
SSH.hs
mit
10,890
0
48
4,609
1,279
640
639
207
11
{-# LANGUAGE OverloadedStrings #-} import Web.Scotty (scotty, notFound, get, matchAny, param, html, json, text) import System.Environment (getEnvironment) import Control.Monad (liftM) import Data.Random (sample, randomElement, shuffleNofM) import Data.Random.Source.IO() import Data.Text.Lazy (Text) import Control.Monad...
wjlroe/HydroFerret
Main.hs
mit
3,672
0
21
994
1,079
572
507
101
2
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.HTMLTableColElement (js_setAlign, setAlign, js_getAlign, getAlign, js_setCh, setCh, js_getCh, getCh, js_setChOff, setChOff, js_getChOff, getChOff, js_setSpan, setSpan, js_getSpan, getSpan, j...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLTableColElement.hs
mit
5,915
84
10
854
1,343
746
597
80
1
{-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeApplications #-} module Examples.Rpc.CalculatorServer (main) whe...
zenhack/haskell-capnp
examples/lib/Examples/Rpc/CalculatorServer.hs
mit
5,032
0
17
1,359
1,328
688
640
-1
-1
module Interaction.AdventureProperties where import Rules import TestFramework import TestHelpers import Test.Tasty.QuickCheck import Test.Tasty import Test.QuickCheck.Monadic import Data.Maybe import Data.Function ((&)) import qualified Data.Set as S adventureTests :: TestTree adventureTests = localOption (QuickChe...
martin-kolinek/some-board-game-rules
test/Interaction/AdventureProperties.hs
mit
4,694
0
19
791
1,138
522
616
90
2
module Main where import Addition main :: IO () main = do putStrLn "hello world"
JoshuaGross/haskell-learning-log
Code/Haskellbook/Addition/src/Main.hs
mit
95
0
7
29
28
15
13
5
1
-------------------------------------------------------------------------------- -- (c) Tsitsimpis Ilias, 2011-2012 -- -- Type check our abstruct syntax tree -- -- The aim of the type checker is to transform from the UnTypedAst type to -- the TypedAst type, so basicaly -- typeCheckExpr :: UExpr -> TExpr a -- -- We...
iliastsi/gac
src/typecheck/TypeCheck.hs
mit
29,825
0
32
8,459
8,374
4,153
4,221
518
8
module GHCJS.DOM.ScriptProfileNode ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/ScriptProfileNode.hs
mit
47
0
3
7
10
7
3
1
0
module Main where import Data.Array import Data.List (genericReplicate) import Control.Monad (forM_) import Text.Printf directions :: [(Integer, Integer)] directions = cycle [(0,1),(1,0),(0,-1),(-1,0)] distances :: (Num a, Enum a) => a -> [a] distances n = n':dup where n' = n-1 dup = foldr (\x s -> x:x:s) ...
Kroisse/haskell_practices
2015-05-02/Snail.hs
mit
1,203
0
18
250
632
343
289
33
1
module Model where import Yesod import Data.Text (Text) import Database.Persist.Quasi import Database.Persist.MongoDB hiding (master) import Language.Haskell.TH.Syntax import Data.Typeable (Typeable) import Prelude -- You can define all of your database entities in the entities file. -- You can find more information ...
dschalk/score
Haskell/score/Model.hs
mit
568
0
13
71
107
62
45
-1
-1
module GHCJS.DOM.SVGPathSegCurvetoCubicAbs ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/SVGPathSegCurvetoCubicAbs.hs
mit
55
0
3
7
10
7
3
1
0
{-# LANGUAGE OverloadedStrings #-} module Main where import BlueWire import Options import Data.Text (pack) import qualified Database.Persist.Sqlite as P import Control.Monad.Logger (runNoLoggingT) import Control.Monad.IO.Class data BWOpts = BWOpts { port :: Int, dbfile :: String, poolSize :: Int } instance Options ...
quantifiedtran/blue-wire-backend
app/Main.hs
mit
931
0
17
230
246
133
113
20
1
----------------------------------------------------------------------------- -- -- Module : Transient.Move.Services.MonitorService -- Copyright : -- License : MIT -- -- Maintainer : agocorona@gmail.com -- Stability : -- Portability : -- -- | -- ---------------------------------------------------------...
geraldus/transient-universe
app/server/Transient/Move/Services/MonitorService.hs
mit
2,139
0
19
672
488
248
240
43
5
removeDups :: Eq a => [a] -> [a] removeDups [] = [] removeDups (x:xs) = x : filter (/= x) (removeDups xs)
Kiandr/CrackingCodingInterview
Haskell/src/chapter-2/remove-dups.hs
mit
106
0
8
22
69
36
33
3
1
{- CIS 194 HW 11 due Monday, 8 April -} module Cis194.Spring13.HW11.SExpr where import Cis194.Spring13.HW11.AParser import Control.Applicative import Data.Char ------------------------------------------------------------ -- 1. Parsing repetitions ------------------------------------------------------------ zer...
tylerjl/cis194
library/Cis194/Spring13/HW11/SExpr.hs
mit
1,816
0
11
313
328
182
146
27
1
module FrontEnd.Tc.Main (tiExpr, tiProgram, makeProgram, isTypePlaceholder ) where import Control.Monad.Reader import Control.Monad.Writer import Data.Graph(stronglyConnComp, SCC(..)) import System.IO(hPutStr,stderr) import Text.Printf import qualified Data.Map as Map import qualified Data.Set as Set import qualified ...
dec9ue/jhc_copygc
src/FrontEnd/Tc/Main.hs
gpl-2.0
32,778
282
22
8,855
12,734
6,384
6,350
-1
-1
module PrettyProcess where import Math.ExpPairs.ProcessMatrix import Math.ExpPairs.PrettyProcess import Test.Tasty import Test.Tasty.SmallCheck as SC import Test.Tasty.QuickCheck as QC hiding (Positive) import Instances () testUglifyPrettify :: [Process] -> Bool testUglifyPrettify xs = uglify (prettify xs) == xs t...
Bodigrim/exp-pairs
tests/PrettyProcess.hs
gpl-3.0
676
0
13
100
191
109
82
15
1
module P99 ( P99.last ) where import Experimentation.P01 (last_foldl') void = void last = last_foldl'
adarqui/99problems-hs
P99.hs
gpl-3.0
106
0
5
19
31
19
12
5
1
module While.Domain.Interval.SemanticsSpec (spec) where import Test.Hspec import Test.Hspec.QuickCheck import System.Directory import Data.List import qualified Data.Map.Strict as Map import Data.Maybe import Abstat.Interface.Poset import Abstat.Interface.Lattice import Abstat.Interface.GaloisConnection import Abstat...
fpoli/abstat
test/While/Domain/Interval/SemanticsSpec.hs
gpl-3.0
6,673
0
25
2,599
1,938
1,020
918
142
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/Rollback.hs
mpl-2.0
4,931
0
17
1,189
783
456
327
114
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-kinesis/gen/Network/AWS/Kinesis/GetRecords.hs
mpl-2.0
7,454
0
12
1,500
650
406
244
69
1