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 Main (main) where import Rendering import Interface import ClientSide import Control.Monad.Trans.Except import Control.Concurrent (forkIO) import Control.Concurrent.STM import Graphics.Gloss.Interface.IO.Game import qualified Network.WebSockets as WS import System.Environment background :: Color background =...
cmc-haskell-2016/asteroids
client/Main.hs
bsd-3-clause
995
0
15
220
286
146
140
30
1
{-# LANGUAGE UndecidableInstances #-} -- | Classifying spaces for discrete groups -- Wbar : Grp -> 0-reduced sSet_* -- Much easier than the case of general simplicial groups -- See also https://dl.acm.org/doi/10.1145/1576702.1576744 module Math.Topology.SGrp.WbarDiscrete where import Math.Algebra.Group import qualifi...
mvr/at
src/Math/Topology/SGrp/WbarDiscrete.hs
bsd-3-clause
2,267
0
13
462
928
478
450
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveGeneric #-} module GraphBuilder ( shortDistMat, shortestDists, joinContext, EContext(..), EShortDists(..), theContextsAndDists, ) where import Control.DeepSeq (NFData (..)) import Control.Monad ...
emmanueldenloye/manifoldRNC
src/GraphBuilder.hs
bsd-3-clause
3,918
0
14
1,090
1,245
679
566
76
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 #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Ordinal.GA.Rules ( rules ) where im...
facebookincubator/duckling
Duckling/Ordinal/GA/Rules.hs
bsd-3-clause
4,270
0
17
1,209
1,172
577
595
102
71
module Trace( module Debug.Trace, ) where import Debug.Trace
OS2World/DEV-UTIL-HUGS
oldlib/Trace.hs
bsd-3-clause
67
2
5
14
20
13
7
3
0
----------------------------------------------------------------------------- -- | -- Module : GHC.LanguageExtensions.Type -- Copyright : (c) The GHC Team -- -- Maintainer : ghc-devs@haskell.org -- Portability : portable -- -- A data type defining the language extensions supported by GHC. -- {-# LANGUAGE De...
ezyang/ghc
libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs
bsd-3-clause
3,745
0
6
870
404
276
128
115
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} module Math.Probably.Datasets where import Data.Csv import GHC.Generics import qualified Data.Vector as V import qualified Data.ByteString.Lazy as BL --http://www.stephendiehl.com/what/#csv data Plant = Plant { sepal_length :: Double , sepal_w...
glutamate/probably-baysig
src/Math/Probably/Datasets.hs
bsd-3-clause
904
0
11
145
253
143
110
24
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Ivory.Tower.HAL.Bus.SPI where import Ivory.Language import Ivory.Tower.HAL.Bus.SPI.DeviceHandle [ivory| struct spi_transaction_request { tx_device :: St...
GaloisInc/tower
tower-hal/src/Ivory/Tower/HAL/Bus/SPI.hs
bsd-3-clause
749
0
10
130
82
50
32
13
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE Scoped...
qnikst/distributed-process-supervisor
src/Control/Distributed/Process/Supervisor.hs
bsd-3-clause
63,785
0
28
16,709
12,606
6,614
5,992
998
15
{-# LANGUAGE ConstraintKinds #-} module Handler.Wallet where import Import import Web.MangoPay import Yesod.MangoPay import Control.Monad (join) import Control.Arrow ((&&&)) import Data.Text (pack) -- | get wallet list getWalletsR :: AnyUserId -> Handler Html getWalletsR uid=do -- no paging, should be reasonable ...
prowdsponsor/mangopay
yesod-mangopay/app/Handler/Wallet.hs
bsd-3-clause
2,962
0
21
702
851
417
434
-1
-1
module GHCJS.DOM.MouseEvent where data MouseEvent = MouseEvent class IsMouseEvent a instance IsMouseEvent MouseEvent ghcjs_dom_mouse_event_init_mouse_event = undefined mouseEventInitMouseEvent = undefined ghcjs_dom_mouse_event_get_screen_x = undefined mouseEventGetScreenX = undefined ghcjs_dom_mouse_event_get_screen_...
mightybyte/reflex-dom-stubs
src/GHCJS/DOM/MouseEvent.hs
bsd-3-clause
1,732
0
5
138
233
138
95
-1
-1
{-# LANGUAGE DeriveGeneric, RecordWildCards, TupleSections #-} import Data.Monoid import GHC.Generics import Options.Applicative import Options.Applicative.Types import Network.URI import System.Directory import System.Log.Logger import Te...
anchor/vaultaire-query
src/Query.hs
bsd-3-clause
3,451
0
17
1,177
809
413
396
75
3
module Network.MoHWS.ByteString where import qualified Data.ByteString.Char8 as S import qualified Data.ByteString.Lazy.Char8 as L import qualified System.IO as IO import Control.Monad (liftM2, ) import System.IO.Unsafe (unsafeInterleaveIO, ) {- | Like 'L.hGetContents' but it does not try to close the file when reac...
xpika/mohws
src/Network/MoHWS/ByteString.hs
bsd-3-clause
1,869
0
21
498
366
192
174
30
3
module Nancy.Interpreter where import Nancy.Core.Language as L import Nancy.Core.Util import Nancy.Core.Output import Nancy.Core.Errors.Interpreter as Err import Control.Monad.Identity import Control.Monad.Except import Control.Monad.Reader import Control.Monad.Writer type InterpretEnv = Trail type InterpretM = Read...
jgardella/nancy
src/Nancy/Interpreter.hs
mit
7,618
0
19
1,443
2,430
1,221
1,209
151
10
module HidingMultipleUnused where import Data.List hiding (lookup, sort) import GHC.OldList (sort) foo = sort
serokell/importify
test/test-data/base@basic/08-Z01-HidingMultipleUnused.hs
mit
134
0
5
38
33
21
12
4
1
import Network.MateLight.Simple import Network.MateLight import SDLEventProvider.SDLKeyEventProvider import Control.Monad.State import Control.Monad.Reader import Data.Maybe import qualified Network.Socket as Sock type KeyStatus = (String, String, Integer) -- Represents the tuple (KeyStatusString, KeyNameString, Ti...
Alveran/Pixelsaur-FP
SDLEventTest.hs
gpl-3.0
3,767
0
22
882
1,430
777
653
59
4
-- | Parsing of documentation nodes. module Data.GI.GIR.Documentation ( Documentation(..) , queryDocumentation ) where import Data.Text (Text) import Text.XML (Element) import Data.GI.GIR.XMLUtils (firstChildWithLocalName, getElementContent, lookupAttr) -- | Documentation for...
ford-prefect/haskell-gi
lib/Data/GI/GIR/Documentation.hs
lgpl-2.1
997
0
9
233
151
91
60
14
1
module SwiftNav.SBP.FileIo 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 msgFileioReadReq :: Word16 msgFileioRea...
hankaiwen/libsbp
haskell/src/SwiftNav/SBP/FileIo.hs
lgpl-3.0
4,461
0
11
714
969
498
471
-1
-1
-- | Wrapper program for propellor distribution. -- -- Distributions should install this program into PATH. -- (Cabal builds it as dist/build/propellor/propellor). -- -- This is not the propellor main program (that's config.hs) -- -- This installs propellor's source into ~/.propellor, -- uses it to build the real prope...
shosti/propellor
src/wrapper.hs
bsd-2-clause
5,539
48
17
945
1,231
632
599
111
2
module Distribution.Server.Features.LegacyRedirects ( legacyRedirectsFeature ) where import Distribution.Server.Framework import Distribution.Server.Features.Upload import Distribution.Package ( PackageIdentifier(..), packageName, PackageId ) import Distribution.Text ( display, simpleParse ) ...
isomorphism/hackage2
Distribution/Server/Features/LegacyRedirects.hs
bsd-3-clause
4,891
0
26
1,133
1,144
592
552
79
4
-- ----------------------------------------------------------------------------- -- -- Output.hs, part of Alex -- -- (c) Simon Marlow 2003 -- -- Code-outputing and table-generation routines -- -- ----------------------------------------------------------------------------} module Output (outputDFA) where import AbsSy...
alanz/Alex
src/Output.hs
bsd-3-clause
23,475
0
42
8,042
6,045
3,018
3,027
-1
-1
{-# LANGUAGE NoImplicitPrelude, MagicHash, MultiParamTypeClasses, UnboxedTuples, BangPatterns, FlexibleInstances, FlexibleContexts, UndecidableInstances, DefaultSignatures, DeriveAnyClass, FunctionalDependencies, StandaloneDeriving #-} ---------------------------------------------...
pparkkin/eta
libraries/base/Java/Array.hs
bsd-3-clause
8,615
0
15
2,200
3,089
1,602
1,487
216
2
{-# LANGUAGE CPP, FlexibleInstances, Rank2Types, BangPatterns #-} -- | -- Module : Data.Vector.Fusion.Bundle -- Copyright : (c) Roman Leshchinskiy 2008-2010 -- License : BSD-style -- -- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au> -- Stability : experimental -- Portability : non-portable -- -- Bu...
dolio/vector
Data/Vector/Fusion/Bundle.hs
bsd-3-clause
16,957
0
12
4,136
5,154
2,810
2,344
349
3
<?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="az-AZ"> <title>Context Alert Filters | ZAP Extension</title> <maps> <homeID>top</homeID> ...
0xkasun/security-tools
src/org/zaproxy/zap/extension/alertFilters/resources/help_az_AZ/helpset_az_AZ.hs
apache-2.0
983
80
66
161
417
211
206
-1
-1
{- (c) The University of Glasgow, 2000-2006 \section[Finder]{Module Finder} -} {-# LANGUAGE CPP #-} module Finder ( flushFinderCaches, FindResult(..), findImportedModule, findPluginModule, findExactModule, findHomeModule, findExposedPackageModule, mkHomeModLocation, mkHomeModLocat...
oldmanmike/ghc
compiler/main/Finder.hs
bsd-3-clause
26,711
1
20
7,687
5,073
2,582
2,491
418
12
{-# OPTIONS -Wall #-} {-# LANGUAGE OverloadedStrings #-} module Data.Either.Extra where -- | When a value is Right, do something with it, monadically. whenRight :: Monad m => Either a b -> (b -> m c) -> m () whenRight (Right x) m = m x >> return () whenRight _ _ = return () -- | When a value is Left, do some...
lwm/haskellnews
src/Data/Either/Extra.hs
bsd-3-clause
476
0
10
118
177
87
90
9
1
{-# LANGUAGE CPP #-} module GHCJS.DOM.OfflineAudioContext ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.OfflineAudioContext #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/OfflineAudioContext.hs
mit
370
0
5
33
33
26
7
4
0
module Yage.Uniform ( module Material , module Light , module UniformVar , module Image ) where import Yage.Uniform.Material as Material import Yage.Uniform.Light as Light import Yage.Uniform.Image as Image import Yage.Uniform.UniformVar as UniformVar
MaxDaten/yage
src/Yage/Uniform.hs
mit
275
0
4
55
56
41
15
9
0
import Text.Parsec import Parser import AST import Generator import Paths_poorscript main = do s <- readFile "in.js" coreFile <- Paths_poorscript.getDataFileName "core.js" core <- readFile coreFile let result = parseAll s putStrLn "start" case result of Right x -> do writeFile ...
jinjor/poorscript
src/Main.hs
mit
498
0
13
125
153
69
84
19
2
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.IDBCursorWithValue (getValue, IDBCursorWithValue(..), gTypeIDBCursorWithValue) where import Prelude ((.), (==), (...
ghcjs/jsaddle-dom
src/JSDOM/Generated/IDBCursorWithValue.hs
mit
1,276
0
10
136
345
224
121
20
1
{-| Module : Main Description : Main module Licence : MIT Maintainer : victor.cacciari@gmail.com Stability : experimental Portability : portable Main module -} module Main where import qualified MMM.OOP.Main.Flags as Fl import MMM.Core.All import MMM.OOP.Language.Syntax import MMM.OOP.Language.Pa...
VictorCMiraldo/mmm
MMM/OOP/Main/Main.hs
mit
2,421
0
23
701
743
376
367
54
5
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module GhostLang.InterpreterGenerators ( TestInstrSet (..) , SimpleSequencePattern (..) , ManySimpleSequencePatterns (..) , NonNestedLoopPattern (..) , NonNestedConcPattern (..) ) w...
kosmoskatten/ghost-lang
ghost-lang/test/GhostLang/InterpreterGenerators.hs
mit
4,016
0
14
1,185
724
409
315
75
1
----------------------------------------------------------------------------- -- -- Module : ResidualSpace -- Copyright : Armin Kazmi (2015) -- License : MIT -- -- Maintainer : Armin Kazmi -- Stability : experimental -- Portability : GHC only or compatible -- -- | -- --------------------------------------...
apriori/daak
lib/DAAK/Core/ResidualSpace.hs
mit
8,544
0
11
1,588
2,147
1,150
997
-1
-1
{-# LANGUAGE OverloadedStrings #-} module DAAK.Algorithms.Gamo.JsonImport where import Control.Monad import DAAK.Algorithms.Gamo.Packing import DAAK.Core.Space3D import Data.Aeson import Data.ByteString.Lazy as BS hiding (zip) import Data.Map ...
apriori/daak
lib/DAAK/Algorithms/Gamo/JsonImport.hs
mit
2,780
0
13
986
782
419
363
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-} module PagedResponse (Paged, nextPage) where import Data.Text (Text, unpack) import D...
miciek/mr-stats-haskell-servant
src/PagedResponse.hs
mit
1,594
0
13
403
441
230
211
48
4
module Melchior.Dom.Events where import Melchior.Data.String import Melchior.Dom.Html data Event a = ElementEvt ElementEvent | MouseEvt MouseEvent | KeyboardEvt KeyboardEvent instance Show (Event a) where show (ElementEvt a) = show a show (MouseEvt a) = show a show (KeyboardEvt a) = show a data ElementEvent =...
kjgorman/melchior
Melchior/Dom/Events.hs
mit
1,299
0
8
244
373
198
175
36
0
module Chapter05.EqExercises where data TisAnInteger = TisAn Integer instance Eq TisAnInteger where (==) (TisAn x) (TisAn y) = x == y data TwoIntegers = Two Integer Integer deriving Show instance Eq TwoIntegers where (==) (Two x y) (Two p q) = x == y && p ...
brodyberg/LearnHaskell
HaskellProgramming.hsproj/Chapter05/EqExercises.hs
mit
1,417
0
8
549
551
298
253
49
0
module Main ( main ) where -- doctest import qualified Test.DocTest as DocTest main :: IO () main = DocTest.doctest [ "-isrc" , "src/Party.hs" ]
mauriciofierrom/cis194-homework
homework08/test/examples/Main.hs
mit
168
0
6
48
44
27
17
8
1
main :: IO () main = print "cow"
hausdorff/manifold_stats
src/Main.hs
mit
32
0
6
7
19
9
10
2
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE StrictData #-} module Data.Raft.Index where import Data.RaftPrelude newtype Index = Index Word64 der...
AndrewRademacher/zotac
lib/Data/Raft/Index.hs
mit
847
0
7
192
192
103
89
21
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE BlockArguments #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ViewPatterns #-} module U.Util.Term where import qualified U.Core.ABT as ABT import qualified U.Codebase.Term as Term import U.Codebase.Term (Pattern(..), MatchCase(..), F'(..)) import Control.Monad.Writer (tell...
unisonweb/platform
codebase2/util-term/U/Util/Term.hs
mit
1,493
0
21
327
611
314
297
-1
-1
module Text.Docvim.Visitor.Header (extractHeader) where import Control.Applicative import Text.Docvim.AST import Text.Docvim.Visitor -- | Extracts a list of nodes (if any exist) from the `@header` section(s) of -- the source code. -- -- It is not recommended to have multiple headers in a project. If multiple -- heade...
wincent/docvim
lib/Text/Docvim/Visitor/Header.hs
mit
669
0
9
126
104
63
41
9
2
{-# LANGUAGE FlexibleContexts #-} module IAFinance.Environment.Config( Has(..), EnvConfig, Config(..), ServerConfig(..), SessionConfig(..), IAPIConfig(..), IAPIMethod(..), modify, get ) where ----------------------------------------------------------------------------- -- import i...
wiryls/HomeworkCollectionOfMYLS
2018.ProjectV/src/IAFinance/Environment/Config.hs
mit
1,114
0
9
205
337
204
133
30
1
-- import Data.Char -- digitToIntMay :: Char -> Maybe Int -- digitToIntMay '.' = Nothing -- digitToIntMay x = Just $ digitToInt x -- main = putStrLn $ show $ fmap digitToIntMay "13.2..2" import Data.Char charToMaybeInt :: Char -> Maybe Int charToMaybeInt x | isDigit x = Just $ digitToInt x | otherwise = Noth...
michalc/haskell-experiments
digits.hs
mit
380
1
8
76
72
37
35
6
1
{-# LANGUAGE FlexibleInstances, ScopedTypeVariables, TupleSections #-} import Test.Tasty import Test.Tasty.QuickCheck import Test.QuickCheck.Property import Data.IORef import Data.Void import Data.Either import Numeric.Limp.Solvers.Cbc (solve, Error(..)) import Numeric.Limp.Program import Numeric.Limp.Rep.IntDouble imp...
amosr/limp-cbc
test/Main.hs
mit
3,000
0
21
803
642
341
301
53
2
import XMonad import XMonad.Layout.NoBorders import XMonad.Hooks.ManageDocks import XMonad.Hooks.SetWMName import XMonad.Hooks.DynamicLog import XMonad.Actions.CycleWS import XMonad.Util.EZConfig -- LAYOUTS import XMonad.Layout.Spacing import XMonad.Layout.ResizableTile import XMonad.Layout.Grid -------------------...
hmrm/arch-computer-setup
modules/x11/files/xmonad.hs
mit
3,337
21
14
963
684
391
293
66
1
module P012 (main, solveBasic, triangles) where {- The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... Let us list the factors of the first seven tri...
yyotti/euler_haskell
src/P012.hs
mit
1,262
0
13
252
194
112
82
13
1
-- Copyright (C) 2007 Eric Kow -- -- 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, or (at your option) -- any later version. -- -- This program is distributed in the ho...
DavidAlphaFox/darcs
src/Darcs/UI/Commands/ShowBug.hs
gpl-2.0
2,744
0
17
649
442
266
176
48
1
module Capture.Win32 where import Data import qualified Data.MyText as T import Control.Monad import Control.Exception (bracket) import Control.Applicative import Data.Maybe import Data.Time.Clock import System.IO import Graphics.Win32.Window.Extra setupCapture :: IO () setupCapture = do return () captureDa...
nomeata/darcs-mirror-arbtt
src/Capture/Win32.hs
gpl-2.0
653
0
14
154
200
109
91
21
1
-- Copyright: (c) Johan Astborg, Andreas Bock -- License: BSD-3 -- Maintainers: Andreas Bock <bock@andreasbock.dk> -- Johan Astborg <joastbg@gmail.com> -- Stability: experimental -- Portability: portable module HQL where -- import Utils.Brownian import Utils.Calendar import Utils.Payments import U...
andreasbock/hql
src/HQL.hs
gpl-2.0
617
0
4
78
72
49
23
12
0
module Probability.BivariateDistributions where import Notes import Functions.Application.Macro import Functions.Basics.Macro import Functions.Basics.Terms import Functions.Inverse.Macro import Logic.PropositionalLogic.Macro import Probability.In...
NorfairKing/the-notes
src/Probability/BivariateDistributions.hs
gpl-2.0
2,643
0
16
682
857
445
412
-1
-1
module PrisonersDilemma.Renderer ( renderPDFrame ) where import FRP.FrABS import PrisonersDilemma.Model import qualified Graphics.Gloss as GLO type PDRenderFrame = RenderFrame PDAgentState PDEnvironment type PDAgentColorer = AgentCellColorerDisc2d PDAgentState renderPDFrame :: PDRenderFrame renderPDFrame = r...
thalerjonathan/phd
coding/libraries/chimera/examples/ABS/PrisonersDilemma/Renderer.hs
gpl-3.0
1,087
0
8
162
276
144
132
18
1
Maybe [Int] -> Maybe [Int]
hmemcpy/milewski-ctfp-pdf
src/content/1.7/code/haskell/snippet35.hs
gpl-3.0
26
2
5
4
18
9
9
-1
-1
module HEP.Automation.MadGraph.Dataset.Set20110708set1 where import HEP.Storage.WebDAV.Type 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.ZpH import HEP.Automation.MadGr...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110708set1.hs
gpl-3.0
1,825
0
10
610
394
247
147
49
1
-- Copyright (C) 2015 Guillem Marpons -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- This program is distribu...
gmarpons/elections-in-spain
ElectionsInSpain.hs
gpl-3.0
55,798
0
42
17,139
10,451
5,411
5,040
912
12
phoneBook = [("Murali", "1234") ,("Sathish", "5678") ,("Balu", "9101") ,("Vishnu", "8983") ,("Vinay", "4315") ] findElement :: Eq k => k -> [(k, v)] -> v findElement key map = snd . head . filter (\(k, v) -> k == key) $ map findKey :: Eq k => k -> [(k, v)] -> Maybe v findKey _ [] = Nothing fin...
muralikrishna8/Haskell-problems
map.hs
gpl-3.0
443
0
10
156
210
118
92
13
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.FirebaseRules.Types.Sum -- Copyright : (c) 2015-2016 B...
rueshyna/gogol
gogol-firebase-rules/gen/Network/Google/FirebaseRules/Types/Sum.hs
mpl-2.0
2,478
0
11
615
394
218
176
50
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-classroom/gen/Network/Google/Resource/Classroom/UserProFiles/GuardianInvitations/List.hs
mpl-2.0
10,100
0
21
2,135
1,096
646
450
161
1
<h3>Example 60 (categorical bars #1)</h3> <palette name="mfpal" type="discrete"> female #FF7F7F; male #7F7FFF </palette> <palette name="urpal" type="discrete"> rural #10520D; urban #505050 </palette> <plot height=600 aspect=1.5 axis-x-label="off" axis-y-label="Rate" stroke="none"> <bars x="[[d1#sex]]" y=...
openbrainsrc/hRadian
examples/Example/defunct/Eg60.hs
mpl-2.0
2,788
119
57
470
1,307
692
615
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Workspaces/Templates/Update.hs
mpl-2.0
6,353
0
18
1,416
863
503
360
130
1
-- | -- Module : Main -- Copyright : (c) 2012-2015 Brendan Hay <brendan@soundcloud.com> -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- A copy of the MPL can be found in the LICENSE file or -- you can obtain it ...
brendanhay/gamekeeper
src/Main.hs
mpl-2.0
4,425
0
14
1,416
1,187
611
576
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/SetModerationStatus.hs
mpl-2.0
4,693
0
15
1,018
479
287
192
76
1
module AST where data AST = AST [Block] (Maybe FootnoteDefs) deriving (Show) data FootnoteDefs = FootnoteDefs [FootnoteDef] deriving (Show) data FootnoteDef = FootnoteDef { index :: Int, content :: [Block] } deriving (Show) data ListItem = ListItem [Inline] | SubList List deriv...
alexbecker/blogdown
src/AST.hs
agpl-3.0
1,534
0
10
512
453
270
183
56
0
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RankNTypes #-} module Gonimo.Server.Auth where import Control.Lens import Control.Monad (unless) import Control.Monad.Base (MonadBase) import Control.Monad.Reader (MonadReader, ask) import ...
gonimo/gonimo-back
src/Gonimo/Server/Auth.hs
agpl-3.0
1,856
0
9
505
523
284
239
-1
-1
----------------------------------------------------------------------------------------- {-| Module : Draw Copyright : (c) Daan Leijen 2003 License : wxWindows Maintainer : wxhaskell-devel@lists.sourceforge.net Stability : provisional Portability : portable Drawing. -} ---------------------------...
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/Draw.hs
lgpl-2.1
34,611
0
21
10,110
7,687
3,838
3,849
648
20
{-# LANGUAGE OverloadedStrings #-} module Stubby.Data.Endpoint ( Endpoint , defaultEndpoint , getRequest , getResponses ) where import Stubby.Data.Request (Request, defaultRequest) import Stubby.Data.Response (Response, defaultResponse) import Data.Yaml import qualified Data.HashMap.Strict as H...
mrak/stubby4hs
src/lib/Stubby/Data/Endpoint.hs
apache-2.0
1,315
0
11
402
331
190
141
34
4
{-# LANGUAGE FlexibleContexts, TemplateHaskell #-} module JSONCommon where import Database.Persist.TH import Data.Aeson.TH (deriveJSON, defaultOptions) data EndType = TimeOut | ENDE | Disconnect | Resign deriving (Show, Read, Eq) derivePersistField "EndType" deriveJSON defaultOptions ''EndType d...
sleepomeno/snooker-statistics
src/JSONCommon.hs
apache-2.0
424
0
6
76
113
61
52
10
0
module Main where import Graphics.Blank import Life.Engine.Hutton import Life.Display.Canvas import Life.Types --import Life.Scenes -- or import Life.Formations -- Runs Life indefinitely life :: Config -> Scene -> IO () life c b = blankCanvas 3000 $ \dc -> lifeCanvas dc (scene c b :: Board) -- Runs Life for the spe...
ku-fpg/better-life
examples/simulations/HuttonCanvas.hs
bsd-2-clause
590
0
9
110
189
104
85
11
1
module HSH.MonitoredDirectory where import Control.Monad import Data.List import qualified Data.Map as Map import qualified System.Posix.Directory as Posix import qualified System.Posix.Files as Posix import qualified System.Posix.Types as Posix import qualified System.Directory as Dir import System.FilePath impor...
jessekempf/hsh
src/HSH/MonitoredDirectory.hs
bsd-2-clause
3,371
0
12
580
684
367
317
52
2
{-# LANGUAGE ScopedTypeVariables, OverloadedStrings, ViewPatterns, RecordWildCards, DeriveFunctor #-} module General.Web( Input(..), Output(..), readInput, server, general_web_test ) where import Network.Wai.Handler.Warp hiding (Port, Handle) import Network.Wai.Handler.WarpTLS import Action.CmdLine impor...
ndmitchell/hoogle
src/General/Web.hs
bsd-3-clause
9,207
0
27
2,727
1,799
971
828
135
12
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE NoMonomorphismRestriction #-} module Data.CompactMap.Index where import Control.Monad import Data.Maybe import Foreign hiding (ro...
dmjio/CompactMap
src/Data/CompactMap/Index.hs
bsd-3-clause
21,141
0
21
6,703
4,801
2,324
2,477
305
5
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} module Main where import Codec.Picture import Control.Concurrent (forkOS) import Control.Lens (view) import...
mattrrichard/darwin
src/Main.hs
bsd-3-clause
4,417
0
14
1,435
1,015
536
479
96
3
{- - Hacq (c) 2013 NEC Laboratories America, Inc. All rights reserved. - - This file is part of Hacq. - Hacq is distributed under the 3-clause BSD license. - See the LICENSE file for more details. -} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-...
ti1024/hacq
src/Control/Monad/Ask/Class.hs
bsd-3-clause
1,159
0
8
197
318
184
134
23
1
module Data.ICalendar.Types ( ICalObject(..) , ICalProperty(..) -- * Property lookups , lookupProps , lookupProp , lookupPropValue , lookupPropParam ...
bgamari/icalendar
Data/ICalendar/Types.hs
bsd-3-clause
2,009
0
11
733
442
240
202
33
1
{-# LANGUAGE OverloadedStrings #-} -- | -- Module: Network.FastIRC.Session -- Copyright: (c) 2010 Ertugrul Soeylemez -- License: BSD3 -- Maintainer: Ertugrul Soeylemez <es@ertes.de> -- Stability: alpha -- -- This module implements a framework for IRC client software. -- Essentially it consists of a dumb bot, ...
xyzzyz/fastirc
Network/FastIRC/Session.hs
bsd-3-clause
11,696
0
24
3,289
2,925
1,497
1,428
248
11
{-# LANGUAGE ExistentialQuantification, MultiParamTypeClasses #-} module HTIG.IRCServer.Channel ( IChannel(..) , Channel(Channel) , channelName , joinChannel , kickChannel , noticeChannel , partChannel , privmsgChannel , quitChannel , topicChannel ) where import Network.Fast...
nakamuray/htig
HTIG/IRCServer/Channel.hs
bsd-3-clause
2,072
0
13
499
858
431
427
50
1
module Types where import System.Console.ANSI type Grid = [String] data Player = Player { token :: Char -- the unique token of this player, chosen when calling the program , color :: Color -- the color in which the token of this player will be printed during the game ...
chisaramai/connect4
src/Types.hs
bsd-3-clause
678
0
9
259
97
62
35
10
0
module CodeGen.LispToJs ( genCode ) where import Ast import qualified CodeGen.JsAst as JS genCode :: Program -> JS.Program genCode p = map compileFun p ++ [callMain] where callMain = JS.ExprStatement $ JS.Call (JS.Ref "main") [] compileFun :: Function -> JS.Statement compileFun f = JS.Assign name (JS.L...
davidpdrsn/alisp
src/CodeGen/LispToJs.hs
bsd-3-clause
2,855
0
12
540
1,245
622
623
54
1
-- |Internal representation of data types in hasp. The types in this file differ -- from those defined in Expressions.hs in that Expr represents syntactic forms -- as they appear in hasp source code, whereas HData represnts hasp values, i.e. -- results of computations. module DataTypes ( HData(..) , HNum(..) , Env(..)...
aldld/hasp
src/DataTypes.hs
bsd-3-clause
2,600
0
10
722
1,200
612
588
65
1
{-# LANGUAGE OverloadedStrings #-} module Data.Wavelets.Reconstruction where import Prelude hiding (map,maximum,minimum,init) import Data.Wavelets import Numeric.Statistics import Statistics.Sample import Data.Vector.Storable -- hiding (map) -- import Linear -- |explicitly name a Fractional and Ord instance on the...
smurphy8/wavelets
src/Data/Wavelets/Reconstruction.hs
bsd-3-clause
722
0
9
125
161
90
71
13
1
{-# LANGUAGE TypeOperators #-} module Dag.Render where import Control.Monad.State import Data.Foldable (Foldable) import qualified Data.Foldable as Foldable import Data.IntMap import Data.Traversable (Traversable, traverse) import Tree import Dag.Internal import Dot numberNodesFree :: Traversable f => Maybe...
emilaxelsson/ag-graph
src/Dag/Render.hs
bsd-3-clause
2,074
0
16
535
895
450
445
53
2
-- | This module contains the parser for the MiniJava language module Espresso.Parser( identifier, mainClass) where import Text.Parser as P import Text.Parser.Combinators import Text.Parser.Char import Espresso.AST -- | 'token' represents a token in the MiniJava language token :: Parser a -> Parser a token p ...
helino/espresso
src/Espresso/Parser.hs
bsd-3-clause
1,388
0
13
470
299
141
158
34
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} module Api.Session where import Data.Text (Text) import Control.Monad.Except i...
tlaitinen/servant-cookie-hmac-auth-example
src/Api/Session.hs
bsd-3-clause
3,264
0
20
1,188
747
417
330
74
3
module Text.HTML.Moe2.Element where import Text.HTML.Moe2.Type import Text.HTML.Moe2.Utils import Data.Default import Control.Monad.Writer import Prelude hiding (id, span, div, head, (>), (.), (-)) import Air.Light ((-), first) import Data.DList (singleton, toList) import Data.Maybe (fromMaybe) element :: String -> M...
nfjinjing/moe
src/Text/HTML/Moe2/Element.hs
bsd-3-clause
1,905
0
14
430
659
369
290
52
1
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {- | A small module to perform optimization using Particle Swarm Optimization (PSO), based on the so-called /Standard PSO/ defined in Bratton, Daniel, and James Kennedy. \"Defining a standard for particle swarm optimization.\" Swarm Intellige...
brianshourd/haskell-Calypso
Calypso/Core.hs
bsd-3-clause
24,330
0
13
5,573
3,637
1,972
1,665
219
2
{-# LANGUAGE OverloadedStrings #-} {-| Muster is a library that provides composable regular expressions implemented using derivatives. = References * Janusz A. Brzozowski (1964). Derivatives of Regular Expressions * Scott Owens, John Reppy, Aaron Turon (2009). Regular-expression derivatives reexamined -} module Mu...
DasIch/haskell-muster
src/Muster.hs
bsd-3-clause
1,826
0
10
375
564
294
270
45
2
--------------------------------------------------------------------------------- -- | -- Module : Data.SBV -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- (The sbv library is hosted at <http://github.com/LeventErkok/sbv>. -- Commen...
TomMD/cryptol
sbv/Data/SBV.hs
bsd-3-clause
33,155
0
14
6,133
3,790
2,221
1,569
159
2
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, DeriveFunctor #-} {-| TT is the core language of Idris. The language has: * Full dependent types * A hierarchy of universes, with cumulativity: Type : Type1, Type1 : Type2, ... * Pattern matching letrec binding * (primitive types defined exter...
ctford/Idris-Elba-dev
src/Idris/Core/TT.hs
bsd-3-clause
42,471
0
17
12,812
16,469
8,281
8,188
-1
-1
module SNMPTrapType ( SNMPTrap (..) ) where import Data.ASN1.Types (ASN1) import Data.ConfigFile (SectionSpec) import Data.Default import Data.Word (Word8) data SNMPTrap = SNMPTrap { takeSection :: SectionSpec , takeVersion :: String , takeCommunity :: String ...
IMOKURI/bulk-snmptrap-tool
src/SNMPTrapType.hs
mit
1,124
0
9
489
193
124
69
25
0
{-# LANGUAGE RecordWildCards #-} module Graphics.GL.Pal.Geometries.Octahedron where import Graphics.GL import Graphics.GL.Pal.Types import Graphics.GL.Pal.Geometry import Linear hiding (trace) import Control.Lens hiding (indices) import Data.Foldable import Control.Arrow import Control.Monad.Trans octahedron...
lukexi/gl-pal
src/Graphics/GL/Pal/Geometries/Octahedron.hs
bsd-3-clause
3,499
0
16
1,217
1,083
572
511
72
1
{-# LANGUAGE ScopedTypeVariables #-} -- | This package uses "Data.Generics.PlateData", so -- -- * when Cabal package format changes, we don't have to rewrite anything -- -- * all queries are statically typed -- -- * as a disadvantage, we may suffer some performance loss when doing very complex queries, -- anyway mos...
explicitcall/cabal-query
src/Distribution/Query.hs
bsd-3-clause
3,293
0
12
668
544
309
235
39
2
module Core.Data where import Core.Type import Name import Utilities type Arity = Int type DataCon = String dataTypes :: [(TyCon, [TyVar], [(DataCon, [Type])])] dataTypes = [ ("()" , [], [("()" , [])]), ("(,)" , [name "a", name "b"], [("(,)" , [TyVar (name "a"), TyVar (name "b")...
batterseapower/mini-ghc
Core/Data.hs
bsd-3-clause
1,849
0
13
497
879
495
384
47
7
module Main ( main ) where import qualified Bot.Test.TestIntegration import qualified Bot.Test.TestParser import Test.Framework ( defaultMain ) main = defaultMain [ Bot.Test.TestIntegration.tests , Bot.Test.TestParser.tests ]
andregr/bot
test/src/Main.hs
bsd-3-clause
282
0
7
81
55
36
19
6
1
{-# LANGUAGE FlexibleContexts #-} module Kalium.Nucleus.Scalar.Atomize (atomize) where import Kalium.Prelude import Kalium.Util import Control.Monad.Reader import Control.Monad.Writer import Control.Monad.Rename import qualified Data.Map as M import Kalium.Nucleus.Scalar.Program import Kalium.Nucleus.Scalar.Build (...
rscprof/kalium
src/Kalium/Nucleus/Scalar/Atomize.hs
bsd-3-clause
2,661
0
16
607
834
426
408
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -------------------------------------------------------------------------------- -- | -- Module : HEP.Data.HepMC.Type -- Copyright : (c) 2017 Chan Beom Park -- License : BSD-style -- Maintainer : Chan Beom Park <cbpark@gmail.com> -- ...
cbpark/hep-kinematics
src/HEP/Data/HepMC/Parser.hs
bsd-3-clause
9,249
0
18
3,846
2,154
1,111
1,043
197
7
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} module IHaskell.Display.Widgets.Selection.SelectMultiple ( -- * The SelectMultiple Widget SelectMultiple, -- * Constructor mkSelectMultiple) where -- ...
FranklinChen/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/SelectMultiple.hs
mit
2,637
0
17
675
556
294
262
56
1
-- Echo Test Example for Push Notifications. -- This is a simple example of a Yesod server, where devices can register to receive -- messages and every time they send a message to the server, they receive an echo response. {-# LANGUAGE OverloadedStrings, TypeFamilies, TemplateHaskell, FlexibleInstances, Q...
jimpeak/GSoC-Communicating-with-mobile-devices
push-notify-general/test/yesodAppEcho.hs
mit
5,592
4
33
2,159
1,118
584
534
92
6
#if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Trustworthy #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Graphics.Win32 -- Copyright : (c) Alastair Reid, 1997-2003 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : Esa...
jwiegley/ghc-release
libraries/Win32/Graphics/Win32.hs
gpl-3.0
1,399
24
5
165
194
135
59
23
0
module Main where -- this is a simple example where lambdas only bind a single variable at a time -- this directly corresponds to the usual de bruijn presentation import Data.List (elemIndex) import Data.Foldable hiding (notElem) import Data.Maybe (fromJust) import Data.Traversable import Control.Monad import Control...
bixuanzju/bound
examples/Simple.hs
bsd-3-clause
6,353
0
16
1,641
2,651
1,356
1,295
123
2
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Keymap.Vim.Ex.Commands.Tag -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable module Yi.Keymap.Vim.Ex.Commands.Tag (parse) where import ...
TOSPIO/yi
src/library/Yi/Keymap/Vim/Ex/Commands/Tag.hs
gpl-2.0
2,256
0
18
708
615
351
264
48
2