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, GADTs, DeriveDataTypeable, StandaloneDeriving #-} module Data.OrgMode.Text ( LineNumber(..), toNumber, TextLine(..), isNumber, TextLineSource(..), normalizeInputText, lineAdd, linesStartingFrom, hasNumber, makeDrawerLines, wrapLine, prefixLine, tlPrint, tlFormat, wrapStringVarLines )...
lally/orgmode
src/Data/OrgMode/Text.hs
bsd-3-clause
4,866
0
16
1,113
1,549
806
743
106
4
module Main where main :: IO () main = do print "Hello org-monad!"
bonnefoa/org-monad
prog/Main.hs
bsd-3-clause
71
0
7
17
25
13
12
4
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeFamilies #-} -- | module Network.Libtorrent.Types where import ...
eryx67/haskell-libtorrent
src/Network/Libtorrent/Types.hs
bsd-3-clause
3,535
1
13
915
1,068
575
493
76
2
-- | module Yesod.Content.PDFSpec (main, spec) where import Test.Hspec import Yesod.Content.PDF import Data.ByteString.UTF8 (toString) import Text.Blaze.Html main :: IO () main = hspec spec h :: Html h = toHtml ("<html><body>Hello World</body></html>" :: String) spec :: Spec spec = do describe "generate PDF from...
alexkyllo/yesod-content-pdf
test/Yesod/Content/PDFSpec.hs
bsd-3-clause
495
0
20
88
159
89
70
14
1
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE DataKinds #-} -- expermenting with home made overloaded record fields -- cf sdiehl, wiwinwlh -- but maybe -- http://statusfailed.com/blog/2013/02/19/overloading-record-fields-with-lens.html -- would be...
reuleaux/pire
src/Pire/Syntax/Modules.hs
bsd-3-clause
2,739
0
10
679
334
208
126
40
0
{-# LANGUAGE StrictData #-} {-# LANGUAGE Trustworthy #-} module Network.Tox.NodeInfo.SocketAddressSpec where import Test.Hspec import Data.Proxy (Proxy (..)) import Network.Tox.EncodingSpec import Network.Tox.NodeInfo.SocketAddress (SocketAddress) impor...
iphydf/hs-toxcore
test/Network/Tox/NodeInfo/SocketAddressSpec.hs
gpl-3.0
665
0
10
139
132
76
56
16
1
{- (c) The AQUA Project, Glasgow University, 1994-1998 \section[ErrsUtils]{Utilities for error reporting} -} {-# LANGUAGE CPP #-} module ETA.Main.ErrUtils ( MsgDoc, Validity(..), andValid, allValid, isValid, getInvalids, ErrMsg, WarnMsg, Severity(..), Messages, ErrorMessages, Warning...
alexander-at-github/eta
compiler/ETA/Main/ErrUtils.hs
bsd-3-clause
16,021
0
23
4,655
3,687
1,919
1,768
289
4
{-# OPTIONS_HADDOCK hide #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.ByteString -- Copyright : (c) Sven Panne 2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Port...
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/ByteString.hs
bsd-3-clause
2,185
0
13
367
566
309
257
37
1
{-# LANGUAGE CPP, RecordWildCards, NamedFieldPuns, DeriveGeneric #-} -- | Project configuration, implementation in terms of legacy types. -- module Distribution.Client.ProjectConfig.Legacy ( -- * Project config in terms of legacy types LegacyProjectConfig, parseLegacyProjectConfig, showLegacyProjectCo...
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/ProjectConfig/Legacy.hs
bsd-3-clause
51,073
0
22
14,893
8,512
4,859
3,653
975
8
module GameEngine.Graphics.BezierSurface ( tessellatePatch ) where import Control.Monad import Data.List (foldl') import Data.Vect.Float hiding (Vector) import Data.Vect.Float.Instances import Data.Vector (Vector,(!)) import qualified Data.Vector as V import qualified Data.Vector.Mutable as MV import GameEngine.D...
csabahruska/quake3
game-engine/GameEngine/Graphics/BezierSurface.hs
bsd-3-clause
3,004
0
22
827
1,430
760
670
46
2
module Foo() where -- check various type synonym expansions. type XChar = Char xc :: XChar xc = 'x' type Foo = Int type Bar = Foo type Bug x = Char type App f x = f (Bug x) type Fun = App Bug (Bug Char) f :: Foo -> Int f = id --(x :: Foo) = 4 y = (1 + 4 :: Bar) `div` 3 z = 'z' :: Fun w = let f = 'z' :: App Bug Foo ...
hvr/jhc
regress/tests/1_typecheck/2_pass/TypeSynonym.hs
mit
483
0
9
133
212
123
89
20
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module PackageTests.DeterministicAr.Check where import Control.Monad import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BS8 import Data.Char (isSpace) import Data.List #if __GLASGOW_HASKELL__ < 710 import Data.Traversable #endif imp...
Helkafen/cabal
Cabal/tests/PackageTests/DeterministicAr/Check.hs
bsd-3-clause
5,495
0
23
1,563
1,370
700
670
105
7
<?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="fa-IR"> <title>Python Scripting</title> <maps> <homeID>top</homeID> <mapref location="m...
thc202/zap-extensions
addOns/jython/src/main/javahelp/org/zaproxy/zap/extension/jython/resources/help_fa_IR/helpset_fa_IR.hs
apache-2.0
970
98
27
156
390
207
183
-1
-1
<?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="hi-IN"> <title>Call Graph</title> <maps> <homeID>callgraph</homeID> <mapref location="m...
kingthorin/zap-extensions
addOns/callgraph/src/main/javahelp/help_hi_IN/helpset_hi_IN.hs
apache-2.0
961
94
29
156
394
209
185
-1
-1
module Data.Map.Base (trim) where data Map k a = Tip {-@ data Map k a <l :: root:k -> k -> Prop> = Tip @-} {-@ measure isBin :: Map k a -> Prop isBin (Tip) = false @-} trim :: Map k a trim = error "TODO"
mightymoose/liquidhaskell
tests/pos/record1.hs
bsd-3-clause
236
0
5
80
41
25
16
4
1
module Handler.CommentSpec (spec) where import TestImport import Data.Aeson spec :: Spec spec = withApp $ do describe "valid request" $ do it "gives a 200" $ do get HomeR statusIs 200 let message = "My message" :: Text body = object [ "message" .= messa...
Southern-Exposure-Seed-Exchange/Order-Manager-Prototypes
yesod/test/Handler/CommentSpec.hs
gpl-3.0
1,244
0
20
499
298
135
163
32
1
{-# LANGUAGE CPP #-} ---------------------------------------------------------------------------- -- -- Pretty-printing of common Cmm types -- -- (c) The University of Glasgow 2004-2006 -- ----------------------------------------------------------------------------- -- -- This is where we walk over Cmm emitting an ex...
siddhanathan/ghc
compiler/cmm/PprCmmDecl.hs
bsd-3-clause
5,727
0
15
1,244
1,216
634
582
78
7
{-# LANGUAGE ScopedTypeVariables, RankNTypes #-} -- Trac #2714 module T2714 where f :: ((a -> b) -> b) -> (forall c. c -> a) f = ffmap ffmap :: Functor f => (p->q) -> f p -> f q ffmap = error "urk" {- a ~ f q c ~ f p (p->q) ~ (a->b) -> b => a ~ f q c ~ f p p ~ a->b q ~ b...
urbanslug/ghc
testsuite/tests/typecheck/should_fail/T2714.hs
bsd-3-clause
358
0
9
141
88
49
39
6
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE RankNTypes #-} module T3101 where type family F a :: * data Boom = Boom (forall a. a -> F a) deriving Show
urbanslug/ghc
testsuite/tests/deriving/should_fail/T3101.hs
bsd-3-clause
155
0
10
34
42
26
16
6
0
module MathSpec where import Test.Hspec import Math main :: IO() main = hspec $ do describe "absolute" $ do it "returns the original number when given a positiv integer" $ absolute 1 `shouldBe` 1 it "returns the negated result when given a negative integer" $ absolute (-1) ...
Sgoettschkes/learning
haskell/LearnYouAHaskell/old/MathSpec.hs
mit
416
0
15
127
103
52
51
12
1
{-# LANGUAGE TupleSections #-} module SoOSiM.CLI.Util ( mapAccumLM , mapAccumRM ) where import Control.Applicative (Applicative(..)) import Control.Monad.State (StateT(..)) import Data.Traversable (Traversable(..)) -- | The 'mapAccumLM' function behaves like a combination of 'fmap' -- and 'foldl' in a monadi...
christiaanb/SoOSiM-cli
src/SoOSiM/CLI/Util.hs
mit
1,592
0
14
346
523
283
240
31
1
module Pwn.Tubes.Tube where import Control.Concurrent (forkIO, killThread) import Control.Concurrent.MVar import Control.Monad (when) import Control.Monad.IO.Class import qualified Data.ByteString.Char8 as BS import qualified Data.Conduit as C import ...
Tosainu/pwn.hs
src/Pwn/Tubes/Tube.hs
mit
1,967
0
17
566
711
357
354
46
2
{-# LANGUAGE NoMonomorphismRestriction #-} module Plugins.Gallery.Gallery.Manual40 where import Diagrams.Prelude import Graphics.Rendering.Diagrams.Points ts = mconcat . take 3 . iterate (rotateBy (1/9)) $ eqTriangle 1 example = (ts ||| stroke ts ||| strokeT ts ||| fromVertices ts) # fc red
andrey013/pluginstest
Plugins/Gallery/Gallery/Manual40.hs
mit
304
0
11
51
96
51
45
6
1
-- GENERATED by C->Haskell Compiler, version 0.16.4 Crystal Seed, 24 Jan 2009 (Haskell) -- Edit the ORIGNAL .chs file instead! {-# LINE 1 "Scene.chs" #-}{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE TypeSynonymInstances #-} {-# context lib="hyd" #-} module Hyd.Scene where import Foreign import Foreign.C....
Smilex/hyd_engine
bindings/haskell/Hyd/Scene.hs
mit
2,210
43
14
406
597
327
270
-1
-1
module Main (main) where import Prelude hiding (mapM, concat) import qualified Control.Arrow as A import Control.Monad hiding (mapM) import Control.Exception import Options.Applicative import Data.Tuple.Homogenous import Data.Foldable import Data.Traversable import Text.PrettyPrint.Mainland as PP import Parser import ...
feuerbach/prover
src/Main.hs
mit
2,216
0
20
621
729
374
355
-1
-1
{-| Module: Flaw.UI.Label Description: One-line centered text label. License: MIT -} module Flaw.UI.Label ( Label(..) , LabelStyle(..) , newLabel , newTextLabel , newTitleLabel , renderLabel ) where import Control.Concurrent.STM import qualified Data.Text as T import Flaw.Graphics import Flaw.Graphics....
quyse/flaw
flaw-ui/Flaw/UI/Label.hs
mit
2,993
0
16
574
811
432
379
85
7
module Proteome.Data.AddError where import Ribosome.Data.ErrorReport (ErrorReport(ErrorReport)) import Ribosome.Error.Report.Class (ReportError(..)) import System.Log.Logger (Priority(NOTICE)) newtype AddError = InvalidProjectSpec Text deriving stock (Eq, Show) deepPrisms ''AddError instance ReportError AddErro...
tek/proteome
packages/proteome/lib/Proteome/Data/AddError.hs
mit
462
0
8
55
124
73
51
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} -- | -- The main entry point for the application. module Main where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative ((<$>)) #endif import Control.Monad.IO.Class (liftIO...
yamadapc/hshort
src/Main.hs
mit
2,600
0
14
846
592
309
283
50
2
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, TupleSections, GADTs #-} module Day14 where import AdventPrelude import qualified Crypto.Hash.MD5 as MD5 import Data.Text.Format hiding (print) salt :: String -- salt = "abc" salt = "ahsbgdzn" hashes :: [Text] hashes = (repack . concat . map (\b -> format "...
farrellm/advent-2016
src/Day14.hs
mit
1,547
0
21
534
640
336
304
48
2
module LLVM.AbcOps (OpCode(..)) where import Data.Word import LLVM.Lang import qualified Abc.Def as Abc data OpCode = {- 0x01 -} Breakpoint | {- 0x02 -} Nop | {- 0x03 -} Throw | {- 0x04 -} GetSuper Abc.MultinameIdx (Maybe String) | {- 0x05 -} SetSupe...
phylake/avm3
llvm/abcops.hs
mit
9,579
0
8
4,515
1,241
838
403
158
0
{-# LANGUAGE OverloadedStrings #-} import Lens.Family import Graphics.Badge.Barrier import Test.Tasty import Test.Tasty.Golden main :: IO () main = defaultMain $ testGroup "" [ testGroup "flat" [ goldenVsString "1" "tests/data/flat/1.svg" . return $ renderBadge flat "build" "success" , goldenVsStr...
philopon/barrier
tests/tasty.hs
mit
1,896
0
14
329
414
207
207
22
1
{-# LANGUAGE TemplateHaskell #-} module Tests where import Data.Char (isAlpha) import Test.Framework.TH (defaultMainGenerator) import Test.Framework (defaultMain, testGroup) import Test.Framework.Providers.HUnit (testCase) import Test.HUnit ((@=?)) import WordTools (isNotAlpha, hasAlpha, takeUntil) main = $(defaultM...
akaihola/palindromi-haskell
src/Tests.hs
mit
1,197
0
8
178
336
172
164
25
1
evaluate :: Num a => [String] -> [a] evaluate ("add":h1:h2:t) = ((read h1) + (read h2)):evaluate t worker = do input <- getLine putStrLn $ show . evaluate . words $ input worker main = worker
teodorlu/ballmer
calc/calc.hs
gpl-2.0
197
0
10
41
111
56
55
7
1
module Main where import Scanner import System.Environment main :: IO () main = do args <- getArgs let fileName = args !! 0 fileContents <- readFile fileName putStrLn $ show $ scanTokens fileContents
yangsiwei880813/CS644
src/JMain.hs
gpl-2.0
210
0
10
43
71
35
36
9
1
-- some includes import Network.HTTP import Network.URI import Text.HTML.TagSoup import Data.Dates hiding (Day) import Data.List import Text.Printf import Control.Monad import qualified Codec.Binary.UTF8.String as UTF8 ----------------------------- -- some datatypes used for clarity data Menu = Menu { name...
fhaust/mensaplan
Mensaplan.hs
gpl-3.0
2,633
6
10
555
759
398
361
60
1
module Decks where import Cards mixed = [ dog, catOrDog, dragon, catFactory, masterOfGreed, buff ] pets = [ dog, dog, dog, cat, cat, cat, dragon, dragon, dragon ]
MoritzR/CurseOfDestiny
src/Decks.hs
gpl-3.0
225
0
5
90
62
41
21
19
1
module Server ( main, mainTest, lookupHandlerServer ) where import Text.Parsec hiding (Error) import qualified PupEventsServer as Server import System.Environment import Events import Control.Concurrent.STM import qualified Data.UUID as UUID2 import qualified Data.UUID.V4 as UUIDV4 import Data.List imp...
RocketPuppy/PupCollide
Server/Server.hs
gpl-3.0
12,961
0
20
3,941
1,436
829
607
69
2
{- Printing utilities. - - Copyright 2013 Raúl Benencia <rul@kalgan.cc> - - Licensed under the GNU GPL version 3 or higher - -} module Lazymail.Print where import Data.Char (isSpace) import Data.List (intercalate) import Lazymail.Email import Codec.Text.Rfc1342 import Lazymail.Types(Flag(..), Flags, ComposeFie...
rul/lazymail
src/Lazymail/Print.hs
gpl-3.0
2,609
0
12
765
821
431
390
55
2
data BinOpType = Add | Subtract | Multiply | Divide deriving (Show) data UnOpType = Negate deriving (Show) data Expr = BinaryExpr BinOpType Expr Expr | UnaryExpr UnOpType Expr | IntegerLiteral Int deriving (Show)...
zc1036/Compiler-project
src/Main.hs
gpl-3.0
899
0
9
339
292
154
138
29
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TemplateHaskell #-} -- | Data types, instances, and form validators -- for storing job postings in a database. module Snap.Snaplet.JobBoard.Types where import Control.Applicative import Control.Monad import Control.Lens {- Text -} imp...
statusfailed/snaplet-job-board
src/Snap/Snaplet/JobBoard/Types.hs
agpl-3.0
4,753
0
26
1,035
1,180
643
537
88
2
---------------------------------------------------------------- -- Jedes Modul beginnt mit diesen Teil -- weil wir ein lauffähiges Programm haben wollen -- schreiben wir nur das Hauptmodul (`Main`) module Main where -- danach kommt de Teil wo externe Module improtiert werden import Control.Monad (forM_) import Syst...
CarstenKoenig/DOS2015
Countdown/Countdown.hs
unlicense
6,569
0
11
1,353
1,484
818
666
83
1
module Main (main) where import Control.Applicative import Control.Lens import Criterion.Main import Data.Time.Lite import Data.Time.Lite.Nano import Data.Time import Data.Time.Clock.POSIX import qualified Data.Thyme as Th import qualified Data.Thyme.Time as Th import System.Hourglass benchmarks :: [Benchmark] bench...
nilcons/time-lite
benchmarks/gettimeofday_bench.hs
apache-2.0
1,260
0
11
192
338
184
154
32
1
module Binary.A272756 (a272756) where import Data.List (find) import Data.Maybe (fromJust) import HelperSequences.A070939 (a070939) a272756 :: Int -> Int a272756 n = a272756_list !! (n - 1) a272756_list :: [Int] a272756_list = 3 : remaining 1 where remaining i = next_term : remaining (i + 1) where next_term = f...
peterokagey/haskellOEIS
src/Binary/A272756.hs
apache-2.0
381
0
17
71
161
88
73
10
1
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} {-| Combines the construction of RPC server components and their Python stubs. -} {- Copyright (C) 2013 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitte...
yiannist/ganeti
src/Ganeti/THH/PyRPC.hs
bsd-2-clause
7,731
0
16
2,033
1,426
732
694
110
7
---------------------------------------------------------------------------- -- | -- Module : Haddock.Interface.Rename -- Copyright : (c) Simon Marlow 2003-2006, -- David Waern 2006-2009 -- License : BSD-like -- -- Maintainer : haddock@projects.haskell.org -- Stability : experimen...
mrBliss/haddock
haddock-api/src/Haddock/Interface/Rename.hs
bsd-2-clause
19,393
0
17
4,699
6,067
3,025
3,042
374
22
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK not-home #-} #include "version-compatibility-macros.h" -- | __Warning:__ Internal module. May change arbitrarily between versions. module Prettyprinter.Render.Terminal.Internal ( -- * Styling AnsiStyle(..), Color(.....
quchen/prettyprinter
prettyprinter-ansi-terminal/src/Prettyprinter/Render/Terminal/Internal.hs
bsd-2-clause
12,351
0
21
3,186
2,318
1,272
1,046
175
11
{-# LANGUAGE PackageImports #-} {-# LANGUAGE FlexibleContexts #-} module Propellor.Property ( -- * Property combinators requires , before , onChange , onChangeFlagOnFail , flagFile , flagFile' , check , fallback , trivial , revert -- * Property descriptions , describe , (==>) -- * Constructing propert...
np/propellor
src/Propellor/Property.hs
bsd-2-clause
6,320
38
15
1,282
1,409
737
672
134
3
{-# LANGUAGE CPP, PatternGuards #-} ----------------------------------------------------------------------------- -- | -- Module : Haddock.Convert -- Copyright : (c) Isaac Dupree 2009, -- License : BSD-like -- -- Maintainer : haddock@projects.haskell.org -- Stability : experimental -- Portability : ...
randen/haddock
haddock-api/src/Haddock/Convert.hs
bsd-2-clause
19,092
0
23
5,452
4,399
2,292
2,107
319
8
module Propellor.Property.Cron where import Propellor import qualified Propellor.Property.File as File import qualified Propellor.Property.Apt as Apt import Utility.SafeCommand import Utility.FileMode import Data.Char -- | When to run a cron job. -- -- The Daily, Monthly, and Weekly options allow the cron job to be ...
aisamanra/smaccm-propellor
src/Propellor/Property/Cron.hs
bsd-2-clause
2,799
20
19
547
607
331
276
54
7
{-# LANGUAGE OverloadedStrings #-} module Network.Syncthing.Types.Version ( Version(..) ) where import Control.Applicative ((<$>), (<*>)) import Control.Monad (MonadPlus (mzero)) import Data.Aeson (FromJSON, Value (..), parse...
jetho/syncthing-hs
Network/Syncthing/Types/Version.hs
bsd-3-clause
840
0
11
334
203
124
79
20
0
-- | A module that provides an experimental syntax highlighter using TextMate -- syntax files. module Text.SyntaxHighlight.TextMate ( TMSyntaxFile, parseSyntaxFile, HLFile(..), HLSegment(..), highlightFile, ) where import Data.Array import Data.List import Data.List.Split import qualified Data.Map as M import ...
tomgr/webcspm
src/Text/SyntaxHighlight/TextMate.hs
bsd-3-clause
13,036
0
29
5,467
3,283
1,757
1,526
235
25
module Execution where import Syntax import Evaluation import Prelude hiding (lookup) update :: Environment -> Store -> Identifier -> Int -> Store update [] sto _ _ = sto update ((x1,l):xls) sto x2 v = match x1 x2 (updateStore sto l v) (update xls sto x2 v) updateStore :: Store -> Location -> Int -> Store updateSt...
grammarware/slps
topics/semantics/while/extended/Execution.hs
bsd-3-clause
2,733
12
14
574
1,432
751
681
54
2
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE GADTs #-} module Pakej.Daemon ( daemon ) where import Control.Concurrent (forkIO, forkFinally, threadDelay) import Control.Concurrent.MVar (MVar, newEmptyMVar, putMVar, takeMVar) import Control.Exception (bracket) import Control.Lens ...
supki/pakej
src/Pakej/Daemon.hs
bsd-3-clause
3,782
0
20
982
1,376
725
651
97
5
module Reactive.Bacon.Examples where import Reactive.Bacon import Reactive.Bacon.PushStream import Reactive.Bacon.Property import Control.Applicative import Control.Concurrent import Control.Monad pushCollectionExample = do (stream, push) <- newPushStream stream ==> print push $ Next "lol" mapFilterExample = d...
raimohanska/reactive-bacon
src/Reactive/Bacon/Examples.hs
bsd-3-clause
1,986
1
14
586
723
357
366
65
1
module Permutation where import Data.Monoid data PermIndex = One | Two | Three | Four | Five deriving Show data Perm = Perm PermIndex PermIndex PermIndex PermIndex PermIndex deriving Show instance Monoid Perm where mempty = Perm One Two Three Four Five mappend p (Perm a b c d e...
cullina/Hex
src/Permutation.hs
bsd-3-clause
742
0
10
309
303
157
146
18
1
module Main where import Lib main :: IO () main = someFunc {-99 Haskell Problems-} {-| Get the last element of a list-} myLast :: [a] -> a myLast [x] = x myLast (_:xs) = myLast xs {-| Get the second to last element of a list-} myButtLast :: [a] -> a myButtLast [x, _] = x myButtLast (_:xs) = myButtLast xs {-| Get...
MauriceIsAG/HaskellScratch
app/.stack-work/intero/intero116761NK.hs
bsd-3-clause
3,349
0
13
953
1,969
1,039
930
95
3
-- | This mdoule provides efficient functions to render lists of queries. module Database.Algebra.SQL.Render ( debugTransformResult , renderCompact , renderPretty , renderPlain ) where import qualified Text.PrettyPrint.ANSI.Leijen as L (Doc, SimpleDoc, ...
ulricha/algebra-sql
src/Database/Algebra/SQL/Render.hs
bsd-3-clause
1,796
0
9
478
362
212
150
28
1
{- (c) The AQUA Project, Glasgow University, 1993-1998 \section[SimplMonad]{The simplifier Monad} -} {-# LANGUAGE CPP #-} module SimplEnv ( InId, InBind, InExpr, InAlt, InArg, InType, InBndr, InVar, OutId, OutTyVar, OutBind, OutExpr, OutAlt, OutArg, OutType, OutBndr, OutVar, InCoercion, OutCo...
gridaphobe/ghc
compiler/simplCore/SimplEnv.hs
bsd-3-clause
27,760
0
15
7,521
4,369
2,414
1,955
304
4
------------------------------------------------------------------------------ -- | This module does data-type conversions and general data manipulations. -- See LICENSE file for copyright and license info. ------------------------------------------------------------------------------ module DataConversion where ---...
rockwolf/haskell_generic
DataConversion.hs
bsd-3-clause
3,322
0
8
284
371
221
150
21
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} module Lib ( startApp ) where import Control.Monad.Trans.Either import Data.Aeson.TH import Network.Wai import Network.Wai.Handler.Warp import Servant data User = User { userId :: Int , userFirstNam...
frontrowed/blog-servant
src/Lib.hs
bsd-3-clause
884
0
10
203
265
148
117
37
1
{-# LANGUAGE CPP #-} #ifdef ghcjs_HOST_OS {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE JavaScriptFFI #-} #endif {-# LANGUAGE LambdaCase #-} module Reflex.Dom.WebSocket.Foreign ( module Reflex.Dom.WebSocket.Foreign , JSVal ) where import Prelude hiding (all, concat, concatMap, div, mapM, mapM_, sequenc...
reflex-frp/reflex-dom
reflex-dom-core/src/Reflex/Dom/WebSocket/Foreign.hs
bsd-3-clause
3,749
0
22
713
1,006
538
468
80
2
{-# LANGUAGE DeriveGeneric , AutoDeriveTypeable #-} -- | Notice that 'LongItem's are not supported as none are specified on the <http://www.usb.org/developers/hidpage/ USB Human Interface device page> module System.USB.HID.Descriptor where import Data.ByteString as B import Data.Word import GHC.Generics data HIDD...
mapinguari/usb-hid
System/USB/HID/Descriptor.hs
bsd-3-clause
6,205
0
11
2,677
1,461
806
655
280
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} ----------------------------------------------------------------------------- -- | -- Module : Plots.Axis.ColourBar -- Copyright : (C) 2015 Christopher Chalmers -- License : BSD-style (see the file LICENSE) -- Maintainer : Christopher C...
bergey/plots
src/Plots/Axis/ColourBar.hs
bsd-3-clause
3,080
0
14
871
883
479
404
63
1
module ExampleModule where import Data.Char foo :: Double -> Double -> Double foo = (*) bar :: Int -> Int bar i = sum [1..i] baz :: Int -> Bool baz = (> 5) arr_arg :: [Int] -> Int arr_arg = sum arr_ret :: Int -> [Int] arr_ret i = [1..i] arr_complex :: [[Int]] -> [[Int]] arr_complex = map (map (* 2)) string_fun ...
sakana/HaPy
example/haskell/ExampleModule.hs
mit
418
0
8
91
191
109
82
18
1
{-| Module : Devel.Paths Description : For filepath related matters. Copyright : (c) 2015 Njagi Mwaniki License : MIT Maintainer : njagi@urbanslug.com Stability : experimental Portability : POSIX Uses the GHC package to parse .hi files. Will hopefully be moved upstream to ide-backend. -} {-# LANGUAGE Ov...
urbanslug/yesod-devel
src/Devel/Paths.hs
gpl-3.0
3,207
0
16
814
817
434
383
71
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-sts/gen/Network/AWS/STS/DecodeAuthorizationMessage.hs
mpl-2.0
5,287
0
9
953
448
280
168
55
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE KindSignatures #-} module Ef.Type.List where import Ef.Type.Nat import GHC.Exts data Index (n :: Nat) where Index :: Index n type family Appended (xs :: [k]) (ys :...
grumply/Ef
src/Ef/Type/List.hs
bsd-3-clause
939
0
8
213
406
231
175
28
0
module Network.Mattermost.TH where import qualified Language.Haskell.TH.Syntax as TH import qualified Language.Haskell.TH.Lib as TH import Lens.Micro ((&), (.~)) import Lens.Micro.TH (DefName(..), makeLensesWith, lensRules, lensField) suffixLenses :: TH.Name -> TH.DecsQ suffixLenses = makeLensesWith $ lensRules & ...
dagit/mattermost-api
src/Network/Mattermost/TH.hs
bsd-3-clause
396
0
12
53
132
83
49
8
1
{-# LANGUAGE OverloadedStrings #-} import Test.Microspec import Sound.Tidal.TidalParseTest main :: IO () main = microspec $ do Sound.Tidal.TidalParseTest.run
d0kt0r0/Tidal
tidal-parse/test/Test.hs
gpl-3.0
163
0
8
23
39
22
17
6
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-iam/gen/Network/AWS/IAM/GetRolePolicy.hs
mpl-2.0
5,113
0
13
1,151
643
392
251
76
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[HsLit]{Abstract syntax: source-language literals} -} {-# LANGUAGE CPP, DeriveDataTypeable #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUA...
alexander-at-github/eta
compiler/ETA/HsSyn/HsLit.hs
bsd-3-clause
7,388
0
12
2,020
1,713
893
820
111
1
{- | Module : XMonad.Actions.WindowGo License : Public domain Maintainer : <gwern0@gmail.com> Stability : unstable Portability : unportable Defines a few convenient operations for raising (traveling to) windows based on XMonad's Query monad, such as 'runOrRaise'. runOrRaise will run a shell command u...
f1u77y/xmonad-contrib
XMonad/Actions/WindowGo.hs
bsd-3-clause
9,236
0
19
2,028
1,316
695
621
-1
-1
{-# LANGUAGE TypeFamilies #-} ----------------------------------------------------------------------------- -- | -- Module : Hadrian.Oracles.Cabal.Type -- Copyright : (c) Andrey Mokhov 2014-2018 -- License : MIT (see the file LICENSE) -- Maintainer : andrey.mokhov@gmail.com -- Stability : experimental -- -- Th...
snowleopard/shaking-up-ghc
src/Hadrian/Oracles/Cabal/Type.hs
bsd-3-clause
2,781
0
16
475
415
244
171
32
0
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- -- | Parsing the top of a Haskell source file to get its module name, -- imports and options. -- -- (c) Simon Marlow 2005 -- (c) Lemmih 2006 -- -------------------------------------------------------------------------...
snoyberg/ghc
compiler/main/HeaderInfo.hs
bsd-3-clause
14,156
3
28
4,447
2,907
1,495
1,412
229
18
{-| Module : IRTS.CodegenJavaScript Description : The JavaScript code generator. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE OverloadedStrings, PatternGuards #-} module IRTS.CodegenJavaScript (codegenJavaScript , codegenNode ...
ben-schulz/Idris-dev
src/IRTS/CodegenJavaScript.hs
bsd-3-clause
48,846
0
25
17,584
18,283
9,128
9,155
-1
-1
<?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="ja-JP"> <title>SAML Support</title> <maps> <homeID>saml</homeID> <mapref location="map....
thc202/zap-extensions
addOns/saml/src/main/javahelp/help_ja_JP/helpset_ja_JP.hs
apache-2.0
958
77
66
156
407
206
201
-1
-1
{-| Module : Idris.Chaser Description : Module chaser to determine cycles and import modules. License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE FlexibleContexts #-} module Idris.Chaser( buildTree, getImports , getModuleFiles , ModuleTree(..) ) where import Idris.AbsSyntax import Id...
kojiromike/Idris-dev
src/Idris/Chaser.hs
bsd-3-clause
10,173
12
24
4,001
2,844
1,428
1,416
185
11
-- | When there aren't enough registers to hold all the vregs we have to spill -- some of those vregs to slots on the stack. This module is used modify the -- code to use those slots. module RegAlloc.Graph.Spill ( regSpill, SpillStats(..), accSpillSL ) where import RegAlloc.Liveness import ...
urbanslug/ghc
compiler/nativeGen/RegAlloc/Graph/Spill.hs
bsd-3-clause
13,266
0
16
4,655
2,492
1,283
1,209
226
2
-- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "License"); you ma...
jcgruenhage/dendrite
vendor/src/github.com/apache/thrift/lib/hs/test/JSONSpec.hs
apache-2.0
7,644
0
21
2,242
2,381
1,108
1,273
175
1
module ProjectEuler.Problem024 (solve) where import Data.List solve :: [Int] solve = ps !! n where ps = sort . permutations $ [0..9] n = 1000000 - 1
hachibu/project-euler
src/ProjectEuler/Problem024.hs
mit
162
0
8
40
62
36
26
6
1
-- Typeclasses {-# LANGUAGE FlexibleContexts, FlexibleInstances #-} class Borked a where bork :: a -> String instance Borked Int where bork = show --instance Num a => Borked a where -- bork = show --instance Borked (Int, Int) where -- bork (x, y) = bork x ++ " " ++ bork y --instance (Borked a, Bork...
gitrookie/functionalcode
code/Haskell/haskfeatures/src/typeclass.hs
mit
459
0
7
117
68
39
29
7
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.RTCStatsCallback (newRTCStatsCallback, newRTCStatsCallbackSync, newRTCStatsCallbackAsync, RTCStatsCallback) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), M...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/RTCStatsCallback.hs
mit
2,295
0
12
447
521
310
211
42
1
{-# OPTIONS_HADDOCK show-extensions #-} {-| Module : Data.Utils Description : various utilities Copyright : (c) Lars Brünjes, 2016 License : MIT Maintainer : brunjlar@gmail.com Stability : experimental Portability : portable This module reexports various utility modules for convenience. -} module Data....
brunjlar/neural
src/Data/Utils.hs
mit
852
0
5
146
125
86
39
20
0
module GHCJS.DOM.SVGAnimatedRect ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/SVGAnimatedRect.hs
mit
45
0
3
7
10
7
3
1
0
-- @Author: Zeyuan Shang -- @Date: 2016-06-07 12:44:38 -- @Last Modified by: Zeyuan Shang -- @Last Modified time: 2016-06-07 12:54:45 data Graph a = Graph [a] [(a, a)] deriving (Show, Eq) data Adjacency a = Adj [(a, [a])] deriving (Show, Eq) graphToAdj :: (Eq a) => Graph a -> Adjacenc...
zeyuanxy/haskell-playground
ninety-nine-haskell-problems/vol9/80.hs
mit
716
0
13
211
335
185
150
15
1
-- Problems/Problem007Spec.hs module Problems.Problem007Spec (main, spec) where import Test.Hspec import Problems.Problem007 main :: IO() main = hspec spec spec :: Spec spec = describe "Problem 7" $ it "Should evaluate to 104743" $ p7 `shouldBe` 104743
Sgoettschkes/learning
haskell/ProjectEuler/tests/Problems/Problem007Spec.hs
mit
269
0
8
52
73
41
32
9
1
-- MoreMonads.hs import Control.Monad import Control.Monad.Writer pathsWriter :: [(Int,Int)] -> Int -> Int -> [[Int]] pathsWriter edges start end = map execWriter (pathsWriter' edges start end) pathsWriter' :: [(Int,Int)] -> Int -> Int -> [Writer [Int] ()] pathsWriter' edges start end = let e_paths = do (e_start, ...
hnfmr/beginning_haskell
chapter7/src/Chapter7/MoreMonads.hs
mit
615
0
15
205
213
111
102
12
2
module Ch01Spec (spec) where import Ch01 import Test.Hspec spec :: Spec spec = do describe "toDigits" $ do it "converts integer to digits" $ do let int = 1234 expected = [4,3,2,1] toDigitsRev int `shouldBe` expected toDigits int `shouldBe` (reverse expected) it "returns [] for 0 ...
isaiah/cis194
test/Ch01Spec.hs
mit
1,220
0
16
333
434
227
207
33
1
module PE0007 where -- Spotted on the front page of haskell.org -- but Melissa O'Neil calls it The Unfaithful Sieve -- in http://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf primes' :: [Integer] primes' = sieve [2..] where sieve (p:xs) = p : sieve [x | x <- xs, x `mod` p /= 0] sieve [] = [] -- "We can write ...
mvidner/projecteuler
src/PE0007.hs
mit
611
0
12
138
229
125
104
13
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module HBF.PrgmIO.Pure ( PurePrgmIO , runPurePrgmIO , Val ) where import Control.Monad.State import Control.Monad.Writer import HBF.PrgmIO newtype PurePrgmIO a = PurePrgmIO {getPurePrgmIO :: WriterT [Val] (State [Val]) a} deriving (Functor, Monad) runPurePrgmIO :: [Val]...
atlaua/hbf
HBF/PrgmIO/Pure.hs
mit
548
0
11
88
182
104
78
14
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-hadoopjarstepconfig.html module Stratosphere.ResourceProperties.EMRClusterHadoopJarS...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EMRClusterHadoopJarStepConfig.hs
mit
3,378
0
13
307
447
255
192
39
1
{- This module was generated from data in the Kate syntax highlighting file julia.xml, version 0.2, by -} module Text.Highlighting.Kate.Syntax.Julia (highlight, parseExpression, syntaxName, syntaxExtensions) where import Text.Highlighting.Kate.Types import Text.Highlighting.Kate.Common import Text.Parser...
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Julia.hs
gpl-2.0
10,193
0
55
1,597
2,685
1,415
1,270
196
11
module HEP.Automation.MadGraph.Dataset.Set20110630set1 where import HEP.Storage.WebDAV.Type import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine.V2 import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.SetupType.V2 import HEP.Automation.MadGraph.Model.ZpH import HEP.Automation...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110630set1.hs
gpl-3.0
1,720
0
10
559
372
236
136
49
1
{-# LANGUAGE ScopedTypeVariables #-} module Serverless.AWSLambda where import qualified Amex.DE as Amex import qualified Amex.Request as Amex import qualified Amex.Response as Amex import Data.Aeson as JSON import qualified Data.ByteString.Char8 as BS -- import...
jpotecki/AmexMobileBackend
src/Serverless/AWSLambda.hs
gpl-3.0
751
0
16
215
196
106
90
20
2
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE DeriveDataTypeable #-} -- | -- Copyright ...
samscott89/tamarin-prover
lib/theory/src/Theory/Constraint/System/Guarded.hs
gpl-3.0
32,328
0
25
9,091
8,706
4,477
4,229
479
24
-- Author: Stefan Eng -- License: GPL v3 -- File: xmobar.hs -- Description: -- xmobar configuration file Config { font = "xft:DejaVu-10" , bgColor = "#000000" , fgColor = "#BFBFBF" , position = Top , hideOnStart = False , lowerOnStart = True , persistent = False ...
stefaneng/dotfiles
haskell/xmobar/xmobar.hs
gpl-3.0
1,314
0
9
564
221
140
81
-1
-1
module System.DevUtils.MySQL.Helpers.ProcessList ( ProcessList(..), default', query'List, showFullProcessList ) where import System.DevUtils.MySQL.Helpers.ProcessList.Include (ProcessList(..), query'List) import System.DevUtils.MySQL.Helpers.ProcessList.Default (default') import System.DevUtils.MySQL.Helpers.Proce...
adarqui/DevUtils-MySQL
src/System/DevUtils/MySQL/Helpers/ProcessList.hs
gpl-3.0
410
0
6
27
88
63
25
9
0
{-# LANGUAGE RecordWildCards, DeriveDataTypeable #-} {-| Options common to most hledger reports. -} module Hledger.Reports.ReportOptions ( ReportOpts(..), BalanceType(..), AccountListMode(..), FormatStr, defreportopts, rawOptsToReportOpts, flat_, tree_, dateSpanFromOpts, intervalFromOpts, clear...
kmels/hledger
hledger-lib/Hledger/Reports/ReportOptions.hs
gpl-3.0
11,444
0
16
3,121
2,599
1,404
1,195
242
4
module Main where import GameLogic.Language.RawToken import GameLogic.Language.Translation.Translator import GameLogic.Language.Translation.Runtime import GameLogic.Data.World import Control.Monad (liftM) import Control.Monad.State (runState) import qualified Data.Map as M import qualified Data.Monoid as Monoid extr...
graninas/The-Amoeba-World
src/Amoeba/Test/TranslationTest.hs
gpl-3.0
912
0
10
159
255
135
120
24
1
import System.Exit import Test.HUnit import LambdaMainTest (testMainLoop) testSuite = TestList [ testMainLoop ] main = do counts <- runTestTT testSuite if errors counts > 0 then exitWith $ ExitFailure 2 else if failures counts > 0 then exitWith $ ExitFailure 1 else exit...
Sventimir/LambdaShell
testSuite.hs
gpl-3.0
328
0
10
93
92
47
45
12
3