code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
{-# LANGUAGE FlexibleInstances #-} -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Ver...
jcgruenhage/dendrite
vendor/src/github.com/apache/thrift/lib/hs/src/Thrift/Transport/HttpClient.hs
apache-2.0
2,967
0
16
755
545
301
244
58
2
-- ------------------------------------------------------------------------------------- -- 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/Algorithms/Greedy/priyankaAndToys.hs
mit
739
0
17
187
151
82
69
9
2
-- | Helper functions for template Haskell, to avoid stage restrictions. module Strive.Internal.TH ( options , makeLenses ) where import Data.Aeson.TH (Options, defaultOptions, fieldLabelModifier) import Data.Char (isUpper, toLower, toUpper) import Data.Maybe (isJust) import qualified Language.Haskell.TH as TH i...
liskin/strive
library/Strive/Internal/TH.hs
mit
3,523
0
26
749
1,337
677
660
87
3
{-# htermination foldM :: Monad m => (a -> b -> m a) -> a -> [b] -> m a #-} import Monad
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Monad_foldM_2.hs
mit
90
0
3
24
5
3
2
1
0
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module with consumer properties types and functions. ----------------------------------------------------------------------------- module Kafka.Consumer.ConsumerProperties ( ConsumerProperties(..) ,...
haskell-works/kafka-client
src/Kafka/Consumer/ConsumerProperties.hs
mit
7,103
0
11
1,121
1,110
656
454
103
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TypeFamilies #-} -------------------------------------------------------------------- -- | -- Copyright : © Oleg Grenrus 2014 -- License : MIT -- Maintainer: Oleg Grenrus <oleg.grenrus@iki.fi> -- Stability : experimental -- Portability: non-portable -- ---------------...
phadej/boolean-normal-forms
src/Data/Algebra/Boolean/NormalForm.hs
mit
1,275
0
11
220
206
123
83
18
0
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE BangPatterns #-} -- | This module provides the ability to create reapers: dedicated cleanup -- threads. These threads will automatically spawn and die based on the -- presence of a workload to process on. Example uses include: -- -- * Killing long-running jobs -- ...
tolysz/wai
auto-update/Control/Reaper.hs
mit
10,059
0
16
2,456
1,369
770
599
106
4
import Control.Applicative import Text.Parsec import Text.Parsec.String (Parser) import Text.Parsec.Language (haskellStyle) import qualified Text.Parsec.Token as Tok data Expr = Add String String deriving Show lexer :: Tok.TokenParser () lexer = Tok.makeTokenParser style where ops = ["->","\\","+","*","-","="] ...
riwsky/wiwinwlh
src/parsec_applicative.hs
mit
747
0
8
143
266
140
126
26
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE QuasiQuotes #-} module Graphics.Urho3D.Resource.Cache( ResourceCache , resourceCacheContext , priorityLast , cacheAddResourceDir , cacheGetResource ) where import qualified Language.C.Inline as C import qualified Language.C.Inline.Cpp as C import Graphi...
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Resource/Cache.hs
mit
3,048
0
15
460
633
359
274
-1
-1
module Server.Swagger where import API import Servant.Swagger import Data.Swagger import Servant swaggerServer :: Handler Swagger swaggerServer = return (toSwagger basicApi)
lierdakil/markco
server/src/Server/Swagger.hs
mit
176
0
7
22
44
25
19
7
1
{-#LANGUAGE FlexibleContexts #-} {-#LANGUAGE FlexibleInstances #-} {-#LANGUAGE OverloadedStrings #-} {-#LANGUAGE TupleSections #-} {-#LANGUAGE TypeSynonymInstances #-} {-#LANGUAGE MultiParamTypeClasses #-} {-#LANGUAGE ScopedTypeVariables #-} module Text.Ginger.Run.FuncUtils where import Prelude ( (.), ($), (==), (/=) ...
tdammers/ginger
src/Text/Ginger/Run/FuncUtils.hs
mit
7,011
2
17
1,807
2,513
1,411
1,102
143
6
module Day3Spec (main, spec) where import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck import Test.QuickCheck.Property import Test.QuickCheck.Modifiers import Test.Hspec import Day3 main :: IO () main = hspec spec spec :: Spec spec = do describe "When Santa is alone" $ do it "visits only o...
AndrewSinclair/aoc-haskell
test/Day3Spec.hs
mit
1,203
0
14
277
292
142
150
32
1
module Optimization where import Numeric.LinearAlgebra class Optimize a where --optimizeInit :: a -> Double -> Double -> (Int, Int) -> a paramUpdate :: a -> a data SGD = SGD { sgdLearningRate :: Double, sgdDecay :: Double, sgdMomentum :: Double, sgdParams :: [Matrix R], sgdGparams :: [Matrix R], sgd...
neutronest/vortex
vortex/Optimization.hs
mit
3,455
0
52
1,085
1,347
698
649
78
0
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-} {- | Module : ./Isabelle/Logic_Isabelle.hs Description : Isabelle instance of class Logic Copyright : (c) Till Mossakowski, Uni Bremen 2002-2004 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki...
gnn/Hets
Isabelle/Logic_Isabelle.hs
gpl-2.0
2,250
0
10
485
367
193
174
41
0
module Zepto.Primitives.HashPrimitives where import Control.Monad.Except import Data.Map (keys, elems, member, delete, fromList, toList) import Zepto.Types hashKVDoc :: String -> String hashKVDoc name = "get " ++ name ++ " from hashmap <par>hash</par>.\n\ \n\ params:\n\ - hash: the hashmap from which to get th...
zepto-lang/zepto
src/Zepto/Primitives/HashPrimitives.hs
gpl-2.0
3,055
146
15
637
1,268
664
604
-1
-1
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-} module Text.Pandoc2.Shared where import Text.Pandoc2.Definition import Data.Data import Data.Bits import Data.Char import Data.Monoid import qualified Data.Text.Encoding as E import qualified Data.ByteString.Char8 as B8 import Text.Parsec (SourcePos, sourceLine, s...
jgm/pandoc2
Text/Pandoc2/Shared.hs
gpl-2.0
5,933
0
14
2,085
1,858
981
877
138
29
module HEP.Automation.MadGraph.Dataset.Set20110516set4 where import HEP.Storage.WebDAV import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Model.ZpHFull import HEP.Automation.MadGra...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110516set4.hs
gpl-3.0
1,785
0
13
468
465
275
190
46
1
{-# LANGUAGE RecordWildCards #-} module Sara.Parser.PrettyPrinter ( Pretty , pretty , prettyRender) where import qualified Sara.Parser.Keywords as K import Text.PrettyPrint import Sara.Ast.Types import Sara.Ast.Operators import Sara.Ast.Syntax as S prettyRender :: Pretty a => a -> String prettyRender = render ...
Lykos/Sara
src/lib/Sara/Parser/PrettyPrinter.hs
gpl-3.0
5,810
0
12
1,842
1,627
808
819
104
3
{-# LANGUAGE FlexibleInstances #-} -- | parse profile file generated by @+RTS -p@ module GHC.ProfileAnalyzer.ParseProfile ( -- * function readProfile ) where import Control.Applicative ((<*), (*>)) import Control.Monad import Data.Char import Data.List (sortBy) import Data.Monoid imp...
shnarazk/profileAnalyzer
GHC/ProfileAnalyzer/ParseProfile.hs
gpl-3.0
2,211
0
16
473
780
397
383
58
3
{-# 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/RegionInstanceGroups/List.hs
mpl-2.0
7,833
0
20
1,699
833
497
336
123
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.Route53.Types.Product -- ...
olorin/amazonka
amazonka-route53/gen/Network/AWS/Route53/Types/Product.hs
mpl-2.0
44,112
0
20
9,576
7,455
4,339
3,116
720
1
{-# LANGUAGE OverloadedStrings #-} module Experimental.Database where import Experimental.Data.Card type Database = [Card] database :: IO Database database = readSets "db/cards/sets" findByName :: String -> Database -> Database findByName name = filter (\card -> cName card == name) findBySet :: String -> Database ...
aspidites/vice-by-example
haskell/Experimental/Database.hs
agpl-3.0
383
0
9
60
116
63
53
10
1
module HEP.Jet.FastJet.Class.TObject ( TObject(..) , ITObject(..) , upcastTObject , newTObject ) where -- import HEP.Jet.FastJet.Class.Interface -- import HEP.Jet.FastJet.Class.Implementation () import HEP.Jet.FastJet.Class.TObject.RawType import HEP.Jet.FastJet.Class.TObject.Interface import HEP.Jet.F...
wavewave/HFastJet
oldsrc/HEP/Jet/FastJet/Class/TObject.hs
lgpl-2.1
357
0
5
43
60
45
15
9
0
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-| Module providing Bitcoin script evaluation. See <https://github.com/bitcoin/bitcoin/blob/master/src/script.cpp> EvalScript and <https://en.bitcoin.it/wiki/Script> -} module Network.Haskoin.Script.Evaluator ( -- * Script evaluation verifySpen...
plaprade/haskoin
haskoin-core/src/Network/Haskoin/Script/Evaluator.hs
unlicense
29,108
0
17
8,251
7,845
4,040
3,805
575
20
module Data.P440.Domain.APZ where import Data.P440.Domain.SimpleTypes import Data.P440.Domain.ComplexTypes import Data.Text (Text) -- 2.7 Отзыв инкассового поручения data Файл = Файл { идЭС :: GUID ,типИнф :: Text ,версПрог :: Text ,телОтпр :: Text ,должнОтпр :: Text ,ф...
Macil-dev/p440
src/Data/P440/Domain/APZ.hs
unlicense
1,197
50
8
303
500
274
226
33
0
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} ------------------------------------------------------------------------------ -- | This module defines our application's state type and an alias for its -- handler monad. module Ap...
santolucito/Peers
src/Application.hs
apache-2.0
1,096
0
11
148
169
98
71
23
0
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QGLWidget.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:32 Warning : this file is machine generated - do not...
uduki/hsQt
Qtc/Opengl/QGLWidget.hs
bsd-2-clause
70,417
0
15
11,708
23,771
12,088
11,683
-1
-1
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} module YesodDsl.ParserState (ParserMonad, initParserState, getParserState, getPath, getParsed, setParserState, runParser, pushScope, popScope, declare, declareClassInstances, declareGlobal, SymType(..), addClassInstances, Pa...
tlaitinen/yesod-dsl
YesodDsl/ParserState.hs
bsd-2-clause
16,297
1
20
4,512
5,554
2,831
2,723
344
4
module HSH.Evaluate where import HSH.CommandLineParse import HSH.ShellState import HSH.Exec import Control.Monad import Control.Monad.State import System.IO import qualified System.Environment as SysEnv import qualified System.Posix.Directory as Posix import qualified Data.Map as Map import Data.Maybe import Data....
jessekempf/hsh
src/HSH/Evaluate.hs
bsd-2-clause
2,746
0
11
561
683
344
339
61
3
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Type checking of type signatures in interface files -} {-# LANGUAGE CPP #-} module TcIface ( tcLookupImported_maybe, importDecl, checkWiredInTyCon, tcHiBootIface, typecheckIface, tcIfaceDecl, tcIf...
vTurbine/ghc
compiler/iface/TcIface.hs
bsd-3-clause
66,022
324
24
22,850
11,219
6,075
5,144
-1
-1
module Benchmarks.Day04 (benchmarks) where import Criterion (Benchmark, bench, nf) import Day04 import Text.Heredoc benchmarks :: [Benchmark] benchmarks = [ bench "findAdventCoin5" $ nf (findAdventCoin input) 5 , bench "findAdventCoin6" $ nf (findAdventCoin input) 6 ] input = [there|./inputs/Day04....
patrickherrmann/advent
bench/Benchmarks/Day04.hs
bsd-3-clause
325
0
9
58
97
56
41
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-| Module : Network.Spotify.Api.Types.Scope Description : OAuth scopes for the Spotify Web API Stability : experimental Scopes let you specify exactly what types of data your application wants to access, and the set of scopes you pass in your call determines what access perm...
chances/servant-spotify
src/Network/Spotify/Api/Types/Scope.hs
bsd-3-clause
3,257
0
15
580
388
234
154
46
1
import Test.Hspec (hspec) import ParseTest (parseSpecs) import GeometryTest (geometrySpecs) main :: IO () main = hspec $ do parseSpecs geometrySpecs
albertov/kml2obj
tests/main.hs
bsd-3-clause
155
0
7
26
52
28
24
7
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE QuasiQuotes #-} module Horbits.UI.Camera.Trace(logCamera, orthoCameraColatitudeDeg, orthoCameraLongitudeDeg) where import Control.Lens import Data.Foldable (mapM_) import Data.StateVar import Linear import ...
chwthewke/horbits
src/horbits/Horbits/UI/Camera/Trace.hs
bsd-3-clause
1,499
0
11
483
397
219
178
-1
-1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-| Module : Numeric.AERN.RealArithmetic.Basis.MPFR.FieldOps Description : rounded arithmetic instances for MPFR Copyright : (c) Michal Konecny License : BSD3 Maintainer : mikkonecny@gmail.com Stability : ex...
michalkonecny/aern
aern-mpfr-rounded/src/Numeric/AERN/RealArithmetic/Basis/MPFR/FieldOps.hs
bsd-3-clause
4,335
0
14
1,105
951
506
445
79
0
module Sexy.Instances.Nil.Function where import Sexy.Classes (Nil(..)) instance (Nil b) => Nil (a -> b) where nil = (\_ -> nil)
DanBurton/sexy
src/Sexy/Instances/Nil/Function.hs
bsd-3-clause
133
0
7
25
59
36
23
4
0
module Graphics.Gnuplot.Frame.OptionSet ( OptionSet.T, deflt, OptionSet.add, OptionSet.remove, OptionSet.boolean, OptionSet.addBool, size, title, key, keyInside, keyOutside, xRange2d, yRange2d, xRange3d, yRange3d, zRange3d, xLabel, yLabel, zLabel, xTicks2d, ...
kubkon/gnuplot
src/Graphics/Gnuplot/Frame/OptionSet.hs
bsd-3-clause
7,742
0
15
1,717
3,144
1,614
1,530
214
2
-- | -- This module reexports most of the types from \"containers\", -- \"unordered-containers\", \"array\", and \"vector\". No -- functions are exported. -- module Prelude.Containers.Types ( module E ) where -- array types import Data.Array as E (Array) import Data.Array.IArray as E (IArray) import Data.Array.IO ...
andrewthad/lens-prelude
src/Prelude/Containers/Types.hs
bsd-3-clause
953
0
5
167
246
170
76
19
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module Webcrank.Internal.ReqData where import Control.Applicative import Control.Lens import Control.Monad.State import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy as LB import qualified Data.HashMap.Strict as HashMap import D...
webcrank/webcrank.hs
src/Webcrank/Internal/ReqData.hs
bsd-3-clause
2,186
0
9
355
492
277
215
57
1
{-# LANGUAGE ScopedTypeVariables, GeneralizedNewtypeDeriving, TypeSynonymInstances, FlexibleInstances, OverlappingInstances #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.GridSelect -- Copyright : Clemens Fruhwirth <clemens@endorphin.org> -- Li...
MasseR/xmonadcontrib
XMonad/Actions/GridSelect.hs
bsd-3-clause
27,412
3
23
7,682
6,581
3,578
3,003
399
7
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.EXT.FogCoord -- Copyright : (c) Sven Panne 2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- -- ...
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/EXT/FogCoord.hs
bsd-3-clause
1,004
0
4
142
76
58
18
15
0
module Main where import System.Environment (getArgs) import Data.Either.Combinators (fromRight') import Text.Blaze.Html.Renderer.Pretty (renderHtml) import Parse (iParse, doc) import Semantics (semantic) import Compile (compile) main :: IO () main = do [f] <- getArgs s <- readFile f case iParse doc...
RoganMurley/dreamail
app/Main.hs
bsd-3-clause
436
0
14
98
153
83
70
14
2
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE TupleSections #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} module NeuroSpider.UiManager ( setupMenuToolBars , UiAction(..) ) where import BasicPrelude hiding (empty, on) import Data.Char (isUpper) import Data.Text (pack, unpack, toLower, breakOn) import Graphics.UI.Gt...
pavelkogan/NeuroSpider
src/NeuroSpider/UiManager.hs
bsd-3-clause
4,273
0
18
1,060
1,423
703
720
127
4
{-# LANGUAGE GeneralizedNewtypeDeriving, DoRec, ExistentialQuantification, FlexibleContexts #-} module TermSet2 where import Control.Arrow((***)) import Control.Monad.State import Control.Monad.Reader import qualified Data.IntMap as IntMap import Data.IntMap(IntMap) import Test.QuickCheck hiding (label) import Test.Qu...
jystic/QuickSpec
TermSet2.hs
bsd-3-clause
1,852
0
13
349
715
381
334
43
1
module Mud.Error ( MudError(..) , humanReadableMudError ) where import GHC.Conc.Signal data MudError = MudErrorNoConfigFound FilePath | MudErrorNotInMudDirectory | MudErrorUnreadableConfig String | MudErrorUnreadableHistory String | MudErrorNoRollbackPlanFound | MudErrorScriptFailure (Either Int Sig...
thoferon/mud
src/Mud/Error.hs
bsd-3-clause
1,037
0
10
173
203
106
97
25
8
module CorrectEmptyWhere where class X a where y :: a -> a y 2 = 2 class Y b where x :: b -> Int x _ = 2 main2 = 2 where main3 = 1 class Z z g :: Int -> Int g _ = 0
roberth/uu-helium
test/typeClassesParse/CorrectEmptyWhere.hs
gpl-3.0
201
0
7
84
91
48
43
-1
-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/2013-07-24-SimplifiedSUSYlepgluglu.hs
gpl-3.0
6,215
0
17
2,022
1,534
904
630
125
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-s3/gen/Network/AWS/S3/GetBucketNotificationConfiguration.hs
mpl-2.0
5,377
0
10
1,002
598
354
244
78
1
{-# LANGUAGE OverloadedStrings, GADTs, FlexibleInstances #-} module D3JS.Reify where import Data.Text (Text) import qualified Data.Text as T import D3JS.Type instance Reifiable Var where reify t = t instance Reifiable (Var' r) where reify (Var' name) = name instance Reifiable (Chain a b) where reify (Val name)...
nebuta/d3js-haskell
D3JS/Reify.hs
bsd-3-clause
2,648
2
12
504
1,275
650
625
57
1
{-# LANGUAGE GeneralizedNewtypeDeriving, CPP, TypeFamilies, FlexibleInstances, FlexibleContexts, DeriveDataTypeable, TypeOperators #-} import Development.Shake import qualified Development.Shake.Core as Core import Control.DeepSeq import Control.Monad.IO.Class import Data.Binary import Data.Binary.Get import Data.Bina...
batterseapower/openshake
tests/deserialization-changes/Shakefile-3.hs
bsd-3-clause
991
0
15
185
285
148
137
22
1
-------------------------------------------------------------------- -- | -- Module : Text.RSS1.Utils -- Copyright : (c) Galois, Inc. 2008 -- License : BSD3 -- -- Maintainer: Sigbjorn Finne <sof@galois.com> -- Stability : provisional -- Portability: -- --------------------------------------------------------------...
GaloisInc/feed
Text/RSS1/Utils.hs
bsd-3-clause
3,511
2
11
594
1,145
634
511
71
1
{- GTK 2.0 Tutorial: Chapter 2: Getting Started To run with GHCi: ghci GtkChap2a.hs To compile with GHC: ghc --make GtkChap2a.hs -o chap -} import Graphics.UI.Gtk main :: IO () main = do initGUI window <- windowNew windowSetTitle window "Step One" widgetShowAll window mainGUI {- Notes: 1) Watch t...
k0001/gtk2hs
docs/tutorial/Tutorial_Port/Example_Code/GtkChap2a.hs
gpl-3.0
400
0
7
92
51
24
27
8
1
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="sq-AL"> <title>Browser View | ZAP Extension</title> <maps> <homeID>top</homeID> <mapre...
0xkasun/security-tools
src/org/zaproxy/zap/extension/browserView/resources/help_sq_AL/helpset_sq_AL.hs
apache-2.0
974
80
66
160
415
210
205
-1
-1
-- | This module generates Netlist 'Decl's for a circuit graph. module Language.KansasLava.Netlist.Decl where import Language.KansasLava.Types import Language.Netlist.AST import Data.Reify.Graph (Unique) import Language.KansasLava.Netlist.Utils -- Entities that need a _next special *extra* signal. --toAddNextSignal...
andygill/kansas-lava
Language/KansasLava/Netlist/Decl.hs
bsd-3-clause
2,443
26
24
945
483
262
221
34
4
{-# LANGUAGE CPP, GeneralizedNewtypeDeriving #-} -------------------------------------------------------------------------------- -- | The LLVM Type System. -- module Llvm.Types where #include "HsVersions.h" import GhcPrelude import Data.Char import Data.Int import Numeric import DynFlags import FastString import...
shlevy/ghc
compiler/llvmGen/Llvm/Types.hs
bsd-3-clause
35,412
0
16
8,302
5,867
3,137
2,730
483
4
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} module IHaskell.Display.StaticCanvas (Canvas(..)) where import Data.Text.Lazy.Builder (toLazyText) import Data.Text.Lazy (unpack) import Data.Text (pack, Text) import System.IO.Unsafe import Control.Concurrent.M...
artuuge/IHaskell
ihaskell-display/ihaskell-static-canvas/src/IHaskell/Display/StaticCanvas.hs
mit
976
0
13
216
273
146
127
24
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE UnboxedSums #-} {-# OPTIONS_GHC -O2 #-} module Packed.Bytes.Stream.ST ( ByteStream(..) , empty , unpack , fromBytes ) where import Data.Primitive (Arr...
sdiehl/ghc
testsuite/tests/codeGen/should_run/T15038/src/Packed/Bytes/Stream/ST.hs
bsd-3-clause
1,853
0
18
375
698
392
306
48
2
{-@ LIQUID "--no-termination" @-} module Foo where data RBTree a = Leaf | Node Color !BlackHeight !(RBTree a) a !(RBTree a) deriving (Show) data Color = B -- ^ Black | R -- ^ Red deriving (Eq,Show) type BlackHeight = Int type RBTreeBDel a = (RBTree a, Bool) ---...
mightymoose/liquidhaskell
benchmarks/llrbtree-0.1.1/Data/Set/RBTree-mini-color.hs
bsd-3-clause
7,444
0
14
2,090
2,207
1,144
1,063
79
5
{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- experimental, not expected to work {- our goal: config = do add layout Full set terminal "urxvt" add keys [blah blah blah] -} {- ideas: composability! "only once" features like avoidStruts, ewmhDesktops -} module XMonad.Config.Monad where import XM...
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Config/Monad.hs
bsd-2-clause
1,188
0
10
247
362
203
159
23
1
{-| Module : Web.Facebook.Messenger Copyright : (c) Felix Paulusma, 2016 License : MIT Maintainer : felix.paulusma@gmail.com Stability : semi-experimental TODO: Explanation of this entire package (later) -} module Web.Facebook.Messenger ( module Web.Facebook.Messenger.Types ) where import Web.Fa...
Vlix/facebookmessenger
src/Web/Facebook/Messenger.hs
mit
343
0
5
60
25
18
7
3
0
{-# LANGUAGE FlexibleInstances #-} {- | Module : Language.Egison.EvalState Licence : MIT This module defines the state during the evaluation. -} module Language.Egison.EvalState ( EvalState(..) , initialEvalState , MonadEval(..) , mLabelFuncName ) where import Control.Monad.Except impor...
egison/egison
hs-src/Language/Egison/EvalState.hs
mit
1,515
0
12
338
428
224
204
41
1
{-# LANGUAGE CPP #-} module GHCJS.DOM.Element ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.Element #else module Graphics.UI.Gtk.WebKit.DOM.Element #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBK...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/Element.hs
mit
420
0
5
39
33
26
7
4
0
module GHCJS.Utils where import GHCJS.Foreign import GHCJS.Types foreign import javascript unsafe "console.log($1)" consoleLog :: JSRef a -> IO () foreign import javascript unsafe "(function() { return this; })()" this :: IO (JSRef a)
CRogers/stack-ide-atom
haskell/src/GHCJS/Utils.hs
mit
242
5
7
40
66
35
31
7
0
module Main where import Data.Monoid import Language.LambdaCalculus maybeFromEither :: Either x y -> Maybe y maybeFromEither (Left _) = Nothing maybeFromEither (Right x) = Just x -- | Read a lambda calclus example from file -- openExample :: String -> IO (Maybe Term) openExample ex = do conte...
owainlewis/lambda-calculus
src/Main.hs
mit
413
0
10
92
123
62
61
10
1
{-# LANGUAGE MultiParamTypeClasses, DataKinds, KindSignatures, TypeOperators, FlexibleInstances, OverlappingInstances, TypeSynonymInstances, IncoherentInstances #-} module Math.Matrix where import Math.Vec hiding (r,g,b,a,x,y,z,w) import qualified Math.Vec as V (r,g,b,a,x,y,z,w) import GHC.TypeLits type Matrix n m a...
davidyu/Slowpoke
hs/src/Math/matrix.hs
mit
9,345
0
24
3,397
4,885
2,519
2,366
-1
-1
{-# LANGUAGE LambdaCase #-} import Brainhack.Evaluator (emptyMachine, eval, runBrainState) import Brainhack.Parser (parse) import Control.Exception.Safe (SomeException) import Control.Monad (forM) import Data.Bifunctor (second) import Data.List (nub) import Data.Tuple.Extra ((&&&)) import NicoLang.Parser.Items (NicoTo...
aiya000/nico-lang
test/Spec.hs
mit
2,199
0
19
419
803
434
369
51
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE TypeApplications #-} {-# OPTIONS_GHC -O0 #-} {-# OPTIONS_GHC -fomit-interface-pragmas #-} module ZoomHub.Storage.PostgreSQL.GetRecent ( getRecent, ) where import Data.Binary (Word64) import Squeal.PostgreSQ...
zoomhub/zoomhub
src/ZoomHub/Storage/PostgreSQL/GetRecent.hs
mit
1,281
0
20
306
299
179
120
42
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.SQLResultSetRowList (js_item, item, js_getLength, getLength, SQLResultSetRowList, castToSQLResultSetRowList, gTypeSQLResultSetRowList) where import Prelude ((.), (==), (>>=), return, IO, Int,...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SQLResultSetRowList.hs
mit
1,715
14
8
199
434
269
165
26
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeSynonymInstances #-} import Prelude hiding (Functor, fmap, id) class (Category c, Category d) => Functor c d t where fmap :: c a b -> d (t a) (t b) type Hask = (->) instance Category Hask where id x = x (f . g) x = f (g x) instance Functor Hask Hask [] ...
riwsky/wiwinwlh
src/functors.hs
mit
379
4
10
92
183
96
87
12
0
module TemplateGen.TemplateContext ( TemplateContext(..) , mkTemplateContext ) where import qualified TemplateGen.Master as M import qualified TemplateGen.PageContext as PC import qualified TemplateGen.Settings as S import qualified TemplateGen.Url as U data TemplateContext = TemplateContext { pageTitle :: ...
seahug/seattlehaskell-org-static
src/lib/TemplateGen/TemplateContext.hs
mit
952
0
10
181
234
140
94
26
1
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Consensus.Log -- Copyright : (c) Phil Hargett 2014 ...
hargettp/raft
src/Data/Log.hs
mit
6,658
0
14
1,442
716
390
326
51
4
-- ------------------------------------------------------------------------------------- -- 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
codeJam/2014/elf/greedyElf.hs
mit
1,999
1
13
502
602
324
278
46
4
{-# LANGUAGE NoMonomorphismRestriction #-} import Diagrams.Prelude import Diagrams.Backend.SVG.CmdLine c1 = circle 0.5 # lw none # showOrigin c2 = circle 1 # fc orange c3 = circle 0.5 # fc steelblue # showOrigin diagram :: Diagram B diagram = (c1 ||| c2) === c3 main = mainWith $ frame 0.1 diagram
jeffreyrosenbluth/NYC-meetup
meetup/Atop5.hs
mit
304
0
7
57
105
54
51
9
1
{-# LANGUAGE TypeOperators #-} module Language.LSP.Server ( module Language.LSP.Server.Control , VFSData(..) , ServerDefinition(..) -- * Handlers , Handlers(..) , Handler , transmuteHandlers , mapHandlers , notificationHandler , requestHandler , ClientMessageHandler(..) , Options(..) , defau...
alanz/haskell-lsp
lsp/src/Language/LSP/Server.hs
mit
1,114
0
5
224
206
145
61
-1
-1
{-# LANGUAGE TemplateHaskell #-} module Shaders where import Data.FileEmbed import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BC import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Search as BSS import Graphics.Rendering.OpenGL.GL.Shaders.ShaderObjects passthro...
hesiod/xenocrat
src/exec/Shaders.hs
gpl-3.0
1,181
0
8
103
245
157
88
18
1
{-# language LambdaCase, OverloadedStrings, ScopedTypeVariables #-} module HMail.Brick.MailBoxView ( handleEvent , draw , updateMailBoxView ) where import HMail.Types import HMail.ImapMail import HMail.Header import HMail.Brick.EventH import HMail.Brick.Widgets import HMail.Brick.Util import HMail.Brick.ViewSwitchin...
xaverdh/hmail
HMail/Brick/MailBoxView.hs
gpl-3.0
3,910
0
22
1,024
1,384
715
669
-1
-1
module Main where import ClassyPrelude import Reviewer.Entity import Reviewer.EntityType import Reviewer.Database makeEntity :: EntityType -> Text -> Entity makeEntity goodOrBad text = Entity { _entityText = text , _entityType = goodOrBad , _entityEncounters = [] } toEntities :: (MonadIO m, Functor m) => F...
pmiddend/reviewer
src/Reviewer/Importer.hs
gpl-3.0
641
0
11
111
199
103
96
19
1
module Language.PySMEIL.Typing ( typeOf , sizeOf , sign , Signedness(..)) where import Language.PySMEIL.AST -- VERY simple for now. Shouldn't be hard to do things a little bit better -- e.g.by unifying integer types of different sizes to the biggest of the two unify :: DType -> DType -> DType unify ...
truls/almique
src/Language/PySMEIL/Typing.hs
gpl-3.0
1,639
0
14
447
613
310
303
50
1
import Control.Monad import System.IO import System.Environment import ParserEvaluator flushStr :: String -> IO () flushStr str = putStr str >> hFlush stdout readPrompt :: String -> IO String readPrompt prompt = flushStr prompt >> getLine evalAndPrint :: Env -> String -> IO () evalAndPrint env expr = evalString env...
GallagherCommaJack/scheming-machine
REPL.hs
gpl-3.0
1,196
8
16
239
525
256
269
34
2
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, DeriveFunctor, DeriveFoldable, DeriveTraversable #-} module Lamdu.Builtins ( eval ) where import Control.Lens.Operators import Control.Monad (join, void, when) import Data.Map (Map) import qualified Data.Map as Map import ...
rvion/lamdu
Lamdu/Builtins.hs
gpl-3.0
5,693
0
17
1,436
2,012
1,007
1,005
126
14
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Pull.hs
mpl-2.0
6,411
0
18
1,508
941
549
392
134
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-cloudsearch/gen/Network/Google/Resource/CloudSearch/Stats/Index/Datasources/Get.hs
mpl-2.0
8,049
0
23
1,955
1,307
742
565
179
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Column/Update.hs
mpl-2.0
3,363
0
15
791
461
275
186
72
1
{- Copyright (C) 2011, 2012 Jeroen Ketema This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed i...
jeroenk/iTRSsVisualised
DynamicReduction.hs
agpl-3.0
4,067
0
9
842
896
463
433
68
1
{-# LANGUAGE OverloadedStrings #-} module Address (tests) where import ProxyPool.Mining (validateAddress) import Test.Tasty import Test.Tasty.Hspec tests :: TestTree tests = testGroup "Address" [ testCase "validateAddress" validateAddressSpec ] validateAddressSpec :: Spec validateAddressSpec = describe "Correct val...
dogestreet/proxypool
tests/Address.hs
agpl-3.0
1,512
0
15
189
259
141
118
18
1
module View where import Model import Logic data ViewResource = ViewResource { descr :: String ,shortd :: String } deriving (Show) data ViewState = ViewState String (State ViewResource) String deriving (Show) --showRoomExit :: String -> (Maybe RoomI...
LoggerMN/hsAdventure
src/View.hs
lgpl-3.0
3,542
0
15
1,243
960
488
472
50
9
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Hecate.Backend.JSON ( JSON , run , initialize , finalize , AppState ) where import Control.Monad (when) import Control.Monad.Catch (MonadThrow (..)) import qualified Control.Monad.Except as Except import...
henrytill/hecate
src/Hecate/Backend/JSON.hs
apache-2.0
3,297
0
14
862
909
488
421
72
1
{-# LANGUAGE OverloadedStrings #-} module IFind.UI ( runUI ) where import Control.Applicative import Data.Either import Data.IORef import Graphics.Vty hiding (pad) import Graphics.Vty.Widgets.All import System.Exit (exitSuccess) import Text.Printf import qualified Data.Text as T import qualified Data.Text.Encoding...
andreyk0/ifind
IFind/UI.hs
apache-2.0
6,997
0
24
1,839
1,962
1,000
962
155
8
module Checker where import Data.Maybe import EdictDB type Conjugation = String conjugate :: Word -> Conjugation -> Maybe Word conjugate _ [] = Nothing conjugate ([],_) _ = Nothing conjugate w c | not (validC c) = Just w | c == "Te" = teForm $ Just w | c == "Imperitive" = imperitive $...
MarkMcCaskey/Refcon
Checker.hs
apache-2.0
17,577
0
11
5,484
9,399
4,465
4,934
414
1
{-# LANGUAGE OverloadedStrings #-} import Text.HTML.SanitizeXSS import Text.HTML.SanitizeXSS.Css import Data.Text (Text) import Data.Text as T import Test.Hspec.Monadic import Test.Hspec.HUnit () import Test.HUnit (assert, (@?=), Assertion) test :: (Text -> Text) -> Text -> Text -> Assertion test f actual expected = ...
silkapp/haskell-xss-sanitize
test/main.hs
bsd-2-clause
3,468
0
16
588
567
254
313
60
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QHttp_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:31 Warning : this file is machine generated - do not m...
keera-studios/hsQt
Qtc/Network/QHttp_h.hs
bsd-2-clause
16,093
0
18
3,806
5,490
2,616
2,874
-1
-1
{-# LANGUAGE CPP #-} module CLaSH.GHC.Compat.Outputable ( showPpr, showSDoc, showPprDebug ) where #if __GLASGOW_HASKELL__ >= 707 import qualified DynFlags (unsafeGlobalDynFlags) #elif __GLASGOW_HASKELL__ >= 706 import qualified DynFlags (tracingDynFlags) #endif import qualified Outputable (Outputable (..), SDoc,...
christiaanb/clash-compiler
clash-ghc/src-ghc/CLaSH/GHC/Compat/Outputable.hs
bsd-2-clause
908
0
7
105
153
92
61
9
1
import Intel.ArBB import Intel.ArBB.Util.Image import qualified Intel.ArbbVM as VM import qualified Data.Vector.Storable as V import qualified Prelude as P import Prelude as P hiding (map,zipWith) import Data.Word import System.IO import System.Time import Text.Printf import System.Environment import F...
svenssonjoel/EmbArBB
Samples/Bench/sobel.hs
bsd-3-clause
4,578
2
17
1,760
1,464
768
696
95
2
module Text.Highlighter.Lexers.Vim (lexer) where import Text.Regex.PCRE.Light import Text.Highlighter.Types lexer :: Lexer lexer = Lexer { lName = "VimL" , lAliases = ["vim"] , lExtensions = [".vim", ".vimrc"] , lMimetypes = ["text/x-vim"] , lStart = root' , lFlags = [multiline] } root' :...
chemist/highlighter
src/Text/Highlighter/Lexers/Vim.hs
bsd-3-clause
1,348
0
10
242
372
196
176
27
1
module NumberKata where import DeleteNth import HappyNumbers import LastDigitOfLargeNumber import PascalsTriangle import PerimeterOfSquaresInRectangle import ProductOfConsecutiveFibs import WeightForWeight testKata :: IO () testKata = print "Hey! Another super-useless function!"
Eugleo/Code-Wars
src/NumberKata.hs
bsd-3-clause
282
0
6
30
43
26
17
10
1
{-# LANGUAGE TemplateHaskell #-} module Item ( Item(..) , itemSymbol , itemDescription ) where import Control.Lens import Misc data Item = Item { _itemSymbol :: Symbol , _itemDescription :: String } deriving (Read, Show, Eq) makeLenses ''Item
dagit/7drl2017
src/Item.hs
bsd-3-clause
258
0
8
52
72
43
29
12
0
module Graphics.Vty.Widgets.Builder.Handlers.DirBrowser ( handlers ) where import Control.Applicative import Graphics.Vty.Widgets.Builder.Types import Graphics.Vty.Widgets.Builder.GenLib import qualified Graphics.Vty.Widgets.Builder.Validation as V import qualified Graphics.Vty.Widgets.Builder.SrcHelpers as S ...
jtdaugherty/vty-ui-builder
src/Graphics/Vty/Widgets/Builder/Handlers/DirBrowser.hs
bsd-3-clause
1,325
0
16
368
331
178
153
25
1
{-# LANGUAGE OverloadedStrings #-} module Spell.LazyText where import qualified Data.Text.Lazy as TL import Data.Text.Lazy (Text) import Data.Monoid import Data.List.Ordered (nubSort) import Data.Ord import Data.List import Control.Monad type Dict = ( TL.Text -> Bool, TL.Text -> Int ) singles :: [ TL.Text ] singles...
erantapaa/test-spelling
src/Spell/LazyText.hs
bsd-3-clause
1,820
0
15
476
719
387
332
40
1
{-# LANGUAGE RankNTypes, ScopedTypeVariables #-} module Network.LambdaBridge.Bridge where import Data.Word as W import System.Random import Data.Default import Control.Concurrent import Control.Concurrent.MVar import Control.Concurrent.Chan import Numeric import Data.Word import Data.Binary import Data.Binary.Get as ...
andygill/lambda-bridge
Network/LambdaBridge/Bridge.hs
bsd-3-clause
6,133
46
18
1,385
1,480
780
700
110
5
import qualified Network.HTTP.Types as HTTP import qualified Network.HTTP.Conduit as HTTP import Aws import qualified Aws.S3 as S3 import qualified Aws.SimpleDb as Sdb import qualified Aws.Sqs as Sqs import qualified Aws.Ses as Ses
jgm/aws
ghci.hs
bsd-3-clause
292
0
4
92
54
40
14
7
0