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 GitHub.Issues.Milestones where import GitHub.Internal milestones o r = ownerRepo o r <> "/milestones" milestone o r i = milestones o r <> "/" <> i --| GET /repos/:owner/:repo/milestones listRepositoryMilestones :: OwnerName -> RepoName -> Maybe MilestoneState -> Maybe MilestoneSort -> Maybe SortDirection -...
SaneApp/github-api
src/GitHub/Issues/Milestones.hs
mit
1,100
46
11
172
465
227
238
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Site.Person where import BasePrelude hiding (bool, delete, insert) import Prelude () import Control.Lens import Control.Monad.Trans (lift, liftIO) import Data.Text (Text) impor...
benkolera/phb
hs/Site/Person.hs
mit
5,434
0
22
1,583
1,425
738
687
-1
-1
module Corner ( Corner (..) ) where data Corner = URF | UFL | ULB | UBR | DFR | DLF | DBL | DRB deriving (Bounded, Enum, Eq, Ord, Show)
v64/rubik
Corner.hs
mit
229
0
6
124
64
39
25
11
0
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import MediaType (mediaType, destination) import Prelude hiding (FilePath) import Turtle main :: IO () main = do homeDir <- home sh $ do files <- ls $ homeDir </> "Desktop" liftIO $ moveFile files moveFile :: FilePath -> IO () moveFile fpath = ...
bendycode/desktop-cleaner
src/Main.hs
mit
379
0
12
81
131
67
64
15
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Vaultaire.Collector.Ceilometer.Process.Image where import Control.Applicative import Control.Lens import Control.Monad.Trans import Data.Aeson import qualified Data.HashMap.Strict ...
anchor/vaultaire-collector-ceilometer
lib/Vaultaire/Collector/Ceilometer/Process/Image.hs
mit
3,371
0
18
1,065
712
350
362
72
7
module TestEntry (entrySpec) where import Test.Hspec (Spec, context, describe, it, shouldBe) import qualified Data.Expenses.Types as E import qualified Data.Expenses.Parse.Megaparsec.Types as PE import qualified Data.Expenses.Parse.Megaparsec.Entry as PE entrySpec :: Spec entrySpec = describe "Data.Expenses.Parse....
rgoulter/expenses-csv-utils
test/TestEntry.hs
mit
1,523
0
19
470
478
266
212
38
1
{-# LANGUAGE OverloadedStrings #-} module Partials.TagList (TagList(..)) where import Control.Monad (forM_) import GHC.Exts (fromString) import Internal.FileDB import Text.Blaze.Html5 ((!)) import qualified Text.Blaze.Html5 ...
mayeranalytics/nanoPage
src/Partials/TagList.hs
mit
878
0
11
234
227
130
97
19
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} -- | TAG a stack project based on snapshot versions module Stack.Tag where import qualified Data.Set as Set import qualified Data.Text as T import qualified Data.Traversable as T import Control.Exception as ...
creichert/stack-tag
src/Stack/Tag.hs
mit
9,044
0
19
2,454
2,193
1,134
1,059
175
3
-- Informatics 1 - Functional Programming -- Lab week tutorial part II -- -- import Data.Char import PicturesSVG import Test.QuickCheck -- Exercise 8: pic1 :: Picture pic1 = undefined pic2 :: Picture pic2 = undefined -- Exercise 9: -- a) emptyRow :: Picture emptyRow = undefined -...
PavelClaudiuStefan/FMI
An_3_Semestru_1/ProgramareDeclarativa/Laboratoare/Laborator1Optional/labweekchess.hs
cc0-1.0
806
0
7
176
232
112
120
25
1
module Main (main) where ------------------------------------------------------------------------------- import Control.Concurrent.STM (TQueue, newTQueueIO) import Control.Monad.Trans.Maybe (runMaybeT) import Control.Monad.IO.Class (liftIO) import Control.Monad (void, unless) import Control.Monad.Reader (runReaderT, ...
sgillis/HOpenGL
src/Main.hs
gpl-2.0
2,755
0
25
991
624
331
293
64
1
-- rectangulos_girados.hs -- Rectángulos girados. -- José A. Alonso Jiménez <jalonso@us.es> -- Sevilla, 20 de Mayo de 2013 -- --------------------------------------------------------------------- -- --------------------------------------------------------------------- -- Ejercicio. ¿Qué dibujo genera el siguiente prog...
jaalonso/I1M-Cod-Temas
src/Tema_25/rectangulos_girados.hs
gpl-2.0
598
0
8
66
115
61
54
5
1
bubblesort :: (Ord a) => [a] -> [a] bubblesort [] = [] bubblesort [x] = [x] bubblesort (x:y:ys) = let (z:zs) = bubblesort (y:ys) in if x < z then x:z:zs else bubblesort (z:x:zs)
Jecoms/cosmos
code/sorting/bubble_sort/bubblesort.hs
gpl-3.0
202
0
11
58
140
71
69
5
2
{-# LANGUAGE TypeOperators #-} module PixelMaps (grayscale, onlyRed, onlyGreen, onlyBlue, negative, sepia, onlyY, onlyCb, onlyCr, onlyH, onlyL, onlyS, filterHue, filterSkin, filterRedEyes, binarize, binarize',...
mikolajsacha/HaskellPics
pixelmaps.hs
gpl-3.0
3,317
0
12
864
1,551
860
691
85
1
{-# LANGUAGE OverloadedStrings,MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Database.Alteryx.Serialization ( buildBlock, buildRecord, calgaryHeaderSize, dbFileId, getCalgaryRecords, getCalgaryBlockIndex, getOneBlock, getOneBlockCalgaryRecord...
MichaelBurge/yxdb-utils
src/Database/Alteryx/Serialization.hs
gpl-3.0
23,858
0
21
6,617
4,776
2,438
2,338
464
4
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RecordWildCards#-} module KeyHandler where import qualified Brick.Main as BrickMain import qualified Brick.Types as BrickTypes import qualified Graphics.Vty as GraphicsVty import qualified Brick.Widgets.Edit as BrickWidgetsEdit import AppState import Control.Lens impor...
stephane-rolland/aastraal
aastraal-client-brick/src/KeyHandler.hs
gpl-3.0
7,486
0
19
1,711
2,338
1,130
1,208
177
3
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid 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 Lice...
karamellpelle/grid
source/Game/Memory/Output.hs
gpl-3.0
1,058
0
5
180
66
55
11
2
0
module P18TempConverterSpec (main,spec) where import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck ((==>)) import P18TempConverter hiding (main) main :: IO () main = hspec spec spec :: Spec spec = do describe "toCelsius" $ do prop "is idempotent on Celsius inputs" $ \x -> toCelsius (...
ciderpunx/57-exercises-for-programmers
test/P18TempConverterSpec.hs
gpl-3.0
2,610
0
17
704
838
401
437
50
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} -- Spider for Book from OpenISBN module Spider.Book.Copy ( insertBookCopy ) where import Database.PostgreSQL.Simple import Database.PostgreSQL.Simple.SqlQQ import Text.Printf i...
XDU-PurpleBear/database
pb-spider/src/Spider/Book/Copy.hs
gpl-3.0
695
0
12
196
123
68
55
14
1
-- Author: Viacheslav Lotsmanov -- License: GPLv3 https://raw.githubusercontent.com/unclechu/xlib-keys-hack/master/LICENSE {-# LANGUAGE DeriveGeneric, DeriveAnyClass #-} module Types ( type AlternativeModeState , type AlternativeModeLevel (..) , numberToAlternativeModeLevel ) where import "base" ...
unclechu/xlib-keys-hack
src/Types.hs
gpl-3.0
1,133
0
7
158
189
108
81
-1
-1
{- - Copyright (C) 2014 Alexander Berntsen <alexander@plaimi.net> - - This file is part of coreutilhs. - - coreutilhs 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 y...
alexander-b/coreutilhs
sleep.hs
gpl-3.0
1,268
0
12
226
192
102
90
15
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/HTTPHealthChecks/List.hs
mpl-2.0
6,984
0
18
1,502
678
409
269
101
1
{-# LANGUAGE ForeignFunctionInterface #-} {- Copyright 2010 Daniel Silva Distributed under the AGPL v3. See LICENSE file. -} -- ghc --make -dynamic -shared -fPIC MobileGtk.hs -o libmobilegtk.so /usr/lib/ghc-6.12.1/libHSrts-ghc6.12.1.so -optl-Wl,-rpath,/usr/lib/ghc-6.12.1/ -optc '-DMODULE=MobileGtk' init.c -- ne...
dsilva/gtk-mobile-preload
MobileGtk.hs
agpl-3.0
6,000
0
17
1,088
1,209
619
590
-1
-1
-- C->Haskell Compiler: information about the C implementation -- -- Author : Manuel M T Chakravarty -- Created: 5 February 01 -- -- Version $Revision: 1.2 $ from $Date: 2005/01/16 21:31:21 $ -- -- Copyright (c) 2001 Manuel M T Chakravarty -- -- This file is free software; you can redistribute it and/or modify --...
thiagoarrais/gtk2hs
tools/c2hs/gen/CInfo.hs
lgpl-2.1
7,214
8
8
1,618
965
572
393
71
1
module BOM where import Control.Applicative import Control.Monad.State import Control.Monad.RWS import Control.Monad.Logic import Data.Function import Data.List import Data.Monoid import Data.Ord import qualified Data.Map as M bom = [ (1, pcb) , (1, mcu) , (1, avccDecouplingCapacitor) , (1, filterBead...
mokus0/schematics
xmega-e5-target/BOM.hs
unlicense
4,914
0
18
1,619
1,569
881
688
132
2
splitBy _ [] = [] splitBy a x = let s = takeWhile (/= a) x x'= dropWhile (/= a) x in if x' == [] then [s] else s:(splitBy a $ drop 1 x') ans s = let [m,n] = map read $ splitBy ':' s :: [Double] ang_s = 360 / 12 * m + 360 / 12 / 60 * n ang_l = 6 * n diff = abs (ang_s - ang_l) ...
a143753/AOJ
0135.hs
apache-2.0
603
0
14
235
300
155
145
25
4
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE Arrows #-} module Marvin.GUI.Main (mainMarvinGUI) where import Graphics.UI.Gtk as Gtk import Graphics.UI.Gtk.Glade import Data.Maybe import Data.Traversable import Control.Arrow import Prelude hiding (readFile) import Data.ByteString.Lazy (readFile) import qual...
gaborhermann/marvin
src/Marvin/GUI/Main.hs
apache-2.0
23,273
1
21
4,501
6,420
3,141
3,279
517
3
module Braxton.A284431 (a284431) where import Helpers.BraxtonHelper (enumerateSequences, SymmetricRelation(..), ReflexiveRelation(..)) a284431 n = length $ enumerateA284431 n n enumerateA284431 = enumerateSequences NonReflexive Symmetric sum -- (1,2,1,6,2,42,12,116,...) -- Counts A282166
peterokagey/haskellOEIS
src/Braxton/A284431.hs
apache-2.0
290
0
6
29
66
39
27
4
1
{-# LANGUAGE TemplateHaskell #-} -- | Smart constructor and destructor functions for CoreHW module CLaSH.Core.Util where import Data.HashMap.Lazy (HashMap) import Unbound.Generics.LocallyNameless (Fresh, bind, embed, unbind, unembed, unrebin...
christiaanb/clash-compiler
clash-lib/src/CLaSH/Core/Util.hs
bsd-2-clause
7,155
0
15
2,653
2,182
1,127
1,055
166
10
module Parser (Token(..), ParsingData(..), initParsingData, post, resultAccept, resultError) where import SemanticData type Value = MyType data Token = End | UMns | Ast | Sla | Pls | Mns | LParen | RParen | Id deriving (Enum, Eq) data StackFrame = StackFrame { state :: ParsingData -> Token -> Value -> (ParsingDat...
marionette-of-u/kp19pp
sample/haskell/Parser.hs
bsd-2-clause
9,651
0
17
2,815
4,577
2,333
2,244
255
7
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} module ETA.TypeCheck.TcValidity ( Rank, UserTypeCtxt(..), checkValidType, checkValidMonoType, expectedKindInCtxt, checkValidTheta, checkValidFamPats, checkValidInstance, validDerivPred, checkInstTermination, ch...
alexander-at-github/eta
compiler/ETA/TypeCheck/TcValidity.hs
bsd-3-clause
55,304
5
16
15,509
8,175
4,191
3,984
585
14
-- http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_1_C -- Rectangle -- input: 3 5 -- output: 15 16 import Control.Applicative main = do [a, b] <- map read . words <$> getLine let x = area a b y = circumference a b putStrLn $ show x ++ " " ++ show y area :: Int -> Int -> Int area a...
ku00/aoj-haskell
src/ITP1_1_C.hs
bsd-3-clause
399
2
10
103
159
76
83
10
1
{-# LANGUAGE DataKinds, TemplateHaskell, TypeFamilies, QuasiQuotes #-} import TICTACTOE import Data.Type.Equality t :: ([tq| x o x o o x ☐ ☐ x |]) :~: SOLVE DRAW t = Refl game :: ([tq| x o x o o x ☐ ☐ x |]) game = (?)
mxswd/ylj-2014
2_proof/tictactoe/Main.hs
bsd-3-clause
279
1
7
99
63
37
26
-1
-1
module AERN2.BoxFunMinMax.Expressions.EliminateFloats where import MixedTypesNumPrelude import AERN2.BoxFunMinMax.Expressions.Type import AERN2.BoxFunMinMax.Expressions.Translators.FPTaylor import System.Process import System.IO.Unsafe import AERN2.BoxFunMinMax.VarMap (VarMap) import System.Exit fpTaylorPath :: File...
michalkonecny/aern2
aern2-mfun/src/AERN2/BoxFunMinMax/Expressions/EliminateFloats.hs
bsd-3-clause
3,082
0
13
565
906
456
450
55
3
module CodeWidget.CodeWidget (codeWidgetNew, Code(..), CwAPI(..), CwSelection(..), Region, RegionID, PageID, rootRegion, CwView, CwIter ) where ...
termite2/code-widget
CodeWidget/CodeWidget.hs
bsd-3-clause
4,604
0
14
2,037
557
304
253
59
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -- | This is a "Now Playing"-style widget that listens for MPRIS -- events on DBus. Various media players implement this. This widget -- works with version 2 of the MPRIS protocol -- (http://www.mpris.org/2.0/spec.html). -- module System.Taffybar...
Undeterminant/taffybar
src/System/Taffybar/MPRIS2.hs
bsd-3-clause
4,783
0
18
1,270
1,422
700
722
106
5
------------------------------------------------------------------------------ -- | Project Euler No. 5 -- -- 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. -- -- What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?...
mazelife/project_euler
five.hs
bsd-3-clause
743
5
8
147
176
84
92
11
1
{-# LANGUAGE OverloadedStrings #-} -- | HTTP\/2 client library. -- -- Example: -- -- > {-# LANGUAGE OverloadedStrings #-} -- > module Main where -- > -- > import qualified Control.Exception as E -- > import Control.Concurrent (forkIO, threadDelay) -- > import qualified Data.ByteString.Char8 as C8 -- > import Network....
kazu-yamamoto/http2
Network/HTTP2/Client.hs
bsd-3-clause
4,669
0
14
973
783
455
328
71
1
{-# LANGUAGE TypeFamilies, TypeOperators, ConstraintKinds #-} {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP -- {-# OPTIONS_GHC -fno-warn-unused-binds #-} -- TEMP -- For Transformable instance. Maybe move...
conal/pixie
src/Pixie/TSFunTF.hs
bsd-3-clause
7,433
5
11
1,772
1,473
842
631
78
1
module Main where multiplesOf3or5 :: Int -> Int multiplesOf3or5 upTo = sum . takeWhile (< upTo) . filter divisibleBy3Or5 $ [1..] where divisibleBy3Or5 x = x `mod` 3 == 0 || x `mod` 5 == 0 main = do let number = multiplesOf3or5 1000 putStrLn $ "Sum: " ++ (show number)
tomob/euler
001/001.hs
bsd-3-clause
288
0
11
71
114
60
54
7
1
{-# LANGUAGE ForeignFunctionInterface, CPP #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.EXT.VertexWeighting -- Copyright : (c) Sven Panne 2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- S...
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/EXT/VertexWeighting.hs
bsd-3-clause
2,588
0
13
275
341
214
127
-1
-1
{- % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % \section[FloatOut]{Float bindings outwards (towards the top level)} ``Long-distance'' floating of bindings towards the top level. -} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS -fno-warn-tabs #-} -- The above warning supression flag is a tempora...
lukemaurer/sequent-core
src/Language/SequentCore/FloatOut.hs
bsd-3-clause
25,454
276
19
6,995
4,594
2,431
2,163
329
8
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} module Data.Aeson.Versions.AesonExtensions where import Data.Aeson import Data.Aeson.Types import Data.Functor.Identity import Data.Traversable import Data.Maybe -- | A typeclass to represent serializations that can possibly fail -- for exam...
vfiles/aeson-versioned
src/Data/Aeson/Versions/AesonExtensions.hs
bsd-3-clause
1,517
0
11
251
240
132
108
26
0
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} #ifdef DECLARE_NFDATA_INSTANCE {-#...
trskop/verbosity
src/Data/Verbosity.hs
bsd-3-clause
7,206
0
10
1,361
1,186
740
446
-1
-1
-- dirichletseries.hs module Math.DirichletSeries where import Math.NumberTheoryFundamentals (divides) import Math.MathsPrimitives ( ($+), ($-) ) import Math.QQ import Math.ArithmeticFunctions import Math.UPoly -- Dirichlet series is sum a_n n^-s data DirichletSeries a = DS [a] precisionDS = 16 :: ...
nfjinjing/bench-euler
src/Math/DirichletSeries.hs
bsd-3-clause
6,524
2
18
1,590
1,900
1,012
888
70
2
-- Copyright (c) Microsoft. All rights reserved. -- Licensed under the MIT license. See LICENSE file in the project root for full license information. import Test.Tasty import Test.Tasty.QuickCheck import Test.Tasty.HUnit (testCase) import Tests.Syntax import Tests.Syntax.JSON(methodParsingTests) import Tests.Codegen ...
chwarr/bond
compiler/tests/TestMain.hs
mit
9,804
0
13
3,965
1,216
631
585
204
1
{-# LANGUAGE ForeignFunctionInterface #-} {-| Module : Finance.Blpapi.Impl.SessionImpl Description : FFI for Session Copyright : Bloomberg Finance L.P. License : MIT Maintainer : agupta182@bloomberg.net Stability : experimental Portability : *nix, windows -} module Finance.Blpapi.Impl.SessionImpl where i...
bitemyapp/blpapi-hs
src/Finance/Blpapi/Impl/SessionImpl.hs
mit
11,446
0
19
4,007
2,316
1,131
1,185
233
2
{-# LANGUAGE FlexibleInstances #-} module Rede.SpdyProtocol.Framing.RstStream ( getRstStreamFrame ,rstStreamFrame ,getFrameResetReason ,RstStreamFrame(..) ,RstStreamValidFlags(..) ,FrameResetReason(..) ) where import Rede.SpdyProtocol.Framing.Frame import Data.BitSet.Generic(empty) import Data.Bin...
alcidesv/ReH
hs-src/Rede/SpdyProtocol/Framing/RstStream.hs
bsd-3-clause
1,934
20
12
365
467
262
205
60
1
module Music.Time.Split ( module Music.Time.Position, -- * The Splittable class Splittable(..), -- * Miscellaneous chunks, ) where import Control.Lens hiding (Indexable, Level, above, below, index, inside, p...
music-suite/music-score
src/Music/Time/Split.hs
bsd-3-clause
2,463
0
10
781
552
329
223
-1
-1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE BangPatterns , CPP , ExistentialQuantification , NoImplicitPrelude , RecordWildCards , TypeSynonymInstances , FlexibleInstances #-} -- | -- The event manager supports event notification on fds. Each fd may -- ...
pparkkin/eta
libraries/base/GHC/Event/Manager.hs
bsd-3-clause
18,343
0
24
4,803
4,149
2,158
1,991
330
9
{-# LANGUAGE OverloadedStrings #-} import Control.Monad (forever) import qualified Network.WebSockets as WS echo :: WS.Connection -> IO () echo conn = forever $ do msg <- WS.receiveDataMessage conn WS.sendDataMessage conn msg main :: IO () main = WS.runServer "0.0.0.0" 9160 $ \pending -> do ...
nsluss/websockets
benchmarks/echo.hs
bsd-3-clause
368
0
11
83
119
59
60
11
1
{- (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1996-1998 This module contains "tidying" code for *nested* expressions, bindings, rules. The code for *top-level* bindings is in TidyPgm. -} {-# LANGUAGE CPP #-} module CoreTidy ( tidyExpr, tidyVarOcc, tidyRule, tidyRules, tidyUn...
mcschroeder/ghc
compiler/coreSyn/CoreTidy.hs
bsd-3-clause
9,989
0
18
2,879
2,013
1,088
925
134
2
{-# LANGUAGE TemplateHaskell, GADTs #-} module T15815B where import T15815A mkFoo [t| Int -> Int |]
sdiehl/ghc
testsuite/tests/th/T15815B.hs
bsd-3-clause
102
0
5
18
18
12
6
4
0
{-# LANGUAGE PolyKinds, RankNTypes #-} module T11142 where import Data.Kind data SameKind :: k -> k -> * foo :: forall b. (forall k (a :: k). SameKind a b) -> () foo = undefined
sdiehl/ghc
testsuite/tests/polykinds/T11142.hs
bsd-3-clause
182
0
10
39
65
39
26
-1
-1
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | This module is not used by GHC itself. Rather, it exports all of -- the functions and types you are likely to need when writing a -- plugin for GHC. So authors of plugins can probably get away simply -- with saying "import GhcPlugins". -- -- Particularly interestin...
tjakway/ghcjvm
compiler/main/GhcPlugins.hs
bsd-3-clause
2,488
0
6
497
377
272
105
56
0
{-# language RecordWildCards #-} {-# language OverloadedStrings #-} -- | Atom and RSS feeds module Web.Hablog.Feed where import Web.Hablog.Config import Web.Hablog.Post import qualified Data.Set as S import qualified Text.Blaze.Html.Renderer.Text as HR import Data.Time import Data.Maybe (fromJust) import qualified D...
soupi/hablog
src/Web/Hablog/Feed.hs
mit
4,922
0
16
1,191
1,488
812
676
126
1
module Y2018.M04.D05.Exercise where {-- We're basically rewriting Store.SQL.Connection. Good module, if you only have one database to manage, but now I have multiple SQL databases, so I have to make all these functions confirgurable. --} import Control.Monad ((>=>)) import Database.PostgreSQL.Simple import System.Env...
geophf/1HaskellADay
exercises/HAD/Y2018/M04/D05/Exercise.hs
mit
1,286
0
11
275
240
133
107
20
1
module SPL.Parsers.AbsCK where -- Haskell module generated by the BNF converter newtype Ident = Ident String deriving (Eq,Ord,Show) data ConfigurationKnowledge = TConfigurationKnowledge [ConfigurationItem] deriving (Eq,Ord,Show) data ConfigurationItem = TBasicConfigurationItem FeatureExp [Transformation] |...
hephaestus-pl/hephaestus
willian/hephaestus-integrated/spl/src/SPL/Parsers/AbsCK.hs
mit
839
0
7
130
233
133
100
26
0
{-# LANGUAGE CPP #-} module GHCJS.DOM.MallocStatistics ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.MallocStatistics #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/MallocStatistics.hs
mit
361
0
5
33
33
26
7
4
0
{-# htermination sequence_ :: [[] a] -> [] () #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_sequence__2.hs
mit
50
0
2
10
3
2
1
1
0
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {- | Module : Orville.PostgreSQL.SqlType Copyright : Flipstone Technology Partners 2016-2021 License : MIT -} module Orville.PostgreSQL.Internal.ExecutionResult ( ExecutionResult (..), Column (..), Row (..), FakeLibPQResult, mkFakeLibPQResult, read...
flipstone/orville
orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/ExecutionResult.hs
mit
5,462
0
16
1,212
1,174
615
559
109
2
{-# LANGUAGE OverloadedStrings, FlexibleContexts #-} module TestUtil where import Data.Text (Text) import Text.ParserCombinators.Parsec import qualified Text.Parsec as T import Test.HUnit testParsecExpectVal :: (Eq a, Show a) => Text -> T.Parsec Text () a -> a -> Assertion testParsecExpectVal = testParsecExp...
emmanueltouzery/cigale-timesheet
tests/TestUtil.hs
mit
856
0
11
172
267
140
127
18
2
module Weapons.Pistols where import Weapon import Damage despair :: Weapon despair = Weapon { accuracy=1.0, capacity=210, critChance=0.025, critMultiplier=1.5, damage=[Damage 2 Impact, Damage 44 Puncture, Damage 8 Slash], fireRate=3.3, magazine=10, multishot=0, name="Despair", ...
m4rw3r/warframe-dmg-hs
src/weapons/pistols.hs
mit
2,311
0
8
563
736
461
275
101
1
{-# LANGUAGE OverloadedStrings #-} module Web.Pocket.Request ( request ) where -- aeson import Data.Aeson (FromJSON, ToJSON) import qualified Data.Aeson as Aeson -- base import Control.Monad.IO.Class (MonadIO) -- bytestring import Data.ByteString (ByteString) -- exceptions import Control.Monad.Catch (MonadTh...
jpvillaisaza/pocket-haskell
src/Web/Pocket/Request.hs
mit
1,074
0
15
192
309
176
133
31
2
{-# LANGUAGE ScopedTypeVariables, Rank2Types, CPP #-} -- -- (c) The University of Glasgow 2002-2006 -- -- Serialized values module GHCJS.Prim.TH.Serialized ( Serialized , fromSerialized , toSerialized , serializeWithData ...
ghcjs/ghcjs
lib/ghcjs-th/GHCJS/Prim/TH/Serialized.hs
mit
7,100
0
18
1,803
2,264
1,210
1,054
104
5
import Data.Maybe (fromMaybe) import qualified Faun.MarkovLogic as ML mln = ML.fromStrings [ "∀x Smoking(x) ⇒ Cancer(x) 1.5" , "∀xy Friend(x, y) ∧ Smoking(x) ⇒ Smoking(y) 1.1" , "∀x,y Friend(x, y) ⇔ Friend(y, x) 2.0" , "A.x !Cancer(x) 2.0"] cs = ["Jerry", "Elaine", "George"] ask = ML....
PhDP/Sphinx-AI
benchmarks/ExactInference.hs
mit
662
8
8
136
193
92
101
15
1
import System.Random -- DATA STRUCTURES type Point = (Int, Int) type Edge = (Point, Point) type Box = ([Edge], Int) type Board = [[Box]] type Strategy = (Board -> [Edge] -> IO Edge) -- GAME LOGIC -- Switch player changePlayer :: Int -> Int changePlayer 1 = 2 changePlayer 2 = 1 changeStrategy :: (Strategy, Strat...
bmoix/dots-and-boxes
dots-boxes.hs
mit
10,130
326
14
3,364
3,925
2,116
1,809
200
5
-- | "System.Process.ListLike" functions restricted to type 'Data.ByteString.Char8.ByteString'. -- All the module's supporting functions are also re-exported here. {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} module System.Process.ByteString ( readProcess , readProcessWithExitC...
ddssff/process-listlike-old
System/Process/ByteString.hs
mit
1,925
0
11
323
441
255
186
34
1
{-# LANGUAGE ExistentialQuantification, ParallelListComp, TemplateHaskell #-} {-| TemplateHaskell helper for Ganeti Haskell code. As TemplateHaskell require that splices be defined in a separate module, we combine all the TemplateHaskell functionality that HTools needs in this module (except the one for unittests). ...
vladimir-ipatov/ganeti
src/Ganeti/THH.hs
gpl-2.0
47,998
4
20
12,767
11,237
5,956
5,281
-1
-1
module Main where import Lib import System.Exit import Control.Exception main :: IO () main = do anHero res <- try mainAction :: IO (Either SomeException ()) case res of Left e -> die $ "Ошибка : " ++ show e Right () -> exitSuccess
gore-v/xc
app/Main.hs
gpl-2.0
271
0
11
77
99
49
50
11
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Main where import Control.Concurrent (newEmptyMVar, takeMVar, putMVar, threadDelay) import Control.Concurrent.Async (async, cancel, race_) import Control.Concurrent.STM (newTVarIO, writeTVar, atomically) import...
Southern-Exposure-Seed-Exchange/southernexposure.com
server/app/Main.hs
gpl-3.0
11,271
0
23
3,440
2,528
1,294
1,234
231
8
module File where import qualified Data.ByteString.Lazy as BStr import Control.Exception import Crypto.Hash import Data.List import System.Directory import System.Exit import System.FilePath import System.FilePath.Posix import System.Posix import System.Process import System.IO import Util printError :: IOException ...
Jon0/status
src/File.hs
gpl-3.0
7,655
0
20
1,938
2,555
1,268
1,287
222
7
{- Merch.Race.MapGen.Settlement - Generates settlements and the road network. Copyright 2013 Alan Manuel K. Gloria This file is part of Merchant's Race. Merchant's Race 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 Found...
AmkG/merchants-race
Merch/Race/MapGen/Settlement.hs
gpl-3.0
5,772
5
21
1,944
1,468
733
735
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} module Query.Field ( getDistinctFieldQuery , getDistinctFieldLikeQuery , getDistinctAlgorithmVersionQuery ) where import Data.Proxy (Proxy(...
merijn/GPU-benchmarks
benchmark-analysis/src/Query/Field.hs
gpl-3.0
3,388
0
12
714
877
472
405
80
2
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies #-} {-| This module exports routes for all the files in the static directory at compile time, allowing compile-time verification that referenced files exist. However, any files added during run-time can't be accessed this way; use their FilePath or URL to access...
trygvis/hledger
hledger-web/StaticFiles.hs
gpl-3.0
509
0
7
76
30
18
12
5
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Alerts/List.hs
mpl-2.0
5,355
0
17
1,241
787
460
327
115
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 #-} -- ...
olorin/amazonka
amazonka-ec2/gen/Network/AWS/EC2/CreateSnapshot.hs
mpl-2.0
5,258
0
11
1,083
564
355
209
76
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/Debug/Identitysources/Items/ListForunmAppedidentity.hs
mpl-2.0
8,722
0
22
1,922
1,128
649
479
172
1
{-# LANGUAGE OverloadedStrings #-} module Examples.Radio(radio) where import Development.NSIS import Development.NSIS.Plugins.EnvVarUpdate import Development.NSIS.Plugins.Sections radio = do name "Radio" outFile "radio.exe" installDir "$DESKTOP/Radio" requestExecutionLevel User -- page Director...
idleberg/NSIS
Examples/Radio.hs
apache-2.0
881
0
11
204
256
118
138
24
1
-- 510510 import Euler(allPrimes) nn = 1000000 -- maximize n / phi(n) by finding minimal phi(n) -- more factors => lower phi number -- more prime factors => even lower phi number (can build more divisors) -- if x mod n == 0 then phi(x) = phi(x*n) -- since there is a single maximum, just multiply by primes findMaxRati...
higgsd/euler
hs/69.hs
bsd-2-clause
473
2
8
91
91
47
44
5
1
{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-} ----------------------------------------------------------------------------- -- | -- Module : HEP.Storage.WebDAV.Type -- Copyright : (c) 2011-2013 Ian-Woo Kim -- -- License : GPL-3 -- Maintainer : Ian-Woo Kim <ianwookim@gmail.com> -- Stabilit...
wavewave/webdav-manager
src/HEP/Storage/WebDAV/Type.hs
bsd-2-clause
1,173
0
8
281
163
103
60
15
0
-------------------------------------------------------------------- -- | -- Copyright : (c) Edward Kmett and Dan Doel 2012-2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental -- Portability: non-portable -- ------------------------------------------------------------...
ekmett/ermine
src/Ermine/Parser/Keywords.hs
bsd-2-clause
1,333
0
6
270
185
120
65
44
1
-- 8319823 import Data.Function(on) import Data.List(minimumBy, sort) import Euler(allPrimes, intSqrt, toDigitsBase) nn = 10^7 -- minimize n / phi(n) by finding maximal phi(n) -- fewer factors => higher phi number, so build n from two primes -- only check primes within +/- order of magnitude of sqrt(n) totientPerms n...
higgsd/euler
hs/70.hs
bsd-2-clause
865
8
12
220
330
173
157
14
1
module Data.Blockchain.Types.BlockchainSpec (spec) where import TestUtil import qualified Control.Arrow as Arrow import qualified Data.Aeson as Aeson import qualified Data.HashMap.Strict as H import qualified Data.List.NonEmpty as NonEmpty import Data.Blockchain spec :: Spec spec...
TGOlson/blockchain
test/Data/Blockchain/Types/BlockchainSpec.hs
bsd-3-clause
9,752
0
23
3,284
1,923
934
989
132
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} module Client.Console where import Control.Lens ((.=), use, zoom, (^.), ix, preuse, (-=), (+=)) import Control.Monad (void, unless, when, liftM) import Data.Bits (shiftR, shiftL, (.&.), (.|.), xor) import Data.Char (o...
ksaveljev/hake-2
src/Client/Console.hs
bsd-3-clause
18,127
1
26
6,033
5,777
2,923
2,854
-1
-1
module Tile where data Point = Point Int Int deriving Show data Tile = Wall | Space | Hole | Gold | Monster | Player | DStairs | UStairs | VDoor deriving Eq instance Show Tile where show Wall = "#" show Space ...
hans25041/gringotz-level
src/Tile.hs
bsd-3-clause
714
0
6
258
221
118
103
32
1
{-# OPTIONS_GHC -fno-warn-unused-imports #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Tar -- Copyright : (c) 2007 Bjorn Bringert, -- 2008 Andrea Vezzosi, -- 2008-2009 Duncan Coutts -- License : ...
IreneKnapp/Faction
faction/Distribution/Client/Tar.hs
bsd-3-clause
31,452
0
19
8,749
6,929
3,671
3,258
575
15
module RemoteController where import Frenetic.NetCore import Frenetic.NetCore.JSON import Frenetic.NetCore.Semantics import Frenetic.Server import Text.JSON.Generic import Data.Generics main addr = do -- putStrLn . show . encodeJSON . MsgPolicy . PolProcessIn Any $ [ActFwd AllPorts unmodified] remoteController ad...
frenetic-lang/netcore-1.0
examples/RemoteController.hs
bsd-3-clause
334
0
9
45
61
36
25
9
1
{-# LANGUAGE OverloadedStrings, MultiWayIf #-} module ABFA.Zone where -- the zone screen and data is defined import qualified Data.List as L import qualified Data.ByteString.Lazy as BS import Data.Binary.Put import Data.ByteString.Base64 (encode, decode) import Control.Parallel.Strategies (parMap, rpar) imp...
coghex/abridgefaraway
src/ABFA/Zone.hs
bsd-3-clause
10,403
0
23
3,646
4,151
2,191
1,960
152
1
{-# LANGUAGE DoAndIfThenElse #-} module TMChunkedQueue ( tests ) where import Control.Monad.STM (atomically) import Data.Monoid import Control.Concurrent.STM.TMChunkedQueue import TestUtils import qualified TChunkedQueue import Test.Tasty import Test.Tasty.HUnit -- | Convenience specialization to avoid "Def...
KholdStare/stm-chunked-queues
tests/TMChunkedQueue.hs
bsd-3-clause
2,853
0
19
995
740
394
346
71
2
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ARB.RobustnessCore -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portabili...
haskell-opengl/OpenGLRaw
src/Graphics/GL/ARB/RobustnessCore.hs
bsd-3-clause
1,170
0
5
150
113
78
35
23
0
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module Main where import Control.Concurrent (threadDelay) import Control.Monad import Control.Monad.IO.Class import Data.Default import Data.Time import System.IO ...
cmahon/interactive-brokers
executable/Requests-Simple.hs
bsd-3-clause
1,735
0
12
394
388
198
190
46
1
-------------------------------------------------------------------------------- -- | -- Module : EasyGL.Obj.Obj2IM -- Copyright : Copyright (c) 2017, Jose Daniel Duran Toro -- License : BSD3 -- -- Maintainer : Jose Daniel Duran Toro <jose_daniel_d@hotmail.com> -- Stability : stable -- Portab...
JoseD92/EasyGL
src/EasyGL/Obj/Obj2IM.hs
bsd-3-clause
6,207
0
26
1,414
1,949
997
952
96
3
{-# language CPP #-} -- | = Name -- -- VK_KHR_maintenance3 - device extension -- -- == VK_KHR_maintenance3 -- -- [__Name String__] -- @VK_KHR_maintenance3@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 169 -- -- [__Revision__] -- 1 -- -- [__Extension and Versi...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_KHR_maintenance3.hs
bsd-3-clause
6,460
0
8
1,253
378
277
101
-1
-1
{-# LANGUAGE CPP #-} module Data.Streaming.Network.Internal ( ServerSettings (..) , ClientSettings (..) , HostPreference (..) , Message (..) , AppData (..) #if !WINDOWS , ServerSettingsUnix (..) , ClientSettingsUnix (..) , AppDataUnix (..) #endif ) where import Data.String (IsString...
phadej/streaming-commons
Data/Streaming/Network/Internal.hs
mit
2,855
0
13
661
559
333
226
105
0
<?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="ja-JP"> <title>Customizable HTML Report</title> <maps> <homeID>top</homeID> <mapref lo...
veggiespam/zap-extensions
addOns/customreport/src/main/javahelp/org/zaproxy/zap/extension/customreport/resources/help_ja_JP/helpset_ja_JP.hs
apache-2.0
970
84
52
158
394
208
186
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Config where import qualified Data.Bifunctor as BF import Data.ByteString as BS import qualified Data.List as List import qualified Data.Map.Strict as M import Data.Maybe (fromMaybe) import Data.Text hiding (empty) import qualif...
joelmccracken/git-stuff
src/Config.hs
bsd-3-clause
9,261
0
17
2,082
2,256
1,203
1,053
246
3
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ScopedTypeVariables #-} -- Load information on package sources module S...
DanielG/stack
src/Stack/Build/Source.hs
bsd-3-clause
21,051
0
27
7,283
4,856
2,517
2,339
-1
-1
{-# OPTIONS -fno-warn-tabs #-} -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and -- detab the module (please do the detabbing in a separate patch). See -- http://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces -- for de...
lukexi/ghc-7.8-arm64
compiler/nativeGen/SPARC/ShortcutJump.hs
bsd-3-clause
2,175
16
12
412
537
277
260
45
4
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-} module Aws.DynamoDb.Commands.Table ( -- * Commands CreateTable(..) , createTable , CreateTableResult(..) , DescribeTable(..) , DescribeTableResult(..) , Upda...
romanb/aws
Aws/DynamoDb/Commands/Table.hs
bsd-3-clause
18,748
0
31
5,056
3,516
1,941
1,575
-1
-1
-- Get an interactive shell with the right packages to load -- pandoc modules. -- To use: -- runghc Interact.hs -- then, -- :l Text/Pandoc.hs -- (or whichever package you like) -- You must have first done a 'cabal configure' or 'cabal install' import System.Process import Distribution.Simple.LocalBuildInfo import Di...
Lythimus/lptv
sites/all/modules/jgm-pandoc-8be6cc2/Interact.hs
gpl-2.0
1,122
0
15
175
280
143
137
17
1