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 OverloadedStrings #-} {-| Module : MsgFmt Description : Raw pack-it-forms message handling Copyright : (c) 2015 Peter Amidon <peter@picnicpark.org> : (c) 2015 Keith Amidon <amidon@picnicpark.org> Generic handling of pack-it-forms encoded forms, which are also compatible with PacFORMS e...
pack-it-forms/msgfmt
src/PackItForms/MsgFmt.hs
apache-2.0
6,920
0
15
1,886
1,797
943
854
116
4
{-# LANGUAGE OverloadedStrings #-} module Stubby.Net.Admin (adminserver) where import Prelude hiding (concat) import Stubby.Settings (Settings, getAdmin, getLocation) import Stubby.CLI.Logging (status) import Stubby.Net.LoggerMiddleware (logger) import Network.Wai (Application, responseLBS) import Network.Wai.Handler.W...
mrak/stubby4hs
src/lib/Stubby/Net/Admin.hs
apache-2.0
1,113
0
13
277
283
159
124
26
1
module NVIM.Command where import Data.MessagePack (Object (..)) import Data.MessagePack.RPC (Request (..)) import Data.Text (Text) import qualified Data.Text as Text import qualified Data.Vector as Vector -- TODO Support special types (with newtype over Object) for Buffer, Window, Tabpage (EXT 0, 1, 2) -- see https:/...
aloiscochard/sarsi
sarsi-nvim/NVIM/Command.hs
apache-2.0
1,847
0
11
270
593
315
278
38
1
{-# LANGUAGE OverloadedStrings #-} module Utils.Vigilance.Workers.StaticWatchWorker (runWorker) where import Data.Acid (AcidState) import Control.Concurrent.STM ( TChan , atomically , readTChan ) import Control.Monad.Trans (lift) import Control.Lens import Ut...
MichaelXavier/vigilance
src/Utils/Vigilance/Workers/StaticWatchWorker.hs
bsd-2-clause
826
0
11
190
185
99
86
19
1
import Options.Applicative import Options main :: IO () main = do opts <- execParser Options.parser perform (optCommand opts)
lovasko/swim
src/Main.hs
bsd-2-clause
132
0
9
24
48
23
25
6
1
{-# LANGUAGE CPP, InstanceSigs, RankNTypes, ScopedTypeVariables, TypeFamilies, UndecidableInstances #-} -- | Continuation-passing parser for context-free grammars module Text.Grampa.ContextFree.Continued (Parser(..), Result(..), alt) where import Control.Applicative (Applicative(..), Alternative(..), liftA2) import Co...
blamario/grampa
grammatical-parsers/src/Text/Grampa/ContextFree/Continued.hs
bsd-2-clause
16,355
0
18
4,373
6,277
3,228
3,049
-1
-1
import Controller import Network.Wai.Handler.SimpleServer (run) main :: IO () main = putStrLn "Loaded" >> withGloop (run 3000)
jsgf/gloop
simple-server.hs
bsd-2-clause
128
0
8
18
47
25
22
4
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} module SwaggerJSONGen where import Data.Aeson as A import Data.Text as T import qualified...
byteally/webapi
webapi-swagger/src/SwaggerJSONGen.hs
bsd-3-clause
17,180
10
39
5,340
3,732
1,985
1,747
249
18
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UndecidableInstances #-} #if __GLASGOW_HASKELL__ >= 706 {-# LANGUAGE PolyKinds #-} #endif {-| "Data.Implicit" p...
duairc/implicit-params
src/Data/Implicit.hs
bsd-3-clause
7,406
0
11
1,281
724
421
303
57
1
module Arhelk.Russian.Lemma.Data( RawWord , SemiProcWord(..) , Word(..) , Lemma(..) , SentenceClause , Sentence , lemmaWord , MoreSpecialized(..) , glueLessSpecialized , module X ) where import Arhelk.Russian.Lemma.Data.Adjective as X import Arhelk.Russian.Lemma.Data.Adverb as X import Arhelk.R...
Teaspot-Studio/arhelk-russian
src/Arhelk/Russian/Lemma/Data.hs
bsd-3-clause
6,131
0
12
1,401
1,942
997
945
-1
-1
-- module Main where module Network.LibRSync where import Control.Applicative((<$>),(<*>),pure) import Control.Monad import Control.Monad.IO.Class import Data.ByteString import Data.Conduit import Foreign.Marshal.Alloc import Network.LibRSync.Internal --------------------------------------------------------------...
noinia/hlibrsync
src/Network/LibRSync.hs
bsd-3-clause
2,815
0
14
835
615
304
311
45
3
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude, UnicodeSyntax, LambdaCase #-} module Help.UI.WebSearch where import Help.Imports hiding (fin...
argiopetech/help
Help/UI/WebSearch.hs
bsd-3-clause
5,827
0
28
1,675
906
489
417
66
4
-- Takes a reversed log file on the standard input and outputs web page. module Distribution.Server.Pages.Recent ( recentPage, recentFeed, revisionsPage, recentRevisionsFeed ) where import Distribution.Server.Packages.Types import qualified Distribution.Server.Users.Users as Users import Distributio...
edsko/hackage-server
Distribution/Server/Pages/Recent.hs
bsd-3-clause
7,363
0
15
1,715
2,065
1,108
957
158
2
{-# LANGUAGE UnicodeSyntax #-} import Test.QuickCheck -- import Test.Framework -- import Test.Framework.Providers.HUnit import Control.Monad import Data.Monoid import AXT.TicTacToe.Field as FA(findFreePos, getFreePos) import AXT.TicTacToe.Rules (isEnd) import AXT.TicTacToe.Types as GT (CoorOnField, Field(F), State(..)...
xruzzz/axt-tic-tac-toe-gl-haskell
test/Spec.hs
bsd-3-clause
1,662
0
11
511
501
287
214
25
1
module SymbolicDifferentiation.AlphaSyntax where -- | Variable in an expression. type Var = String -- | Expression. data Exp = N Int -- ^ number | V Var -- ^ variable | Plus Exp Exp -- ^ sum | Times Exp Exp -- ^ product deriving (Show, Eq) -- | Derivative of expression with respect to ...
FranklinChen/twenty-four-days2015-of-hackage
src/SymbolicDifferentiation/AlphaSyntax.hs
bsd-3-clause
1,077
0
9
352
442
229
213
26
2
module Roguelike.WorldMap ( MapObject(..) , point, object , WorldMap , iptraverse , byPoint , nearbyObjects , fromList ) where import Con...
abbradar/roguelike
src/Roguelike/WorldMap.hs
bsd-3-clause
2,434
0
11
661
750
406
344
-1
-1
module Language.SPL.Printer ( module Text.PrettyPrint.ANSI.Leijen , tabstop , parensized , block , keyword , constant , annotation , identifier , comment , operator , dullify , prettify ) where import Text.PrettyPrint.ANSI.Leijen tabstop :: Int tabstop = 4 parensized :: (Pretty a) => [a] ->...
timjs/spl-compiler
src/Language/SPL/Printer.hs
bsd-3-clause
1,112
0
9
259
330
191
139
31
1
{-# LANGUAGE CPP #-} module Main where import GHC.RTS.Events import GHC.RTS.Events.Analysis.Duplication import Control.Monad import Data.Maybe import System.Environment import System.IO import System.Exit import System.FilePath import Text.Printf main = getArgs >>= command command ["--help"] = do putStr usage ...
hferreiro/ghc-events-replay
Replay.hs
bsd-3-clause
3,169
0
14
784
1,120
575
545
69
2
-- Copyright (c) 2014, Facebook, Inc. -- All rights reserved. -- -- This source code is distributed under the terms of a BSD license, -- found in the LICENSE file. An additional grant of patent rights can -- be found in the PATENTS file. {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE RankNTypes #-} {-# LANGUA...
kantp/Haxl
Haxl/Core/RequestStore.hs
bsd-3-clause
2,983
0
13
583
547
301
246
39
2
module Main where import Control.Lens import Data.Monoid import Network.HTTP.Types import Network.Wai import Network.Waitra import qualified Network.Wai.Handler.Warp as Warp import Network.Wai.Middleware.Cors import Network.Wai.Middleware.RequestLogger import System.Environment import System.Exit import System.IO im...
ktvoelker/auth-proxy
src/Main.hs
bsd-3-clause
1,704
0
14
343
467
257
210
-1
-1
{-# LANGUAGE DeriveGeneric #-} module Data.Graph.Libgraph.AlgoDebug where import Data.Graph.Libgraph.Core import Data.Graph.Libgraph.Dagify(collapse,remove) import Prelude hiding (Right) import Data.List(find) import Data.Maybe(isJust) import GHC.Generics data AssistedMessage = InconclusiveProperty String | PassingPro...
MaartenFaddegon/libgraph
Data/Graph/Libgraph/AlgoDebug.hs
bsd-3-clause
2,727
0
15
800
1,098
576
522
46
4
import qualified TestOrdECMWithTestSequence as OrdTest import qualified TestHashECMWithTestSequence as HashTest import qualified TestOrdECMWithTestSequenceInvalidating as OrdTestInvalidating import qualified TestHashECMWithTestSequenceInvalidating as HashTestInvalidating main = do HashTest.testWithTestSequence Or...
elblake/expiring-cache-map
tests/TestWithTestSequence.hs
bsd-3-clause
470
0
8
41
58
34
24
10
1
module WASH.CGI.HTMLMail where import Prelude hiding (head,div,span) import WASH.HTML.HTMLMonad hiding (map) import WASH.Mail.MIME -- |transform HTML Element into document suitable for sending as email. htmlDOC :: Element -> DOC htmlDOC el = binaryDOC "text" "html" (show el)
nh2/WashNGo
WASH/CGI/HTMLMail.hs
bsd-3-clause
282
0
7
43
71
43
28
7
1
#!/usr/bin/env runhaskell {-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} module TimeTests where import Control.Monad import Data.Foldable (for_) import Data.Monoid import qualified Data.Text as T import ...
JustusAdam/haxl-test-generated-graph
app/TimeTests.hs
bsd-3-clause
2,407
0
15
591
657
352
305
53
3
module Data.Geo.GPX.Lens.GeoidheightL where import Data.Lens.Common class GeoidheightL a where geoidheightL :: Lens a (Maybe Double)
tonymorris/geo-gpx
src/Data/Geo/GPX/Lens/GeoidheightL.hs
bsd-3-clause
138
0
9
20
40
23
17
4
0
{-# language CPP #-} -- | = Name -- -- VK_KHR_pipeline_executable_properties - device extension -- -- == VK_KHR_pipeline_executable_properties -- -- [__Name String__] -- @VK_KHR_pipeline_executable_properties@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 270 -- -...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_KHR_pipeline_executable_properties.hs
bsd-3-clause
57,437
331
19
9,737
5,842
4,121
1,721
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module OpenRTB.Types.Enum.VideoQualitySpec where import Control.Applicative import Data.Aeson import Data.Aeson.TH import Test.Hspec import Test.QuickCheck import Test.Instances import OpenRTB.Types.Enum.VideoQuality data Mock = Mock { vct :: VideoQ...
ankhers/openRTB-hs
spec/OpenRTB/Types/Enum/VideoQualitySpec.hs
bsd-3-clause
662
0
19
112
196
106
90
21
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module OpenRTB.Types.Enum.VASTCompanionTypeSpec where import Control.Applicative import Data.Aeson import Data.Aeson.TH import Test.Hspec import Test.QuickCheck import Test.Instances import OpenRTB.Types.Enum.VASTCompanionType data Mock = Mock { vct...
ankhers/openRTB-hs
spec/OpenRTB/Types/Enum/VASTCompanionTypeSpec.hs
bsd-3-clause
682
0
19
112
197
106
91
21
1
import Watch import Watch.Options main :: IO () main = execParser optsI >>= \ args -> watch (wTarget args) args where optsI = info (helper <*> opts) (fullDesc <> progDesc "Watch a source directory for changes" <> header "src-watch" )
pikajude/src-watch
src/Main.hs
bsd-3-clause
291
0
11
97
83
42
41
8
1
-- | This module is a linter for the input and output of our programs. This -- means it checks properties that, if they fail, are a bug somewhere in the -- program. -- -- It should not be possible to trigger the linter via the usual interface (but -- easily so via the debugging interface). -- -- The existence of this m...
psibi/incredible
logic/Lint.hs
mit
4,678
0
15
1,306
1,389
707
682
82
5
module Foundation where import Import.NoFoundation import Database.Persist.Sql (ConnectionPool, runSqlPool) import Text.Hamlet (hamletFile) import Text.Jasmine (minifym) import Yesod.Auth.BrowserId (authBrowserId) import Yesod.Auth.Message (AuthMessage (InvalidLogin)) import Yesod.Default.Util (ad...
rcook/seattlehaskell-org
Foundation.hs
mit
6,374
0
15
1,434
851
454
397
-1
-1
module Main (main) where import Pos.Util.Log.LoggerConfig (LoggerConfig) import Pos.Infra.Network.Yaml (Topology) import Data.List.Split import System.Environment import Data.Yaml import Control.Monad.Catch import Data.Monoid main :: IO () main = do runTest "logConfigs" checkLogConfig runTest "topologyConfigs" ch...
input-output-hk/pos-haskell-prototype
yaml-validation/Main.hs
mit
856
0
13
158
278
137
141
28
1
{-# LANGUAGE PackageImports #-} import Control.Monad import Data.Pipe import Data.Char import System.IO import "monads-tf" Control.Monad.Trans main :: IO () main = do _ <- runPipe $ readFileP "sample.txt" =$= takeP 3 =$= convert (map toUpper) =$= writeString return () readFileP :: FilePath -> Pipe () St...
YoshikuniJujo/forest
subprojects/pipeline/examples/upperFile.hs
bsd-3-clause
968
2
13
242
478
226
252
42
2
{- Teak synthesiser for the Balsa language Copyright (C) 2007-2010 The University of Manchester This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or...
Mahdi89/eTeak
src/Gui.hs
bsd-3-clause
96,034
647
40
33,304
16,183
8,527
7,656
-1
-1
module SerializeText () where import Control.Applicative import Data.Binary import qualified Data.Text as T import qualified Data.Text.Encoding as TE -- FIXME: Why isn't there already an instance? instance Binary T.Text where put = put . TE.encodeUtf8 get = TE.decodeUtf8 <$> get
bgamari/bayes-stack
network-topic-models/SerializeText.hs
bsd-3-clause
312
0
7
72
67
42
25
8
0
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TemplateHaskell #-} module T10891 where import Language.Haskell.TH import System.IO class C a where f :: a -> Int class C' a where type F a :: * type F a = a f' :: a -> Int class C'' a where data Fd a :: * instance C' Int where type F Int = Bool f' = id in...
mpickering/ghc-exactprint
tests/examples/ghc8/T10891.hs
bsd-3-clause
630
0
18
201
256
130
126
31
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} -- | A Shakespearean module for Roy, introducing type-safe, -- compile-time variable and url interpolation. It is exactly the same as -- "Text.Julius", except that the templat...
fgaray/shakespeare
Text/Roy.hs
mit
3,132
1
17
626
344
214
130
40
1
module T14285a where import qualified Data.Foldable as F import qualified Data.IntMap as IM import qualified Data.IntSet as IS import Prelude hiding (null) data Set k = Set IS.IntSet empty = Set IS.empty null (Set a) = IS.null a sfromList :: (Enum a, Foldable c) => c a -> Set a sfromList xs = Set $ IS.fromList $ ...
ezyang/ghc
testsuite/tests/stranal/should_run/T14285a.hs
bsd-3-clause
971
0
11
196
418
224
194
24
1
{-# LANGUAGE RebindableSyntax, OverloadedStrings #-} module T12688 where import Prelude (String,Show(..)) newtype Text = Text String fromString :: String -> Text fromString = Text x :: Text x = "x" newtype Foo = Foo () deriving (Show)
olsner/ghc
testsuite/tests/deriving/should_compile/T12688.hs
bsd-3-clause
242
0
6
44
69
43
26
10
1
import Control.Monad (when) import Data.Maybe (isJust) import System.Environment (lookupEnv) main :: IO () main = do term <- lookupEnv "PATH" when (isJust term) $ putStrLn "Got PATH" fish <- lookupEnv "One fish, two fish, red fish, blue fish" print fish
urbanslug/ghc
libraries/base/tests/System/T5930.hs
bsd-3-clause
271
0
10
57
91
44
47
9
1
import System.Environment main :: IO () main = do (expr:_) <- getArgs putStrLn $ show $ calcRPN expr calcRPN :: String -> Float calcRPN e | length finalStack == 1 = head $ finalStack | otherwise = error "Unbalanced expression" where finalStack = foldl evalCurrent [] $ words e ...
fredmorcos/attic
snippets/haskell/RPNCalc.hs
isc
839
0
13
310
363
177
186
20
1
module GHCJS.DOM.StorageEvent ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/StorageEvent.hs
mit
42
0
3
7
10
7
3
1
0
{-# LANGUAGE OverloadedStrings #-} module Unison.Test.UriParser where import EasyTest import Unison.Codebase.Editor.RemoteRepo (ReadRepo(..)) import Unison.Codebase.Path (Path(..)) import qualified Unison.Codebase.Path as Path import qualified Text.Megaparsec as P import qualified Unison.Codebase.Editor.UriParser as ...
unisonweb/platform
parser-typechecker/tests/Unison/Test/UriParser.hs
mit
3,882
0
11
583
649
381
268
47
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} -- | This module is the primary interface to the Unison typechecker module Unison.Typechecker (admissibleTypeAt, check, check', checkAdmissible', equals, locals, subtype, isSubtype, synthesize, synthesize', typeAt, wellTyped) where import Control.Mon...
nightscape/platform
shared/src/Unison/Typechecker.hs
mit
7,128
0
18
1,533
2,035
1,036
999
91
5
module Feature.RpcSpec where import Test.Hspec import Test.Hspec.Wai import Test.Hspec.Wai.JSON import Network.HTTP.Types import Network.Wai.Test (SResponse(simpleStatus, simpleBody)) import qualified Data.ByteString.Lazy as BL (empty) import SpecHelper import Text.Heredoc import Network.Wai (Application) import Pro...
begriffs/postgrest
test/Feature/RpcSpec.hs
mit
18,200
0
20
4,590
3,178
1,844
1,334
-1
-1
module BreveLang where -- ( -- Expr (..) -- , Statement (..) -- , Trace -- , Traces -- , breveParser -- , pitchClasses -- , durations -- ) where {- Breve: pitchclass ::= ( A | B | C | D | E | F | G ) ( ff | f | ss | s ) integer ::= digit {digit} double ::= integer '.' integer b...
Solumin/ScriptNScribe
src/BreveLang.hs
mit
18,041
0
16
4,673
3,688
1,980
1,708
258
2
{-# LANGUAGE TemplateHaskell #-} module Bank.Models.Customer.Commands ( customerCommands , CreateCustomer (..) ) where import Language.Haskell.TH (Name) import Bank.Json customerCommands :: [Name] customerCommands = [ ''CreateCustomer ] data CreateCustomer = CreateCustomer { createCustomerData :: Str...
jdreaver/eventful
examples/bank/src/Bank/Models/Customer/Commands.hs
mit
390
0
8
62
89
54
35
14
1
{-# LANGUAGE CPP #-} module Arguments where #if (MIN_VERSION_base(4,9,0)) import Data.Monoid #endif import Options.Applicative import System.Environment (getArgs) import Config import Dispatch.Types import Types import Utils getInstructions :: ...
badi/super-user-spark
src/Arguments.hs
mit
4,913
0
19
1,349
1,002
503
499
113
2
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE PatternGuards #-} -- | A sqlite backend for persistent. -- -- Note: If you prepend @...
rdnetto/persistent
persistent-sqlite/Database/Persist/Sqlite.hs
mit
20,603
0
21
6,243
4,901
2,582
2,319
435
5
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module IHaskell.Display.Widgets.Style.ButtonStyle ( -- * Button style ButtonStyle -- * Create a new button style , mkButtonStyle )...
gibiansky/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Style/ButtonStyle.hs
mit
1,480
0
13
344
243
141
102
33
1
module MppCodeGen (gen_code) where {- Code Generation for M++ ======================= Generates AM Stack machine code for M++ programs, given their intermediate representation. Refer to the AM specification for details of the code generation. Usage ===== gen_code ir : Return the AM sourc...
JamesSullivan1/Mpp
src/MppCodeGen.hs
mit
15,190
0
28
3,835
4,973
2,608
2,365
414
4
first :: (a, b, c) -> a first (x, _, _) = x second :: (a, b, c) -> b second (_, y, _) = y third :: (a, b, c) -> c third (_, _, z) = z
v0lkan/learning-haskell
session-003/004-sort-tuple.hs
mit
136
0
6
41
106
63
43
6
1
-- | Functionality for graphing 2-dimensional matrices. module System.Console.Ansigraph.Internal.Matrix ( matShow , displayMat , displayCMat ) where import System.Console.Ansigraph.Internal.Core import Data.Complex import Data.List (intersperse) import Control.Monad.IO.Class (MonadIO, liftIO) -- for GHC <= 7...
BlackBrane/ansigraph
src/System/Console/Ansigraph/Internal/Matrix.hs
mit
3,034
0
13
611
978
523
455
53
2
module Tach.Node.ImpulseSpec (main, spec) where import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = do describe "someFunction" $ do it "should work fine" $ do True `shouldBe` False
smurphy8/tach
apps/tach-node-impulse/test/Tach/Node/ImpulseSpec.hs
mit
214
0
13
49
77
41
36
9
1
{-# LANGUAGE OverloadedStrings #-} module Database.Design.Ampersand.Output.PandocAux ( writepandoc , XRefObj(..) , xRefTo, xRefToLatexRefString , headerWithLabel , definitionListItemLabel , pandocEqnArray , pandocEqnArrayWithLabels , pandocEqnArrayWithLabel , pandocEquati...
4ZP6Capstone2015/ampersand
src/Database/Design/Ampersand/Output/PandocAux.hs
gpl-3.0
33,170
1
29
11,746
6,318
3,333
2,985
570
124
-- In the Lists chapter, you wrote a Caesar cipher. Now, we want to -- expand on that idea by writing a Vigenère cipher. A Vigenère ci- -- pher is another substitution cipher, based on a Caesar cipher, but it -- uses a series of Caesar ciphers for polyalphabetic substitution. The -- substitution for each letter in the ...
nirvinm/Solving-Exercises-in-Haskell-Programming-From-First-Principles
Algebraic_DataTypes/VigenereCipher.hs
gpl-3.0
2,037
0
12
438
413
229
184
28
1
{- | Module : Sound.FModEx.Raw.Codec Description : Codec FModEx library Haskell raw binding Copyright : (c) Dimitri Sabadie License : GPL-3 Maintainer : dimitri.sabadie@gmail.com Stability : experimental Portability : Linux only for now Codec FModEx raw Haskell API. -} module Sound.FModEx.Raw.Co...
phaazon/hsFModEx
Sound/FModEx/Raw/Codec.hs
gpl-3.0
391
0
4
81
25
19
6
3
0
----------------------------------------------------------------------------- -- | -- Module : System.Random -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : stable -- Portability : ...
kaoskorobase/mescaline
resources/hugs/packages/base/System/Random.hs
gpl-3.0
14,104
197
19
3,303
2,628
1,473
1,155
176
4
module Wordify.Rules.Board(Board, emptyBoard, allSquares, placeTile, occupiedSquareAt, emptySquaresFrom, lettersAbove, lettersBelow...
Happy0/haskellscrabble
src/Wordify/Rules/Board.hs
gpl-3.0
7,072
0
15
1,754
2,262
1,305
957
108
7
module Pirandello.Outgoing where import Control.Concurrent.STM (TVar, atomically, newTVar, readTVar, writeTVar) import Control.Exception (SomeException) import Control.Monad.Trans.Class (lift) import Data.ByteString.Lazy (fromStrict) import Data.Text (unpack) import Data.Text.Encoding (encodeUtf8) import Network.Socke...
rimmington/pirandello
src/Pirandello/Outgoing.hs
gpl-3.0
2,449
0
13
403
716
383
333
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/SetBackup.hs
mpl-2.0
4,763
0
19
1,179
646
378
268
101
1
{-# LANGUAGE GeneralizedNewtypeDeriving, TypeFamilies #-} module Action.Types ( RequestContext(..) , Handler(..) , runHandler ) where import Control.Applicative (Alternative) import Control.Monad (MonadPlus) import Control.Monad.Base (MonadBase) import Control.Monad.IO.Class (MonadIO) import Control.Monad.Read...
databrary/databrary
src/Action/Types.hs
agpl-3.0
4,496
0
10
677
1,037
592
445
-1
-1
module QuantLib.Event (module QuantLib.Event ) where import QuantLib.Prices import QuantLib.Time.Date class Event a where evDate :: a->Date evOccured :: a->Date->Bool evOccured event date = evDate event < date evOccuredInclude:: a->Da...
paulrzcz/hquantlib
src/QuantLib/Event.hs
lgpl-3.0
1,368
0
11
500
380
205
175
41
0
module Bindings.Verba.HL.Helpers where import Data.ByteString.Char8 import qualified Data.ByteString.Unsafe as BSU import System.IO.Unsafe import qualified GHC.IO.Encoding as GHC import qualified GHC.Foreign as GHC -- Every time someone write `unsafePerformIO` a cute kitty dies! cp1251 = unsafePerformIO $ GHC.mkTe...
Macil-dev/verhface-hl
src/Bindings/Verba/HL/Helpers.hs
unlicense
513
0
8
92
103
63
40
11
1
{-# OPTIONS_GHC -Wno-unused-do-bind #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module X03_LedgerTamperEvident where import qualified Control.Concurrent.Async as Async import qualified Crypto.Hash.SHA256 as SHA import qua...
haroldcarr/learn-haskell-coq-ml-etc
haskell/playpen/blockchain/2018-06-maurice-herlihy-blockchains-from-distributed-computing-perspective/src/X03_LedgerTamperEvident.hs
unlicense
3,572
4
19
1,009
913
492
421
82
2
#!/usr/bin/env stack -- stack --install-ghc runghc --package bytestring --package text --package amqp --package uuid {-# LANGUAGE OverloadedStrings #-} import Control.Concurrent (MVar, newEmptyMVar, putMVar, takeMVar) import Control.Monad ...
rabbitmq/rabbitmq-tutorials
haskell/rpcClient.hs
apache-2.0
1,869
0
15
579
528
267
261
43
1
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} module Main where import Control.Concurrent (forkIO, threadDelay) import Control.Concurrent.MVar import Control.Lens import Control.Wire hiding (unless) import ...
supki/scrobblers
tests/behaviours.hs
bsd-2-clause
3,480
0
24
1,024
1,153
583
570
91
3
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE CPP #-} {-# LANGUAGE PackageImports #-} --------------------------------------------------------- -- -- Module : Control.Monad.Attempt -- Copyright : Michael Snoyman -- License : BSD3 -- -...
snoyberg/control-monad-attempt
Control/Monad/Attempt.hs
bsd-2-clause
3,261
0
11
691
682
374
308
53
1
-- -*- Mode: Haskell; -*- -- -- QuickCheck tests for Megaparsec's primitive parser combinators. -- -- Copyright © 2015 Megaparsec contributors -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are -- met: -- -- * Redistribution...
omefire/megaparsec
tests/Prim.hs
bsd-2-clause
14,783
0
14
4,140
5,020
2,505
2,515
280
2
{- re-export many things to simplify external use -} module Database.Drasil ( -- ChunkDB ChunkDB(defTable), RefbyMap, TraceMap, UMap, asOrderedList, cdb, collectUnits , conceptMap, conceptinsLookup, conceptinsTable, dataDefnTable , datadefnLookup, defResolve, gendefLookup, gendefTable, generateRefbyMap , idMa...
JacquesCarette/literate-scientific-software
code/drasil-database/Database/Drasil.hs
bsd-2-clause
864
0
5
104
178
121
57
17
0
{- The haskell base for the Agda implementation of a Relational Algebra -- Toon Nolten -} module RelationalBase (connectSqlite3, read) where import Database.HDBC.sqlite3 (connectSqlite3) import Database.HDBC type DatabasePath = String type TableName = String -- Read : all s -> Handle s -> RA s read :: IConne...
toonn/haskell-casestt
relational_base.hs
bsd-2-clause
455
1
10
102
92
52
40
-1
-1
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ATI.ElementArray -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability...
haskell-opengl/OpenGLRaw
src/Graphics/GL/ATI/ElementArray.hs
bsd-3-clause
848
0
5
115
73
53
20
13
0
{-# LANGUAGE CPP, MagicHash, ScopedTypeVariables #-} {-# OPTIONS_GHC -optc-DNON_POSIX_SOURCE #-} -- -- (c) The University of Glasgow 2002-2006 -- -- | ByteCodeItbls: Generate infotables for interpreter-made bytecodes module ByteCodeItbls ( mkITbls ) where #include "HsVersions.h" import ByteCodeTypes import GHCi imp...
sgillespie/ghc
compiler/ghci/ByteCodeItbls.hs
bsd-3-clause
2,245
0
16
553
558
301
257
47
2
-- | Helpers for setting up a tls connection with @HsOpenSSL@ package, -- for further customization, please refer to @HsOpenSSL@ package. -- -- Note, functions in this module will throw error if can't load certificates or CA store. -- module Data.OpenSSLSetting ( -- * choose a CAStore TrustedCAStore(..) ...
didi-FP/tcp-streams
tcp-streams-openssl/Data/OpenSSLSetting.hs
bsd-3-clause
3,932
0
11
955
552
288
264
56
1
-- | Basic operations on graphs. -- module ETA.Utils.GraphOps ( addNode, delNode, getNode, lookupNode, modNode, size, union, addConflict, delConflict, addConflicts, addCoalesce, delCoalesce, addExclusion, addExclusions, addPrefe...
alexander-at-github/eta
compiler/ETA/Utils/GraphOps.hs
bsd-3-clause
22,572
0
18
8,469
4,884
2,511
2,373
417
2
module Idris.ElabQuasiquote (extractUnquotes) where import Idris.Core.Elaborate hiding (Tactic(..)) import Idris.Core.TT import Idris.AbsSyntax extract1 :: Int -> (PTerm -> a) -> PTerm -> Elab' aux (a, [(Name, PTerm)]) extract1 n c tm = do (tm', ex) <- extractUnquotes n tm return (c tm', ex) ex...
bkoropoff/Idris-dev
src/Idris/ElabQuasiquote.hs
bsd-3-clause
7,770
0
16
1,854
3,543
1,768
1,775
162
2
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} {-# OPTIONS_GHC -F -pgmF htfpp #-} -- | test cards module Web.MangoPay.CardsTest where import Web.MangoPay import Web.MangoPay.TestUtils import Data.Default import Data.Maybe (isJust, isNothing, fromJust) import Test.Framework import Test.HUnit (Assertion) impo...
prowdsponsor/mangopay
mangopay/test/Web/MangoPay/CardsTest.hs
bsd-3-clause
2,021
0
13
333
633
303
330
46
1
-- | -- Module: Network.Protocool.ZigBee.ZNet25 -- Copyright: (c) 2012 David Joyner -- License: BSD3 -- Maintainer: David Joyner <david@joynerhome.net> -- Stability: experimental -- Portability: portable -- -- A protocol library enabling wireless communications via -- XBee/XBee-PRO (ZibBee) ZNet 2.5 RF mo...
djoyner/zigbee-znet25
src/Network/Protocol/ZigBee/ZNet25.hs
bsd-3-clause
1,278
0
5
191
66
55
11
5
0
module Milib.Geometry ( cross , dot , norm2 , ccw , convex_hull ) where cross :: (Num a) => (a, a) -> (a,a) -> a cross (x1,y1) (x2,y2) = x1 * y2 - y1 * x2 dot :: (Num a) => (a, a) -> (a,a) -> a dot (x1,y1) (x2,y2) = x1 * x2 + y1 * y2 norm2 :: (Num a) => (a, a) -> a norm2 (x1,y1) = x1 * x1 + y1 *...
mkut/milib_haskell
src/Milib/Geometry.hs
bsd-3-clause
1,333
0
12
405
717
390
327
38
4
-- We refer to otherwise unused modules in documentation. {-# OPTIONS_GHC -fno-warn-unused-imports #-} module System.Win32.SystemServices.Services.SERVICE_ACCEPT ( SERVICE_ACCEPT (..) , pokeServiceAccept , peekServiceAccept ) where import Data.Bits import Data.Maybe import Text.Printf import Import ...
nick0x01/Win32-services
src/System/Win32/SystemServices/Services/SERVICE_ACCEPT.hs
bsd-3-clause
4,099
0
9
748
563
309
254
50
1
module Main where import Queue as Q import Covariance import Data.Time.Clock import Data.IORef import Control.Monad import System.Random import qualified Data.Vector.Unboxed as U import qualified Data.List as L import Control.DeepSeq import Control.Exception import Statistics.Sample as S summer :: Queue Int summer = q...
charles-cooper/hroll
src/Main.hs
bsd-3-clause
2,378
0
13
536
955
467
488
62
3
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1998 \section[DataCon]{@DataCon@: Data Constructors} -} {-# LANGUAGE CPP, DeriveDataTypeable #-} module DataCon ( -- * Main data types DataCon, DataConRep(..), HsBang(..), HsSrcBang, HsImplBang, Stri...
gcampax/ghc
compiler/basicTypes/DataCon.hs
bsd-3-clause
47,245
0
18
13,922
5,061
2,885
2,176
412
4
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.MESA.YCbCrTexture -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portabilit...
haskell-opengl/OpenGLRaw
src/Graphics/GL/MESA/YCbCrTexture.hs
bsd-3-clause
724
0
5
99
57
42
15
9
0
module Main where import Cauterize.ErlangRef.Options import Cauterize.ErlangRef.Generate import System.Directory import System.FilePath.Posix import Data.Text (unpack) import qualified Cauterize.Specification as S main :: IO () main = runWithOptions caut2erlang caut2erlang :: ErlangOpts -> IO () caut2erlang ErlangO...
cauterize-tools/caut-erl-ref
app/Main.hs
bsd-3-clause
1,132
0
13
250
369
186
183
32
3
import System.Environment (getArgs) stripChars :: String -> String -> String stripChars = filter . flip notElem distance :: [Double] -> String distance [x1, y1, x2, y2] = show . floor $ sqrt (x*x + y*y) where x = x1 - x2 y = y1 - y2 main :: IO...
nikai3d/ce-challenges
easy/calculate_distance.hs
bsd-3-clause
479
0
14
166
190
98
92
12
1
module Phil.AST.Expr where import Data.List.NonEmpty (NonEmpty) import Phil.AST.Binding import Phil.Core.AST.Identifier import Phil.Core.AST.Literal import Phil.Core.AST.Pattern import Phil.Core.AST.Types import Phil.Typecheck.Unification type Placeholder = (Ctor, NonEmpty Type) subPlaceholders subs (DictPlaceholde...
LightAndLight/hindley-milner
src/Phil/AST/Expr.hs
bsd-3-clause
838
0
9
146
270
158
112
29
1
{-# LANGUAGE ViewPatterns, TemplateHaskell, TypeFamilies, UndecidableInstances, Rank2Types, FlexibleContexts #-} -- tournament between neural networks - each working with the same DBN. module Main where import Prelude hiding (putStr, putStrLn) import GenericGameExperiments import GenericGame import AgentGeneric impo...
Tener/deeplearning-thesis
src/gg-exp10.hs
bsd-3-clause
9,402
4
25
2,141
2,277
1,195
1,082
167
1
------------------------------------------------------------------------------ module Extraction where import Monad import StrategyLib hiding (replaceFocus) import VarsAnalyses import Datatypes --- Method extraction -------------------------------------------------------- ...
forste/haReFork
StrategyLib-4.0-beta/examples/joos-padl02/Extraction.hs
bsd-3-clause
3,069
0
15
937
822
435
387
45
2
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.INTEL.MapTexture -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable --...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/INTEL/MapTexture.hs
bsd-3-clause
883
0
4
103
64
50
14
10
0
-- | Common pitch representation. module Music.Pitch.Common ( module Music.Pitch.Common.Semitones, module Music.Pitch.Common.Quality, module Music.Pitch.Common.Number, module Music.Pitch.Common.Interval, module Music.Pitch.Common.Pitch, module Music.Pitch.Common.Spell, module Music.Pitch.Co...
music-suite/music-pitch
src/Music/Pitch/Common.hs
bsd-3-clause
719
0
5
85
146
107
39
19
0
module Language.Structure.Binary where import qualified Data.Tree as Rose import Language.POS (POS) import Language.Word (Word (Word)) import Text.Printf (printf) -- | Constituency trees are rose trees with POS tags in their nodes and words in -- their leaves. data Tree = Leaf Word ...
pepijnkokke/Dep2Con
src/Language/Structure/Binary.hs
bsd-3-clause
1,718
0
13
435
627
324
303
32
2
{-# LANGUAGE FlexibleContexts, TypeFamilies, GeneralizedNewtypeDeriving, MultiParamTypeClasses, CPP, UndecidableInstances #-} module Test.WebDriver.Monad ( WD(..), runWD, runSession, withSession, finallyClose, closeOnException, dumpSessionHistory ) where import Test.WebDriver.Class import Te...
plow-technologies/hs-webdriver
src/Test/WebDriver/Monad.hs
bsd-3-clause
3,574
0
12
636
694
378
316
52
1
{-# LANGUAGE OverloadedStrings #-} import Control.Monad import System.IO import Text.XML.Pipe import Network import qualified Data.ByteString.Char8 as BSC import Network.XmlPush.HttpPush import TestPusher main :: IO () main = do soc <- listenOn $ PortNumber 80 forever $ do (sh, _, _) <- accept soc testPusher...
YoshikuniJujo/xml-push
examples/httpPushT.hs
bsd-3-clause
888
12
13
155
350
186
164
29
1
{-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns #-} -- | Utilities to remove unused qualified imports module Importify.Resolution.Qualified ( removeUnusedQualifiedImports ) where import Universum import Data.List ...
serokell/importify
src/Importify/Resolution/Qualified.hs
mit
3,383
0
13
1,148
579
320
259
-1
-1
module Main where import HaskellStarter.CommitPrinter import System.Environment main :: IO () main = do args <- getArgs printCommitsFor (args !! 0) (args !! 1)
TomRegan/HaskellStarter
executables/Main.hs
mit
167
0
9
31
58
31
27
7
1
----------------------------------------------------------------------------- -- | -- Module : Graphics.HGL.Core -- Copyright : (c) Alastair Reid, 1999-2003 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : provisional -- Portability ...
FranklinChen/hugs98-plus-Sep2006
packages/HGL/Graphics/HGL/Core.hs
bsd-3-clause
794
4
5
105
91
66
25
11
0
{-# LANGUAGE RecordWildCards #-} -- | This module manages storing the various GHC option flags in a modules -- interface file as part of the recompilation checking infrastructure. module FlagChecker ( fingerprintDynFlags ) where import Binary import BinIface () import DynFlags import HscTypes import Modul...
snoyberg/ghc
compiler/iface/FlagChecker.hs
bsd-3-clause
3,171
0
12
773
288
169
119
27
4
-- {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE RankNTypes, MultiParamTypeClasses, FunctionalDependencies #-} -- This one caught a bug in the implementation of functional -- dependencies, where improvement must happen when -- checking the call in 'test4' module ShouldCompile where newtype M s a =...
rahulmutt/ghcvm
tests/suite/typecheck/compile/tc237.hs
bsd-3-clause
740
0
12
185
143
80
63
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-autoscaling/gen/Network/AWS/AutoScaling/DescribeAdjustmentTypes.hs
mpl-2.0
3,587
0
10
660
391
237
154
52
1
{-# LANGUAGE JavaScriptFFI #-} {- Copyright 2017 The CodeWorld Authors. 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....
three/codeworld
funblocks-client/src/Blockly/Connection.hs
apache-2.0
980
0
8
176
99
54
45
11
0