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
module Types where data Header = Header { getData :: String } deriving (Show) data HeaderNew = HeaderNew { requestQuery :: (String,String), -- (Method, Full query) gzipFlag :: Bool, userAgent :: Maybe String, doesItEnd :: Bool } deriving (Show) data Input = Input { server :: Maybe...
Cipherwraith/Rokka
Types.hs
gpl-2.0
760
0
9
262
202
118
84
24
0
module Crystal.Pretty (pretty, prettyD) where import Data.List import Text.PrettyPrint import Crystal.AST pretty expr = renderStyle style{lineLength=150} $ prettyE expr prettyD (decls, expr) = renderStyle style{lineLength=150} $ vcat (map toDecl decls) $+$ prettyE expr where toDecl (id, Expr l (Lambda args r...
Botje/crystal
Crystal/Pretty.hs
gpl-2.0
2,421
0
15
592
1,221
609
612
42
3
{- | Module : $Header$ Description : extraction of the sign from the frames Copyright : (c) Francisc-Nicolae Bungiu, Felix Gabriel Mance License : GPLv2 or higher, see LICENSE.txt Maintainer : f.bungiu@jacobs-university.de Stability : provisional Portability : portable Extraction of all the entit...
nevrenato/HetsAlloy
OWL2/Extract.hs
gpl-2.0
6,031
0
17
1,309
1,836
860
976
133
11
{-# OPTIONS_GHC -Wno-missing-export-lists #-} module Main where import Prelude hiding (id, putStrLn) import Data.Monoid ((<>)) import Data.Text (intercalate) import Data.Text.IO (putStrLn) import Data.Version (showVersion) import Database.SQLite.Simple import Options.Applicative import Paths_pinboard_notes_backup (ve...
bdesham/pinboard-notes-backup
src/Main.hs
gpl-3.0
4,304
0
13
1,504
713
380
333
83
2
{---------------------------------------------------------------------} {- Copyright 2015, 2016 Nathan Bloomfield -} {- -} {- This file is part of Feivel. -} {- ...
nbloomf/feivel
src/Feivel/Grammar/Int.hs
gpl-3.0
2,474
0
8
931
339
215
124
51
0
{-# LANGUAGE TypeSynonymInstances , OverlappingInstances #-} module Database.Design.Ampersand.ADL1.Expression ( subst ,foldlMapExpression,foldrMapExpression ,primitives,isMp1, isEEps ,isPos,isNeg, deMorganERad, deMorganECps, deMorg...
guoy34/ampersand
src/Database/Design/Ampersand/ADL1/Expression.hs
gpl-3.0
9,217
0
13
2,451
3,699
1,909
1,790
155
21
module GetImages (getActiveGraphImage, getTimetableImage, randomName) where import TimetableImageCreator (renderTable) import qualified Data.Map as M import System.Random import Svg.Generator import ImageConversion import Happstack.Server (Request, rqCookies, cookieValue) import Data.List.Utils (replace) -- | If...
miameng/courseography
app/GetImages.hs
gpl-3.0
1,906
0
14
378
414
215
199
37
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-cognito-sync/gen/Network/AWS/CognitoSync/DescribeDataset.hs
mpl-2.0
5,301
0
9
1,129
608
374
234
73
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Interconnects/List.hs
mpl-2.0
7,048
0
19
1,538
756
452
304
107
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/SetVaultAccessPolicy.hs
mpl-2.0
4,734
0
9
989
510
311
199
64
1
{- arch-tag: FTP server support Copyright (C) 2004 John Goerzen <jgoerzen@complete.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) a...
icetortoise/ftphs
src/Network/FTP/Server.hs
lgpl-2.1
25,147
0
25
9,083
5,898
2,929
2,969
-1
-1
module ViperVM.Backends.OpenCL.Processor ( Processor, initProc, procLibrary, procContext, procDevice, procQueue, procID, procName, procVendor, procCapabilities, procMemories, programCompile ) where import ViperVM.Backends.OpenCL.Types import ViperVM.Backends.OpenCL.Loader import ViperVM.Backends.OpenCL....
hsyl20/HViperVM
lib/ViperVM/Backends/OpenCL/Processor.hs
lgpl-3.0
2,448
0
12
469
652
362
290
61
2
{-# LANGUAGE OverloadedStrings #-} module LastFM ( scrobbleItem , getLastfmSession ) where import System.IO import Data.Aeson.Types import Data.List (find) import Data.Text (Text, pack) import Data.Aeson hiding (json) import Data.Int (Int64) import System.Directory import qualified Data.List.NonEmpty as...
amir/hmscrobbler
src/LastFM.hs
unlicense
3,183
0
23
739
1,134
554
580
93
3
module HaskHOL.Lib.CalcNum.Pre where import HaskHOL.Core hiding (base) import HaskHOL.Deductive import HaskHOL.Lib.Nums import HaskHOL.Lib.Arith import HaskHOL.Lib.WF -- Build up lookup table for numeral conversions. tmZero, tmBIT0, tmBIT1, tmM, tmN, tmP, tmAdd, tmSuc :: WFCtxt thry => HOL cls thry HOLTerm tmZero = ...
ecaustin/haskhol-math
src/HaskHOL/Lib/CalcNum/Pre.hs
bsd-2-clause
9,511
0
16
3,788
1,543
831
712
-1
-1
module Main where import System.Console.CmdArgs import Application.Hoodle.Database.ProgType import Application.Hoodle.Database.Command main :: IO () main = do putStrLn "hoodle-db" param <- cmdArgs mode commandLineProcess param
wavewave/hoodle-db
exe/hoodle-db.hs
bsd-2-clause
238
0
8
35
61
33
28
9
1
module NeighboursSpec where import Neighbours import Test.Hspec spec :: Spec spec = describe "neighbours" $ do describe "leftCell" $ do it "the left cell of a left-most cell is always dead (top)" $ do leftCell 0 0 [[1,0,0],[0,0,0],[0,0,0]] `shouldBe` 0 it "the left cell of a left-mo...
supersven/game-of-life
test/NeighboursSpec.hs
bsd-2-clause
10,080
0
17
2,371
5,589
3,245
2,344
187
1
{-# LANGUAGE DeriveGeneric, FlexibleContexts #-} -- | The following module is responsible for general types used -- throughout the system. module Torrent ( -- * Types InfoHash , PeerId , AnnounceURL , TorrentState(..) , TorrentInfo(..) , PieceNum , PieceSize , PieceMap , Pie...
abhin4v/combinatorrent
src/Torrent.hs
bsd-2-clause
4,565
0
15
1,103
972
553
419
110
2
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.APPLE.TextureRange -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portabili...
haskell-opengl/OpenGLRaw
src/Graphics/GL/APPLE/TextureRange.hs
bsd-3-clause
956
0
5
124
85
60
25
15
0
import Data.Binary (decode) import Data.Binary.Put (putWord16host, runPut) import Data.Word (Word8) littleEndian :: Bool littleEndian = (decode . runPut $ putWord16host 42 :: Word8) == 42 main :: IO () main | littleEndian = putStrLn "LittleEndian" | otherwise = putStrLn "BigEndian"
nikai3d/ce-challenges
moderate/endian.hs
bsd-3-clause
293
0
8
50
102
54
48
8
1
module Monad.Free where import qualified Prelude as P import Data.Constraint import Data.Proxy import Data.Tagged import Category import Functor import Coproduct import Monad import NatTr import NatTr.Coproduct data Free f a where Free :: FMap f (Free f a) -> Free f a Pure :: EndoFunctorOf f (->) => a -> Fre...
ian-mi/extended-categories
Monad/Free.hs
bsd-3-clause
1,560
1
16
399
778
402
376
-1
-1
{-# LANGUAGE NoMonomorphismRestriction #-} module Main (main) where import Test.QuickCheck import Test.Framework (Test, defaultMain, testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.XBeeTestSupport import Data.Word import Data.ByteString (ByteString,pack,unpack) import qualified Data...
msiegenthaler/haskell-xbee
test/CommandTest.hs
bsd-3-clause
9,904
0
18
1,973
2,375
1,268
1,107
168
1
-- Shake Generator for wiki pages {-# LANGUAGE CPP #-} module Main where import Prelude hiding ((*>)) import Control.Concurrent import Data.Char import qualified Data.List as L import Development.Shake hiding (doesFileExist) imp...
ku-fpg/blank-canvas
wiki-suite/Main.hs
bsd-3-clause
10,241
38
25
2,590
2,622
1,443
1,179
236
8
-- Copyright 2019 Google LLC -- -- Use of this source code is governed by a BSD-style -- license that can be found in the LICENSE file or at -- https://developers.google.com/open-source/licenses/bsd {-# LANGUAGE CPP #-} module GHC.SourceGen.Type.Internal where import GHC.Hs (GhcPs) #if MIN_VERSION_ghc(9,0,0) import ...
google/ghc-source-gen
src/GHC/SourceGen/Type/Internal.hs
bsd-3-clause
2,294
0
10
410
490
259
231
44
4
module Language.Haskell.GhcMod.Boot where import Control.Applicative ((<$>)) import CoreMonad (liftIO, liftIO) import Language.Haskell.GhcMod.Browse import Language.Haskell.GhcMod.Flag import Language.Haskell.GhcMod.Lang import Language.Haskell.GhcMod.List import Language.Haskell.GhcMod.Monad import Language.Haskell.G...
darthdeus/ghc-mod-ng
Language/Haskell/GhcMod/Boot.hs
bsd-3-clause
974
0
10
167
229
131
98
29
1
{-# LANGUAGE TypeFamilies, TypeOperators #-} ------------------------------------------------------------------------------------------- -- | -- Module : Control.Category.Object -- Copyright: 2010-2012 Edward Kmett -- License : BSD -- -- Maintainer : Edward Kmett <ekmett@gmail.com> -- Stability : experimental -- Po...
ekmett/categories
old/src/Control/Categorical/Object.hs
bsd-3-clause
1,318
2
8
211
120
77
43
11
0
import Test.Cabal.Prelude main = cabalTest $ do expectBroken 4477 $ do cabal' "new-run" ["foo"] >>= assertOutputContains "Hello World"
mydaum/cabal
cabal-testsuite/PackageTests/NewBuild/T4477/cabal.test.hs
bsd-3-clause
147
0
13
30
44
21
23
4
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ImplicitParams #-} module MLModules where import Prelude hiding (Monoid) -- We can represent a module dependencies with our fake modules! -- This means submodules! -- -- The only thing is I cannot have...
sleexyz/haskell-fun
MLModulesSubmodule.hs
bsd-3-clause
794
14
6
185
184
108
76
22
1
module PackageTests.Tests(tests) where import PackageTests.PackageTester import qualified PackageTests.BenchmarkStanza.Check import qualified PackageTests.TestStanza.Check import qualified PackageTests.DeterministicAr.Check import qualified PackageTests.TestSuiteTests.ExeV10.Check import Control.Monad import Data.V...
lukexi/cabal
Cabal/tests/PackageTests/Tests.hs
bsd-3-clause
9,655
21
19
2,245
1,571
813
758
134
1
-- | -- Support for source code annotation feature of GHC. That is the ANN pragma. -- -- (c) The University of Glasgow 2006 -- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -- module Annotations ( -- * Main Annotation data types Annotation(..), AnnTarget(..), CoreAnnTarget, ...
nomeata/ghc
compiler/main/Annotations.hs
bsd-3-clause
4,023
0
12
913
745
410
335
55
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS -fno-warn-orphans #-} module PropGenerators ( arbitraryPropWithVarsAndSize , arbitraryPropWithVars , boundShrinkProp ) where import PropositionalPrelude import Prop import Test.QuickCheck (Arbitrary, arbitrary, shrink, Gen, on...
bradlarsen/hs-cudd
test/PropGenerators.hs
bsd-3-clause
3,517
0
15
1,293
1,115
567
548
70
11
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. module Duckling.Numeral.KO.Tests ( tests ) where import Prelude import Data.String import Test.Tasty import D...
facebookincubator/duckling
tests/Duckling/Numeral/KO/Tests.hs
bsd-3-clause
504
0
9
78
79
50
29
11
1
#!/usr/local/bin/runhaskell {-# LANGUAGE DeriveDataTypeable #-} import Text.Hastache import Text.Hastache.Context import qualified Data.Text.Lazy.IO as TL import Data.Data import Data.Generics main = hastacheStr defaultConfig (encodeStr template) context >>= TL.putStrLn -- begin example data Book = Book { t...
lymar/hastache
examples/genericsBig.hs
bsd-3-clause
1,235
12
9
381
240
140
100
37
1
module Main where import Scraper import Formatter import System.Environment (getArgs) import Data.Maybe import Text.HTML.Scalpel import Control.Monad (when) import Data.List import System.Console.ParseArgs run :: String -> String -> IO() run outputpath uri = do putStrLn "Scraping..." maybeitems <- scrapeURL u...
tsukimizake/haddock2anki
app/Main.hs
bsd-3-clause
891
1
10
181
279
141
138
25
1
{-# OPTIONS_GHC -Wall #-} module Main where import Data.Proxy import OfflinePlay import qualified Punter.Connector as Connector main :: IO () main = runPunterOffline (Proxy :: Proxy Connector.Punter)
nobsun/icfpc2017
hs/app/connector.hs
bsd-3-clause
202
0
8
29
50
30
20
7
1
import TestDatas (int1, stringHello) import Test.QuickCheck.Simple (Test, boolTest, qcTest, defaultMain) main :: IO () main = defaultMain tests prop_int1 :: Bool prop_int1 = int1 == 1 prop_stringHello :: Bool prop_stringHello = stringHello == "Hello 2017-01-02 12:34:56" prop_show_read :: Int -> Bool prop_show_r...
khibino/travis-ci-haskell
pkg-a/tests/useQuickCheckSimple.hs
bsd-3-clause
531
0
8
121
151
84
67
14
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE TupleSections #-} {-| HAProxy proxying pro...
23Skidoo/io-streams-haproxy
src/System/IO/Streams/Network/HAProxy.hs
bsd-3-clause
14,487
0
17
4,118
2,728
1,429
1,299
220
4
module CNC.IntegrationTests where import CNC.Declarative import CNC.HCode import Data.Complex import Control.Monad flake_side = do [p1,p2,p3,p4,p5] <- declarePoints 5 xSize p1 p2 1 len p2 p3 1 len p3 p4 1 xAngle p2 p3 (pi / 3) xAngle p3 p4 (- pi / 3) xSize p4 p5 1 renderPolygon :: Int -> Path -> HCode...
akamaus/gcodec
test/CNC/IntegrationTests.hs
bsd-3-clause
777
0
15
194
328
158
170
26
2
{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE ViewPatterns #-} module EZConfig (spec) where import Control.Arrow (first, (>>>)) import Data.Coerce import Foreign....
xmonad/xmonad-contrib
tests/EZConfig.hs
bsd-3-clause
3,567
0
17
807
935
491
444
75
1
module Wow1 where import Haskore.Melody import Haskore.Music as M import Haskore.Basic.Duration as D import Haskore.Basic.Duration import Snippet import Prelude as P import Haskore.Music.GeneralMIDI import Haskore.Basic.Interval flute_base = [ cs 1 qn, fs 1 qn, fs 1 en, e 1 en, fs 1 hn, fs 1 en, gs 1 en ] flute_...
nfjinjing/haskore-guide
src/wow_1.hs
bsd-3-clause
806
0
11
217
363
196
167
28
1
{-# language CPP #-} -- | = Name -- -- XR_MSFT_unbounded_reference_space - instance extension -- -- = Specification -- -- See -- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_MSFT_unbounded_reference_space XR_MSFT_unbounded_reference_space> -- in the main specification for complete information...
expipiplus1/vulkan
openxr/src/OpenXR/Extensions/XR_MSFT_unbounded_reference_space.hs
bsd-3-clause
2,016
0
8
429
145
99
46
-1
-1
module Libv10 ( main' ) where -- v10 : Fill in the division team mapping and other data import Control.Monad import qualified Data.Map.Strict as Map import Data.List import Data.Maybe import Data.Ord import System.Environment import Text.Parsec import Text.Parsec.String import Text.Printf -- data ---------------...
mfine/hs-talks
src/Libv10.hs
bsd-3-clause
5,032
0
11
966
1,316
752
564
122
1
{-# LANGUAGE DeriveDataTypeable #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} ------------------------------------------------------...
csabahruska/GFXDemo
Thrift/Content_Consts.hs
bsd-3-clause
1,066
0
6
240
152
109
43
19
0
-- | -- Module : $Header$ -- Copyright : (c) 2013-2015 Galois, Inc. -- License : BSD3 -- Maintainer : cryptol@galois.com -- Stability : provisional -- Portability : portable {-# LANGUAGE Safe #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE PatternGuards #-} modul...
ntc2/cryptol
src/Cryptol/TypeCheck/Solver/CrySAT.hs
bsd-3-clause
21,839
0
22
6,846
5,956
3,024
2,932
399
5
module GHCJS.DOM.HTMLInputElement where data HTMLInputElement = HTMLInputElement class IsHTMLInputElement a instance IsHTMLInputElement HTMLInputElement ghcjs_dom_html_input_element_step_up = undefined htmlInputElementStepUp = undefined ghcjs_dom_html_input_element_step_down = undefined htmlInputElementStepDown = und...
mightybyte/reflex-dom-stubs
src/GHCJS/DOM/HTMLInputElement.hs
bsd-3-clause
8,767
0
5
564
943
564
379
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module Web.Spock.Api.Client (callEndpoint,...
agrafix/Spock
Spock-api-ghcjs/src/Web/Spock/Api/Client.hs
bsd-3-clause
3,862
2
18
1,210
1,054
570
484
112
3
-------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.IBM.MultimodeDrawArrays -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- ----------...
haskell-opengl/OpenGLRaw
src/Graphics/GL/IBM/MultimodeDrawArrays.hs
bsd-3-clause
676
0
4
89
47
36
11
7
0
{-# LANGUAGE CPP #-} {-# LANGUAGE UnicodeSyntax #-} module Shake.It.C.Make ( make , configure , nmake , vcshell ) where import Control.Monad import Shake.It.Core import System.Environment configure ∷ [String] → IO () configure α = rawSystem "configure" α >>= checkExi...
Heather/Shake.it.off
src/Shake/It/C/Make.hs
bsd-3-clause
938
0
11
263
279
147
132
18
1
{-# LANGUAGE OverloadedStrings #-} ------------------------------------------------------------------------------- -- | -- Module : Generator.Primer.Modern -- Copyright : (c) 2016 Michael Carpenter -- License : BSD3 -- Maintainer : Michael Carpenter <oldmanmike.dev@gmail.com> -- Stability : experimen...
oldmanmike/hs-minecraft-protocol
generate/src/Generator/Primer/Modern.hs
bsd-3-clause
2,953
0
21
1,054
520
274
246
70
3
{-# LANGUAGE DataKinds, PolyKinds, TypeFamilies, TypeOperators, OverloadedStrings #-} module Database.Edis.Command.Hash where import Database.Edis.Type import Database.Edis.Helper import Data.ByteString (ByteString) import Data.Proxy (Proxy) import Data.Serialize (Serialize, encode) ...
banacorn/tredis
src/Database/Edis/Command/Hash.hs
mit
2,619
0
15
579
1,028
519
509
47
1
-- https://www.codewars.com/kata/five-fundamental-monads {-# LANGUAGE NoImplicitPrelude #-} module Monads where import Prelude hiding (Maybe(..), Monad) class Monad m where return :: a -> m a (>>=) :: m a -> (a -> m b) -> m b newtype Identity a = Identity { runIdentity :: a } deriving (Eq, Show) data Maybe a ...
airtial/Codegames
codewars/five-fundamental-monads.hs
gpl-2.0
1,113
0
13
274
529
280
249
27
0
#!/usr/bin/env stack {- stack runghc --verbosity info --package pandoc-types -} import Text.Pandoc.JSON main :: IO () main = toJSONFilter dropHtmlBlocks dropHtmlBlocks :: Block -> Block dropHtmlBlocks (RawBlock (Format "html") _) = Plain [] dropHtmlBlocks x = x
mstksg/hledger
tools/pandoc-drop-html-blocks.hs
gpl-3.0
265
0
9
40
71
37
34
6
1
module Rasa.Internal.EventsSpec where import Test.Hspec spec :: Spec spec = return ()
samcal/rasa
rasa/test/Rasa/Internal/EventsSpec.hs
gpl-3.0
88
0
6
14
27
16
11
4
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.DynamoDB.Types.Product --...
fmapfmapfmap/amazonka
amazonka-dynamodb/gen/Network/AWS/DynamoDB/Types/Product.hs
mpl-2.0
97,603
0
24
20,741
11,539
6,980
4,559
1,021
1
{-# LANGUAGE RecordWildCards, ViewPatterns, TupleSections, PatternGuards #-} module General.Log( Log, logCreate, logNone, logAddMessage, logAddEntry, Summary(..), logSummary, ) where import Control.Concurrent.Extra import Control.Applicative import System.IO import Data.Time.Calendar import Data.Time.Cloc...
BartAdv/hoogle
src/General/Log.hs
bsd-3-clause
4,539
0
26
1,133
1,679
877
802
107
7
{-# LANGUAGE BangPatterns #-} -- A simple wc-like program using Data.Iteratee. -- Demonstrates a few different ways of composing iteratees. module Main where import Prelude as P import Data.Iteratee import Data.Iteratee.Char as C import qualified Data.Iteratee as I import qualified Data.ByteString.Char8 as BC import ...
iteloo/tsuru-sample
iteratee-0.8.9.6/Examples/word.hs
bsd-3-clause
1,862
0
11
324
346
194
152
26
2
{-# LANGUAGE ScopedTypeVariables #-} module Main where import GHC.Conc import Control.Exception -- Create trivial invariants using a single TVar main = do putStr "\nStarting\n" x <- atomically ( newTVar 42 ) putStr "\nAdding trivially true invariant (no TVar access)\n" atomically ( alwaysSucceeds ( return 1 ...
gridaphobe/packages-stm
tests/stm060.hs
bsd-3-clause
2,923
0
20
756
798
378
420
49
3
{-# LANGUAGE ParallelListComp, BangPatterns #-} import Solver import Graphics.Gloss import System.Environment import Data.Maybe import qualified Data.Vector as V import qualified Data.Vector.Unboxed as VU main :: IO () main = do args <- getArgs mainWithArgs args ...
mainland/dph
dph-examples/examples/spectral/Rotation/MainGloss.hs
bsd-3-clause
1,901
2
18
745
413
218
195
42
1
{-# LANGUAGE Haskell98, CPP, DeriveDataTypeable, ForeignFunctionInterface, TypeSynonymInstances #-} {-# LINE 1 "dist/dist-sandbox-261cd265/build/Network/Socket.hs" #-} {-# LINE 1 "Network/Socket.hsc" #-} {-# LANGUAGE CPP, ScopedTypeVariables #-} {-# LINE 2 "Network/So...
phischu/fragnix
tests/packages/scotty/Network.Socket.hs
bsd-3-clause
60,647
480
33
13,640
9,357
5,328
4,029
-1
-1
{-# LANGUAGE BangPatterns, DeriveDataTypeable, RecordWildCards #-} -- | -- Module : Criterion.Analysis -- Copyright : (c) 2009-2014 Bryan O'Sullivan -- -- License : BSD-style -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : GHC -- -- Analysis code for benchmarks. module Cri...
paulolieuthier/criterion
Criterion/Analysis.hs
bsd-2-clause
9,668
0
24
2,908
2,640
1,429
1,211
194
5
{- Copyright (C) 2013-2014 John MacFarlane <jgm@berkeley.edu> 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 program is ...
peter-fogg/pardoc
src/Text/Pandoc/Asciify.hs
gpl-2.0
7,630
0
8
1,409
2,382
1,574
808
388
1
{-# LANGUAGE DeriveDataTypeable #-} module Main ( main ) where import Test.Tasty import Test.Tasty.Options import Data.Proxy import Data.Typeable import Distribution.Simple.Utils import Distribution.Verbosity import Distribution.Compat.Time import qualified UnitTests.Distribution.Compat.CreatePipe import qu...
thomie/cabal
Cabal/tests/UnitTests.hs
bsd-3-clause
2,833
0
14
501
511
294
217
65
2
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE BangPatterns, NoImplicitPrelude #-} -- Copyright (c) 2008, Ralf Hinze -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- * Redistributions ...
snoyberg/ghc
libraries/base/GHC/Event/PSQ.hs
bsd-3-clause
18,113
0
14
5,068
6,446
3,231
3,215
304
6
module AmortizedQueue where import Prelude hiding (head) data AbsQueue a = AQ { front :: [a] , rear :: [a] } {-@ data AbsQueue a = AQ { front :: [a] , rear :: {v:[a] | size v <= size front} } @-} {-@ die :: {v:String | false} -> a @-} die :: String -> a die x = error...
abakst/liquidhaskell
tests/todo/AmortizedQueue.hs
bsd-3-clause
4,228
0
9
1,207
304
165
139
20
1
{-# LANGUAGE CPP, TupleSections #-} {-# OPTIONS_GHC -fno-cse #-} -- -fno-cse is needed for GLOBAL_VAR's to behave properly ----------------------------------------------------------------------------- -- -- Static flags -- -- Static flags can only be set once, on the command-line. Inside GHC, -- each static flag corr...
acowley/ghc
compiler/main/StaticFlags.hs
bsd-3-clause
7,834
0
13
1,718
924
528
396
-1
-1
module Utilities (toBinary, fl) where import Stream import Data.Ratio -- Convert from an Integer to its signed-digit representation toBinary :: Integer -> Stream toBinary 0 = [0] toBinary x = toBinary t ++ [x `mod` 2] where t = x `div` 2 fl :: Stream -> Stream fl (x:xs) = (f x):xs where f 0 = 1 ...
ryantm/ghc
testsuite/tests/concurrent/prog001/Utilities.hs
bsd-3-clause
328
3
9
85
130
72
58
11
2
{-# LANGUAGE OverloadedStrings #-} {-| Module : Examples.AllPrimitives Description : Predefined network: allPrimitives. Copyright : (c) Sanne Woude 2015 Predefined network: allPrimitives. -} module Examples.AllPrimitives (allPrimitives) where import Madl.Network import Examples.TypesAndFunctions import Utils...
julienschmaltz/madl
examples/Examples/AllPrimitives.hs
mit
2,842
0
9
767
633
386
247
56
2
-- Peano numbers -- https://www.codewars.com/kata/5779b0f0ec883247b2000117 module Haskell.Codewars.Peano where import Prelude hiding (even, odd, div, compare, Num, Int, Integer, Float, Double, Rational, Word) data Peano = Zero | Succ Peano deriving (Eq, Show) add, sub, mul, div :: Peano -> Peano -> Peano add p1 Zer...
gafiatulin/codewars
src/5 kyu/Peano.hs
mit
1,014
0
10
229
492
257
235
29
1
module Language.Rebeca.Fold.Erlang.Simulation where import Control.Monad.Reader import Control.Monad.State import Language.Fold import Language.Erlang.Builder import Language.Erlang.Syntax import qualified Language.Rebeca.Absrebeca as R import Language.Rebeca.Algebra import Language.Rebeca.Fold import Language.Rebeca...
arnihermann/timedreb2erl
src/Language/Rebeca/Fold/Erlang/Simulation.hs
mit
4,296
0
28
1,187
1,454
739
715
68
2
-- | Options/Parsing module Vaultaire.Collector.Nagios.Perfdata.Options where import Vaultaire.Collector.Nagios.Perfdata.Types import Options.Applicative parseOptions :: IO NagiosOptions parseOptions = execParser optionParser -- | Parser which include all help info optionParser :: ParserInfo Na...
anchor/vaultaire-collector-nagios
lib/Vaultaire/Collector/Nagios/Perfdata/Options.hs
mit
2,266
0
18
674
409
193
216
59
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.WebKitCSSViewportRule (js_getStyle, getStyle, WebKitCSSViewportRule, castToWebKitCSSViewportRule, gTypeWebKitCSSViewportRule) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, D...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/WebKitCSSViewportRule.hs
mit
1,467
6
11
182
377
238
139
26
1
{-# htermination transpose :: [[a]] -> [[a]] #-} import List
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/List_transpose_1.hs
mit
61
0
3
10
5
3
2
1
0
{-# LANGUAGE LambdaCase #-} module Language.Bison.Summary.Parser ( parseRules ) where import Language.Bison.Summary.Parser.Lexer import Language.Bison.Summary.Syntax import Text.Parsec import Text.Parsec.Prim import Text.Parsec.Pos import Text.Parsec.Error import Control.Applicative hiding ((<|>), optio...
gergoerdi/bison-parser
src/Language/Bison/Summary/Parser.hs
mit
2,509
0
13
673
948
490
458
73
3
import Text.ParserCombinators.Parsec import qualified Data.Map as M import Text.Parsec.Error (messageString, errorMessages) import Data.Text (pack, unpack, strip) import Data.Monoid type TextLine = String type Name = String data ActionType = FoulCommit | GenericAction String | ActionTy...
ddccffvv/fun-with-haskell
belgie_parser.hs
mit
5,711
0
13
1,432
1,754
900
854
137
1
module Main where import System.Environment import WoofParse import WoofToBC import IO main :: IO () main = do s <- hGetContents stdin ast <- return $ readAST s case ast of ASTNull errMsg -> do putStr errMsg otherwise -> emitBC ast
aemoncannon/woof
compiler/woof_main.hs
mit
295
0
12
104
88
43
45
11
2
{-# LANGUAGE OverloadedStrings #-} {-| Controls host muting in Datadog. -} module Network.Datadog.Host ( muteHost , unmuteHost ) where import Control.Monad (void) import Data.Aeson import Data.Text (Text, unpack) import Data.Time.Clock import Data.Time.Clock.POSIX import Network.HTTP.Types import Network.Datadog....
iand675/datadog
src/Network/Datadog/Host.hs
mit
1,139
0
18
244
336
180
156
25
1
{-# LANGUAGE NoImplicitPrelude, DeriveFunctor #-} module IHaskell.Flags ( IHaskellMode(..), Argument(..), Args(..), LhsStyle(..), NotebookFormat(..), lhsStyleBird, parseFlags, help, ) where import IHaskellPrelude import qualified Data.Text as T import qualified Data.Text....
beni55/IHaskell
src/IHaskell/Flags.hs
mit
7,280
0
15
1,907
1,727
929
798
137
5
module Ocram.Names where import Text.Printf (printf) -- TODO: split this file into the submodules ecPrefix :: String ecPrefix = "ec_" -- |The name of the attribute that marks blocking function declaratations blockingAttr :: String blockingAttr = "tc_block" -- |The name of the attribute that marks thread start func...
copton/ocram
ocram/src/Ocram/Names.hs
gpl-2.0
2,394
0
6
406
373
209
164
40
1
module Main where -------------------------------------------------------------------------------- import Math.REPL.Evaluator.Base (evalTest) import Model.Arithmetic -------------------------------------------------------------------------------- import Control.Applicative ((<$>)...
sumitsahrawat/calculator
tests/Arithmetic.hs
gpl-2.0
1,904
0
16
405
391
215
176
36
2
module AnnotatingTypeChecker where import AbsMini import PrintMini import ErrM -- from TypeChecker by changing () to Program,Stm,etc typecheck :: Program -> Err Program typecheck (Prog stms) = do (stms',_) <- checkStms emptyEnv stms ; return (Prog stms') checkStms :: Env -> [Stm] -> Err ([Stm],Env) checkStms env []...
izimbra/PLT2014
mini/haskell/AnnotatingTypeChecker.hs
gpl-2.0
2,614
0
19
975
1,008
504
504
58
5
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -F -pgmF htfpp #-} module TestTmp where import Test.Framework #include "solution.hs" test = htfMain htf_thisModulesTests
NorfairKing/project-euler
build/haskell/test-boilerplate.hs
gpl-2.0
169
0
5
32
20
13
7
5
1
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import qualified SDL import qualified SDL.Image import qualified Common as C import Control.Monad.IO.Class (MonadIO) import Control.Monad.Extra (whileM) main :: IO () main = C.withSDL $ do C.setHintQuality C.withWindow "Lesson 07" (640, 480) $ \w -> ...
palf/haskellSDL2Examples
examples/lesson07/src/Lesson07.hs
gpl-2.0
671
0
17
149
240
125
115
22
1
--- apfelmus 2009. This code is hereby released into public domain. module RandomList where import System.Random import Control.Monad.Random import Control.Monad type R a = Rand StdGen a -- List returning elements in random order type RandomList a = R [a] print_rl :: RandomList [Integer] -> IO() print_rl rl = d...
adhalanay/Examen
src/RandomList.hs
gpl-3.0
1,497
0
14
416
573
309
264
37
4
{-# LANGUAGE OverloadedStrings #-} module WebSpec (spec) where import Control.Monad (void) import Test.Hspec import Test.Hspec.Fn import Common import Users.Model spec :: Spec spec = fnTests $ do describe "/login" $ do it "should login the user" $ do let...
emhoracek/smooch
app/tests/WebSpec.hs
gpl-3.0
1,109
0
18
338
303
155
148
28
1
{-# LANGUAGE TemplateHaskell #-} module Vdv.FilterOperator where import ClassyPrelude import Control.Lens(makePrisms) data FilterOperator = FilterOperatorEq | FilterOperatorLike | FilterOperatorLe | FilterOperatorGe | FilterOperatorDateLe...
pmiddend/vdvanalyze
src/Vdv/FilterOperator.hs
gpl-3.0
477
0
8
173
68
40
28
13
0
module Ennel.Text.Interpreter where import Ennel.Linguistics import Ennel.Dictionary.Data hiding (phrase) import Data.JustParse import Data.JustParse.Char import Data.JustParse.Combinator hiding (branch) import Control.Applicative ((<$>), (<*>), (<*), (*>), pure) import Control.Monad import Data.Monoid impo...
trehansiddharth/ennel
Ennel/Text/Interpreter.hs
gpl-3.0
2,143
4
17
436
834
436
398
47
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} import Control.Monad import Control.Monad.Trans (liftIO) import Control.Monad.Trans.Either (EitherT(..)) import Control.Monad.Trans.Maybe -- impor...
wavewave/lhc-analysis-collection
analysis/SimplifiedSUSY_sqsg_ATLAS0L2to6JMET_8TeV.hs
gpl-3.0
6,551
0
22
1,803
2,120
1,105
1,015
140
5
module DrawingColors ( ColorStyle(..) , colorScheme , colorOnBlackScheme , whiteOnBlackScheme , randomColorScheme ) where import Diagrams.Prelude hiding ((&), (#)) {-# ANN module "HLint: ignore Unnecessary hiding" #-} -- COLO(U)RS -- colorScheme :: ColorStyle Double colorScheme = colorOnBlackScheme data C...
rgleichman/glance
app/DrawingColors.hs
gpl-3.0
2,666
0
10
556
745
452
293
88
1
module MicChan ( SoundData(..) , Mic(..) , openMic , closeMic , readSoundData ) where import Control.Monad ( void , forever ) import Control.Monad.Loops ( whileJust ...
martinvlk/sound-level-indicator
src/MicChan.hs
gpl-3.0
2,486
0
12
1,238
534
292
242
58
1
module Main where import Test.HLex import Test.TDOP main :: IO () main = undefined
cbowdon/TDOP
test.hs
gpl-3.0
85
0
6
16
29
17
12
5
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-mirror/gen/Network/Google/Resource/Mirror/Accounts/Insert.hs
mpl-2.0
3,745
0
15
883
531
315
216
84
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-alertcenter/gen/Network/Google/Resource/AlertCenter/Alerts/List.hs
mpl-2.0
6,631
0
20
1,574
1,055
612
443
140
1
{-# LANGUAGE OverloadedStrings #-} module Controller.VolumeState ( postVolumeState , deleteVolumeState ) where import Data.Maybe (fromMaybe) import Network.HTTP.Types (noContent204) import qualified Web.Route.Invertible as R import qualified Data.Aeson as Aeson import Model.Id import Model.Permission import Mod...
databrary/databrary
src/Controller/VolumeState.hs
agpl-3.0
1,578
0
17
261
437
235
202
40
1
module Main where import Control.Monad import Data.Maybe import Test.QuickCheck import Text.HTML.TagSoup import Text.HTML.ValueCalc import System.Exit (exitFailure) -- running test suite main :: IO () main = do quickCheck threeArrowTest r1 <- quickCheckResult prop_getDiff r2 <- quickCheckResult...
ksallberg/valuecalc
Tests/QCTests.hs
unlicense
4,987
0
18
1,250
1,188
609
579
83
1
module Utils where import qualified Data.Set as S (Set, singleton, union, map, toList, fromList) import Control.Monad (liftM2) import RuleRTypes ss :: a -> S.Set (S.Set a) ss = S.singleton . S.singleton cp :: (Eq a, Ord a) => S.Set (S.Set a) -> S.Set (S.Set a) -> S.Set (S.Set a) cp a b = S.fromList . map S.fromList ...
rispoli/nesy-hs
Utils.hs
unlicense
962
0
15
236
502
255
247
18
1
module Git.Sanity.Internal where import Data.Machine -- TODO Contribute to machine? slide :: Process a (a, a) slide = f Nothing where f Nothing = await (\x -> f $ Just x) f (Just x) = await (\y -> machine $ Yield (x, y) $ f $ Just y) await f = machine $ Await f Refl stopped machine = MachineT . return
aloiscochard/git-sanity
src/Git/Sanity/Internal.hs
apache-2.0
316
0
14
75
142
75
67
8
2
{- | A BSON document is a JSON-like object with a standard binary encoding defined at bsonspec.org. This implements version 1.0 of that spec. Use the GHC language extension /OverloadedStrings/ to automatically convert String literals to UString (UTF8) -} {-# LANGUAGE OverloadedStrings, TypeSynonymInstances, FlexibleI...
mongodb/bson-haskell
Data/Bson.hs
apache-2.0
14,020
108
15
2,854
4,611
2,434
2,177
301
20
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE UndecidableInstances #-} module Tersus.DataTypes.TError where import Control.Exception.Base import Data.Text import Data.Typeable import Prelude import Tersus.DataTypes.TypeSynonyms import Yesod.Handler import GHC.Generics (Generic) import Data.Aeson (FromJSON, ToJSON, dec...
kmels/tersus
Tersus/DataTypes/TError.hs
bsd-2-clause
867
0
6
147
152
92
60
22
0
{-# LANGUAGE BangPatterns, PatternGuards #-} module Data.BTree ( -- * Types BTree -- * Creation , empty , singleton , fromList -- * Queries , size , lookup , minimumKey -- * Insertion , insert , insertWith -- * Debugging , showBTree ) where ...
jaspervdj/b-tree
src/Data/BTree.hs
bsd-3-clause
6,073
3
17
2,443
1,748
890
858
115
5
module HM.Normal where import HM.Types import HM.Monad import Data.IORef import Data.List( (\\) ) import Debug.Trace import Text.PrettyPrint.HughesPJ typecheck :: Term -> Tc Sigma typecheck e = do { ty <- inferSigma e ; zonkType ty } data Expected a = Infer (IORef a) | Check a checkRho :: Ter...
MnO2/hindley-milner
src/HM/Normal.hs
bsd-3-clause
2,533
0
11
746
915
459
456
64
1
import Data.Function import Data.List import Data.Monoid import qualified Data.Set as S import Data.Foldable.Strict import qualified Data.Map.Strict as M import Control.Lens import MinIR.CorpusStats as CS import MinIR.TermIndex as TI import MinIR.OrderedIndex as OI import MinIR.UnorderedIndex as UI import MinIR.Sequen...
bgamari/minir
Test.hs
bsd-3-clause
940
0
15
184
402
234
168
26
1