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
{-# htermination elemFM :: (Ord a, Ord k) => (Either a k) -> FiniteMap (Either a k) b -> Bool #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_elemFM_10.hs
mit
115
0
3
23
5
3
2
1
0
module Test.Smoke.Spec.PathGenerator ( genAbsoluteFilePath, genRelativeDir, genRelativeFile, genRelativeFilePath, genNamedSegment, ) where import qualified Data.List as List import Hedgehog import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import qualified System.FilePat...
SamirTalwar/Smoke
src/test/Test/Smoke/Spec/PathGenerator.hs
mit
2,065
0
13
319
559
296
263
55
1
{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {-| Module : Main Description : Main module running the GMM Copyright : (c) Julian Kopka Larsen, 2015 Stability : experimental -} module Main ( main ) where import Control.Monad (forM, unless) import Data.Lis...
juliankopkalarsen/FpStats
GMM/src/Main.hs
mit
3,730
0
14
1,232
1,267
669
598
-1
-1
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-missing-import-lists #-} {-# OPTIONS_GHC -fno-warn-implicit-prelude #-} module Paths_robot_simulator ( version, getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Except...
c19/Exercism-Haskell
robot-simulator/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/autogen/Paths_robot_simulator.hs
mit
2,476
0
10
239
410
238
172
33
1
module Nauva.CSS ( module X ) where import Nauva.CSS.Helpers as X import Nauva.CSS.Terms as X import Nauva.CSS.Typeface as X import Nauva.CSS.Types as X
wereHamster/nauva
pkg/hs/nauva-css/src/Nauva/CSS.hs
mit
169
0
4
39
44
32
12
6
0
module Main where import qualified Graphics.UI.SDL as SDL import Reactive.Banana import Reactive.Banana.Frameworks (actuate) import Reactive.Banana.SDL import Hage.Graphics import Hage.Game.Arkanoid.EventNetwork main :: IO () main = do sdlES <- getSDLEventSource gd <- initGraphics network <- compile $ se...
Hinidu/Arkanoid
src/Hage/Game/Arkanoid.hs
mit
403
0
9
72
111
60
51
15
1
{-# LANGUAGE NoImplicitPrelude, PackageImports #-} module Test where import "base-compat-batteries" Data.Ratio.Compat
haskell-compat/base-compat
check/check-hs/Data.Ratio.Compat.check.hs
mit
118
0
4
11
12
9
3
3
0
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa That line was so long Phew
ke00n/alabno
backend/linter/testFiles/longLineFile.hs
mit
156
0
5
6
19
7
12
-1
-1
-- Converts .lhs (literary Haskell files) to .hs (plain Haskell files) -- Keeps only the statements which are normally compiled, plus blank lines. -- To use: -- ghc --make lhs2hs.hs -- to get an executable file lhs2hs. -- Then -- lhs2hs filename -- will open filename.lhs and save the converted file in filenam...
AlexMckey/FP101x-ItFP_Haskell
Sources/lhs2hs_.hs
cc0-1.0
1,360
0
12
369
288
143
145
23
5
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Network.SockMock ( Handler , Application , HostPreference(..) ...
NicolasT/sockmock
src/Network/SockMock.hs
gpl-2.0
4,959
0
14
1,387
1,369
727
642
134
2
-- Orden.hs -- Implementación de relaciones de orden del capítulo 1 -- Sevilla, 4 de Mayo de 2016 -- --------------------------------------------------------------------- module Orden where -- Referencias -- =========== -- + "On Multiset Orderings" http://bit.ly/1VXmgZO -- + "Data.MultiSet Functions" http://bit.ly/1...
migpornar/SRTenHaskell
Codigo_Haskell/Orden.hs
gpl-3.0
3,941
0
15
939
545
318
227
31
2
{-# LANGUAGE TupleSections #-} {-# LANGUAGE StandaloneDeriving #-} module Experiment.Battlefield.Stage ( stageWireOnce , stageWireLoop , stageWireOnce' , stageWireLoop' ) where -- import Data.Foldable (foldl) -- import Debug.Trace -- import Utils.Wire.Debug import Control.Monad.Fix import Contr...
mstksg/netwire-experiments
src/Experiment/Battlefield/Stage.hs
gpl-3.0
13,703
7
21
4,357
4,648
2,451
2,197
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.BigtableAdmin.Types.Sum -- Copyright : (c) 2015-2016 B...
brendanhay/gogol
gogol-bigtableadmin/gen/Network/Google/BigtableAdmin/Types/Sum.hs
mpl-2.0
22,510
0
11
5,138
3,007
1,621
1,386
353
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.YouTube.Typ...
brendanhay/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
mpl-2.0
561,702
0
82
134,953
104,596
60,230
44,366
11,680
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Orderreturns/Process.hs
mpl-2.0
5,623
0
20
1,380
882
511
371
128
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/BatchCreate.hs
mpl-2.0
6,828
0
18
1,549
878
517
361
124
1
myLength :: [t] -> Int myLength [] = 0 myLength (x:xs) = myLength xs + 1
alephnil/h99
04.hs
apache-2.0
72
0
7
15
45
23
22
3
1
{-# LANGUAGE BangPatterns #-} module Database.VCache.VRef ( VRef , vref, deref , vref', deref' , unsafeVRefAddr , unsafeVRefRefct , vref_space , CacheMode(..) , vrefc, derefc , withVRefBytes , unsafeVRefEncoding ) where import Control.Monad import Data.IORef import Data.B...
dmbarbour/haskell-vcache
hsrc_lib/Database/VCache/VRef.hs
bsd-2-clause
6,043
0
20
1,270
1,093
596
497
-1
-1
module RuntimeProcessManager (withRuntimeProcess) where import JavaUtils (getClassPath) import StringPrefixes (namespace) import System.IO (Handle, hSetBuffering, BufferMode(..)) import System.Process withRuntimeProcess :: String -> BufferMode -> ((Handle,Handle) -> IO a) -> Bool -> IO a withRuntimeProcess...
bixuanzju/fcore
lib/services/RuntimeProcessManager.hs
bsd-2-clause
797
0
14
171
241
128
113
16
2
{- Copyright (c) 2008 David Roundy All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following...
droundy/franchise
Distribution/Franchise/ListUtils.hs
bsd-3-clause
2,222
0
9
412
292
158
134
17
1
module HsImport.Types where import qualified Language.Haskell.Exts as HS type SrcLine = Int type SrcColumn = Int type SrcSpan = HS.SrcSpan type SrcLoc = HS.SrcLoc type Annotation = (HS.SrcSpanInfo, [HS.Comment]) type Decl = HS.Decl Annotation type ImportDecl = HS.ImportDe...
dan-t/hsimport
lib/HsImport/Types.hs
bsd-3-clause
1,919
0
12
429
460
259
201
38
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} module Elm.Package.Description where import Prelude hiding (read) import Control.Applicative ((<$>)) import Control.Arrow (first) import Control.Monad.Trans (MonadIO, liftIO) import Control.Monad.Error.Class (MonadError, throwError) import Control.Mo...
laszlopandy/elm-package
src/Elm/Package/Description.hs
bsd-3-clause
8,771
0
21
2,702
2,188
1,153
1,035
204
4
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-| Module : Numeric.AERN.RealArithmetic.Basis.Double.Measures Description : distance between Double numbers Copyright : (c) Michal Konecny License : BSD3 Maintainer : mikkonecny@gmail.com Stability : experi...
michalkonecny/aern
aern-double/src/Numeric/AERN/RealArithmetic/Basis/Double/Measures.hs
bsd-3-clause
1,576
0
8
320
178
113
65
19
0
{- | Module : <Onping.Tag.Report> Description : <Executable for Onping Tag Report > Copyright : (c) <Plow Technology 2014> License : <MIT> Maintainer : <lingpo.huang@plowtech.net> Stability : unstable Portability : portable <Grab a company by its name and generate reports for all its sites , loca...
plow-technologies/onping-tag-report
src/Onping/Tag/Report.hs
bsd-3-clause
10,288
0
19
2,646
1,695
847
848
133
2
module AI.MDP.GridWorld ( GridWorld ,GridVal ,GridAction(..) -- Debug/Visualization Funcs ,showRewards ,showAbsorbs ,showTransition -- common action results ,deterministicActions ,maybeActions ,maybeReverseActions ,scatterActions ,BlockedCells ,MoveCost ,gridWorld ,reward ,absorb ,initVals ,iterVals ) where impor...
chetant/mdp
AI/MDP/GridWorld.hs
bsd-3-clause
7,273
0
15
2,520
2,982
1,680
1,302
-1
-1
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable , NoMonomorphismRestriction #-} import MFlow.Wai.Blaze.Html.All hiding (footer, retry, push) import qualified MFlow.Wai.Blaze.Html.All as MF(retry) import Control.Monad.Trans import Data.Monoid import Control.Applicative import Control.Concurrent import Control....
agocorona/MFlow
tests/workflow1.hs
bsd-3-clause
8,659
0
27
2,813
2,415
1,186
1,229
198
6
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Network.Mail.Locutoria.State where import Control.Applicative ((<$>), pure) import Control.Lens hiding (Index) import Data.Default (def) import Data.List (elemIndex, find) import Data.Maybe (ca...
hallettj/locutoria
Network/Mail/Locutoria/State.hs
bsd-3-clause
4,908
1
15
1,284
1,732
915
817
-1
-1
module Base ( -- * General utilities module Control.Applicative, module Control.Monad.Extra, module Data.List.Extra, module Data.Maybe, module Data.Semigroup, module Hadrian.Utilities, -- * Shake module Development.Shake, module Development.Shake.Classes, module Development....
bgamari/shaking-up-ghc
src/Base.hs
bsd-3-clause
4,129
0
9
704
642
392
250
74
1
{-# LANGUAGE RecordWildCards #-} module Plot.Gauss where import Types import PatternRecogn.Gauss.Utils import PatternRecogn.Utils import PatternRecogn.Lina as Lina import PatternRecogn.Gauss.Types import Graphics.Rendering.Chart.Easy as Chart hiding( Matrix, Vector ) import Graphics.Rendering.Chart.Backend.Diagrams ...
EsGeh/pattern-recognition
test/Plot/Gauss.hs
bsd-3-clause
2,710
68
16
617
916
481
435
82
2
module Test.Database.Redis.CommandTests ( commandTests ) where import Database.Redis import Test.HUnit import Test.Util -- --------------------------------------------------------------------------- -- Tests -- commandTests :: Test commandTests = TestLabel "command" $ TestList [ -- * Connection ...
brandur/redis-haskell
testsuite/tests/Test/Database/Redis/CommandTests.hs
bsd-3-clause
4,277
0
13
1,213
1,160
577
583
98
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE TypeOperators #-} ----------------------------------------------------------------------------- -- | -- Copyright : Andrew Martin -- License : BSD-style (see the file LICENSE) -- -- Maintainer : Andrew Martin <andrew.thaddeus@gmail.com> -- Stability : experiment...
andrewthad/vinyl-vectors
src/Data/Vector/Vinyl/Default/Empty/Monomorphic/Implication.hs
bsd-3-clause
2,047
0
9
521
289
173
116
21
1
{-# LANGUAGE ScopedTypeVariables, RankNTypes #-} -- | Simple lenses (from SPJ's talk about lenses) - playground module Sky.Lens.SimpleLens where import Data.Functor.Identity import Control.Applicative (Const(Const,getConst)) data LensR s a = LensR { getR :: s -> a, setR :: a -> s -> s } type Lens' s a = forall f. ...
xicesky/sky-haskell-playground
src/Sky/Lens/SimpleLens.hs
bsd-3-clause
1,998
0
10
554
626
346
280
32
1
{-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE Safe #-} module Data.MessagePack.Result where import Control.Applicative (Alternative (..), Applicative (..), (<$>), (<*>)) impo...
SX91/msgpack-haskell
src/Data/MessagePack/Result.hs
bsd-3-clause
1,153
0
8
350
319
174
145
32
0
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module HipChat.AddOn.Types.RoomEvent where import Control.Lens.AsText (AsText) import qualified Control.Lens.AsText as AsText import Data.Aeson (FromJSON, ToJSON, parseJSON, toJSON) data RoomEvent = RoomArchived | ...
mjhopkins/hipchat
src/HipChat/AddOn/Types/RoomEvent.hs
bsd-3-clause
1,566
0
9
397
302
163
139
46
0
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE Over...
rfranek/duckling
Duckling/Quantity/FR/Corpus.hs
bsd-3-clause
954
0
11
225
165
98
67
19
1
-- |A simple msgpack remote procedure call (rpc) system for -- interacting with the MSF server. module RPC.SimpleRPC (request) where import MsgPack import Data.Char import Data.Maybe import Network.HTTP (simpleHTTP) import Network.HTTP.Base (Request (..), Response (..), RequestMethod (..)) import Network.HTTP.Headers...
GaloisInc/msf-haskell
src/RPC/SimpleRPC.hs
bsd-3-clause
1,716
0
15
339
504
275
229
36
3
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-} module Transformations.Optimising.CaseCopyPropagationSpec where import Transformations.Optimising.CaseCopyPropagation import Transformations.Names (ExpChanges(..)) import Test.Hspec import Grin.TH import Test.Test hiding (newVar) import Test.Assertions import Grin.TypeE...
andorp/grin
grin/test/Transformations/Optimising/CaseCopyPropagationSpec.hs
bsd-3-clause
10,010
0
22
5,572
1,136
600
536
90
1
{-# LANGUAGE CPP, NamedFieldPuns, RecordWildCards #-} -- | cabal-install CLI command: freeze -- module Distribution.Client.CmdFreeze ( freezeCommand, freezeAction, ) where import Distribution.Client.ProjectPlanning import Distribution.Client.ProjectConfig ( ProjectConfig(..), ProjectConfigShared(.....
sopvop/cabal
cabal-install/Distribution/Client/CmdFreeze.hs
bsd-3-clause
8,028
0
14
1,899
1,274
720
554
133
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE AllowAmbiguousTypes ...
sleexyz/haskell-fun
TypeSafePrintF.hs
bsd-3-clause
3,196
0
13
735
1,140
617
523
67
1
module Main where import Test.Tasty import Test.Tasty.HUnit -- import qualified TicTacToeTest as TTTT -- import qualified GameOfLifeTest as GOL -- import qualified HearthstoneTest as HT -- import qualified RomanNumeralTest as RN import qualified PokerHandsTest as PH import qualified PokerHoldEmTest as PHT main :: IO ...
steveshogren/haskell-katas
test/MainTest.hs
bsd-3-clause
600
0
9
215
67
45
22
8
1
module Y2017.Day09 (answer1, answer2) where import Data.Functor import Data.Void import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.IO as T import Text.Megaparsec import Text.Megaparsec.Char type Parser = Parsec Void Text answer1, answer2 :: IO () answer1 = parseInput >>= print . st...
geekingfrog/advent-of-code
src/Y2017/Day09.hs
bsd-3-clause
1,270
0
15
247
474
252
222
31
2
---------------------------------------------------------------------------- -- | -- Module : Haskell.Language.Server.Tags.Types.Imports -- Copyright : (c) Sergey Vinokurov 2018 -- License : BSD3-style (see LICENSE) -- Maintainer : serg.foo@gmail.com -----------------------------------------------------...
sergv/tags-server
src/Haskell/Language/Server/Tags/Types/Imports.hs
bsd-3-clause
8,319
0
17
1,626
1,657
905
752
187
5
----------------------------------------------------------------------------- -- Pred: Predicates -- -- Part of `Typing Haskell in Haskell', version of November 23, 2000 -- Copyright (c) Mark P Jones and the Oregon Graduate Institute -- of Science and Technology, 1999-2000 -- -- This program is distributed as...
elben/typing-haskell-in-haskell
Pred.hs
bsd-3-clause
6,679
0
14
2,295
2,236
1,139
1,097
129
3
{-# LANGUAGE OverloadedStrings #-} -- | Add <http://www.w3.org/TR/cors/ CORS> (cross-origin resource sharing) -- headers to a Snap application. CORS headers can be added either conditionally -- or unconditionally to the entire site, or you can apply CORS headers to a -- single route. module CORS ( -- * Applying CO...
GaloisInc/verification-game
web-prover/src/CORS.hs
bsd-3-clause
10,675
0
28
2,374
2,159
1,176
983
178
8
-- Min Zhang -- March 2, 2016 -- LongestAlignment -- BLAST algorithm -- Find longest strech of matching -- random generation sequences that match the probability -- Not working yet seq1 = [0, -1, -2, -1, -2, -1, -2, -1, 0, 1, 0, -1, -2, -3, -4] value = fst pos = snd f [] (a, b, c, d) = (a, b, c, d) f (x:xs) (...
Min-/HaskellSandbox
src/LongestAlignment.hs
bsd-3-clause
650
0
13
161
337
187
150
10
1
module ActorQueue where import Control.Category import Control.Lens import qualified Data.Dequeue as DQ import Prelude hiding (Either(..), id, (.)) import Entity type ActorQueue = DQ.BankersDequeue EntityRef dropFront :: ActorQueue -> ActorQueue dropFront queue = case DQ.popFront queue of Nothing -> DQ.e...
fros1y/umbral
src/ActorQueue.hs
bsd-3-clause
1,010
0
11
252
308
163
145
33
2
{-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fplugin Brisk.Plugin #-} {-# OPTIONS_GHC -fplugin-opt Brisk.Plugin:main #-} module Scratch where import Control.Distributed.Process main :: Process () main = do me <- getSelfPid spawnLocal $ send me () expect
abakst/brisk-prelude
examples/spawn01.hs
bsd-3-clause
285
0
9
57
52
28
24
9
1
-- Quantities -- Copyright (C) 2015-2016 Moritz Schulte <mtesseract@silverratio.net> -- API is not necessarily stable. {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module Quantities.Parser ( parseNumber , parseFraction , parseInt , parseDecimal , parseMixed...
mtesseract/quantities
src/Quantities/Parser.hs
bsd-3-clause
3,083
0
20
851
872
453
419
70
7
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} module Common where import Data.Proxy import Servant.API #if MIN_VERSION_servant(0,10,0) import Servant.Utils.Links #endif import Miso import Miso.String data Model = Model { modelUri :: URI, modelMsg :: String } deriving (Show, Eq) data Action = ServerMs...
dmjio/miso
examples/sse/shared/Common.hs
bsd-3-clause
1,030
0
11
210
293
163
130
31
1
module Tests.Twitch.Path where import Test.Hspec tests :: Spec tests = return ()
menelaos/twitch
tests/Tests/Twitch/Path.hs
mit
81
0
6
12
27
16
11
4
1
{-# LANGUAGE OverloadedStrings #-} module Maxl (runMaxl, MaxlOpt(..)) where import RarecoalLib.MaxUtils (computeFrequencySpectrum, makeInitialPoint, minFunc, penalty, writeFullFitTable, ...
stschiff/rarecoal
src-rarecoal/Maxl.hs
gpl-3.0
6,005
0
20
1,849
1,625
840
785
102
3
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} ----------------------------------------------------------------------------- -- | -- Copyright : (C) 2013-15 Edward Kmett -- License : BSD-style (see the file LICENSE) -- Maintainer : Edwar...
Gabriel439/succinct
src/Succinct/Internal/Word4.hs
bsd-2-clause
6,818
0
13
1,500
2,690
1,347
1,343
163
1
{-# OPTIONS_GHC -fno-implicit-prelude #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal -- Copyright : (c) The FFI task force 2003 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : ffi@haskell.org -- Stabilit...
FranklinChen/hugs98-plus-Sep2006
packages/base/Foreign/Marshal.hs
bsd-3-clause
852
0
5
147
87
64
23
12
0
{-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module ServerMonad ( ServerMonad, evalServerMonad, mkServerState, getUser, getProtocolVersion, getLastReadyTime, setLastReadyTime, getUserInfo, ...
haskell/ghc-builder
server/ServerMonad.hs
bsd-3-clause
6,274
0
12
1,999
1,585
825
760
152
1
module Syntax.Env where import Syntax.Tree (Identifier) import Data.Map as Map -- Keeps track of declarations at this scope, and the scope above. -- And the type of identifiers in the environment. data Env a = Env { -- Declarations in the scope above. These can be overwritten. aboveScope :: Map Identifier a, ...
BakerSmithA/Turing
src/Syntax/Env.hs
bsd-3-clause
1,997
0
10
408
503
263
240
27
2
-- | -- Module : Console.Options -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : Good -- -- Options parsing using a simple DSL approach. -- -- Using this API, your program should have the following shape: -- -- >defaultMain $ do -- > ...
NicolasDP/hs-cli
Console/Options.hs
bsd-3-clause
16,457
23
27
5,268
4,019
2,118
1,901
271
11
module Countries where import Data.Function (on) import qualified Data.Set as S import Text.Read import qualified Text.Read.Lex as L import Safe data Country = Country { countryCode :: String , countryName :: String } instance Show Country where show (Country c _) = c showCountry :: Country ->...
MicheleCastrovilli/EuPhBot
Bots/MusicBot/Countries.hs
bsd-3-clause
9,043
0
16
2,363
2,269
1,146
1,123
272
1
{- | Module : Data.Convertible.Instances.Map Copyright : Copyright (C) 2009-2011 John Goerzen License : BSD3 Maintainer : John Goerzen <jgoerzen@complete.org> Stability : provisional Portability: portable Instances to convert between Map and association list. Copyright (C) 2009-2011 John G...
hdbc/convertible
Data/Convertible/Instances/Map.hs
bsd-3-clause
737
0
8
136
113
66
47
-1
-1
import Data.Indexable.Tests import Utils.Tests import Physics.Chipmunk.Types.Tests import Physics.Chipmunk.StickyEdges.Tests import Sorts.Terminal.Tests import Sorts.Tiles.Baking.Tests import Top.Main.Tests main :: IO () main = do Top.Main.Tests.tests Data.Indexable.Tests.tests Sorts.Terminal.Tests....
changlinli/nikki
src/testsuite/testsuite.hs
lgpl-3.0
516
0
9
80
151
86
65
18
1
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-} {- | Module : $Header$ Description : Extension of CFOL2IsabelleHOL to CoCASL Copyright : (c) Till Mossakowski and Uni Bremen 2003-2005 License : GPLv2 or higher, see LICENSE.txt Maintainer : hausmann@informatik.uni-bremen....
keithodulaigh/Hets
Comorphisms/CoCFOL2IsabelleHOL.hs
gpl-2.0
5,768
0
24
1,676
1,306
691
615
102
5
-- Test purpose: -- Ensure that not using -Wcompat does not enable its warnings -- {-# OPTIONS_GHC -Wcompat #-} -- {-# OPTIONS_GHC -Wno-compat #-} module WCompatWarningsNotOn where import qualified Data.Semigroup as Semi monadFail :: Monad m => m a monadFail = do Just _ <- undefined undefined (<>) = undefi...
shlevy/ghc
testsuite/tests/wcompat-warnings/WCompatWarningsNotOn.hs
bsd-3-clause
525
0
8
105
128
72
56
13
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Bag: an unordered collection with duplicates -} {-# LANGUAGE ScopedTypeVariables, CPP #-} module Bag ( Bag, -- abstract type emptyBag, unitBag, unionBags, unionManyBags, mapBag, elemBag, ...
mettekou/ghc
compiler/utils/Bag.hs
bsd-3-clause
11,482
0
11
3,668
4,533
2,302
2,231
241
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} module Math.Hclaws.LinearAlgebra ( Point(..), point, Normable(..), ) where import qualified Math.FTensor.Algebra as A import qualified Math.FTensor.General as F data Point = Point { x :: !Double , t :: !Double } deriv...
mikebenfield/hclaws
src/Math/Hclaws/LinearAlgebra.hs
isc
1,197
0
15
312
554
289
265
-1
-1
{-# LANGUAGE OverloadedStrings #-} {- This is a test of how the browser draws lines. This is a second line. This is a third. That was a blank line above this. @r@_Right justify @c@_Center justify @_Left justify @bBold text @iItalic text @b@iBold Italic @fFixed width @f@bBold Fixed @f@iItalic Fixed @f@i@bBold Italic ...
deech/fltkhs-demos
src/Examples/browser.hs
mit
4,793
0
20
1,043
1,509
735
774
90
5
main = interact wordCount where wordCount input = show (length (words input)) ++ "\n"
manhong2112/CodeColle
Haskell/WC.hs
mit
89
0
10
17
38
18
20
2
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} -- | Utilities for reifying simplified datatype info. It omits details -- that aren't usually relevant to generating instances that work wi...
fpco/th-utilities
src/TH/ReifySimple.hs
mit
13,624
0
19
2,988
2,798
1,508
1,290
179
4
{-# LANGUAGE CPP #-} module GHCJS.DOM.MediaKeyMessageEvent ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.MediaKeyMessageEvent #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.D...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/MediaKeyMessageEvent.hs
mit
373
0
5
33
33
26
7
4
0
import Data.Char (digitToInt) asIntFold ('-' : s) = -1 * asIntFold s asIntFold s = foldl (times_10) 0 (map digitToInt s) where times_10 a b = a * 10 + b concatFoldr a = foldr (\x y -> x ++ y) [] a --takeCompare _ [] = ([], []) --takeCompare _ (a: []) = ([a], []) --takeCompare f (a: b: xs) = -- if (f ...
gefei/learning_haskell
real_world_haskell/ch06.hs
mit
380
0
8
101
118
63
55
5
1
{-# LANGUAGE JavaScriptFFI #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module Nauva.Client ( runClient ) where import qualified Data.Text as T import qualified Data.Aeson as A import qualified Data.Aeson.Types as A import Data.Mono...
wereHamster/nauva
pkg/hs/nauva-native/src/Nauva/Client.hs
mit
13,305
17
29
4,344
3,984
1,928
2,056
251
14
import Control.Monad import Data.List factorial n = product [1..n] powerset :: [a] -> [[a]] powerset = filterM $ \x->[True, False] combination :: [a] -> Int -> [[a]] combination list k = filter (\x -> length x == k) $ powerset list permutation :: Eq a => [a] -> [[a]] permutation = nub . perm where perm [] =...
jwvg0425/HaskellScratchPad
src/factorial.hs
mit
396
1
10
97
214
115
99
11
2
{-# htermination maximum :: (Ord a, Ord k) => [(Either a k)] -> (Either a k) #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_maximum_10.hs
mit
81
0
2
17
3
2
1
1
0
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE OverloadedStrings, MultiParamTypeClasses #-} module Util () where import Data.ByteString.Builder (toLazyByteString) import Text.Email.Validate import Data.Text.Encoding import Data.Aeson.Encode (encodeToByteStringBuilder) import Data.Aeson.Types import Happstac...
L8D/cido-api
lib/Util.hs
mit
1,190
0
14
231
322
170
152
29
0
module Main where import PostgREST.App import PostgREST.Config (AppConfig (..), minimumPgVersion, prettyVersion, ...
NikolayS/postgrest
src/PostgREST/Main.hs
mit
3,777
0
16
1,359
869
451
418
-1
-1
module Euler.E63 where import Euler.Lib ( intLength ) euler63 :: Int euler63 = length $ concat $ takeWhile (not . null) $ map validNums [ 1 .. ] validNums :: Integer -> [Integer] validNums n = takeWhile ((== n) . intLength) $ dropWhile ((<n) . intLength) $ [ x^n | x <- [ 1 .. ] ] main :: IO () main = print $ e...
D4r1/project-euler
Euler/E63.hs
mit
327
8
10
75
159
88
71
11
1
{-# LANGUAGE CPP #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ExplicitNamespaces #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Protolude ( -- * Base functions module Base, identity, pass, #if !MIN_VERS...
sdiehl/protolude
src/Protolude.hs
mit
19,454
1
14
4,526
4,312
2,840
1,472
668
2
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE PolyKinds #-} {- | Module : Data.Fix1 Description : Fixed point for types of kind (k -> *) -> k -> * Copyright : (c) Paweł Nowak License : MIT Maintainer : pawel834@gmail.com Stability : experimental -} module Data.Fix1 where ...
pawel-n/data-fix1
src/Data/Fix1.hs
mit
2,175
0
13
565
876
462
414
32
1
module Alarm where import Control.Probability bool :: (Probability p, MonadProb p m) => p -> m p Bool bool p = choose p True False filterDist :: (Ord a, MonadProb p m) => (a -> Bool) -> m p a -> m p a filterDist f m = do x <- m condition (f x) returning x (>>=?) :: (Ord a, M...
chris-taylor/hs-probability-examples
Alarm.hs
mit
1,651
0
9
498
627
329
298
45
4
module Moonbase.Desktop.Gtk.Background ( justImage , BackgroundImage (..) ) where import Control.Applicative import Control.Monad.Except import Control.Monad.State import System.Glib.GError import Data.Maybe import Graphics.UI.Gtk hiding ( get ) import Graphics.Rendering.Cairo import Moonbase.Core import M...
felixsch/moonbase-gtk
src/Moonbase/Desktop/Gtk/Background.hs
gpl-2.0
3,335
0
12
779
1,008
491
517
75
2
{-# LANGUAGE FlexibleContexts #-} module XMonad.Hooks.DynamicLog.Status.Bars where import XMonad import XMonad.Layout.LayoutModifier import XMonad.Util.Run import qualified XMonad.Hooks.DynamicLog.Status.StatusText as ST import XMonad.Hooks.ManageDocks import qualified XMonad.Hooks.DynamicLog.Status.DZen2.Universal a...
Fizzixnerd/xmonad-config
site-haskell/src/XMonad/Hooks/DynamicLog/Status/Bars.hs
gpl-3.0
4,246
0
15
901
1,043
561
482
74
1
module Link ( link ) where import System.Process (runProcess, waitForProcess) link :: [String] -> String -> IO () link objects output = do _ <- waitForProcess =<< runProcess "gcc" (objects ++ ["-o", output]) Nothing Nothing Nothing Nothing Nothing return ()
UndeadMastodon/HsBFC
Link.hs
gpl-3.0
268
0
12
50
100
53
47
7
1
{- oso2pdf --- Better conversion of Oxford Scholarship Online material to PDF Copyright (C) 2015 Sean Whitton This file is part of oso2pdf. oso2pdf 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 ...
spwhitton/oso2pdf
src/pandoc-oso2tex.hs
gpl-3.0
3,033
2
17
1,034
887
474
413
42
7
module Main( main ) where import System (getArgs) import System.IO import Control.Monad (forM_,liftM) import Geda.Parser (readGSchem) tryParse :: String -> String -> IO () tryParse fn x = case readGSchem x of Left err -> hPutStrLn stderr $ fn ++ " FAILED!\nReason: " ++ show err Right _ -> putStrLn $ fn ++ " P...
xcthulhu/lambda-geda
parse-test.hs
gpl-3.0
546
0
11
132
200
98
102
18
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-adsense/gen/Network/Google/Resource/AdSense/Savedadstyles/Get.hs
mpl-2.0
2,919
0
12
642
302
186
116
50
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/ListPipelines.hs
mpl-2.0
4,773
0
12
1,016
665
392
273
71
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.Debugger -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Pub...
rueshyna/gogol
gogol-debugger/gen/Network/Google/Debugger.hs
mpl-2.0
7,578
0
11
1,716
785
571
214
188
0
{-| Module : $Header$ Copyright : (c) 2015 Edward O'Callaghan License : LGPL-2.1 Maintainer : eocallaghan@alterapraxis.com Stability : provisional Portability : portable This module encapsulates types libFtdi library functions. -} {-# LANGUAGE Trustworthy #-} module LibFtdi.Types ( FtdiChi...
victoredwardocallaghan/bindings-libftdi
src/LibFtdi/Types.hs
lgpl-2.1
6,443
8
6
2,854
643
411
232
126
0
{-# LANGUAGE GeneralizedNewtypeDeriving , FlexibleContexts #-} import Text.XML.HaXml import qualified Text.XML.HaXml.Pretty as P import System.Environment ( getArgs ) import Data.LookupTable ( LookupTable ) import qualified Data.LookupTable as LT import Data.Map ( Map ) import Data.Maybe ( fromMaybe ) import C...
urv/fixhs
src/Utils/Generator.hs
lgpl-2.1
15,187
317
69
5,913
4,136
2,054
2,082
301
5
module Constant where newtype Constant a b = Constant { getConstant :: a } deriving (Eq, Ord, Show) instance Functor (Constant a) where fmap _ (Constant b) = Constant b instance Monoid a => Applicative (Constant a) where pure _ = Constant mempty (Constant a) <*> (Constant a') = Constant $ a `mappend` a'
thewoolleyman/haskellbook
17/05/haskell-club/Constant.hs
unlicense
319
0
8
68
132
70
62
9
0
module Lib ( verifySumIsFunctor , verifySumIsApplicative , verifyValidationIsFunctor , verifyValidationIsApplicative ) where import Test.QuickCheck import Test.QuickCheck.Checkers import Test.QuickCheck.Classes data Sum a b = First a | Second b deriving (Eq, Show) -- Arbitrary instance fo...
dmp1ce/Haskell-Programming-Exercises
Chapter 17/VariationsOnEither/src/Lib.hs
unlicense
2,493
0
12
544
895
481
414
55
1
module P8 where import Data.List {- (**) Eliminate consecutive duplicates of list elements. If a list contains repeated elements they should be replaced with a single copy of the element. The order of the elements should not be changed. Example: * (compress '(a a a a b c c a a d e e e e)) (A B C A D E) -} comp...
nikolaspapirniywork/99_problems
haskell/src/P8.hs
apache-2.0
685
0
10
193
212
114
98
12
2
{-# LANGUAGE BangPatterns #-} {-| Module : Data.Snowflake Description : Unique id generator. Port of Twitter Snowflake. License : Apache 2.0 Maintainer : edofic@gmail.com Stability : experimental This generates unique(guaranteed) identifiers build from time stamp, counter(inside same millisecond) and node...
edofic/snowflake-haskell
src/Data/Snowflake.hs
apache-2.0
3,881
0
19
957
783
428
355
76
4
-- -*- coding: utf-8; -*- module Filter where import Model import qualified Data.Map as Map filterElements :: Map.Map String String -- props jakie muszą być znalezione żeby element był zwrócony -> [Element] -- filtrowane elementy -> [Element] filterElements pattern (...
grzegorzbalcerek/orgmode
Filter.hs
bsd-2-clause
809
0
10
158
245
126
119
12
1
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} -- | High-level API for CouchDB design documents. These methods are very -- convenient for bootstrapping and testing. module Database.CouchDB.Conduit.Design ( couchPutView ) where import Prelude hiding (catch) import Control.Monad (void) impo...
lostbean/neo4j-conduit
src/Database/CouchDB/Conduit/Design.hs
bsd-2-clause
2,689
0
12
614
690
382
308
49
2
module GTL.Text ( gtlToText ) where import GTL.Parser import qualified Data.Map as Map import Data.List ((\\), partition, sort, intercalate, foldl') import Data.Tree gtlToText :: MyTree -> [String] gtlToText tree = reverse $ concat $ reverse $ flatten ...
EchoTeam/gtl
tools/GTL/Text.hs
bsd-2-clause
993
0
18
350
371
211
160
23
1
-- 248155780267521 import Data.List(sort) import Euler(digitSum) kk = 20 nn = 10^kk-1 mm = digitSum nn vv = 30 findPowerSums n = map fst $ filter (\x -> snd x == n) ns where ps = takeWhile (nn>) $ map (n^) [2..] ns = map (\x -> (x, digitSum x)) ps allPowerSums = sort $ concatMap findPowerSums [2..mm] ...
higgsd/euler
hs/119.hs
bsd-2-clause
368
7
10
85
200
101
99
11
1
-- Exercise 5 in chapter 3 of "Real World Haskell" isPalindrome :: (Eq a) => [a] -> Bool isPalindrome [] = True isPalindrome ys@(x:xs) | odd (length ys) = False isPalindrome ys@(x:xs) | ys == (reverse ys) = True isPalindrome (x:xs) = False
ploverlake/practice_of_haskell
src/isPalindrome.hs
bsd-2-clause
299
0
10
102
115
59
56
5
1
module Graphics.Pastel.WX.Test ( testWX ) where import Graphics.UI.WX hiding (circle) import Graphics.UI.WXCore.Image import Graphics.Pastel import Graphics.Pastel.WX.Draw testWX :: (Int, Int) -> Drawing -> IO () testWX (w,h) d = start gui where gui = do window <- frame [text := "Pastel WX Runner"]...
willdonnelly/pastel
Graphics/Pastel/WX/Test.hs
bsd-3-clause
529
0
13
163
191
102
89
13
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude, MagicHash #-} {-# LANGUAGE AutoDeriveTypeable, StandaloneDeriving #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Exception.Base -- Copyright : (c) The University of Glasgow 2001 -- License ...
DavidAlphaFox/ghc
libraries/base/Control/Exception/Base.hs
bsd-3-clause
14,530
0
15
3,453
1,992
1,132
860
170
3
{-# LANGUAGE Arrows, OverloadedStrings #-} import FRP.Yampa import FRP.Yampa.Utilities import Data.Colour.Names import Graphics import Shapes import Input type Scalar = Double type Vector = (Scalar, Scalar) type Position = (Scalar, Scalar) main :: IO () main = animate "Demo" 640 480 (parseWinInput >>> ((demo >>> ren...
pyrtsa/yampa-demos-template
src/Main.hs
bsd-3-clause
1,890
0
11
501
504
276
228
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE GADTs #-} module DodgerBlue.Types (CustomDsl(..), customCmd, ConcurrentDslCmd(..), CustomCommandStep) where import Data.Text (Text) import Data.Typeable import Contr...
adbrowne/dodgerblue
src/DodgerBlue/Types.hs
bsd-3-clause
1,297
0
10
257
475
250
225
30
1