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 BangPatterns #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# OPTIONS_GHC -Wno-missing-export-lists #-} -- TODO: try to make it more type-safe somehow? -- | Javascript methods used for the site. -- -- Some Javascript can also be found in .widg...
aelve/guide
back/src/Guide/JS.hs
bsd-3-clause
23,170
0
15
5,362
2,812
1,591
1,221
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Strict #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ScopedTypeVariables #-} {-# ...
jonascarpay/visor
src/Visor.hs
bsd-3-clause
5,057
0
16
1,471
2,193
1,126
1,067
115
1
{-# LANGUAGE BangPatterns, CPP #-} -- | A CSV parser. The parser defined here is RFC 4180 compliant, with -- the following extensions: -- -- * Empty lines are ignored. -- -- * Non-escaped fields may contain any characters except -- double-quotes, commas, carriage returns, and newlines. -- -- * Escaped fields may...
solidsnack/cassava
Data/Csv/Parser.hs
bsd-3-clause
6,364
0
20
1,654
1,344
729
615
115
5
{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} module Control.Variable where import Control.Monad import Control.Monad.ST import Control.Monad.Trans.State import Data.Tuple ( swap ) import Data.IORef import Data.STRef import qualified Data.StateVar as StateVar import Data.StateVar h...
cdxr/haskell-variables
Control/Variable.hs
bsd-3-clause
4,120
0
13
1,019
1,176
631
545
76
1
-- | -- Module : Basement.String.Encoding.ISO_8859_1 -- License : BSD-style -- Maintainer : Foundation -- Stability : experimental -- Portability : portable -- {-# LANGUAGE MagicHash #-} module Basement.String.Encoding.ISO_8859_1 ( ISO_8859_1(..) , ISO_8859_1_Invalid(..) ) where import Baseme...
vincenthz/hs-foundation
basement/Basement/String/Encoding/ISO_8859_1.hs
bsd-3-clause
1,527
0
11
317
440
237
203
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving, OverloadedStrings, DeriveGeneric, TypeFamilies, FlexibleInstances, MultiParamTypeClasses, OverloadedLabels, Arrows, TypeApplications, UndecidableInstances, FlexibleContexts #-} module Api.Post where import Prelude hiding (id) import Data.Aeson import Data.Profunctor import Data...
xldenis/xavio
src/Api/Post.hs
bsd-3-clause
3,139
1
15
873
940
490
450
70
1
{-# LANGUAGE TemplateHaskell #-} module QCommon.QFiles.MD2.DTriangleT where import Control.Applicative ((<*>)) import Control.Lens (makeLenses) import Data.Functor ((<$>)) import Data.Int (Int16) import Linear (V3) import qualified Data.ByteString.Lazy as BL import Types import Util.Binary makeLenses ''DTriangleT n...
ksaveljev/hake-2
src/QCommon/QFiles/MD2/DTriangleT.hs
bsd-3-clause
518
0
6
85
126
76
50
16
1
module Principal ( someFunc ) where someFunc :: IO () someFunc = putStrLn "Hola"
EnriqueNB/Exercitium
src/Principal.hs
bsd-3-clause
90
0
6
23
27
15
12
4
1
module ETests.Pretty.Expression ( prettyExpressionSpecs ) where import Text.Parsec import Text.PrettyPrint.HughesPJ import Test.Hspec import Test.Hspec.HUnit() import Language.TheExperiment.Parser import Language.TheExperiment.Pretty.Expression import ETests.Pretty.Literal import ETests.Parser.Expression impo...
jvranish/TheExperiment
test/ETests/Pretty/Expression.hs
bsd-3-clause
1,842
0
14
431
369
201
168
40
2
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-} module Ircbrowse.Types where import Ircbrowse.Data import Ircbrowse.Types.Import import Ircbrowse.Monads import Control.Applicative import Data.Text import Database.PostgreSQL.Simple import Database.PostgreSQL.Simple.FromRow import Network.M...
chrisdone/ircbrowse
src/Ircbrowse/Types.hs
bsd-3-clause
4,138
0
15
956
1,284
688
596
161
2
module Main ( main ) where import Control.Concurrent import Control.Concurrent.STM import Control.Monad (when) import Data.List (find) import Data.Maybe (isJust) import System.Environment (getArgs) import System.Console.GetOpt import System.Log.Logger import System.Log.Handler.Simple import System.Log.Handler...
artems/htorr
server/Main.hs
bsd-3-clause
3,101
0
13
657
959
508
451
83
4
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module TAPL.Meow ( exec , exec_ , meow , Meow ) where import Control.Monad.Writer hiding (Writer) newtype Meow a = Meow (WriterT [String] IO a) deriving (Functor, Applicative, Monad) exec :: Meow a -> IO (a, [String]) exec (Meow m) = runWriterT m exec_ :: Meow a -> I...
foreverbell/unlimited-plt-toys
tapl/tapl-base/TAPL/Meow.hs
bsd-3-clause
414
0
8
83
178
97
81
15
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TypeFamilies #-} -- Creat...
martin-kolinek/stack
src/Stack/SDist.hs
bsd-3-clause
19,966
0
24
5,214
4,551
2,390
2,161
348
11
{-# LANGUAGE PostfixOperators #-} module Haskellplusplus ( PlusPlus(..) , int , float ) where import Prelude hiding (print) import Prelude as P import Data.IORef int :: Int -> IO (IORef Int) int x = newIORef x float :: Float -> IO (IORef Float) float x = newIORef x class PlusPlus a where...
Heather/io-ref-tests
src/Haskellplusplus.hs
bsd-3-clause
977
0
10
307
488
245
243
27
1
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, ScopedTypeVariables #-} -- | Types definitions module Instagram.Types ( Credentials(..) ,clientIDBS ,clientSecretBS ,OAuthToken(..) ,AccessToken(..) ,UserID ,User(..) ,UserCounts(..) ,Scope(..) ,IGException(..) ,Envelope(..) ,ErrEnvelope(..) ...
prowdsponsor/ig
src/Instagram/Types.hs
bsd-3-clause
19,817
0
39
5,295
5,148
2,763
2,385
443
1
----------------------------------------------------------------------------- -- | -- Module : ForSyDe.Shallow.Utility.PolyArith -- Copyright : (c) ForSyDe Group, KTH 2007-2008 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : [email protected] -- Stability : experimental -- Portabil...
forsyde/forsyde-shallow
src/ForSyDe/Shallow/Utility/PolyArith.hs
bsd-3-clause
3,987
0
14
840
1,619
866
753
60
4
module System.Win32.DHCP.CLIENT_UID ( CLIENT_UID (..) , clientUid , macCuid , macCuidDrop5 , withMac ) where import Foreign import System.Win32.Types import Data.Mac import System.Win32.DHCP.DhcpStructure import System.Win32.DHCP.LengthBuffer -- typedef struct _DHCP_BINARY_DATA { -- DWORD D...
mikesteele81/Win32-dhcp-server
src/System/Win32/DHCP/CLIENT_UID.hs
bsd-3-clause
1,891
0
9
368
415
236
179
28
1
module ContextFilter (filterContext) where filterContext :: Int {- ^ context before -} -> Int {- ^ context after -} -> (a -> Bool) {- ^ predicate -} -> [a] {- ^ inputs -} -> [a] {- ^ matches with context -} filterContext before after p xs ...
glguy/irc-core
src/ContextFilter.hs
isc
1,274
0
12
399
482
245
237
32
2
{-# LANGUAGE FlexibleInstances, OverloadedStrings, FlexibleContexts #-} {-| Module : VizHaskell.TreeRepresentation Description : Representation of all the types that can be shown as a tree. This module defines the 'TreeRepresentation' class, with allows one to define a data type as being representable by a tree....
robarago/vizhaskell
hs/CoreRepresentacion/VizHaskell/TreeRepresentation.hs
gpl-2.0
2,919
0
22
744
516
270
246
36
0
{-| Utilities related to livelocks and death detection -} {- Copyright (C) 2014 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any...
ribag/ganeti-experiments
src/Ganeti/Utils/Livelock.hs
gpl-2.0
2,647
0
16
589
438
236
202
36
2
{-# LANGUAGE ForeignFunctionInterface #-} module Data.PHash.Image ( imageHash ) where import Control.Applicative import Foreign import Foreign.C.String import Foreign.C.Types import Prelude import Data.PHash.Types -- $setup -- >>> let imgPath = "test/fixtu...
bitemyapp/phash
src/Data/PHash/Image.hs
gpl-3.0
1,085
0
13
261
199
107
92
19
3
{-# LANGUAGE OverloadedStrings #-} -- Module : Test.AWS.CodeDeploy -- Copyright : (c) 2013-2015 Brendan Hay -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- A copy of the MPL can be found in the LICENSE file or -- ...
fmapfmapfmap/amazonka
amazonka-codedeploy/test/Test/AWS/CodeDeploy.hs
mpl-2.0
752
0
5
201
73
50
23
11
1
module Baz ( module X ) where import Ignore as X import Foo as X
carymrobbins/intellij-haskforce
tests/gold/resolve/Module00003/Baz.hs
apache-2.0
72
0
4
22
20
15
5
4
0
-- http://www.codewars.com/kata/5541f58a944b85ce6d00006a module Codewars.Kata.Fib where productFib :: Integer -> (Integer, Integer, Bool) productFib n = wrap . head . dropWhile ((< n) . uncurry (*)) $ fibs where fib = 1 : 1 : zipWith (+) fib (tail fib) fibs = zip fib (tail fib) wrap (a, b) = (a, b, a * b == n) ...
Bodigrim/katas
src/haskell/B-Product-of-consecutive-Fib-numbers.hs
bsd-2-clause
322
0
10
66
142
80
62
6
1
{-# LANGUAGE DeriveDataTypeable, TypeFamilies, TemplateHaskell, FlexibleInstances, FlexibleContexts, MultiParamTypeClasses, TypeOperators, TypeSynonymInstances #-} module Distribution.Server.Packages.Downloads where import Distribution.Server.Framework.Instances () import Distribution.Packag...
isomorphism/hackage2
Distribution/Server/Packages/Downloads.hs
bsd-3-clause
4,426
0
12
756
1,138
604
534
85
1
findPrefix :: String -> String -> String findPrefix [] _ = [] findPrefix _ [] = [] findPrefix (x:xs) (y:ys) = if x == y then x : findPrefix xs ys else [] solve :: String -> String -> [String] solve x y = [prefix, (drop l x), (drop l y)] where prefix = findPrefix x y ...
EdisonAlgorithms/HackerRank
practice/fp/recursion/prefix-compression/prefix-compression.hs
mit
528
0
9
172
247
126
121
16
2
module Uni.SS04.Serie2 where -- $Id$ import RAM import RAM.Example import RAM.Check import RAM.Builtin import Prime (prime) import Sets (mkSet,union) -- import Turing_Fun import Wort import ToDoc import Random import Array import Data.List (inits) import qualified Machine.Numerical.Type as N import qualified Mach...
florianpilz/autotool
src/Uni/SS04/Serie2.hs
gpl-2.0
6,513
8
15
1,978
1,476
829
647
118
2
{-# LANGUAGE CPP #-} #define dummy -- just to ensure cpp gets called on this file -- | This is just a convenient way of bunching the XML combinators -- together with some other things you are likely to want at the -- same time. module Text.XML.HaXml ( module Text.XML.HaXml.Types , module Text.XML.HaXml.Combinat...
alexbaluta/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml.hs
gpl-3.0
1,193
0
5
186
228
163
65
27
1
{-# LANGUAGE GADTs #-} {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} module T6124 where newtype A = MkA Int newtype B = MkB Char data T a where A :: T A B :: T B f :: T A -> A f A = undefined
snoyberg/ghc
testsuite/tests/pmcheck/should_compile/T6124.hs
bsd-3-clause
205
0
6
55
63
37
26
10
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} -- | It is well known that fully parallel loops can always be -- interchanged inwards with a sequential loop. This module -- implements that transformation. -- -- This is also where we implement loop-switching (for branches...
diku-dk/futhark
src/Futhark/Pass/ExtractKernels/Interchange.hs
isc
12,311
0
21
3,356
3,647
1,830
1,817
258
5
module Y2016.M07.D04.Solution where import Control.Arrow ((&&&), (>>>)) import Control.Monad ((>=>)) import Text.HTML.TagSoup {-- The name of the game for today's Haskell exercise is report generation. You have the jUnit test case run-off as XML at Y2016/M07/D01/ You want to generate a report of this scheme: --} g...
geophf/1HaskellADay
exercises/HAD/Y2016/M07/D04/Solution.hs
mit
1,956
0
11
430
460
257
203
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} import Control.Monad import Control.Exception (SomeException, try, catch) import Data.Either import Test.Tasty import Test.Tasty.HUnit import System.FilePath import Core.Language import qualified Core.Parser as Parser import qualified Core.Template as Template testFile :...
themattchan/core
test/Spec.hs
mit
1,003
0
16
213
298
156
142
30
1
{-# LANGUAGE OverloadedStrings #-} import Web.Scotty import Web.Scotty.Cookie import qualified Network.Wai.Handler.Warp as W import qualified Network.Wai.Handler.WebSockets as WS import Network.WebSockets (ConnectionException, ServerApp, pendingRequest, requestPath, rejectRequest, defaultConnectionOptions, acceptReques...
SPY/scotty-chat-sandbox
src/Main.hs
mit
3,631
0
22
799
1,189
610
579
89
4
module MTGSimulator where import qualified Data.Map.Strict as Map data Mana = Black | Blue | Green | Red | White | Colorless | Hybrid Mana Mana deriving (Show, Eq, Ord) type ManaCounts = Map.Map Mana Int emptyManaCounts :: ManaCounts emptyManaCounts = Map.empty addToManaCounts :: ManaCounts -> Mana -> ManaCounts a...
rtfeldman/mtgsimulator
src/MTGSimulator.hs
mit
1,036
0
9
192
271
147
124
21
1
-- File : haskelltest.hs -- Author : Peter Schachte -- Origin : Mon Aug 23 16:00:03 2010 -- Purpose : Run an assessment test suite -- -- |This code has a similar purpose to hunit, namely to run a suite of test -- cases. However, the intended application is for student project -- assessment. As such, it...
CIS-UoM/assignments
COMP90048 Declarative Programming/haskell/1/HaskellTest.hs
mit
10,710
0
18
2,612
2,280
1,194
1,086
142
2
module JSTrans.Writer where import JSTrans.AST import List (intersperse) import Char (isAlphaNum,isDigit) import Maybe (isJust,fromJust) expr :: Expr -> ShowS stat :: Statement -> ShowS block :: Block -> ShowS primaryExpr :: Expr -> ShowS memberExpr :: Expr -> ShowS many = foldr (.) id sepBy a x = foldr (.) id (inte...
minoki/jstrans
JSTrans/Writer.hs
mit
10,497
269
13
2,673
3,896
1,975
1,921
221
5
{-# LANGUAGE OverloadedStrings #-} module Smutt.HTTP.Header where import Data.HashMap.Strict (HashMap) import qualified Data.HashMap.Strict as HS import Data.Text.Lazy (Text) import qualified Data.Text.Lazy as T import Data.Monoid import Prelude hiding (lookup) newtype Header = Header (HashMap Text Text) deriving ...
black0range/Smutt
src/Smutt/HTTP/Header.hs
mit
1,781
0
12
354
704
381
323
42
2
{-# LANGUAGE CPP #-} module GHCJS.DOM.SpeechSynthesisUtterance ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.SpeechSynthesisUtterance #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/SpeechSynthesisUtterance.hs
mit
385
0
5
33
33
26
7
4
0
----------------------------------------------------------------------------- -- | -- Module : EchoClient -- Copyright : (c) Phil Hargett 2015 -- License : MIT (see LICENSE file) -- -- Maintainer : [email protected] -- Stability : experimental -- Portability : non-portable (requires STM) -- --...
hargettp/courier
echo/EchoClient.hs
mit
1,819
0
18
339
383
193
190
31
2
-- | Just the smallest set of lens operators {-# language RankNTypes #-} module ZeptoLens where import Control.Applicative (Const (..)) import Control.Monad.Reader.Class import Data.Functor.Identity (Identity (..)) type Lens s t a b = forall f . Functor f => (a -> f b) -> s -> f t over :: Lens s t a b -> (a -> b) ->...
lambdageek/use-c
src/ZeptoLens.hs
mit
845
0
10
211
394
214
180
24
1
module Main ( main ) where import Distribution.Simple main = defaultMain
Qinka/GiveYouAHead
Setup.hs
mit
99
0
4
37
19
12
7
5
1
module Render ( renderRay ) where import Data.Maybe ( fromMaybe ) import Color ( Color ) import Core ( Ray, (|*|), translate ) import Light ( Light, toColor, black ) import Scene ( Scene, Intersection(..) , sceneIntersection, pointLightSourcesVisibleFrom ) import Surface...
stu-smith/rendering-in-haskell
src/experiment05/Render.hs
mit
1,060
0
14
282
309
163
146
25
1
-- | Functions to print list components and convert them to strings. module Printing ( showItem , showTask , showGroup , showBlock , showTodoList , printStrings , writeToFile ) where import Types import Data.Time import Data.List (sort, sortBy, intersperse, intercalate) import Data.Char...
DimaSamoz/thodo
src/Printing.hs
mit
4,366
0
15
998
1,421
736
685
99
1
module Game.Cosanostra.Selectors ( alive , dead , other , otherAlive , selectorCheck ) where import Game.Cosanostra.Effect import Game.Cosanostra.Expr import Game.Cosanostra.Types import Control.Lens import Data.Maybe alive :: Selector alive = Atom Participant `And` Atom Alive dead :: Select...
rfw/cosanostra
src/Game/Cosanostra/Selectors.hs
mit
1,033
0
13
251
299
161
138
-1
-1
module Data.Expenses.Types ( Entry(..) , Model , Money(..) , QueryAttribute(..) , SimpleTransaction(..) , entriesFromModel , modelFromEntries ) where import qualified Data.Decimal as D -- ~ 1234.12 CUR data Money = Amount { moneyAmount :: D.Decimal , moneyCurrency :: Maybe Str...
rgoulter/expenses-csv-utils
src/Data/Expenses/Types.hs
mit
1,236
0
10
276
324
196
128
38
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} module App ( app ) where import Control.Monad.Reader (liftIO, ReaderT) import Crypto.PasswordStore (makePassword, verifyPassword) import Data.ByteString.Char8 (pack, unpack) import Data.ByteString.Lazy (ByteString) import Data.Time.Clock (addUT...
houli/distributed-file-system
auth-service/src/App.hs
mit
3,146
0
16
579
836
434
402
54
3
{-# LANGUAGE OverloadedStrings,TemplateHaskell #-} module Database.Toxic.TSql.Handler where import Control.Applicative import Control.Concurrent import Control.Concurrent.STM.TChan import Control.Lens import Control.Monad.STM import Control.Monad.Trans import Control.Monad.Trans.Class import Control.Monad.Trans.State...
MichaelBurge/ToxicSludgeDB
src/Database/Toxic/TSql/Handler.hs
mit
3,216
0
12
516
797
423
374
84
2
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UndecidableInstances #-} module Betfair.APING.Types.CancelExecutionReport ( ...
joe9/betfair-api
src/Betfair/APING/Types/CancelExecutionReport.hs
mit
1,272
0
10
320
185
115
70
25
0
{-# OPTIONS_HADDOCK show-extensions #-} {-# LANGUAGE FlexibleContexts, ExistentialQuantification #-} -- | -- -- Module : EventProbability.Cache -- Description : 'Cache's used for 'Event' probabilities. -- License : MIT -- -- module EventProbability.Cache ( -- * Count Cache EventCountCache , countOccu...
fehu/min-dat--naive-bayes
src/EventProbability/Cache.hs
mit
2,436
0
13
619
438
249
189
36
1
module FillDB where import Database.HDBC import Database.HDBC.Sqlite3 import System.Random import Control.Monad fill = do gen <- getStdGen males <- replicateM 50 $ mkPeople maleNames gen females <- replicateM 50 $ mkPeople femaleNames gen let couples = zipWith (\x y -> [x!!0, y!!0]) females males --conn <- co...
juventietis/HLINQ
Tests/FillDB.hs
mit
3,428
4
14
581
1,060
514
546
71
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Test.Hspec.LawsSpec (main, spec) where import Test.Hspec import Test.Hspec.Runner import Test.QuickCheck import Data.Monoid import Test.Hspec.Laws main :: IO () main = hspec spec newtype Minus = Minus Int deriving...
hspec/hspec-laws
test/Test/Hspec/LawsSpec.hs
mit
794
0
18
181
213
116
97
21
1
{-# LANGUAGE NoImplicitPrelude #-} module Lib.Set ( filterA, partitionA ) where import Data.Set (Set) import qualified Data.Set as S import qualified Lib.List as L import Prelude.Compat both :: (a -> b) -> (a, a) -> (b, b) both f (x, y) = (f x, f y) filterA :: (Applicative f, Ord k) => (k ->...
sinelaw/buildsome
src/Lib/Set.hs
gpl-2.0
566
0
10
134
274
147
127
13
1
-- -- Copyright (c) 2012 Citrix Systems, Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This progra...
OpenXT/manager
rpc-proxy/Channel.hs
gpl-2.0
6,964
0
14
1,538
2,279
1,130
1,149
152
3
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Unittests for ganeti-htools. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Sof...
badp/ganeti
test/hs/Test/Ganeti/Rpc.hs
gpl-2.0
4,574
0
14
639
816
439
377
75
1
module Main where import Options.Applicative import System.IO (IOMode (..), withFile) import HEP.Analysis.Histogram1D (showHist1D, unitNormalize) import HEP.Analysis.HepMC.Photon (photonSpectrum) main :: IO () main = execParser opts >>= getSpectrum where op...
cbpark/PhotonSpectrum
src/photonspectrum.hs
gpl-3.0
1,675
0
13
757
373
194
179
38
1
{-# LANGUAGE StandaloneDeriving #-} {-| An 'Amount' is some quantity of money, shares, or anything else. A simple amount is a 'Commodity', quantity pair: @ $1 £-50 EUR 3.44 GOOG 500 1.5h 90 apples 0 @ An amount may also have a per-unit price, or conversion rate, in terms of some other commodity. If ...
trygvis/hledger
hledger-lib/Hledger/Data/Amount.hs
gpl-3.0
22,044
0
24
5,236
5,097
2,699
2,398
291
4
module OpenSandbox.Data.EntitySpec (main,spec) where import OpenSandbox.Data.Entity import Test.Hspec import Test.QuickCheck spec :: Spec spec = return () main :: IO () main = hspec spec
oldmanmike/opensandbox
test/OpenSandbox/Data/EntitySpec.hs
gpl-3.0
191
0
6
29
64
37
27
8
1
module Paper where import Ranking.Glicko players :: [Player 1] players = [ Player { playerId = 1 , playerRating = 1500 , playerDev = 200 , playerVol = 0.06 , playerInactivity = 0 , playerAge = 0 } , Player { playerId = 2 , playerRating = 1400 ...
Prillan/haskell-glicko
test/Paper.hs
gpl-3.0
887
0
7
382
238
149
89
-1
-1
{-# LANGUAGE DuplicateRecordFields #-} module Data.Walker where import Data.Hashable (hash) import Data.List import Data.SCAD import Data.Shared import qualified Data.URDF as URDF import qualified Data.SRDF as SRDF import Linear.V3 import Linear....
Schpin/schpin-chassis
schpin_robot_lib/src/Data/Walker.hs
gpl-3.0
11,996
0
17
4,086
3,487
1,879
1,608
192
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TemplateHaskell #-} -- | -- Copyright : (c) 2010, 2011 Benedikt Schmidt & Simon Meier -- License : GPL v3 (see LICENSE) -- -- Maintainer : Simon Meier <[email protected]> -- Portability : GHC only -- -- Theory loading infrastructure. module Main.TheoryLoader ( ...
ekr/tamarin-prover
src/Main/TheoryLoader.hs
gpl-3.0
16,106
0
15
4,136
2,910
1,478
1,432
251
13
-- | A simple counter. Wrong implementation. module Counter where import Control.Monad.Reader import Control.Monad.State.Lazy newtype Counter = MkCounter Int deriving (Show) -- | `inc c n` increments the counter by `n` units. inc :: Counter -> Int -> Counter inc (MkCounter c) n = MkCounter (c ...
capitanbatata/sandbox
random-data-generation/src/CounterWrong.hs
gpl-3.0
1,570
0
13
373
476
247
229
40
1
{-| Defines a state machine of 3D Tic-Tac-Toe. -} module Game.TicTacToe3D.TicTacToe3D ( Team, Issue, Board, Game (..), done, newGame, playGame ) where import Control.Monad import Data.Functor import Data.Monoid import Data.Maybe import Data.List import Data.Foldable as F import Data.Tuple.Homogenous imp...
ryo0ka/tictactoe3d
src/Game/TicTacToe3D/TicTacToe3D.hs
gpl-3.0
4,347
21
14
1,147
1,297
692
605
80
3
module Paths_DBus ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName ) where import Data.Version (Version(..)) import System.Environment (getEnv) version :: Version version = Version {versionBranch = [0,4], versionTags = []} bindir, libdir, datadir, libexecdir :: FilePath bind...
hamaxx/unity-2d-for-xmonad
xmonad-files/DBus-0.4/dist/build/autogen/Paths_DBus.hs
gpl-3.0
945
0
10
144
277
159
118
22
1
module Zoepis.ZCamera where import Zoepis.ZScene import Zoepis.ZVector zMoveCamera :: Double -> Double -> ZSceneRoot -> ZSceneRoot zMoveCamera rightLeft forBack root = root { zSceneCamera = newCamera } where (c,f,u) = zSceneCamera root forward = unit $ f - c right = forward `cross` u ...
abakst/Zoepis
Zoepis/ZCamera.hs
gpl-3.0
1,273
0
10
395
397
219
178
29
1
module He.Lexer.Tokens ( keywords, ident, litInt, litFloat, litChar, litBool , beginString, endString, stringContent , beginInterp, endInterp, beginExtraDelim, endExtraDelim , beginBlockComment, endBlockComment, blockCommentContent , lineComment ) where import qualified Data.Text as T import Text.Regex.Ap...
ktvoelker/helium
src/He/Lexer/Tokens.hs
gpl-3.0
5,896
0
17
1,274
2,299
1,222
1,077
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/Accounts/AdUnits/Update.hs
mpl-2.0
3,818
0
16
861
466
278
188
77
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/Delete.hs
mpl-2.0
3,033
0
14
712
385
231
154
61
1
module Main (main) where import Test.Api import Test.Tasty main :: IO () main = defaultMain tests
twittner/swagger
test/Main.hs
mpl-2.0
100
0
6
18
37
21
16
5
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Datastore.Types -- Copyright : (c) 2015-2016 Brendan H...
brendanhay/gogol
gogol-datastore/gen/Network/Google/Datastore/Types.hs
mpl-2.0
12,721
0
7
2,931
1,263
877
386
354
1
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -Wall -fno-warn-orphans #-} ---------------------------------------------------------------------- -- | -- Module : Text.PrettyPrint.Leijen.PrettyPrec -- Copyright : (c) Conal Elliott 2009 -- License : BSD -- -- Maintainer : [email protected] -- Stability : experim...
conal/shady-gen
src/Text/PrettyPrint/Leijen/PrettyPrec.hs
agpl-3.0
3,944
0
9
671
655
358
297
43
1
module Main where import Graphics.SOE.Gtk type Vector = (Double, Double) (<+>) :: Vector -> Vector -> Vector (a, b) <+> (c, d) = (a+c, b+d) (<->) :: Vector -> Vector -> Vector (a, b) <-> (c, d) = (a-c, b-d) (.*) :: Double -> Vector -> Vector k .* (a, b) = (k * a, k * b) (*.) :: Vector -> Double -> Vector (*.) = f...
thiagoarrais/gtk2hs
demo/soe/Snowflake.hs
lgpl-2.1
2,333
3
17
917
1,057
578
479
57
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE LambdaCase #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module Main where import Paths_pgdl (version) import Data.Version (showVersion) import qualified Data.Text as T import Data.Text (Text) import Data.Maybe import Control.Monad.IO.Class import Control.Applicativ...
sifmelcara/pgdl
src/Main.hs
unlicense
10,980
0
32
4,651
2,837
1,445
1,392
193
25
module Git.Command.LsFiles (run) where run :: [String] -> IO () run args = return ()
wereHamster/yag
Git/Command/LsFiles.hs
unlicense
85
0
7
15
42
23
19
3
1
{-# LANGUAGE TupleSections #-} module Main (main) where import Prelude hiding (catch) import Control.Applicative ((<$>)) import Control.Concurrent (forkIO, newEmptyMVar, putMVar, takeMVar) --import Control.Monad (unless) import Data.Function (on) import Data.List ((\\), maximumBy, transpose) import Data.Maybe ({-isJu...
mkscrg/chinese-poker
dealer/main.hs
bsd-2-clause
3,974
0
15
948
1,890
987
903
112
5
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE EmptyDataDecls #-} -- | * Author: Jefferson Heard (jefferson.r.heard at gmail.com) -- -- * Copyright 2008 Renaissance Computing Institute < http://www.renci.org > -- -- * License: GNU LGPL -- -- * Compatibility GHC (I c...
seagull-kamome/haskell-FTGL
Graphics/Rendering/FTGL.hs
bsd-2-clause
15,759
0
13
2,655
2,795
1,502
1,293
-1
-1
module FRP.Ordrea.Pipes ( networkToPipe , pipeToNetwork ) where import Control.Applicative import Control.Monad (forever) import Data.Monoid (mconcat) import FRP.Ordrea import Pipes import qualified Pipes.Prelude as P -- | Convert an ordrea event network to a pipe. networkToPipe :: MonadIO m => (Event a -> ...
maoe/ordrea-pipes
src/FRP/Ordrea/Pipes.hs
bsd-3-clause
1,150
0
13
266
369
182
187
35
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} module Bootstrap (runBootstrap) where import Control.Monad import System.Directory import System.Environment import System.Exit.Compat import System.F...
soenkehahn/runstaskell
src/Bootstrap.hs
bsd-3-clause
1,304
0
13
276
285
140
145
30
1
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE LiberalTypeSynonyms #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Distributed.Process.ManagedProcess.UnsafeClient -- Copyright : (c) Tim Wats...
haskell-distributed/distributed-process-client-server
src/Control/Distributed/Process/ManagedProcess/UnsafeClient.hs
bsd-3-clause
7,463
0
13
1,616
1,530
841
689
117
3
{-| Module : Description : Copyright : (c) Alexander Vieth, 2015 Licence : BSD3 Maintainer : [email protected] Stability : experimental Portability : non-portable (GHC only) -} {-# LANGUAGE AutoDeriveTypeable #-} module Database.Relational.Not ( NOT(..) ) where data NOT term = NOT term
avieth/Relational
Database/Relational/Not.hs
bsd-3-clause
318
0
6
73
28
19
9
4
0
{-# LANGUAGE RankNTypes #-} -- |A parser for RDF in N-Triples format -- <http://www.w3.org/TR/rdf-testcases/#ntriples>. module Text.RDF.RDF4H.NTriplesParser( NTriplesParser(NTriplesParser), parseNTriplesRDF ) where -- TODO: switch to OverloadedStrings and use ByteString literals (?). import Data.RDF import Dat...
amccausl/RDF4H
src/Text/RDF/RDF4H/NTriplesParser.hs
bsd-3-clause
9,200
0
18
1,983
2,064
1,057
1,007
133
4
module Data.Type.Vec where import Control.Applicative import Data.Foldable import Data.Monoid import Data.Typeable import Data.Traversable import Data.Type.BasicFunctors import Data.Type.Equality import Data.Type.Fin import Data.Type.Nat import Prelude hiding (length, replicate, zipWith, unzip, (++), (!!)) type role ...
kosmikus/tilt
src/Data/Type/Vec.hs
bsd-3-clause
4,075
0
14
1,217
2,206
1,120
1,086
-1
-1
module Main where {-@ total :: Nat -> Nat @-} total :: Int -> Int total 0 = 0 total n = 1 + total (n-1)
ssaavedra/liquidhaskell
tests/pos/recursion0.hs
bsd-3-clause
107
0
8
29
44
24
20
4
1
{-# Language OverloadedStrings #-} {-# Language RankNTypes #-} {-# Language FlexibleContexts #-} module Chat where import Control.Monad.State import Control.Monad.Reader import Control.Monad.Writer import Data.Text (Text) import Data.Map.Strict (Map) import Data.Monoid ((<>)) import qualified Data.Map.Strict as M imp...
MasseR/FreeIrc
src/Chat.hs
bsd-3-clause
4,242
0
14
1,021
1,403
728
675
71
6
-- | Type-safe client-server communication framework for Haste. -- -- In addition to the Haste.App extras, this module exports the same API as -- "Haste", modified slightly to work better with the automatic program -- slicing Haste.App provides. This means that you should import either this -- module *or* Haste...
jtojnar/haste-compiler
libraries/haste-lib/src/Haste/App.hs
bsd-3-clause
1,050
0
6
183
205
139
66
23
0
module Mosh ( module Mosh, OcbKey, buildOcbParams, ) where import Mosh.Crypto.Key import Mosh.Crypto.Params -- aeson import qualified Data.Aeson as J -- base import Control.Applicative import Control.Monad import Data.Bits import Data.List import Data.Monoid import Data.Word import Debug.Trac...
dave4420/mosh-clone
src/Mosh.hs
bsd-3-clause
9,856
0
17
3,708
2,538
1,314
1,224
-1
-1
{- | Module : Web.RBB.Crawler Description : Implementation of a meta data collector for the blog entry repository Copyright : (c) Sebastian Witte License : BSD3 Maintainer : [email protected] Stability : experimental -} module Web.RBB.Crawler.Repository where import ...
saep/repo-based-blog
library/Web/RBB/Crawler/Repository.hs
bsd-3-clause
7,197
0
23
2,307
1,783
924
859
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import Control.Monad import Data.Binary import Network.HTTP.Client (newManager) import Network.HTTP.Client.TLS (tlsManagerSettings) import Servant.Client import System.Directory import Text.Printf (printf) import Text.Show.Pretty import qualified Data.Map ...
edsko/ChinesePodAPI
src-main/Main.hs
bsd-3-clause
6,441
0
17
1,802
1,732
869
863
-1
-1
module Main where import qualified Compiler main :: IO () main = either print putStrLn =<< Compiler.compile =<< getContents
letsbreelhere/egg
app/EggcExe.hs
bsd-3-clause
126
0
7
21
38
21
17
4
1
{-# LANGUAGE TupleSections, OverloadedStrings, QuasiQuotes, TemplateHaskell, TypeFamilies, RecordWildCards, DeriveGeneric ,MultiParamTypeClasses ,FlexibleInstances #-} module Protocol.ROC.PointTypes.PointType172 where import GHC.Generics import qualified Data.ByteString as BS import Data.Word import Dat...
jqpeterson/roc-translator
src/Protocol/ROC/PointTypes/PointType172.hs
bsd-3-clause
1,385
0
9
394
182
103
79
34
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} module Network.Sock.Types.Session ( Session(..) , SessionStatus(..) , SessionID ) where ------------------------------------------------------------------------------ import Control.Concurrent.Lifted (ThreadId) import Contro...
Palmik/wai-sockjs
src/Network/Sock/Types/Session.hs
bsd-3-clause
2,973
0
10
850
243
164
79
28
0
{-# LANGUAGE OverloadedStrings #-} module Tests.Readers.LaTeX (tests) where import Text.Pandoc.Definition import Test.Framework import Tests.Helpers import Tests.Arbitrary() import Text.Pandoc.Builder import Text.Pandoc latex :: String -> Pandoc latex = readLaTeX defaultParserState infix 5 =: (=:) :: ToString c ...
Lythimus/lptv
sites/all/modules/jgm-pandoc-8be6cc2/src/Tests/Readers/LaTeX.hs
gpl-2.0
7,965
0
17
2,765
1,705
947
758
144
1
-- LANGUAGE: Haskell -- AUTHOR: Brent Scheppmann -- GITHUB: https://github.com/bareon -- COMPILE: ghc --make hello_world_bareon.hs -o hello module Main where main :: IO () main = putStrLn "Hello World!!"
bikoheke/hacktoberfest
scripts/hello_world_bareon.hs
gpl-3.0
206
0
6
31
26
16
10
3
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-cloudwatch-logs/gen/Network/AWS/CloudWatchLogs/DescribeLogGroups.hs
mpl-2.0
5,240
0
12
1,106
683
408
275
74
1
-- | Maintainer: Félix Sipma <[email protected]> module Propellor.Property.DebianMirror ( DebianPriority (..) , showPriority , mirror , RsyncExtra (..) , Method (..) , DebianMirror , debianMirrorHostName , debianMirrorSuites , debianMirrorArchitectures , debianMirrorSections , debianMirrorSourceBool...
ArchiveTeam/glowing-computing-machine
src/Propellor/Property/DebianMirror.hs
bsd-2-clause
5,363
32
15
782
1,330
747
583
121
3
module Usage.Usage where import qualified Definition.Definition as Definition test :: Int test = Definition.s<caret>even + 1
charleso/intellij-haskforce
tests/gold/codeInsight/QualifiedImportMultipleLevels/Usage/Usage.hs
apache-2.0
129
0
8
20
38
23
15
-1
-1
{- Copyright 2015 Google Inc. All rights 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 law or a...
Ye-Yong-Chi/codeworld
codeworld-base/src/Control/Concurrent.hs
apache-2.0
751
0
4
136
23
17
6
4
0
----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.CycleWS -- Copyright : (c) Joachim Breitner <[email protected]>, -- Nelson Elhage <[email protected]> (`toggleWS' function) -- License : BSD3-style (see LICENSE) -- -- Main...
markus1189/xmonad-contrib-710
XMonad/Actions/CycleWS.hs
bsd-3-clause
14,169
0
19
4,344
2,164
1,170
994
148
4
<?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="ur-PK"> <title>Directory List v1.0</title> <maps> <homeID>directorylistv1</homeID> <map...
kingthorin/zap-extensions
addOns/directorylistv1/src/main/javahelp/help_ur_PK/helpset_ur_PK.hs
apache-2.0
976
78
66
157
412
209
203
-1
-1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Foreign -- Copyright : (c) The University of Glasgow, 2008-2011 -- License :...
sdiehl/ghc
libraries/base/GHC/Foreign.hs
bsd-3-clause
11,587
0
25
2,993
2,201
1,149
1,052
151
5
{-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeInType #-} module T15308 where import Data.Kind data Foo (a :: Type) :: forall b. (a -> b -> Type) -> Type where MkFoo :: Foo a f f :: Foo a f -> String f = show
sdiehl/ghc
testsuite/tests/dependent/should_fail/T15308.hs
bsd-3-clause
244
0
9
53
75
45
30
-1
-1