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 Paths_BottleStory ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName ) where import Data.Version (Version(..)) import System.Environment (getEnv) version :: Version version = Version {versionBranch = [0,0,0], versionTags = []} bindir, libdir, datadir, libexecdir :: FileP...
konn/BottleStory
dist/build/autogen/Paths_BottleStory.hs
bsd-2-clause
1,224
0
10
144
280
161
119
22
1
{-| Module : Database.Relational.Alter Description : Definition of ALTER. Copyright : (c) Alexander Vieth, 2015 Licence : BSD3 Maintainer : aovieth@gmail.com Stability : experimental Portability : non-portable (GHC only) -} {-# LANGUAGE AutoDeriveTypeable #-} module Database.Relational.Alter ( AL...
avieth/Relational
Database/Relational/Alter.hs
bsd-3-clause
393
0
6
77
31
21
10
4
0
{-| Module : Game.GoreAndAsh.LambdaCube.Module Description : Internal implementation of public API of lambda cube game module Copyright : (c) Anton Gushcha, 2016-2017 Anatoly Nardid, 2016-2017 License : BSD3 Maintainer : ncrashed@gmail.com Stability : experimental Portability : POSIX Th...
Teaspot-Studio/gore-and-ash-lambdacube
src/Game/GoreAndAsh/LambdaCube/Module.hs
bsd-3-clause
12,602
0
26
2,446
3,109
1,574
1,535
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Main where import Trurl import SimpleParams import System.Environment help :: IO () help = do putStrLn "trurl <command> [parameters]" putStrLn " update -- fetch the updates from repository" putStrLn " new project <name> <project_template> [parameters] -- create proj...
dbushenko/trurl
src/Main.hs
bsd-3-clause
2,292
0
11
715
395
204
191
39
16
module Builder(test2, test) where import qualified Data.Sequence.Chunked.Builder as B import Data.Sequence.Chunked import Data.Monoid import qualified Data.Vector.Unboxed as V instance Unbox Double where defaultChunkSize _ = 128 test :: Int -> Seq Int test n = B.toSeq (stupidReplicate n 0) stupidReplicate :: In...
reinerp/chunked-sequence
examples/Builder.hs
bsd-3-clause
612
0
10
111
217
118
99
16
2
import Process import WhileParser import qualified Data.Map.Strict as Map import Text.Parsec (Parsec, runP) import Text.ParserCombinators.Parsec import Text.ParserCombinators.Parsec.Expr import Text.ParserCombinators.Parsec.Language import Control.Monad.State.Lazy import Control.Monad import System.IO showSymState :: ...
PiffNP/HaskellProject
src/REPL.hs
bsd-3-clause
5,224
0
21
3,362
956
504
452
64
9
{-- The newtype keyword The value constructor of a newtype must have exactly one field, and only one value constructor The newtype keyword in Haskell is made exactly for these cases when we want to just take one type and wrap it in something to present it as another type. In the actual libraries, ZipList a is define...
jamesyang124/haskell-playground
src/Chp112.hs
bsd-3-clause
6,836
0
8
1,412
69
49
20
7
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module Main where import Control.Lens hiding (elements) import qualified Data.Binary as B import qualified Data.ByteString as BS import qualifie...
iand675/hs-kafka
test/Main.hs
bsd-3-clause
14,408
0
15
3,459
2,860
1,552
1,308
323
1
import Data.Bits (setBit, testBit) robot :: Int -> Int -> Int -> Int robot _ 3 3 = 1 robot f x y = n + e + s + w where n | y > 0 && not (testBit f (x+4*(y-1))) = robot (setBit f (x+4*(y-1))) x (y-1) | otherwise = 0 e | x < 3 && not (test...
nikai3d/ce-challenges
hard/robot_movements.hs
bsd-3-clause
801
0
17
393
471
237
234
14
1
{-# LANGUAGE PolyKinds, DataKinds, TemplateHaskell, TypeFamilies, GADTs, TypeOperators, RankNTypes, FlexibleContexts, UndecidableInstances, FlexibleInstances, ScopedTypeVariables, MultiParamTypeClasses, OverlappingInstances #-} module Oxymoron.Scene.Mesh where import Data.Singletons import Data.Array.Repa h...
jfischoff/oxymoron
src/Oxymoron/Scene/Mesh.hs
bsd-3-clause
1,747
0
11
288
328
196
132
31
0
{-# LANGUAGE TemplateHaskell #-} module Game.Monsters.MGunnerGlobals where import Control.Lens (makeLenses) import Types makeLenses ''MGunnerGlobals initialMGunnerGlobals :: MGunnerGlobals initialMGunnerGlobals = MGunnerGlobals { _mGunnerSoundPain = 0 , _mGunnerSoundPain2 = 0 ...
ksaveljev/hake-2
src/Game/Monsters/MGunnerGlobals.hs
bsd-3-clause
537
0
6
183
83
52
31
14
1
{-# LANGUAGE PackageImports #-} module Numeric (module M) where import "base" Numeric as M
silkapp/base-noprelude
src/Numeric.hs
bsd-3-clause
96
0
4
18
17
13
4
3
0
{-# LANGUAGE ForeignFunctionInterface, BangPatterns, ScopedTypeVariables, TupleSections #-} module Main where import qualified Data.Vector.Storable as V import Data.Vector.Storable ((!)) import Bindings.SVM import Foreign.C.Types import Foreign.C.String import Foreign.Ptr import Foreign.ForeignPtr import qualified...
aleator/aleators-bindings-svm
example/SmokeTest.hs
bsd-3-clause
4,470
0
17
1,284
1,341
709
632
99
2
module Main where import Lib import Test.QuickCheck import Test.QuickCheck.Checkers import Test.QuickCheck.Classes import Data.Maybe main :: IO () main = do putStrLn "Excercises from Chapter 22: Reader" putStrLn "Some examples commented out in main function." putStrLn "Use 'stack ghci' to start ghci to play ar...
backofhan/HaskellExercises
CH22/app/Main.hs
bsd-3-clause
739
0
7
167
74
45
29
11
1
module Data.List.Zipper where import Data.Maybe (listToMaybe) data Zipper a = Zip ![a] ![a] deriving (Eq,Show) instance Functor Zipper where fmap f (Zip ls rs) = Zip (map f ls) (map f rs) -- | @empty@ is an empty zipper empty :: Zipper a empty = Zip [] [] -- | @fromList xs@ returns a zipper containin...
z0isch/lambda-hive
src/Data/List/Zipper.hs
bsd-3-clause
5,160
0
15
1,338
1,499
769
730
81
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : Text.CSL.Parser -- Copyright : (C) 2014 John MacFarlane -- License : BSD-style (see LICENSE) -- -- Maintainer : John MacFarlane <jgm@berke...
jgm/pandoc-citeproc
src/Text/CSL/Parser.hs
bsd-3-clause
17,223
0
18
6,325
4,302
2,246
2,056
353
11
-- Copyright (c) 2016 Eric McCorkle. All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditi...
emc2/chill
src/IR/Common/Transfer.hs
bsd-3-clause
9,810
4
19
2,807
2,665
1,427
1,238
180
2
{-# LANGUAGE CPP, RecordWildCards, OverloadedStrings #-} module OS.Win ( winOsFromConfig ) where import Control.Monad ( void, when ) import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as B8 import qualified Data.Text as T import Development.Shake import Development.Shake.FilePath #...
gbaz/haskell-platform
hptool/src/OS/Win.hs
bsd-3-clause
5,349
0
17
1,416
959
511
448
87
1
{-# LANGUAGE FlexibleInstances #-} module Playable( Playable(..) ) where class Playable a where sound :: a -> (Double,[Double]) instance Playable (Double,[Double]) where sound = id
alpheccar/HaskellViewer
Playable.hs
bsd-3-clause
194
6
9
38
69
41
28
7
0
module GmState where import Debug.Trace import Language import PrettyPrint import Parser import Utils runProg :: String -> String runProg = showResults . eval . compile . parse type GmState = ( GmCode , GmStack , GmHeap , GmGlobals , GmStats ) type GmCode = [Instruction] getCode :: GmState -> GmCod...
caasi/spj-book-student-1992
src/GmState.hs
bsd-3-clause
1,868
0
7
394
643
384
259
65
1
module Handler.Lists where import Import import Yesod.Form.Bootstrap3 import Database.Persist.Sql import qualified Data.Text as T import qualified Data.List as L listForm :: Text -> Text -> AForm Handler List listForm category username = List <$> areq textField (bfs ("Name" :: Text)) Nothing <*> areq hiddenField ...
Ulrar/cstodo
Handler/Lists.hs
bsd-3-clause
2,659
0
15
526
946
469
477
59
4
module Bench.Pos.Criterion.TxSigningBench ( runBenchmark ) where import Criterion.Main (Benchmark, bench, defaultConfig, defaultMainWith, env, whnf) import Criterion.Types (Config (..)) import Test.QuickCheck (generate) import Universum import...
input-output-hk/pos-haskell-prototype
lib/bench/Bench/Pos/Criterion/TxSigningBench.hs
mit
1,223
0
10
327
296
178
118
27
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-ml/gen/Network/AWS/MachineLearning/GetBatchPrediction.hs
mpl-2.0
10,117
0
23
2,269
1,508
892
616
168
1
module SwiftNav.SBP.Settings where import Control.Monad import Control.Monad.Loops import Data.Binary import Data.Binary.Get import Data.Binary.IEEE754 import Data.Binary.Put import Data.ByteString import Data.ByteString.Lazy hiding ( ByteString ) import Data.Int import Data.Word msgSettingsSave :: Word16 msgSettings...
kovach/libsbp
haskell/src/SwiftNav/SBP/Settings.hs
lgpl-3.0
3,189
0
9
476
684
360
324
-1
-1
{-# LANGUAGE DeriveAnyClass #-} module Haskus.Format.Elf.Dynamic ( RawDynamicEntry (..) , getRawDynamicEntry , putRawDynamicEntry , DynamicEntryFlag (..) , DynamicEntryFlags , DynamicEntryType (..) , DynamicStateFlag (..) , DynamicStateFlags , DynamicFeature (..) , DynamicFeatures , Dy...
hsyl20/ViperVM
haskus-system/src/lib/Haskus/Format/Elf/Dynamic.hs
bsd-3-clause
14,556
0
10
4,436
1,680
968
712
285
66
module Parser.InputChecker ( CodeString , nullCode , appendCode , isValidCode , isExit , toString ) where import Control.Monad.Trans.Writer.Lazy(runWriter, tell, Writer) data CodeString = CodeString { codes :: [String], parenthesesCount :: Int, inString :: Bool } deriving Show nullCode :: CodeString nu...
YuichiroSato/Scheme
src/Parser/InputChecker.hs
bsd-3-clause
1,854
0
11
366
760
404
356
45
2
{- The overall structure of the GHC Prelude is a bit tricky. a) We want to avoid "orphan modules", i.e. ones with instance decls that don't belong either to a tycon or a class defined in the same module b) We want to avoid giant modules So the rough structure is as follows, in (linearised) depend...
elieux/ghc
libraries/base/GHC/Base.hs
bsd-3-clause
41,476
187
46
10,932
6,451
3,630
2,821
397
2
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "Control/AutoUpdate.hs" #-} {-# LANGUAGE CPP #-} -- | In a multithreaded environment, running actions on a regularly scheduled -- background thread can dramatically improve performance. -- For example, web servers need to return the c...
phischu/fragnix
tests/packages/scotty/Control.AutoUpdate.hs
bsd-3-clause
8,177
0
19
2,272
814
463
351
65
3
-- Tuples definition. x = (1, "hello") y = ("pi", [ 1, 2, 3 ], 3.14, 1) -- Pairs. first = fst x second = snd x
M4573R/playground-notes
unfinished-courses/haskell-fundamentals/tuples.hs
mit
111
0
6
27
56
34
22
4
1
{-| Implementation of the Ganeti Query2 job queries. -} {- Copyright (C) 2012 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any ...
kawamuray/ganeti
src/Ganeti/Query/Job.hs
gpl-2.0
5,414
0
16
1,189
1,065
581
484
88
2
main = putStrLn "Fuck you Mendez."
DrItanium/thisisfreesoftware
thisisfreesoftware.hs
agpl-3.0
35
0
5
6
9
4
5
1
1
module SalsaAst where type Program = [Command] data Command = Rect Ident Expr Expr Expr Expr Colour Bool | Circ Ident Expr Expr Expr Colour Bool | Move Ident Pos | Toggle Ident | Par Command Command deriving (Show, Eq) data Pos = Abs Expr Expr |...
Rathcke/uni
ap/afl1/SalsaAst.hs
gpl-3.0
677
0
6
268
202
116
86
22
0
module TcTypeNats ( typeNatTyCons , typeNatCoAxiomRules , BuiltInSynFamily(..) , typeNatAddTyCon , typeNatMulTyCon , typeNatExpTyCon , typeNatLeqTyCon , typeNatSubTyCon , typeNatCmpTyCon , typeSymbolCmpTyCon ) where import Type import Pair import TcType ( TcType, tcEqType ) import TyCon ...
AlexanderPankiv/ghc
compiler/typecheck/TcTypeNats.hs
bsd-3-clause
21,398
0
18
5,879
6,687
3,518
3,169
481
3
undefined = undefined list :: a -> [a] list x = [x] map f [] = [] map f (x:xs) = (f x):(map f xs) succ :: Int -> Int succ x = undefined ones :: [] Int ones = 1:ones nats = 1:map succ nats
themattchan/tandoori
input/list.hs
bsd-3-clause
216
0
7
74
128
67
61
10
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Enum -- Copyright : (c) The University of Glasgow, 1992-2002 -- License : see libra...
tjakway/ghcjvm
libraries/base/GHC/Enum.hs
bsd-3-clause
30,077
0
15
8,302
7,762
4,159
3,603
-1
-1
{-# LANGUAGE ForeignFunctionInterface, EmptyDataDecls #-} {-| Ganeti-specific implementation of the Curl multi interface (<http://curl.haxx.se/libcurl/c/libcurl-multi.html>). TODO: Evaluate implementing and switching to curl_multi_socket_action(3) interface, which is deemed to be more performant for high-numbers of c...
apyrgio/snf-ganeti
src/Ganeti/Curl/Multi.hs
bsd-2-clause
8,411
0
19
1,947
1,636
833
803
-1
-1
module Mod180_A where data T = T x = T
urbanslug/ghc
testsuite/tests/module/Mod180_A.hs
bsd-3-clause
40
0
5
11
16
10
6
3
1
-- ------------------------------------------------------------------------------------- -- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved. -- For email, run on linux (perl v5.8.5): -- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0...
cbrghostrider/Hacking
HackerRank/Contests/ProjectEuler/010_summationOfPrimes.hs
mit
884
0
13
161
214
113
101
12
1
module Main where import Test.DocTest main :: IO () main = doctest ["lib/Control/Checkpointed.hs"]
danidiaz/checkpointed-pipeline
tests/doctests.hs
mit
101
0
6
15
30
17
13
4
1
module GHCJS.DOM.StorageQuota ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/StorageQuota.hs
mit
42
0
3
7
10
7
3
1
0
{-| Module: Octobunce.Types Description: Define types for the Octobunce IRC bot library Copyright: © 2014 Josh Holland License: MIT Maintainer: josh@inv.alid.pw Stability: experimental Portability: any -} module Octobunce.Types ( IrcMessage(..) , IrcCommand(..) , ) where import Data.Byt...
jshholland/octobunce
src/Octobunce/Types.hs
mit
2,885
0
9
1,201
491
289
202
78
0
{-# LANGUAGE Safe #-} module SMTLib2.PP where import Prelude hiding ((<>)) import SMTLib2.AST import Text.PrettyPrint import Numeric import Data.List(genericReplicate) class PP t where pp :: t -> Doc instance PP Bool where pp True = text "true" pp False = text "false" instance PP Integer where pp ...
yav/smtLib
src/SMTLib2/PP.hs
mit
5,906
0
21
2,102
2,226
1,051
1,175
145
1
import qualified ElfParser as ELF import qualified Data.ByteString as B import Arm.ArmType import Arm.Core import qualified Graphics.UI.Threepenny as UI import System.Environment import System.Exit (ExitCode(..), exitWith) import System.IO import System.Console.GetOpt import Graphics.UI.Threepenny.Core import...
mathk/arm-isa
Main.hs
mit
15,564
0
20
4,197
2,861
1,445
1,416
181
7
-- Problems/Problem092Spec.hs module Problems.Problem092Spec (main, spec) where import Test.Hspec import Problems.Problem092 main :: IO() main = hspec spec spec :: Spec spec = describe "Problem 92" $ it "Should evaluate to 8581146" $ p92 `shouldBe` 8581146
Sgoettschkes/learning
haskell/ProjectEuler/tests/Problems/Problem092Spec.hs
mit
272
0
8
51
73
41
32
9
1
{-# LANGUAGE DeriveGeneric #-} module FP15.Modules where import Text.PrettyPrint import GHC.Generics(Generic) import Control.DeepSeq import Data.Map.Strict(Map) import FP15.Disp import FP15.Name import FP15.Expr -- * Type Synonyms type FFixity = Fixity F type FlFixity = Fixity Fl -- * Compilation -- TODO belongs els...
Ming-Tang/FP15
src/FP15/Modules.hs
mit
4,291
0
11
1,249
1,218
649
569
96
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-stack-source.html module Stratosphere.ResourceProperties.OpsWorksStackSource where import Stratosph...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/OpsWorksStackSource.hs
mit
3,555
0
12
397
628
355
273
47
1
-- | -- Module : PhantomPhases.AST -- Copyright : © 2019 Elias Castegren and Kiko Fernandez-Reyes -- License : MIT -- -- Stability : experimental -- Portability : portable -- -- This module includes functionality for creating an Abstract Syntax Tree (AST), -- as well as helper functions for checking d...
kikofernandez/kikofernandez.github.io
files/monadic-typechecker/typechecker/src/PhantomPhases/AST.hs
mit
13,387
0
11
3,841
2,292
1,323
969
159
1
module Main where import Layer import Models import Numeric.LinearAlgebra import ImageProcess import Optimization import Trainer import Data.Vector.Storable (Vector, length, toList) main :: IO() main = do let inputLayer = linearLayerInit 2 2 let sigmoidLayer = sigmoidLayerInit 2 2 let outputLayer = line...
neutronest/vortex
vortex/Main.hs
mit
2,728
0
21
904
660
341
319
62
2
{-| Module: ConfigParser Description: Handles fetching and parsing of configuration information -} module ConfigParser ( getConfig, getCommands, getVerifiers, commandName, verifierName, verifierPrefix, buildCommandString, listArgs, Config, Command ) where import Data.List (sort, nub) da...
splondike/samesame
ConfigParser.hs
gpl-2.0
3,602
0
13
860
1,339
716
623
74
10
{-# LANGUAGE RankNTypes #-} module Main (main) where import qualified Graphics.UI.SDL as SDL import Shared.DrawingSimple import Shared.Input import Shared.Lifecycle import Shared.Polling import Shared.Utilities title :: String title = "lesson04" size :: ScreenSize size = (640, 480) inWindow :: (SDL.Window -> IO (...
Rydgel/haskellSDL2Examples
src/lesson04.hs
gpl-2.0
1,765
0
14
372
562
283
279
50
4
{- | Module : $Header$ Description : Signatures for the EnCL logic Copyright : (c) Dominik Dietrich, DFKI Bremen 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : dominik.dietrich@dfki.de Stability : experimental Portability : portable Types and functions for EnCL logic signatures -} ...
nevrenato/Hets_Fork
CSL/Sign.hs
gpl-2.0
6,499
0
13
2,007
1,533
814
719
115
3
{-| Module : Messages License : GPL Maintainer : helium@cs.uu.nl Stability : experimental Portability : portable Datatype to represent error messages. One abstraction is the datatype MessageBlock, which contains (atomic) pieces of information that are reported in the error...
roberth/uu-helium
src/Helium/StaticAnalysis/Messages/Messages.hs
gpl-3.0
6,478
0
13
2,282
1,612
861
751
130
1
{-# LANGUAGE CPP, FlexibleInstances, IncoherentInstances#-} module Time where -- Code from quickcheck-instances package import Test.QuickCheck import Test.QuickCheck.Function import qualified Data.Time as Time import qualified Data.Time.Clock.TAI as Time instance Arbitrary Time.Day where arbitrary = Time.Modif...
fcostantini/QuickFuzz
src/Time.hs
gpl-3.0
4,708
0
12
1,131
1,316
700
616
101
0
import Control.Applicative import System.Directory import System.Environment import System.Process import qualified Text.StringTemplate as ST render :: String -> [(String,String)] -> String render tmpl attribs = (ST.render . ST.setManyAttrib attribs . ST.newSTMP) tmpl strtmpl = "prospino {\n basedir = \"$basedir$\...
wavewave/lhc-analysis-collection
analysis/2013-07-26_prospino.hs
gpl-3.0
2,236
0
23
610
766
412
354
39
1
{- Copyright 2012 Dustin DeWeese This file is part of peg. peg 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 (at your option) any later version. peg i...
HackerFoo/peg
Peg/Monad.hs
gpl-3.0
5,208
0
18
1,808
2,060
1,015
1,045
122
3
{-# OPTIONS_GHC -fno-warn-orphans #-} module ArbitraryInstances where import qualified Data.ByteString.Char8 as B import qualified Data.Text as T import Food2ForkAPI import Test.QuickCheck import Control.Applicative instance Arbitrary B.ByteString where arbitrary = fmap B.pack arbitrary instance Arbitrary T.Te...
moosingin3space/dailymenu
tests/ArbitraryInstances.hs
gpl-3.0
817
0
14
282
150
84
66
23
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.CloudIOT.Ty...
brendanhay/gogol
gogol-cloudiot/gen/Network/Google/CloudIOT/Types/Product.hs
mpl-2.0
81,597
0
27
17,871
12,216
7,086
5,130
1,354
1
module RunAndParse (runAndParse) where import System.Process import Data.Attoparsec.ByteString.Char8 (eitherResult, parseWith) import Data.ByteString (hGetSome, empty) runAndParse parser cmd args = do (_,Just hIn,_,hProc) <- createProcess (proc cmd args){std_out = CreatePipe} out <- parseWith (hGetSome hIn 1024) ...
OH6AD/puputti
src/RunAndParse.hs
agpl-3.0
384
0
11
53
133
71
62
9
1
{- Habit of Fate, a game to incentivize habit formation. Copyright (C) 2019 Gregory Crosswhite This program is free software: you can redistribute it and/or modify it under version 3 of the terms of the GNU Affero General Public License. This program is distributed in the hope that it will be usef...
gcross/habit-of-fate
sources/library/HabitOfFate/Server/Requests/Api/RunGame.hs
agpl-3.0
1,288
0
9
218
126
77
49
16
1
-- Canvas.Hs, control javascript canvas with Haskell -- Copyright (C) 2013, Lennart Buit, Joost van Doorn, Pim Jager, Martijn Roo, -- Thijs Scheepers -- -- This library 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 Soft...
CanvasHS/Canvas.hs
canvashs-module/CanvasHs/Protocol/Input.hs
lgpl-2.1
6,652
0
41
2,040
1,583
875
708
107
4
{-# OPTIONS_GHC -Wall #-} -- !! WARNING: SPOILERS AHEAD !! -- -- CIS 194: Homework 10 module Homework10 where import Control.Applicative import Control.Arrow ( first ) import Data.Char -- A parser for a value of type a is a function which takes a String -- representing the input to be parsed, and succeed...
nilthehuman/cis194
Homework10.hs
unlicense
2,963
0
12
787
700
371
329
-1
-1
module FormalContext.Wrapper where import FormalContext.FormalContext import FormalContext.FormalContext2 import Data.Map import Data.List toFormalContext2 :: FormalContext g m -> FormalContext2 g m toFormalContext2 cxt@(FormalContext dom cod mat) = FormalContext2 (reverse $ sort dom) (reverse $ sort cod) rows cols...
francesco-kriegel/conexp-hs
src/FormalContext/Wrapper.hs
apache-2.0
514
0
11
81
165
89
76
10
1
-- Copyright (c) 2013-2015 PivotCloud, Inc. -- -- Aws.Kinesis.Client.Producer.Kit -- -- Please feel free to contact us at licensing@pivotmail.com with any -- contributions, additions, or other feedback; we would love to hear from -- you. -- -- Licensed under the Apache License, Version 2.0 (the "License"); you may -- n...
alephcloud/hs-aws-kinesis-client
src/Aws/Kinesis/Client/Producer/Kit.hs
apache-2.0
1,680
0
5
246
122
92
30
25
0
infixr 5 :-: data List a = Empty | a :-: (List a) deriving (Show, Read, Ord, Eq)
Oscarzhao/haskell
learnyouahaskell/infixr.hs
apache-2.0
81
0
8
18
45
25
20
2
0
import qualified Data.Map as Map a1 = [(1, "one"), (2, "two"), (3, "three")] mapFromL = Map.fromList a1 mapFold = foldl (\map (k, v) -> Map.insert k v map ) Map.empty a1 mapManual = Map.insert 2 "two" . Map.insert 3 "three" . Map.insert 1 "one" . Map.insert 4 "four" $ Map.empty
EricYT/real-world
src/chapter-13/buildmap.hs
apache-2.0
308
0
10
79
141
77
64
11
1
{-# LANGUAGE BangPatterns #-} module Distribution.Solver.Modular.Message ( Message(..), showMessages ) where import qualified Data.List as L import Prelude hiding (pi) import Distribution.Text -- from Cabal import Distribution.Solver.Modular.Dependency import Distribution.Solver.Modular.Flag import Distri...
themoritz/cabal
cabal-install/Distribution/Solver/Modular/Message.hs
bsd-3-clause
9,938
0
19
2,734
3,150
1,571
1,579
123
24
{-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | A Matrix - singly represented b...
tonyday567/tower
src/Tower/M.hs
bsd-3-clause
3,091
0
14
789
1,463
792
671
-1
-1
module Opaleye.Order (module Opaleye.Order, O.OrderSpec) where import qualified Opaleye.Column as C import Opaleye.QueryArr (Query) import qualified Opaleye.QueryArr as Q import qualified Opaleye.Internal.Order as O import qualified Database.HaskellDB.PrimQuery as HPQ orderBy :: O.OrderSpec a -> Query a ->...
k0001/haskell-opaleye
Opaleye/Order.hs
bsd-3-clause
755
0
9
132
297
156
141
17
1
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Concurrent import Data.Maybe import Data.ByteString.Lazy as B import Data.ByteString.Lazy.Char8 as C8 import Data.Serialize import qualified System.IO as IO import qualified ClientLib as CL import qualified Utils as Utils import qualified Lib as ...
ntindall/KVStore
client/Client.hs
bsd-3-clause
2,336
0
19
784
800
398
402
67
5
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[RnExpr]{Renaming of expressions} Basically dependency analysis. Handles @Match@, @GRHSs@, @HsExpr@, and @Qualifier@ datatypes. In general, all of these functions return a renamed thing, and a set of free variables. -} {-# LANGUAGE CPP, ScopedTyp...
fmthoma/ghc
compiler/rename/RnExpr.hs
bsd-3-clause
55,827
6
22
16,535
14,476
7,629
6,847
840
11
module Main where import Network.Skkserv import Text.InputMethod.SKK import Control.Applicative ((<$>)) import Control.Concurrent.STM (atomically, newTVarIO, readTVarIO) import Control.Concurrent.STM (writeTVar) import Data.String (fromString) import qualified Data...
konn/hskk
examples/simplesrv.hs
bsd-3-clause
1,003
0
16
264
312
165
147
27
1
module Gidl ( run ) where import Prelude () import Prelude.Compat import Data.Char import Data.Maybe (catMaybes) import Control.Monad (when) import System.Console.GetOpt import System.Directory import System.Environment import System.Exit import System.FilePath import Text.Show.Pretty import Ivory.Artifact impor...
GaloisInc/gidl
src/Gidl.hs
bsd-3-clause
6,912
0
23
2,003
2,144
1,120
1,024
172
8
module TwentyFour where import Control.Monad (guard) import Data.Function (on) import Data.List (groupBy, sortBy, tails, unfoldr, (\\)) import Data.Ord (comparing) newtype Package = Package { weight :: Int } deriving (Show, Eq, Ord) nGroups :: Int ->...
purcell/adventofcodeteam
app/TwentyFour.hs
bsd-3-clause
2,029
0
16
484
826
444
382
46
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Files.State where import Control.Exception import Data.Aeson import Data.Monoid ((<>)) import Data.Text (Text) import GHC.Generics instance T...
Evan-Zhao/FastCanvas
src/Files/State.hs
bsd-3-clause
3,458
0
14
910
929
485
444
73
1
{-# LANGUAGE OverloadedStrings #-} module Network.Kafka.Specs.Kafka.EndToEnd.KeepAliveProducerSpecs where import Control.Concurrent.MVar import Network.Kafka.Producer import Network.Kafka.Producer.KeepAlive import Network.Kafka.Types import Network.Kafka.Specs.IntegrationHelper import System.IO import System.Timeout im...
tcrayford/hafka
Network/Kafka/Specs/Kafka/EndToEnd/KeepAliveProducerSpecs.hs
bsd-3-clause
1,713
0
14
319
407
203
204
40
2
{-# LANGUAGE MultiParamTypeClasses #-} {-| Module : Idris.ASTUtils Description : This implements just a few basic lens-like concepts to ease state updates. Similar to fclabels in approach, just without the extra dependency. Copyright : License : BSD3 Maintainer : The Idris Community. This implements just a...
uuhan/Idris-dev
src/Idris/ASTUtils.hs
bsd-3-clause
5,476
0
12
1,120
1,223
678
545
74
2
module Examples.Example6 where import Examples.Utils(testC) import Graphics.UI.VE import ErrVal data Variant = VString String | VNumber Double | VArray [Variant] | VNUll deriving (Show) instance HasVE Variant where mkVE = mapVE (eVal.toVariant) fromVariant ( ...
timbod7/veditor
demo/Examples/Example6.hs
bsd-3-clause
1,049
0
14
364
340
174
166
26
1
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} module Network.IRC.ByteString.Parser ( -- |IRC message types ServerName, IRCMsg(..), UserInfo(..) -- |Conversion functions , toIRCMsg, fromIRCMsg -- |Attoparsec parser , ircLine ) where import Data.Attopa...
kallisti-dev/irc-bytestring
src/Network/IRC/ByteString/Parser.hs
bsd-3-clause
3,731
0
14
1,324
950
518
432
76
4
{-# LANGUAGE ScopedTypeVariables #-} module SMACCMPilot.GCS.Gateway.Serial ( serialServer ) where import Data.Word import qualified Data.ByteString as B import Data.ByteString (ByteString) import Control.Concurrent import Control.Concurrent.Async import Control.Mo...
GaloisInc/smaccmpilot-gcs-gateway
SMACCMPilot/GCS/Gateway/Serial.hs
bsd-3-clause
1,385
0
16
322
350
185
165
34
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE PostfixOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-or...
GaloisInc/tower-camkes-odroid
test/camera_vm/CameraVMTest.hs
bsd-3-clause
1,696
0
14
253
293
153
140
35
1
module Data.TTask.Types.Part ( projectsAllStory , stWait , stRunning , stFinished , stNotAchieved , stRejected , getLastStatus' , statusToList' ) where import Control.Lens import Data.Maybe import Data.TTask.Types.Types projectsAllStory :: Project -> [UserStory] projectsAllStory p = concat ...
tokiwoousaka/ttask
src/Data/TTask/Types/Part.hs
bsd-3-clause
1,113
0
8
190
341
184
157
36
1
----------------------------------------------------------------------------- -- | -- License : BSD-3-Clause -- Maintainer : Oleg Grenrus <oleg.grenrus@iki.fi> -- -- The Github Search API, as described at -- <http://developer.github.com/v3/search/>. module GitHub.Endpoints.Search( searchReposR, searchCod...
jwiegley/github
src/GitHub/Endpoints/Search.hs
bsd-3-clause
1,224
0
10
167
235
138
97
18
1
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable, FlexibleInstances, UndecidableInstances #-} module Sync.Base.Types ( Repo(..), Change(..), Action(..), Merged(..), Diff, Patch, Merge, RepoItem(..) ) where import Data.Map (Map) import qualified Data.Map as M -- | Named items newtype Repo k a = Repo {...
mvoidex/hsync
src/Sync/Base/Types.hs
bsd-3-clause
2,359
6
11
507
1,055
548
507
-1
-1
{-# LINE 1 "GHC.StaticPtr.hs" #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE ExistentialQuantification #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.StaticPtr -- Copyright : (C) 2014 I/O Tweag -- Li...
phischu/fragnix
builtins/base/GHC.StaticPtr.hs
bsd-3-clause
4,300
0
18
886
676
391
285
55
2
{-# 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 PingMulti00 where import Prelude hiding ((>...
gokhankici/symmetry
checker/tests/pos/PingMultiBaby00.hs
mit
995
0
21
255
331
175
156
25
1
{-------------------------------------------------------------------------------- Author: Daan Leijen Demo that shows how one can manipulate pixels directly in an image to do fast customized drawing. --------------------------------------------------------------------------------} module Main where import Graph...
jacekszymanski/wxHaskell
samples/contrib/PaintDirect.hs
lgpl-2.1
1,494
0
12
472
406
198
208
30
1
module Main where import qualified Network.Hackage.CabalInstall.Main as CabalInstall main :: IO () main = CabalInstall.main
FranklinChen/hugs98-plus-Sep2006
packages/Cabal/cabal-install/CabalInstall.hs
bsd-3-clause
126
0
6
17
31
20
11
4
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Editor -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- P...
siddhanathan/yi
yi-core/src/Yi/Editor.hs
gpl-2.0
30,549
0
23
8,891
7,012
3,689
3,323
-1
-1
module Lib2 where import Text.PrettyPrint.ANSI.Leijen printGreeting :: String -> IO () printGreeting greeting = putDoc $ text greeting <> linebreak
prezi/gradle-haskell-plugin
src/test-projects/test1/lib2/src/main/haskell/Lib2.hs
apache-2.0
150
0
7
22
44
24
20
4
1
module TestSbasics(tests) where import Test.HUnit import Database.HDBC import TestUtils import System.IO import Control.Exception openClosedb = sqlTestCase $ do dbh <- connectDB disconnect dbh multiFinish = dbTestCase (\dbh -> do sth <- prepare dbh "SELECT 1 + 1" sExecute sth [] finish s...
ryantm/hdbc-mysql
testsrc/TestSbasics.hs
lgpl-2.1
6,142
0
17
1,930
1,608
766
842
118
1
{-# LANGUAGE BangPatterns, FlexibleContexts, ScopedTypeVariables #-} module Ros.Node.RosTcp (subStream, runServer, runServers, callServiceWithMaster) where import Control.Applicative ((<$>)) import Control.Arrow (first) import Control.Concurrent (forkIO, killThread, newEmptyMVar, takeMVar, putMVar) import Control.Concu...
bitemyapp/roshask
src/Ros/Node/RosTcp.hs
bsd-3-clause
17,325
0
20
5,517
4,382
2,204
2,178
-1
-1
module PatternIn3 where sumSquares y =let x = 1 in (1 ^ pow) + sq y where sq 0=0 sq x=x^pow pow = 2
SAdams601/HaRe
old/testing/simplifyExpr/PatternIn3_TokOut.hs
bsd-3-clause
137
0
9
61
64
33
31
6
2
{-@ LIQUID "--no-termination" @-} {-@ LIQUID "--short-names" @-} {- LIQUID "--diff" @-} module KMP (search) where import Language.Haskell.Liquid.Prelude (liquidError, liquidAssert) import Data.IORef import Control.Applicative ((<$>)) import qualified Data.Map as M import Prelude hiding (map) {-@ type Up...
ssaavedra/liquidhaskell
tests/todo/kmpMonad.hs
bsd-3-clause
5,260
0
19
1,806
1,310
659
651
83
2
{-# LANGUAGE FlexibleInstances, ViewPatterns #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : Haddock.GhcUtils -- Copyright : (c) David Waern 2006-2009 -- License : BSD-like -- -- Maintaine...
adamse/haddock
haddock-api/src/Haddock/GhcUtils.hs
bsd-2-clause
8,294
0
17
1,667
2,462
1,266
1,196
149
3
module ShouldFail where data Test a = T a deriving( Show a, Read )
hferreiro/replay
testsuite/tests/deriving/should_fail/drvfail005.hs
bsd-3-clause
71
0
6
18
27
16
11
3
0
-- Copyright (C) 2013 Jorge Aparicio main :: IO() main = do contents <- readFile "018.in" let triangle = map (map read . words) $ lines contents :: [[Int]] print . maximum . foldl1 traverse $ triangle traverse :: [Int] -- previous row -> [Int] -- current row -> [Int] -- traversed row traverse p = trave...
japaric/eulermark
problems/0/1/8/018.hs
mit
467
0
14
104
227
120
107
13
1
divisors n = filter (\x -> n `mod` x == 0) [1..n-1] abundant x = (sum $ divisors x) > x maxSum = sum [1..28123] abundants = filter abundant [1..28123] abundantCombs = filter (<=28123) $ zipWith (+) abundants abundants answer = maxSum - (sum abundantCombs)
tamasgal/haskell_exercises
ProjectEuler/p023.hs
mit
256
0
9
45
131
70
61
6
1
module Stackage.Database ( module X ) where import Stackage.Database.Schema as X import Stackage.Database.Query as X import Stackage.Database.Types as X
fpco/stackage-server
src/Stackage/Database.hs
mit
161
0
4
27
36
26
10
5
0
{-# LANGUAGE GADTs, StandaloneDeriving,DeriveFunctor, TypeSynonymInstances, FlexibleInstances #-} module Main where import Context import Lang import Parse import Debug.Trace import Data.List import Data.Function import Data.Set (Set,member) import Control.Applicative import Control.Monad import qualified Data.Set as ...
jdublu10/toy_lang
src/Main.hs
mit
2,329
0
22
775
972
506
466
63
1
{-# LANGUAGE CPP #-} module GHCJS.DOM.Geolocation ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Geolocation #else module Graphics.UI.Gtk.WebKit.DOM.Geolocation #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WE...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/Geolocation.hs
mit
420
0
5
39
31
24
7
4
0