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 Util ( untilFixed , untilFixedBy , untilFixedM , mapFst , mapSnd , commonPrefix , replaceOne , replaceAll ) where -- Yields the result of applying f until a fixed point is reached. untilFixedBy :: (a -> a -> Bool) -> (a -> a) -> a -> a untilFixedBy eq f x = fst . head . filter (uncurry eq) $ zip (iterat...
akerber47/train
Util.hs
bsd-3-clause
1,785
0
14
573
776
416
360
40
2
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -F -pgmF htfpp #-} -- | test documents module Web.MangoPay.DocumentsTest where import Web.MangoPay import Web.MangoPay.TestUtils import Data.Default import Test.Framework import Test.HUnit (Assertion) import Data.Maybe (isJust, fromJust) import qualified Data.ByteStr...
prowdsponsor/mangopay
mangopay/test/Web/MangoPay/DocumentsTest.hs
bsd-3-clause
2,439
0
15
458
839
407
432
52
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} -- | This module provides some functions to use Linux -- terminals module Haskus.System.Linux.Terminal ( stdin , stdout , stderr , writeStr , writeStrLn , readChar ) where import Haskus.System.Linux.ErrorCode import Haskus.System.Linux....
hsyl20/ViperVM
haskus-system/src/lib/Haskus/System/Linux/Terminal.hs
bsd-3-clause
1,363
0
10
237
283
164
119
29
1
module Main where import Control.Monad import System.Exit (exitFailure) import System.Environment import L3.ParL import L3.ErrM import L3ToL2.Compile import L2.PrintL main :: IO () main = do args <- getArgs when (length args /= 1) $ do putStrLn "usage: filename" exitFailure ts <- liftM myLex...
mhuesch/scheme_compiler
src/L3ToL2/Main.hs
bsd-3-clause
561
0
12
164
182
86
96
22
2
{-# Language BangPatterns,FlexibleContexts,TypeFamilies #-} module Numeric.Utilities.GaussElimination {-( -- gaussElem )-} where import Control.Arrow((&&&)) import Data.Array.Repa as R import Data.Array.Repa.Unsafe as R import qualified Data.Vector as V impor...
felipeZ/OptimizationAlgorithms
Numeric/Utilities/GaussElimination.hs
bsd-3-clause
4,258
0
18
1,361
1,494
783
711
73
2
{-# LANGUAGE TypeFamilies #-} module Network.TwoPhase.STM where import Control.Applicative import Control.Concurrent.STM import Data.ByteString import Data.Map (Map) import qualified Data.Map as M import Network.TwoPhase type Message = (Addr STMNetwork, ByteString, Addr STMNetwork) data STMNetwork = STMNetwork (B...
qnikst/2pc-haskell
Network/TwoPhase/STM.hs
bsd-3-clause
1,104
0
14
220
391
206
185
25
1
{-# LANGUAGE RecordWildCards #-} module HLint(hlint, Suggestion, suggestionLocation, suggestionSeverity, Severity(..)) where import Control.Applicative import Control.Monad import System.Console.CmdArgs.Verbosity import Data.List import System.Exit import CmdLine import Settings import Report import Idea import Appl...
bergmark/hlint
src/HLint.hs
bsd-3-clause
5,099
2
21
1,272
1,514
758
756
108
6
-------------------------------------------------------------------------------- -- | The LLVM Metadata System. -- -- The LLVM metadata feature is poorly documented but roughly follows the -- following design: -- * Metadata can be constructed in a few different ways (See below). -- * After which it can either be attach...
ekmett/ghc
compiler/llvmGen/Llvm/MetaData.hs
bsd-3-clause
3,383
0
8
720
258
162
96
18
0
module Util.Handlebars ( module Util.JSON , compile , render , render' , Collection ) where import UHC.Ptr import Util.JSON import Util.String compile :: forall a. String -> IO (Ptr a -> IO PackedString) compile source = __compile (pack source) >>= return . __mkFun render :: (ToJSON a) => (P...
johanneshilden/liquid-epsilon
Util/Handlebars.hs
bsd-3-clause
882
5
11
194
336
173
163
-1
-1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} -- | Common types for actions module VK.API.Actions.Types where import Data.List (stripPrefix) import Data.Maybe (fromMaybe, maybeToList) import qualified Data.Text as T import GHC.Generic...
eryx67/vk-api
src/VK/API/Actions/Types.hs
bsd-3-clause
8,527
0
14
2,937
1,713
932
781
215
0
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE TypeFamilies #-} -- --------------------------------------------------------------------------- -- | -- Module : Data.Vector.Algorithms.Search -- Copyright : (c) 2009-2015 Dan Doel, 2015 Tim Baumann -- Maintainer : Dan Doel <dan.doel@gmail.com> -- Stability : Experi...
tolysz/vector-algorithms
src/Data/Vector/Algorithms/Search.hs
bsd-3-clause
9,078
0
15
2,244
1,976
1,021
955
122
5
module Text.WikiEngine ( RenderCfg (..) , LinkType(..) , CodeRenderType(..) , defaultRenderCfg -- * parsed types , Block(..) , Inline(..) , parseDocument -- * renderer , renderAsHtml ) where import Text.WikiEngine.Configuration import Text.WikiEngine.HTML import Text.WikiEngine.Parse import Text.WikiEngine...
vincenthz/wikiengine
Text/WikiEngine.hs
bsd-3-clause
349
4
5
53
87
59
28
14
1
module BaseSpec where import Test.Hspec (Spec, describe, it, hspec) import Test.Hspec.HUnit () import Test.Hspec.Expectations main :: IO () main = hspec spec spec :: Spec spec = do describe "Prelude.head" $ do it "returns the first element of a list" $ do head [23 ..] `shouldBe` (23 :: Int) ...
jwiegley/script-template
test/BaseSpec.hs
bsd-3-clause
345
0
15
81
109
62
47
11
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PatternGuards #-} #if MIN_VERSION_base(4,9,0) {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Text.CSL.Proc.Disamb -- Copyright : (c) Andrea Rossato -- Licen...
adunning/pandoc-citeproc
src/Text/CSL/Proc/Disamb.hs
bsd-3-clause
18,750
0
19
6,508
5,754
2,990
2,764
308
15
module NoteScript ( module N ) where import NoteScript.LendingClub as N import NoteScript.Prosper as N import NoteScript.Syntax as N
WraithM/notescript
src/NoteScript.hs
bsd-3-clause
181
0
4
67
31
22
9
5
0
module Grid ( Grid , makeGrid , getSize , getRows , getCols , getCell , setCell , update -- Only functions are exported but not Data.Matrix module. -- These functions might not be used always. So no need to -- export module for that. It would be better to export it -- manually when it is needed. , toMatrix , fromMatrix...
wowofbob/gol
src/Grid.hs
bsd-3-clause
3,002
0
16
898
771
427
344
62
2
{-# LANGUAGE OverloadedStrings, TemplateHaskell #-} module Web.Slack.Types.Error where import Data.Aeson import Control.Lens.TH data SlackError = SlackError deriving Show makeLenses ''SlackError instance FromJSON SlackError where parseJSON = withObject "SlackError" (\_ -> return SlackError)
mpickering/slack-api
src/Web/Slack/Types/Error.hs
mit
299
0
9
39
67
38
29
8
0
{-# LANGUAGE TupleSections, ParallelListComp #-} -- | Convert the concrete syntax into the syntax of cubical TT. module Concrete where import Exp.Abs import qualified CTT as C import Pretty import Control.Applicative import Control.Arrow (second) import Control.Monad.Trans import Control.Monad.Trans.Reader import Co...
simhu/cubical
Concrete.hs
mit
9,974
2
17
2,155
4,142
2,134
2,008
210
6
{-# LANGUAGE CPP #-} import Control.Monad import Data.IORef import Control.Exception (SomeException, catch) import Distribution.Simple import Distribution.Simple.BuildPaths (autogenModulesDir) import Distribution.Simple.InstallDirs as I import Distribution.Simple.LocalBuildInfo as L import qualified Distribution.Simp...
Heather/Idris-dev
Setup.hs
bsd-3-clause
12,556
0
17
3,351
2,531
1,299
1,232
196
3
{-# LANGUAGE Rank2Types #-} module Yi.UI.Common where import System.Exit (ExitCode) {- | Record presenting a frontend's interface. The functions 'layout' and 'refresh' are both run by the editor's main loop, in response to user actions and so on. Their relation is a little subtle, and is discussed here: ...
noughtmare/yi
yi-core/src/Yi/UI/Common.hs
gpl-2.0
3,263
0
11
921
235
133
102
20
1
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Hooks.ScreenCorners -- Copyright : (c) 2009 Nils Schweinsberg, 2015 Evgeny Kurnevsky -- License : BSD3-style (see LICENSE) -- ...
CaptainPatate/xmonad-contrib
XMonad/Hooks/ScreenCorners.hs
bsd-3-clause
6,431
0
15
1,565
1,095
601
494
86
2
{-# LANGUAGE RankNTypes, TypeFamilies #-} -- Unification yielding a coercion under a forall module Data.Vector.Unboxed where import Control.Monad.ST ( ST ) import Data.Kind (Type) data MVector s a = MV data Vector a = V type family Mutable (v :: Type -> Type) :: Type -> Type -> Type type instance Mutable Vecto...
sdiehl/ghc
testsuite/tests/indexed-types/should_compile/T4120.hs
bsd-3-clause
719
0
8
168
150
90
60
-1
-1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} module Aws.Iam.Commands.DeleteUserPolicy ( DeleteUserPolicy(..) , DeleteUserPolicyResponse(..) ) where import Aws.Core import Aws.Iam.Core import Aws.Iam.Intern...
Soostone/aws
Aws/Iam/Commands/DeleteUserPolicy.hs
bsd-3-clause
1,647
0
9
357
255
148
107
31
0
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude, MagicHash #-} {-# OPTIONS_HADDOCK hide #-} module Take ( take0 , take ) where import Data.Maybe import GHC.Base import Language.Haskell.Liquid.Prelude (liquidAssert, liquidError) {-@ assert take0 :: n: {v: Int | 0 <= v} -> [a] -> {v:[a] ...
mightymoose/liquidhaskell
tests/pos/take.hs
bsd-3-clause
1,130
0
11
292
331
177
154
26
2
{-# LANGUAGE BangPatterns, OverloadedStrings #-} -- | -- Module: Data.Aeson.Parser -- Copyright: (c) 2012-2015 Bryan O'Sullivan -- (c) 2011 MailRank, Inc. -- License: Apache -- Maintainer: Bryan O'Sullivan <bos@serpentine.com> -- Stability: experimental -- Portability: portable -- -- Efficie...
abbradar/aeson
Data/Aeson/Parser.hs
bsd-3-clause
2,097
0
5
432
97
81
16
9
0
{-# LANGUAGE ConstraintKinds, TemplateHaskell, ExistentialQuantification #-} module Data.Cache.Types where import Data.Int (Int64) import Data.Map (Map) import Data.Typeable (Typeable, TypeRep) import qualified Control.Lens as Lens import qualified Data.ByteString as SBS type Key k = (Typeable k, Ord k) data Priorit...
sinelaw/lamdu
bottlelib/Data/Cache/Types.hs
gpl-3.0
1,293
0
10
270
418
228
190
38
1
module Resources ( GameData(..) , Glyph(..) , Lump(..) , loadPalette , loadSignon , loadGameData , module WL6 ) where import qualified Data.ByteString as B import qualified Data.Bitstream as BS import Data.Binary.Get import Data.Word im...
vTurbine/w3dhs
src/Resources.hs
mit
5,377
0
17
1,842
1,500
818
682
99
2
----------------------------------------------------------------------------- -- -- Module : Graphics.GPipe.Orphans -- Copyright : Tobias Bexelius -- License : MIT -- -- Maintainer : Tobias Bexelius -- Stability : Experimental -- Portability : Portable -- -- | -- Orphan boolean instances for linear ...
Teaspot-Studio/GPipe-Core
src/Graphics/GPipe/Orphans.hs
mit
687
0
4
104
28
24
4
2
0
{-# LANGUAGE CPP #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveGeneric #-} module Codec.Xlsx.Types ( -- * The main types Xlsx(..) , Styles(..) , DefinedNames(..) , ColumnsProperti...
qrilka/xlsx
src/Codec/Xlsx/Types.hs
mit
10,888
0
14
2,254
2,059
1,232
827
219
2
module Example15 where import qualified WeightedLPA as WLPA import Graph import qualified Data.Map as M import qualified Data.Set as S import Polynomial import LaurentPolynomial weighted_graph_F :: WeightedGraph String String weighted_graph_F = WeightedGraph (buildGraphFromEdges [("e",("v","u")),("f",("v","u")),("g"...
rzil/honours
LeavittPathAlgebras/Example15.hs
mit
2,186
0
10
338
839
449
390
46
1
{-# htermination filterFM :: (() -> b -> Bool) -> FiniteMap () b -> FiniteMap () b #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_filterFM_2.hs
mit
104
0
3
20
5
3
2
1
0
{-| Module : Language.Java.Lexer.Internal Description : Lexer for Java program. Copyright : (c) Evan Sebastian 2014 License : MIT Maintainer : evan.sebastian@u.nus.edu Stability : experimental Portability : GHC 7.8.2 This module defines lexer for Java program. Use lexJava to break a string into a list of...
evansb/jasper
src/Language/Java/Lexer.hs
mit
1,207
0
10
247
264
155
109
20
2
module Mish.Config where import Mish.HexagonalGrid data Config = Config { radius :: Radius , roomAttempts :: Int , minRoomRadius :: Int , maxRoomRadius :: Int , doubleConnectorChance :: Float } deriving Show defaultCon...
halvorgb/mish
src/Mish/Config.hs
mit
1,507
0
14
606
309
158
151
32
1
module Rebase.Data.ByteString.Lazy.Internal ( module Data.ByteString.Lazy.Internal ) where import Data.ByteString.Lazy.Internal
nikita-volkov/rebase
library/Rebase/Data/ByteString/Lazy/Internal.hs
mit
131
0
5
12
26
19
7
4
0
module Feature.AuthSpec where import Network.Wai (Application) import Network.HTTP.Types import Test.Hspec import Test.Hspec.Wai import Test.Hspec.Wai.JSON import PostgREST.Config.PgVersion (PgVersion, pgVersion112) import Protolude hiding (get) import SpecHelper spec :: PgVersion -> SpecWith ((), Application) sp...
steve-chavez/postgrest
test/Feature/AuthSpec.hs
mit
9,003
0
17
1,696
1,210
659
551
-1
-1
import Control.Applicative import Control.Monad import Data.List import System.IO rotate :: Int -> [a] -> [a] rotate _ [] = [] rotate n xs = zipWith const (drop n (cycle xs)) xs main :: IO () main = do n_temp <- getLine let n_t = words n_temp let n = read $ n_t!!0 :: Int let k = read $ n_t!!1 :: Int ...
nbrendler/hackerrank-exercises
array-left-rotation/Main.hs
mit
451
0
11
119
226
113
113
16
1
{-# LANGUAGE NoImplicitPrelude, ViewPatterns, DeriveDataTypeable #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DeriveGeneric #-} module Graphics.Caramia.Buffer.Internal where import Data.Data import qua...
Noeda/caramia
src/Graphics/Caramia/Buffer/Internal.hs
mit
3,087
0
14
926
482
275
207
58
0
{- Seth Brown 2014-12-13 GHC 7.8.3 sethbrown AT drbunsen DOT ORG Copyright 2014 Seth Brown. All rights reserved. data from: http://www.beeradvocate.com/lists/top/ $ runghc ba-top-breweries.hs < data.txt ====================================== Hill Farmstead Brewery,24 Brasserie Cantillon,11...
drbunsen/Beer-Advocate-Top-Breweries
ba-top-breweries.hs
mit
1,738
0
12
516
374
201
173
20
2
{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- A weaker version of State, where updates are restricted to addition for some -- monoid. module Philed.Control.Monad.Rec...
Chattered/PhilEdCommon
Philed/Control/Monad/Record.hs
mit
2,403
0
10
546
898
474
424
53
1
module WhenView.Process (process) where import Control.Monad (join) import WhenView.Stage1.Parser (entries) import WhenView.Stage1.Serializer (calTokens) import WhenView.Stage2.Parser (years) import WhenView.I18n (Months) import Text.ParserCombinators.Parsec (runParser, ParseError) import WhenView.Html (calendarPage) ...
zenhack/whenview
src/WhenView/Process.hs
mit
609
0
11
92
177
101
76
15
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} module Main where import Game.Halma.TelegramBot.CmdLineOptions import Game.Halma.TelegramBot.Controller (halmaBot) import Game.Halma.TelegramBot.Controller.BotM (evalGl...
timjb/halma
halma-telegram-bot/ServerMain.hs
mit
1,207
0
13
227
283
160
123
36
3
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE CPP #-} -- | Field functions allow you to easily create and validate forms, cleanly handling the uncer...
s9gf4ult/yesod
yesod-form/Yesod/Form/Fields.hs
mit
35,208
0
22
8,954
7,281
3,941
3,340
-1
-1
module Handler.Thread where import Authentification (isModeratorBySession, getValidNickBySession) import Captcha import CustomForms (postMForm) import Helper (minusToSpaces, updatePosts) import Import import Widgets (accountLinksW, postWidget, threadWidget) getThreadR :: Text -> Handler Html getThreadR title = do ...
cirquit/HaskellPie
HaskellPie/Handler/Thread.hs
mit
3,300
0
28
1,009
816
405
411
-1
-1
-- Ссылка на задание: https://gist.github.com/astynax/1eb88e195c4bab2b8d31d04921b18dd0 -- Это тоже самое задание, что в части 1, только сделанное прямо на занятии по-другому module Main where data Row a = Row a a a a data Color = Red | Blue data Field = Field (Row (Row (Maybe Color))) empty :: Field empty = ...
aquatir/remember_java_api
code-sample-haskell/typed_fp_basics_cource/02_function_in_haskell/task.hs
mit
981
0
12
292
296
156
140
29
1
-- | This module re-exports all you need in order to /read/ package -- databases and module info files created by compilers that use -- haskell-packages. -- -- If you are writing a compiler, i.e. a program that creates or writes -- package databases or module info files — then take a look at -- "Distribution.HaskellSui...
haskell-suite/haskell-packages
src/Distribution/HaskellSuite.hs
mit
624
0
5
88
42
31
11
5
0
module IHaskell.Eval.Util ( -- * Initialization initGhci, -- * Flags and extensions -- ** Set and unset flags. extensionFlag, setExtension, ExtFlag(..), setFlags, -- * Code Evaluation evalImport, isImportSafe, evalDeclarations, getType, -- * Pretty printing doc, ) where -- GHC imports....
aostiles/LiveHaskell
src/IHaskell/Eval/Util.hs
mit
7,996
0
17
1,874
1,764
903
861
142
6
{-| Module : Sivi.Interface.Misc Description : Miscellaneous functions Copyright : (c) Maxime ANDRE, 2015 License : GPL-2 Maintainer : iemxblog@gmail.com Stability : experimental Portability : POSIX -} module Sivi.Interface.Misc ( withColor , showLine , ...
iemxblog/sivi-haskell
src/Sivi/Interface/Misc.hs
gpl-2.0
863
0
9
228
244
125
119
17
1
quicksort :: (Ord a) => [a] -> [a] quicksort [] = [] quicksort (x:xs) = let smallerOrEqual = [a | a <- xs, a <= x] larger = [a | a <-xs, a > x] in quicksort smallerOrEqual ++ [x] ++ quicksort larger
shimanekb/Learn_Haskell
ch4/Quick.hs
gpl-2.0
271
0
11
115
123
64
59
6
1
{-# LANGUAGE ScopedTypeVariables, NoMonomorphismRestriction, RecordWildCards #-} module Main where import Control.Applicative import Control.Monad import Control.Monad.Error import Control.Monad.Reader import Control.Monad.State import Data.Conduit import...
wavewave/lhc-analysis-collection
exe/evchainRunLeptoQuark.hs
gpl-3.0
5,763
0
20
1,698
1,443
823
620
139
2
module Sound.Tidal.MIDI.Prophet08 where import Sound.Tidal.Params import Sound.Tidal.MIDI.Control prophetController :: ControllerShape prophetController = ControllerShape { controls = [ mCC osc1_frequency_p 20, mCC osc1_freq_fine_p 21, mCC osc1_shape_p 22, mCC osc1_glide_p 23, mCC osc2_frequency_p 24, mCC osc2_...
tidalcycles/tidal-midi
Sound/Tidal/MIDI/Prophet08.hs
gpl-3.0
3,632
82
8
483
1,355
706
649
86
1
module Qual4 where import Qual1 as Q f :: Int f = 2 (/**) :: a -> Int -> Int _ /** z = 2 * g * z -- 12 * z where g = 3 * k -- 6 where k = 2 infixr 5 /** data Listt3 a = a :>>< (Qual4.Listt3 a) | Emptyy listtest :: Q.Listt3 Prelude.Int listtest = (Q.f Q./** 5) Q.:...
Helium4Haskell/helium
test/exports/Qual4.hs
gpl-3.0
531
0
9
199
190
106
84
-1
-1
module Import.NoFoundation ( module Import ) where import ClassyPrelude.Yesod as Import import Model as Import import EarlyModel as Import import Settings as Import import Settings.StaticFiles as Import import Yesod.Auth as Import import Yesod.Core.Types ...
tmcl/katalogo
backend/sqlite/Import/NoFoundation.hs
gpl-3.0
406
0
5
111
70
51
19
10
0
{-# LANGUAGE ForeignFunctionInterface #-} module MainWrapper where import Main (main) foreign export ccall "haskell_main" main :: IO ()
CGenie/haskell-snake
driver/MainWrapper.hs
gpl-3.0
137
0
7
19
30
18
12
4
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/FhirStores/TestIAMPermissions.hs
mpl-2.0
7,410
0
16
1,444
791
467
324
126
1
{-# LANGUAGE KindSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {- | Module : $Header$ Description : Timespan law enforcers. See /docs/LAWS.txt. Copyright : (c) plaimi 2014 License : AGPL-3 Maintainer : tempuhs@plaimi.net -} module Tempuhs.Server.Laws.Timespan...
plaimi/tempuhs-server
src/Tempuhs/Server/Laws/Timespan.hs
agpl-3.0
3,071
0
15
738
849
453
396
80
3
{--License: license.txt --} {-# LANGUAGE RecordWildCards #-} module CCAR.Main.GroupCommunication (ClientState(..) , createClientState , ClientIdentifierMap(..) , processSendMessage , getMessageHistory , DestinationType(..) , testMessages , ClientIdentifier ) where import Yesod.Core import Con...
asm-products/ccar-websockets
CCAR/Main/GroupCommunication.hs
agpl-3.0
6,323
16
18
1,850
1,540
845
695
-1
-1
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances, MultiParamTypeClasses, Rank2Types, FlexibleContexts, NoMonomorphismRestriction, CPP #-} -- | Parser based on <http://www.lua.org/manual/5.2/manual.html#9> module GLua.Parser where import GLua.TokenTypes import GLua.A...
FPtje/LuaAnalysis
analysis/src/GLua/Parser.hs
lgpl-2.1
20,477
0
40
5,661
5,024
2,624
2,400
284
4
module Main ( main ) where import Test.Framework (defaultMain) import qualified Mower.Core.Tests main :: IO () main = defaultMain [ Mower.Core.Tests.tests ]
mdulac/mower-haskell
tests/TestSuite.hs
lgpl-3.0
175
0
7
40
51
31
20
7
1
module Quizz.Core ( Proposition(Proposition), isValid, content, Question(Question), title, propositions, Answers(Answers), answers, Corrections(Corrections), corrections, Correction(Correct, Wrong, Missed, NotCheckedNotAnswer), correct ) where data Proposition = Proposi...
blackheaven/quizz.hs
src/Quizz/Core.hs
unlicense
1,216
0
9
325
339
201
138
33
1
{-# LANGUAGE PolyKinds #-} {-# LANGUAGE UndecidableInstances #-} module Type.Sequence where import Prelude import GHC.TypeLits type family Succ (a :: k) :: k type instance Succ (a :: Nat) = a + 1 type family Empty :: k type instance Empty = '[] type family Zero :: k type instance Zero = 0 type family Range...
wdanilo/typelevel
src/Type/Sequence.hs
apache-2.0
518
0
9
119
171
103
68
-1
-1
import Controller (withYwitter) import Network.Wai.Handler.Warp (run) main :: IO () main = withYwitter $ run 3000
tanakh/Ywitter
production.hs
bsd-2-clause
115
2
7
17
51
25
26
4
1
module Stats (statsMiddleware) where import Prelude import Control.Concurrent import Control.Concurrent.STM import qualified Network.Wai as Wai import qualified Data.ByteString.Char8 as BC import Data.Maybe import Data.Map (Map) import qualified Data.Map as Map import Control.Monad import Control.Monad.Trans (liftIO) ...
jannschu/bitlove-ui
Stats.hs
bsd-2-clause
2,832
1
18
821
852
433
419
75
2
{-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE RoleAnnotations #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE Unsafe #-} module Concurrent.Primitive.Ref ( -- * Primitive References PrimRef(..) , newPrimRef , newPinnedPrimRef , newAlignedPinnedPrimRef , readPrimRef , writePrimRef , p...
ekmett/concurrent
src/Concurrent/Primitive/Ref.hs
bsd-2-clause
9,700
0
11
1,588
2,209
1,143
1,066
139
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} module Playlistach.Soundcloud (searchTracks, getStreamUrl) where import Data.Coerce import Data.Aeson import Control.Monad (mzero) import Control.Monad.Trans.Either (EitherT...
aemxdp/playlistach
backend/Playlistach/Soundcloud.hs
bsd-3-clause
1,856
0
12
515
458
256
202
42
1
{-# LANGUAGE OverloadedStrings #-} module MySQL.Token where import qualified Data.ByteString as BS import Data.List (intersperse) -- | MySQL tokens data LToken = LTokAdd -- ADD (R) | LTokAll -- ALL (R) | LTokAlter -- ALTER (R) | LTokAnd ...
sukwon0709/mysql
src/MySQL/Token.hs
bsd-3-clause
11,494
0
8
5,388
1,760
1,033
727
266
0
module Main where import Folly.DSL import Folly.TPTP import Control.Monad import Control.Applicative p = predicate "p" q = predicate "q" s = relation "s" [a,b,c,d] = map (satsbokstav . return) "abcd" main :: IO () main = zipWithM_ writeTPTP [ "test" ++ show i ++ ".p" | i <- [0 :: Integer ..] ] [ [ axiom' $...
danr/folly
examples/Test.hs
bsd-3-clause
1,060
0
13
377
516
280
236
24
1
{-# LANGUAGE QuasiQuotes #-} import LiquidHaskell import Language.Haskell.Liquid.Prelude data Pair a = P a Int | D a Bool goo z = P z z baz = goo 10
spinda/liquidhaskell
tests/gsoc15/unknown/pos/adt0.hs
bsd-3-clause
158
0
6
38
52
29
23
6
1
-- Copyright 2011 Wu Xingbo -- LANGUAGE {{{ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DoAndIfThenElse #-} -- }}} -- module export {{{ module Eval.DServ ( aHandler, ioaHandler, AHandler, IOHandler, DServerInfo(..), DService(..), DServerDat...
wuxb45/eval
Eval/DServ.hs
bsd-3-clause
13,891
0
21
3,128
4,431
2,288
2,143
320
6
module Main where import Prelude hiding (splitAt,lines,words) import Data.Char import Data.String hiding (lines,words) import Data.Monoid import Data.Bifunctor import qualified Data.List (intersperse,splitAt) import qualified Data.List.Split as Split import qualified Data.Monoid.Factorial as SFM import Test.Tasty impo...
danidiaz/foldl-transduce
tests/tests.hs
bsd-3-clause
7,956
5
23
2,758
2,656
1,446
1,210
176
2
{-# LANGUAGE DataKinds , EmptyDataDecls , KindSignatures , Rank2Types , RecordWildCards #-} module Control.Monad.Trans.Ref.Integer ( Region , Ref , RefSupply , runRefSupply , RefSupplyT , runRefSupplyT , newRef , readRef , writeRef , modi...
sonyandy/unify
src/Control/Monad/Trans/Ref/Integer.hs
bsd-3-clause
3,984
0
12
960
1,542
815
727
-1
-1
module Main (main) where import Control.Monad import Data.Char import Data.List import System.Directory import System.Environment import System.Process -- | Take the arguments passed from the commandline and the filename of the -- Shakefile, then execu...
norm2782/shake-bin
src/Main.hs
bsd-3-clause
1,034
0
10
230
190
103
87
16
1
-- 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. {-# LANGUAGE GADTs #-} module Duckling.Rules.AF ( defaultRules , langRules , localeRules ) where impor...
facebookincubator/duckling
Duckling/Rules/AF.hs
bsd-3-clause
1,244
0
9
196
408
216
192
31
1
{-# LANGUAGE OverloadedStrings #-} module HCSV.CSV where import Prelude hiding (takeWhile) import qualified Data.ByteString as BS import Control.Applicative ((<|>), (<*), (*>), many) import Data.Attoparsec import Data.Attoparsec.Combinator import Data.Conduit import ...
thsutton/hcsv
src/HCSV/CSV.hs
bsd-3-clause
1,882
0
13
423
500
276
224
38
2
{-# LANGUAGE PackageImports #-} module Main (main) where import Control.Applicative ((<$>)) import Control.Monad (void, forever) import "monads-tf" Control.Monad.State (StateT(..), runStateT, liftIO) import Control.Concurrent (forkIO) import System.Environment (getArgs) import Network (listenOn, accept) import "crypt...
YoshikuniJujo/forest
subprojects/tls-analysis/server/runServer.hs
bsd-3-clause
758
0
12
119
279
160
119
20
1
{-# LANGUAGE TupleSections #-} module RandMonadT where -- base import Control.Monad.IO.Class import Control.Applicative import Control.Monad -- transformers import Control.Monad.Trans.Class -- primitive import Control.Monad.Primitive (PrimState) -- mwc-random import qualified System.Random.MWC as R newtype Ran...
kgadek/evil-pareto-tests
src/RandMonadT.hs
bsd-3-clause
1,135
1
12
248
456
249
207
27
1
{-# LANGUAGE JavaScriptFFI, GeneralizedNewtypeDeriving, FlexibleInstances, UndecidableInstances #-} module GHCJS.Three.Material ( Material(..), mkMaterial, IsMaterial(..), MaterialRenderFace, materialFrontSide, materialBackSide, materialDoubleSide, MeshBasicMaterial(..), mkMeshBasicMaterial, setWireFrame, s...
manyoo/ghcjs-three
src/GHCJS/Three/Material.hs
bsd-3-clause
8,769
138
10
1,416
1,963
1,049
914
164
2
-- | Parsing all context-free grammars using Earley's algorithm. module Text.Earley ( -- * Context-free grammars Prod, terminal, (<?>), Grammar, rule , -- * Derived operators satisfy, token, namedToken, list, listLike , -- * Deprecated operators symbol, namedSymbol, word , -- * Parsing Report(.....
sboosali/Earley
Text/Earley.hs
bsd-3-clause
489
0
5
95
99
69
30
10
0
-- | -- Module : Crypto.Hash.MD5 -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- -- Module containing the binding functions to work with the -- MD5 cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE...
tekul/cryptonite
Crypto/Hash/MD5.hs
bsd-3-clause
1,430
0
10
353
284
160
124
28
0
module Language.GroteTrap.Range ( -- * Types Pos, Range, Ranged(..), -- * Utility functions distRange, inRange, includes, unionRange, size, validRange ) where -- | A @Pos@ is a position in between two elements in a list. For example, position @0@ marks the beginning of the list, and position @length lis...
MedeaMelana/GroteTrap
Language/GroteTrap/Range.hs
bsd-3-clause
2,122
65
8
504
534
306
228
28
1
{-# LANGUAGE CPP, MagicHash, UnboxedTuples, ForeignFunctionInterface, GHCForeignImportPrim, UnliftedFFITypes #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Trustworthy #-} #endif module Control.ChunkedTL2.STM ( readTVar, writeTVar, atomically, STM(..), printStats, newTVar, module Control....
ml9951/ghc
libraries/pastm/Control/ChunkedTL2/STM.hs
bsd-3-clause
1,748
0
12
428
639
341
298
-1
-1
module Web.Client.Capacity.Internal ( ) where
athanclark/client-capacity
src/Web/Client/Capacity/Internal.hs
bsd-3-clause
54
0
3
13
11
8
3
2
0
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Lens hiding (children) import Graphics.Svg import Linear.V2 import VirtualHom.Element import VirtualHom.Html hiding (content, main) import VirtualHom.Rendering(renderingOptions) import VirtualHom.Bootstrap(container, row, btnDefault) import VirtualHo...
j-mueller/iso-svg
examples/simple/Main.hs
bsd-3-clause
774
0
16
160
265
140
125
-1
-1
module Pos.Infra.Communication.Relay.Util ( expectInv , expectData ) where import Universum import Pos.Infra.Communication.Relay.Types (RelayError (UnexpectedData, UnexpectedInv)) import Pos.Infra.Communication.Types.Relay (DataMsg, InvMsg, ...
input-output-hk/pos-haskell-prototype
infra/src/Pos/Infra/Communication/Relay/Util.hs
mit
654
0
9
185
188
103
85
16
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE OverloadedStrings #-} module Language.LSP.Test.Files ( swapFiles , rootDir ) where import Language.LSP.Types import Language.LSP.Types.L...
alanz/haskell-lsp
lsp-test/src/Language/LSP/Test/Files.hs
mit
4,962
6
17
1,151
1,499
755
744
-1
-1
{-# Language RebindableSyntax #-} {-# Language TypeOperators #-} {-# Language FlexibleContexts #-} {-# Language ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module PingMulti02 where import Prelude hiding ((>...
abakst/symmetry
checker/tests/pos/PingMulti02.hs
mit
1,069
0
22
322
333
174
159
29
1
module Idris.REPL.Commands where import Idris.AbsSyntaxTree import Idris.Colours import Idris.Core.TT -- | REPL commands data Command = Quit | Help | Eval PTerm | NewDefn [PDecl] -- ^ Each 'PDecl' should be either a type declaration (at most one) or a clause defining the same na...
jmitchell/Idris-dev
src/Idris/REPL/Commands.hs
bsd-3-clause
2,668
0
8
1,273
443
267
176
74
0
module Control.Concurrent.MVar.YC ( modifyMVarPure, writeMVar ) where import Control.Applicative () import Control.Concurrent.MVar (MVar, modifyMVar_) modifyMVarPure :: MVar a -> (a -> a) -> IO () modifyMVarPure mvar = modifyMVar_ mvar . fmap return writeMVar :: MVar a -> a -> IO () writeMVar mvar = modifyMV...
yairchu/peakachu
src/Control/Concurrent/MVar/YC.hs
bsd-3-clause
341
0
8
61
120
64
56
8
1
-- ----------------------------------------------------------------------------- -- ALEX TEMPLATE -- -- This code is in the PUBLIC DOMAIN; you may copy it freely and use -- it for any purpose whatsoever. -- ----------------------------------------------------------------------------- -- INTERNALS and main scanner engi...
hvr/alex
templates/GenericTemplate.hs
bsd-3-clause
7,074
38
28
1,447
1,706
909
797
98
9
{-# OPTIONS -fno-warn-orphans #-} module Network.BitTorrent.Internal.ProgressSpec (spec) where import Control.Applicative import Test.Hspec import Test.QuickCheck import Network.BitTorrent.Internal.Progress instance Arbitrary Progress where arbitrary = Progress <$> arbitrary <*> arbitrary <*> arbitrary spec :: Spe...
DavidAlphaFox/bittorrent
tests/Network/BitTorrent/Internal/ProgressSpec.hs
bsd-3-clause
339
0
8
41
76
45
31
10
1
module Tuura.Library (Library, libraryFile, loadLibrary) where newtype Library = Library FilePath libraryFile :: Library -> FilePath libraryFile (Library file) = file loadLibrary :: FilePath -> Library loadLibrary = Library
allegroCoder/scenco-1
src/Tuura/Library.hs
bsd-3-clause
227
0
7
32
62
36
26
6
1
----------------------------------------------------------------------------- -- | -- Module : Window -- Copyright : (c) 2011-13 Jose A. Ortega Ruiz -- : (c) 2012 Jochen Keil -- License : BSD-style (see LICENSE) -- -- Maintainer : Jose A. Ortega Ruiz <jao@gnu.org> -- Stability : unstable...
tsiliakis/xmobar
src/Window.hs
bsd-3-clause
6,866
0
14
1,869
3,005
1,540
1,465
145
13
module Data.JSTarget.Op where import Prelude hiding (GT, LT) data BinOp = Add | Mul | Sub | Div | Mod | And | Or | Eq | StrictEq | Neq | StrictNeq | LT | GT | LTE | GTE | Shl | ShrL | ShrA | BitAnd | BitOr | BitXor deriving (Eq) instance Show BinOp where show Add ...
beni55/haste-compiler
src/Data/JSTarget/Op.hs
bsd-3-clause
1,653
0
6
624
522
278
244
78
1
{-# LANGUAGE ScopedTypeVariables , MultiParamTypeClasses , FlexibleInstances , FunctionalDependencies , FlexibleContexts , UndecidableInstances , KindSignatures , GADTs , OverlappingInstances , EmptyDataDecls , DeriveDataTypeable #-} module Control.Distributed.Process.Internal.Closure.Explicit ( ...
qnikst/distributed-process
src/Control/Distributed/Process/Internal/Closure/Explicit.hs
bsd-3-clause
5,218
0
12
1,204
1,517
829
688
-1
-1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, PatternGuards, TypeSynonymInstances #-} -- -------------------------------------------------------------------------- -- | -- Module : XMonad.Operations -- Copyright : (c) Spencer Janssen 2007 -- License : BSD3-s...
atupal/xmonad-mirror
xmonad/src/XMonad/Operations.hs
mit
24,176
0
23
6,286
7,202
3,664
3,538
362
4
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE PatternGuards #-} -- This is the runner for the package-tests suite. The actual -- tests are in in PackageTests.Tests module Main where import PackageTests.Options import PackageTests.PackageTester import PackageTests.Tests import Distribution.Simple.Configure ...
kolmodin/cabal
Cabal/tests/PackageTests.hs
bsd-3-clause
15,012
0
17
3,761
1,617
889
728
140
6
module IfFrom where {- map2 xs = map (if xs == [] then (+) else (-)) [ 1 ,2 .. 5] -} map2 xs = (case ((+), [1,2..5]) of (f, []) -> [] (f, (x : xs)) -> (f x) : (map (if xs == [] then (+) else (-)) [1,2 .. 5]))
SAdams601/HaRe
old/testing/generativeFold/IfFrom.hs
bsd-3-clause
287
0
15
131
119
72
47
5
3
module Main where import qualified MsgGen import qualified TopicTest import Test.Tasty main :: IO () main = do genTests <- MsgGen.tests defaultMain $ testGroup "roshask" [ testGroup "roshask executable" [ genTests ] , testGroup "roshask library" [ T...
bitemyapp/roshask
Tests/AllTests.hs
bsd-3-clause
342
0
12
109
77
42
35
11
1
import qualified Data.ByteString.Char8 as B import Parse import Gen main = do parseResult <- parseMsg "LaserScan.msg" let txt = case parseResult of Right msg -> generateMsgType msg Left err -> error err putStr (B.unpack txt) B.writeFile "LaserSc...
bitemyapp/roshask
src/executable/Test.hs
bsd-3-clause
330
0
13
112
92
44
48
9
2
module Bug (tst) where tst :: Float -> Bool tst x = truncate x > (0::Int)
urbanslug/ghc
testsuite/tests/codeGen/should_compile/T1916.hs
bsd-3-clause
74
0
6
16
39
22
17
3
1
-- re-exporting m2 outside of C(..) module Mod118_A( C(m1), m2) where class C a where m1 :: a -> Int m2 :: a -> Bool instance C Int where m1 _ = 1 m2 _ = True
urbanslug/ghc
testsuite/tests/module/Mod118_A.hs
bsd-3-clause
170
0
7
48
68
38
30
9
0