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 Data.TrieMap.Representation (Repr(..), genRepr, genOptRepr, genOrdRepr) where import Data.TrieMap.Representation.Class import Data.TrieMap.Representation.Instances () import Data.TrieMap.Representation.TH
lowasser/TrieMap
Data/TrieMap/Representation.hs
bsd-3-clause
212
0
5
14
49
34
15
4
0
module Arhelk.Core.Rule( Rule , RuleM , proposeMany , propose , imply , implyNothing , implyMap , runRule ) where import Control.Monad.Reader import Control.Monad.Trans.RSS.Strict import Control.Monad.Writer import Lens.Simple newtype RuleM a b c = RuleM { unRuleM :: RSST a b () Identity c } der...
Teaspot-Studio/arhelk-core
src/Arhelk/Core/Rule.hs
bsd-3-clause
2,880
0
14
597
698
380
318
40
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} -- Create a source distribution tarball module ...
phadej/stack
src/Stack/SDist.hs
bsd-3-clause
14,896
0
19
3,775
3,586
1,879
1,707
266
10
import Data.Bits (xor) solve :: Integer -> Integer solve n = sum [ (cnt!!i) * (cnt!!j) * (cnt!!k) | i <- [0 .. 62], j <- [0 .. 62], k <- [0 .. 62], (i `xor` j `xor` k) /= 0] where cnt = [ (n `div` (2^i) + 1) `div` 2 | i <- [0 .. 62] ] main = print $ (solve n) `mod` modulo where modulo = 1234567890 n = 12...
foreverbell/project-euler-solutions
src/509.hs
bsd-3-clause
335
0
13
90
211
121
90
7
1
{-# LANGUAGE InstanceSigs #-} -- Also see FAlgebra.hs for an alternative exploration -- http://programmers.stackexchange.com/questions/242795/what-is-the-free-monad-interpreter-pattern -- http://www.haskellforall.com/2012/07/purify-code-using-free-monads.html -- https://ocharles.org.uk/blog/posts/2016-01-26-transformer...
dterei/Scraps
haskell/freemtl/Free.hs
bsd-3-clause
4,193
0
13
963
1,101
573
528
69
1
{-# LANGUAGE PatternGuards #-} module IRTS.CodegenJava (codegenJava) where import Idris.Core.TT hiding (mkApp) import IRTS.CodegenCommon import IRTS.Java.ASTBuilding import IRTS.Java.JTypes import IRTS.Java.Mangling import IRTS.Java.Pom (pomString...
ctford/Idris-Elba-dev
src/IRTS/CodegenJava.hs
bsd-3-clause
26,975
0
23
6,777
8,480
4,324
4,156
571
5
module Board.Naive ( NaiveBoard(..) ) where import Board.Common import Types import Data.Array import Data.Maybe newtype NaiveBoard = NaiveBoard (Array Coord Field) deriving (Show) instance Board NaiveBoard where board0 = NaiveBoard $ listArray ((1,1), (8,8)) initialPosition updateBoard b (Move from to) |...
sphynx/hamisado
Board/Naive.hs
bsd-3-clause
1,050
0
12
305
414
213
201
30
0
import Control.Concurrent import Control.Exception (finally) import Control.Monad.Reader import qualified Data.ByteString.Char8 as S import qualified Data.ByteString.Lazy.Char8 as L import qualified OpenSSL as SSL import qualified Network.Socket as Net import Network.Socket (Sock...
scslab/iterIO
Examples/httpServer.hs
bsd-3-clause
2,749
6
14
813
823
425
398
68
3
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | Test.Pos.Cbor.CborSpec specification module Test.Pos.Crypto...
input-output-hk/pos-haskell-prototype
crypto/test/Test/Pos/Crypto/CborSpec.hs
mit
2,592
0
21
969
573
269
304
-1
-1
module Penguin where data WherePenguinsLive = Galapagos | Antarctica | Australia | SouthAfrica | SouthAmerica deriving (Eq, Show) data Penguin = Peng WherePenguinsLive deriving (Eq, Show) isSouthAfrica :: WherePenguinsLive -> Bool isSouthAfrica SouthAfrica = True isSouthAfrica _ = False ...
brodyberg/Notes
ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/Penguin.hs
mit
800
0
7
164
197
106
91
26
1
-- Aside from sharing license info as a value itself, this is here so that our code will be recognized as FLO by LibreJS http://www.gnu.org/software/librejs module Handler.JsLicense where import Import import qualified Data.Text as T import Yesod.Form.Jquery data Lib = Lib { libName :: Text , libRoute ...
chreekat/snowdrift
Handler/JsLicense.hs
agpl-3.0
2,565
0
15
753
379
201
178
-1
-1
module Main where fibNextPair :: (Integer, Integer) -> (Integer, Integer) fibNextPair (x, y) = (y, x + y) fibNthPair :: Integer -> (Integer, Integer) fibNthPair 1 = (1, 1) fibNthPair n = fibNextPair (fibNthPair (n - 1)) fib :: Integer -> Integer fib = fst . fibNthPair
nmcl/scratch
haskell/fib_pair.hs
apache-2.0
306
0
9
84
120
69
51
8
1
{-# LANGUAGE TupleSections #-} module Main where import Test import Config import Benchmark import Prelude hiding (catch) import Data.List import Data.Maybe import Control.Arrow import Control.Monad import System.Environment import System.Console.CmdArgs (cmdArgs, getVerbosity, Verbosity(..)) --...
wilbowma/accelerate
accelerate-examples/src/Main.hs
bsd-3-clause
2,074
0
15
574
646
344
302
47
4
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecursiveDo #-} {-...
ryantrinkle/reflex-dom
reflex-dom-core/src/Reflex/Dom/Main.hs
bsd-3-clause
15,010
0
29
2,787
3,814
1,937
1,877
266
1
module HeadersByteString (headers) where import Common (pathTo, rechunkBS) import Criterion.Main (bench, bgroup, nf, nfIO) import Criterion.Types (Benchmark) import HeadersByteString.Atto (request, response) import Network.Wai.Handler.Warp.RequestHeader (parseHeaderLines) import qualified Data.Attoparsec.ByteString.Ch...
beni55/attoparsec
benchmarks/HeadersByteString.hs
bsd-3-clause
999
0
16
202
315
171
144
23
1
{-# OPTIONS_GHC -Wall #-} module Type.Environment ( Environment , initialize , getType, freshDataScheme, ctorNames , addValues , instantiateType ) where import qualified Control.Monad.State as State import qualified Data.List as List import Data.Map ((!)) import qualified Data.Map as Map im...
mgold/Elm
src/Type/Environment.hs
bsd-3-clause
6,804
0
21
2,172
2,372
1,249
1,123
166
11
{-# LANGUAGE OverloadedStrings #-} import Network.Wai import Network.Wai.Handler.Webkit import Network.HTTP.Types main :: IO () main = run "Sample App" app app :: Application app _ = return $ responseLBS status200 [("Content-Type", "text/html")] "<h1>Hello World!</h1>"
beni55/wai
wai-handler-webkit/sample.hs
mit
272
2
8
36
80
41
39
8
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} -- Module : Network.AWS.ElastiCache.Waiters -- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com> -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- ...
kim/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/Waiters.hs
mpl-2.0
3,888
0
14
935
700
382
318
65
1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Install -- Copyright : (c) 2005 David Himmelstrup -- 2007 Bjorn Bringert -- 2007-2010 Duncan Coutts -- License : BSD-like -- -- Mai...
DavidAlphaFox/ghc
libraries/Cabal/cabal-install/Distribution/Client/Install.hs
bsd-3-clause
65,104
0
31
18,305
12,303
6,395
5,908
1,137
12
{-# LANGUAGE TypeFamilies #-} ---------------------------------------------------------------------------- -- | -- Module : Haddock.Interface.Rename -- Copyright : (c) Simon Marlow 2003-2006, -- David Waern 2006-2009 -- License : BSD-like -- -- Maintainer : haddock@projects.haskell.o...
DavidAlphaFox/ghc
utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs
bsd-3-clause
19,822
0
17
4,799
6,172
3,082
3,090
384
24
{-| @/proc/stat@ data collector. -} {- Copyright (C) 2013 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This ...
kawamuray/ganeti
src/Ganeti/DataCollectors/CPUload.hs
gpl-2.0
5,899
0
20
1,268
1,252
665
587
111
3
----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Writer.Lazy -- Copyright : (c) Andy Gill 2001, -- (c) Oregon Graduate Institute of Science and Technology, 2001 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : lib...
johanneshilden/principle
public/mtl-2.2.1/Control/Monad/Writer/Lazy.hs
bsd-3-clause
1,514
0
6
296
166
120
46
26
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="hr-HR"> <title>JSON View</title> <maps> <homeID>jsonview</homeID> <mapref location="map...
thc202/zap-extensions
addOns/jsonview/src/main/javahelp/help_hr_HR/helpset_hr_HR.hs
apache-2.0
959
77
66
156
407
206
201
-1
-1
-- | A description of the platform we're compiling for. -- module Platform ( Platform(..), Arch(..), OS(..), ArmISA(..), ArmISAExt(..), ArmABI(..), target32Bit, isARM, osElfTarget, osMachOTarget, platformUsesFrameworks, pl...
lukexi/ghc-7.8-arm64
compiler/utils/Platform.hs
bsd-3-clause
4,213
0
9
1,317
701
413
288
110
1
{-# LANGUAGE DeriveFunctor #-} module Data.Trie.Naive ( Trie , singleton , singletonString , lookup , parser , fromList , fromListAppend , fromStringList ) where import Prelude hiding (lookup) import Data.Semigroup (Semigroup) import Data.Word (Word8) import Data.Map (Map) import Data.Bifunctor (se...
sdiehl/ghc
testsuite/tests/codeGen/should_run/T15038/common/Data/Trie/Naive.hs
bsd-3-clause
2,220
0
13
435
958
504
454
62
3
module DC () where data Foo a = F a a a z :: Foo Int z = F 1 2 3
mightymoose/liquidhaskell
tests/pos/datacon1.hs
bsd-3-clause
70
0
6
27
41
23
18
4
1
module A2 where import C2 main = (sumSquares [1 .. 4]) + (anotherFun [1 .. 4])
kmate/HaRe
old/testing/liftToToplevel/A2_AstOut.hs
bsd-3-clause
80
0
8
17
40
24
16
3
1
{-# LANGUAGE RankNTypes, NamedWildCards #-} -- See Trac #11098 module NamedWildcardExplicitForall where foo :: forall _a . _a -> _a -- _a is a type variable foo = not bar :: _a -> _a -- _a is a named wildcard bar = not baz :: forall _a . _a -> _b -> (_a, _b) -- _a is a ...
olsner/ghc
testsuite/tests/partial-sigs/should_fail/NamedWildcardExplicitForall.hs
bsd-3-clause
526
0
9
174
143
80
63
10
1
-- | -- Module : SpriteClip.Render -- Description : -- Copyright : (c) Jonatan H Sundqvist, 2015 -- License : MIT -- Maintainer : Jonatan H Sundqvist -- Stability : experimental|stable -- Portability : POSIX (not sure) -- -- Created September 7 2015 -- TODO | - UI and graphics settings -- - Facto...
SwiftsNamesake/SpriteClip
src/SpriteClip/Render.hs
mit
7,562
0
15
1,517
1,735
930
805
90
3
module Control.Monad.Activatable ( -- * The 'MonadActivatable' class MonadActivatable(..), switching', activateWith, activate, -- * The 'Activatable' monad Activatable, runActivatable, finalizeActivatable, -- * The 'ActivatableT' monad transformer ActivatableT(), runActivatableT, finalizeActivatableT, -...
antalsz/hs-to-coq
src/lib/Control/Monad/Activatable.hs
mit
492
0
5
62
84
59
25
10
0
module FromToExperiments where
NickAger/LearningHaskell
HaskellProgrammingFromFirstPrinciples/Chapter23.hsproj/FromToExperiments.hs
mit
35
0
2
7
4
3
1
1
0
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Com.Mysql.Cj.Mysqlx.Protobuf.Frame.Scope (Scope(..)) where import Prelude ((+), (/), (.)) import qualified Prelude as Prelude' import qualified Data.Typeable as...
naoto-ogawa/h-xproto-mysql
src/Com/Mysql/Cj/Mysqlx/Protobuf/Frame/Scope.hs
mit
2,332
0
11
368
638
352
286
52
1
{- ghci c:\Users\Thomas\Documents\GitHub\practice\pe\nonvisualstudio\haskell\Spec\Problem0011.Spec.hs c:\Users\Thomas\Documents\GitHub\practice\pe\nonvisualstudio\haskell\Implementation\Problem0011.hs c:\Users\Thomas\Documents\GitHub\practice\utilities\nonvisualstudio\haskell\Implementation\TestAbstract.hs -} -- :r :...
Sobieck00/practice
pe/nonvisualstudio/haskell/OldWork/Spec/Problem0011.Spec.hs
mit
5,014
0
10
1,053
2,582
1,666
916
61
1
res :: Integer main :: IO() res = (sum [1..100] ^ 2) - (sum [x ^ 2 | x <- [1..100]]) main = print ("The answer to Euler Problem 6 is " ++ show res)
andrew-christianson/Polyglot-Euler
Problem 6.hs
mit
149
0
11
36
84
44
40
4
1
module GiveYouAHead.New ( new ) where import System.Time (getClockTime) import GiveYouAHead.Common (writeF) import Macro.MacroParser(MacroNode(..)) import Macro.MacroIO(getMacroFromFile) import Macro.MacroReplace(findMacro,splitMacroDef,toText) ...
Qinka/GiveYouAHead
lib/GiveYouAHead/New.hs
mit
923
0
15
286
288
150
138
20
3
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Betfair.StreamingAPI.Responses.ConnectionMessage ( ConnectionMessage(..) ) where import Data.Aeson.TH (Options (omi...
joe9/streaming-betfair-api
src/Betfair/StreamingAPI/Responses/ConnectionMessage.hs
mit
698
0
9
154
119
74
45
16
0
{-# LANGUAGE RecordWildCards #-} module Classify0Spec ( main , spec ) where import Ch02KNN.Classify0 import DataFiles import qualified Data.Vector.Unboxed as VU import qualified Data.Map as M import MLUtil import Test.Hspec -- cf kNN.createDataSet values :: Matrix ...
rcook/mlutil
ch02-knn/spec/Classify0Spec.hs
mit
2,420
0
17
700
712
383
329
59
2
-- | -- | Module : Main.hs -- | Description : Entry point for the steg program -- | Copyright : (c) Jim Burton -- | License : MIT -- | -- | Maintainer : j.burton@brighton.ac.uk -- | Stability : provisional -- | Portability : portable -- | module Main where import Data.Maybe (fromJust) imp...
jimburton/steg
src/Main.hs
mit
1,359
0
13
351
342
191
151
26
3
module D20.Dice.Parser where import Text.Regex.Posix import D20.Dice pattern :: String pattern = "([0-9]*)d([0-9]+)([+-][0-9]+)?" parseNumber :: String -> Maybe Int parseNumber ('+':num) = Just $ read num parseNumber ('-':num) = Just $ -(read num) parseNumber "" = Nothing parseNumber num = Just $ read num pars...
elkorn/d20
src/D20/Dice/Parser.hs
mit
773
1
13
199
250
130
120
24
2
import Data.Generics.Uniplate.Direct data Expr a = Fls | Tru | Var a | Not (Expr a) | And (Expr a) (Expr a) | Or (Expr a) (Expr a) deriving (Show, Eq) instance Uniplate (Expr a) where uniplate (Not f) = plate Not |* f uniplate (And f1 f2) = plate And |* f1 |* f2 uniplate (Or f1 f2) = plate O...
riwsky/wiwinwlh
src/uniplate.hs
mit
1,375
0
15
407
757
408
349
40
6
-- | Implements Tarjan's algorithm for computing the strongly connected -- components of a graph. For more details see: -- <http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm> {-# LANGUAGE Rank2Types, Trustworthy #-} module Data.Graph.ArraySCC(scc) where import Data.Graph(Graph,Vertex) im...
yav/GraphSCC
Data/Graph/ArraySCC.hs
mit
3,842
0
17
1,286
1,075
558
517
74
3
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} module Javran.MaxFlow.Parser ( NetworkRep (..) , parseFromRaw ) where import Control.Applicative import Control.Monad.Except import Control.Monad.St...
Javran/misc
max-flow/src/Javran/MaxFlow/Parser.hs
mit
3,266
0
18
880
891
460
431
85
5
{-# LANGUAGE BangPatterns #-} {-# OPTIONS -fno-warn-orphans #-} -- ---------------------------------------------------------------------------- {- | Module : Holumbus.Index.Common.Occurences Copyright : Copyright (C) 2011 Sebastian M. Schlatt, Timo B. Huebel, Uwe Schmidt License : MIT Maintainer : Ti...
ichistmeinname/holumbus
src/Holumbus/Index/Common/Occurences.hs
mit
5,851
0
14
1,656
1,081
603
478
92
2
read_stdin = do input <- getContents evaluate $ force input int32_to_char :: Int32 -> Prelude.Char int32_to_char !i = toEnum (fromIntegral i) str_cons !x !xs = concat [xs, [int32_to_char x]] char_to_int32 :: Prelude.Char -> Int32 char_to_int32 !c = fromIntegral (fromEnum c) string_to_reuse_s...
redien/reuse-lang
compiler-backend/haskell/StdinWrapper.hs
cc0-1.0
1,070
0
14
291
384
183
201
-1
-1
-- -- Copyright (c) 2013 Bonelli Nicola <bonelli@antifork.org> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. --...
YelaSeamless/cgrep
src/Util.hs
gpl-2.0
1,497
0
11
322
292
162
130
21
2
{-# LANGUAGE TemplateHaskell #-} module Lambda.Derive.Config where import Lambda.Type hiding ( free_variables ) import Autolib.Set import Autolib.ToDoc import Autolib.Reader import Data.Typeable data Type = Make { start_size_range :: (Int, Int) , free_variables :: Set Identifier , overall_si...
florianpilz/autotool
src/Lambda/Derive/Config.hs
gpl-2.0
804
0
9
221
195
120
75
22
1
{-# LANGUAGE TemplateHaskell #-} import Geometry import Control.Applicative import Control.Category import Control.FilterCategory import Control.Monad import Data.ADT.Getters import Data.Map (Map, findWithDefault, insert) import Data.Monoid import FRP.Peakachu import FRP.Peakachu.Program import FRP.Peakachu.Backend.F...
yairchu/defend
src/defendFontEdit.hs
gpl-3.0
4,797
0
22
1,279
1,989
1,026
963
147
7
{-# LANGUAGE NoImplicitPrelude, DeriveFunctor, DeriveFoldable, DeriveTraversable, OverloadedStrings #-} module InferCombinators where import Prelude.Compat import Control.Lens (Lens') import qualified Control.Lens as Lens import Control.Lens.Operators import Control.Lens.Tuple ...
da-x/lamdu
test/InferCombinators.hs
gpl-3.0
10,228
0
18
2,201
3,028
1,573
1,455
210
4
{-# LANGUAGE TemplateHaskell, TypeApplications, RecordWildCards, ScopedTypeVariables, KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, DefaultSignatures #-} module Lamdu.Sugar.Eval ( addEvaluationResults ) where import qualified Control.Lens as Lens import Data.CurAndPrev (C...
lamdu/lamdu
src/Lamdu/Sugar/Eval.hs
gpl-3.0
9,042
0
18
2,493
3,068
1,582
1,486
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Network.Refraction.Discover.Advertiser ( runAdvertiser ) where import Control.Concurrent (threadDelay) import Control.Concurrent.Chan (Chan, readChan) import Control.Monad.CryptoRandom (crandomRs) import Crypto.Random.DRBG (CtrDRBG, newGenIO) import qualified Data.Byte...
hudon/refraction-hs
src/Network/Refraction/Discover/Advertiser.hs
gpl-3.0
3,209
0
13
577
848
441
407
62
2
module Strings where import Test.QuickCheck import Data.Char (chr) import qualified Data.Text as TS import qualified Data.Text.Lazy as TL -- Text instance Arbitrary TS.Text where arbitrary = TS.pack <$> mgenName -- arbitrary shrink xs = TS.pack <$> shrink (TS.unpack xs) instance Arbitrary TL.Text where ...
fcostantini/QuickFuzz
src/Strings.hs
gpl-3.0
954
0
12
221
354
189
165
27
1
module Main (main) where import XMonad import XMonad.Hooks.DynamicLog (statusBar, xmobarPP) import qualified Data.Map as M import Data.Maybe (fromMaybe) import System.Environment (lookupEnv) import Data.List (intercalate) import System.FilePath (dropFileName, (</>)) ---------- keysOverrides :: XConfig Layout -> M.M...
artuuge/NixOS-files
xmobar-volume/xmonad.hs
gpl-3.0
2,565
0
14
590
803
440
363
55
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.YouTubeAnalytics.Types.Sum -- Copyright : (c) 2015-201...
brendanhay/gogol
gogol-youtube-analytics/gen/Network/Google/YouTubeAnalytics/Types/Sum.hs
mpl-2.0
3,918
0
11
979
655
355
300
83
0
-- This file is part of purebred -- Copyright (C) 2017-2021 Róman Joost and Fraser Tweedale -- -- purebred 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 yo...
purebred-mua/purebred
src/Purebred/Types.hs
agpl-3.0
30,636
0
13
5,475
8,378
4,744
3,634
616
2
-- -*-haskell-*- -- GIMP Toolkit (GTK) OpenGL Extension -- -- Author : Duncan Coutts -- -- Created: 9 June 2005 -- -- Copyright (C) 2005 Duncan Coutts -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the F...
gtk2hs/gtkglext
Graphics/UI/Gtk/OpenGL.hs
lgpl-2.1
1,577
0
5
241
160
129
31
15
0
{-# language DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable #-} module Base.GameGrounds ( GameGrounds(GameGrounds, gameMainLayerUpdatingRange), gameBackgrounds, gameMainLayer, gameForegrounds, GameLayer(GameLayer, gameXDistance, gameYDistance), gameContent, mkGameGroun...
nikki-and-the-robots/nikki
src/Base/GameGrounds.hs
lgpl-3.0
1,897
0
10
397
542
302
240
50
1
module ReplaceExperiment where replaceWithP :: b -> Char replaceWithP = const 'p' lms :: [Maybe [Char]] lms = [Just "Ave", Nothing, Just "woohoo"] replaceWithP' :: [Maybe [Char]] -> Char replaceWithP' = replaceWithP liftedReplace :: [Maybe [Char]] -> [Char] liftedReplace = fmap replaceWithP twice...
thewoolleyman/haskellbook
16/07/maor/ReplaceExperiment.hs
unlicense
1,187
0
11
309
500
258
242
35
1
module Parse.Monad ( -- * Parse MonadParse(..) -- * Lex , MonadLex(..) -- * Combinator , optional -- * Error , Error(..) -- * Reexports , M.mapM , M.mapM_ ) where import qualified Control.Monad as M import qualified Parse.Location as L {- | An inhabitant of @m a@ ...
edom/ptt
src/Parse/Monad.hs
apache-2.0
2,128
0
9
623
462
253
209
40
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QColorDialog.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:16 Warning : this file is machine generated - do ...
uduki/hsQt
Qtc/Gui/QColorDialog.hs
bsd-2-clause
10,765
0
13
1,707
3,437
1,783
1,654
-1
-1
{-# LANGUAGE DefaultSignatures, FlexibleContexts, TypeOperators #-} module Data.Rule.Alignable ( Alignable(..) , GAlignable ) where import Control.Applicative import Control.Applicative.Backwards import Control.Comonad.Cofree import Control.Comonad.Env import Control.Monad.Free import Control.Monad.Trans.Either ...
ekmett/rules
src/Data/Rule/Alignable.hs
bsd-2-clause
4,579
0
14
995
2,075
1,046
1,029
88
0
module Road where import Control.Monad import qualified Data.BitSet.Dynamic as Bits import Data.BitSet.Dynamic (BitSet) data RoadBits = RoadBits { _road_bits :: BitSet Int } isRoad :: RoadBits -> Int -> Bool isRoad rbits i = Bits.member i (_road_bits rbits) instance Show RoadBits where show = showRoadBits show...
erantapaa/test-bitset
src/Road.hs
bsd-3-clause
658
0
14
133
237
127
110
18
2
module Zero.Exchange.Internal ( -- * Type synonyms CurrencyPair , Currency , Amount , Price , BidEntry , AskEntry , MarketBidEntry , MarketAskEntry , UserId , OrderId , OrderBookId , BidId , AskId , EntryId , TradeId -- * Data types , LimitOrder(..) , MarketOrder(..) , ...
et4te/zero
server/src/Zero/Exchange/Internal.hs
bsd-3-clause
3,781
0
12
869
1,126
638
488
129
1
-- | Helper functions for making openGL Drawings module Degu.DrawingUtils where import Degu.Font import Graphics.Rendering.OpenGL import Foreign import Control.Monad import Graphics.Rendering.FreeType.Internal.Bitmap makeTexture :: TextureSize2D -> ForeignPtr GLbyte -> IO TextureObject makeTexture sz@(TextureSize2D...
AtnNn/degu
Degu/DrawingUtils.hs
bsd-3-clause
1,900
0
33
543
772
393
379
43
2
import Control.Monad import Control.Concurrent import Network import TestSimple main :: IO () main = forever . (void . forkIO . testSimple . fst3 =<<) . accept =<< listenOn (PortNumber 54492) fst3 :: (a, b, c) -> a fst3 (x, _, _) = x
YoshikuniJujo/xml-push
examples/simpleServer.hs
bsd-3-clause
238
0
11
47
104
58
46
9
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.APPLE.ClientStorage -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/APPLE/ClientStorage.hs
bsd-3-clause
671
0
4
78
37
31
6
3
0
-- Copyright : Daan Leijen (c) 1999, daan@cs.uu.nl -- HWT Group (c) 2003, haskelldb-users@lists.sourceforge.net -- License : BSD-style module Opaleye.Internal.HaskellDB.Sql.Default where import Opaleye.Internal.HaskellDB.PrimQuery import qualified Opaleye.Internal.HaskellDB.PrimQuery as PQ imp...
hesselink/haskell-opaleye
src/Opaleye/Internal/HaskellDB/Sql/Default.hs
bsd-3-clause
8,975
0
16
2,962
2,304
1,211
1,093
188
25
module Mire.Test.Telnet (telnetTestGroup) where import Dawn import qualified Codec.Compression.Zlib as Zlib import qualified Data.ByteString.Char8 as CS import qualified Data.ByteString.Lazy.Char8 as CSL import Data.ByteString.Internal (c2w) import Mire.Telnet import Mire.Data.Flow import Test.Tasty import Test.Ta...
ellej/mire
test/Mire/Test/Telnet.hs
bsd-3-clause
3,641
0
17
719
889
478
411
78
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE ScopedTypeVariables #-} module TPar.ProcessPipe ( ProcessOutput(..) , runProcess -- * Killing the process , ProcessKilled(..) -- * Deinterleavin...
bgamari/tpar
TPar/ProcessPipe.hs
bsd-3-clause
5,045
0
18
1,519
1,336
690
646
120
3
-------------------------------------------------------------------------------- {-# LANGUAGE GeneralizedNewtypeDeriving #-} module LoremMarkdownum.Gen ( MonadGen (..) , GenIO , runGenIO , randomBool , oneOf , oneOfFrequencies , sampleFromList , sampleFromFrequencies , sampleFrom...
jaspervdj/lorem-markdownum
lib/LoremMarkdownum/Gen.hs
bsd-3-clause
5,103
0
13
1,075
1,292
674
618
89
2
module Day4 where import Crypto.Hash.MD5 import Data.ByteString (ByteString) import qualified Data.ByteString as B import Data.ByteString.Char8 (pack) import Data.Hex partTwo :: Int partTwo = solve (pack "000000") partOne :: Int partOne = solve (pack "00000") solv...
z0isch/advent-of-code
src/Day4.hs
bsd-3-clause
546
0
11
141
186
105
81
18
1
module Data where import Data.Derive.UniplateDirect import Language.Lua.Parser import Language.Lua.Syntax {-! deriving instance UniplateDirect (Block NodeInfo) !-}
mitchellwrosen/llint
src/Data.hs
bsd-3-clause
166
0
4
18
23
16
7
4
0
{-# LANGUAGE DeriveDataTypeable #-} module Language.TransactSql.Types ( SqlType(..) , Len(..) , Precision , Scale , Collation , precision , scale , len ) where import Data.Generics (Data, Typeable) type Precision = Int data Len = Varying Int Int ...
asztal/transact-sql
Language/TransactSql/Types.hs
bsd-3-clause
3,267
0
9
754
1,371
689
682
117
1
-- Copyright © 2012 Frank S. Thomas <frank@timepit.eu> -- All rights reserved. -- -- Use of this source code is governed by a BSD-style license that -- can be found in the LICENSE file. -- | Ohloh API Reference: <http://meta.ohloh.net/referencekudo_score/> module Web.Ohloh.KudoScore ( KudoScore(..), xpKudoScore ) ...
fthomas/ohloh-hs
Web/Ohloh/KudoScore.hs
bsd-3-clause
1,140
0
11
260
268
150
118
27
1
{-# language MultiParamTypeClasses#-} {-# language ScopedTypeVariables#-} {-# language ViewPatterns#-} {-# language GeneralizedNewtypeDeriving#-} {-# language TypeSynonymInstances#-} {-# language FlexibleInstances#-} {-# language DataKinds#-} {-# language GADTs#-} {-# language FlexibleContexts#-} {-# language Undecidab...
paolino/HDynTs
src/HDynTs/EulerTours/Core.hs
bsd-3-clause
8,919
0
18
2,289
2,702
1,427
1,275
145
3
{-# LANGUAGE DeriveFunctor, GeneralizedNewtypeDeriving #-} module General.ListBuilder( ListBuilder, runListBuilder, newListBuilder, Tree(..), flattenTree, unflattenTree ) where import Data.Semigroup import Prelude -- ListBuilder is opaque outside this module newtype ListBuilder a = ListBuilder (Tree a) ...
ndmitchell/shake
src/General/ListBuilder.hs
bsd-3-clause
1,243
0
9
353
499
264
235
36
3
{-# LANGUAGE DeriveDataTypeable #-} -- | -- Module : Crypto.PubKey.ECC.Types -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : Experimental -- Portability : Excellent -- -- References: -- <https://tools.ietf.org/html/rfc5915> -- module Crypto.PubKey.ECC.Types ( ...
tekul/cryptonite
Crypto/PubKey/ECC/Types.hs
bsd-3-clause
24,102
0
10
4,785
2,627
1,535
1,092
385
1
{-| Module : HeapSort Description : heapsort implemented in Haskell language Copyright : (c) Julia Sypień, Patrycja Tarasińska, 2017 License : GPL-3 Maintainer : sasuke96@tlen.pl Stability : experimental Portability : POSIX -} module Heapsort( -- *functions parent, leftChild, rightChild, heapify, buildHe...
Regulareveryday/our_sorting_algos
src/Heapsort.hs
bsd-3-clause
2,264
0
19
521
924
495
429
44
4
module Main where import Criterion.Main import GR4J runSeries :: Int -> [Double] runSeries n = [q | (q, _) <- run (replicate n (Observation "" 20 10 0)) (ParameterSet 400 1 150 5) (State 200 75 (replicate 5 0) (replicate 10 0)) ] runDay :...
tinyrock/gr4j
src/Bench.hs
bsd-3-clause
948
0
12
356
369
196
173
26
1
module Main where import Lib main :: IO () main = putStrLn $ show helloWorld ++ ";"
cosmo0920/hrr-stack-template
app/Main.hs
bsd-3-clause
86
0
7
19
33
18
15
4
1
module Checked.X2 where {-@ x :: {v:Int | v = 2} @-} x :: Int x = 2
spinda/liquidhaskell-cabal-demo
app/Checked/X2.hs
bsd-3-clause
69
0
4
19
17
11
6
3
1
module Iface.IfaceDriver where -- this module works as a facade for -- the other modules in this package. -- it exports only the function to -- write a module info and to read -- a set of module infos. -- it uses the import / export definitions -- in a module to write / read and to -- report error messages import ...
rodrigogribeiro/mptc
src/Iface/IfaceDriver.hs
bsd-3-clause
1,569
0
12
434
428
228
200
32
1
-- -- -- ----------------- -- Exercise 4.29. ----------------- -- -- -- module E'4'29 where import E'4'26 ( column ) import E'4'27 ( row , rowBlackAt ) import PicturesSVG ( Picture , black , beside , white , above ) diagonalBoth :: Integer -> Picture diagonalBoth length | length < 1 = error "Leng...
pascal-knodel/haskell-craft
_/links/E'4'29.hs
mit
2,502
0
13
930
611
329
282
45
1
{- | Module : $Header$ Description : Interface to the CspCASLProver (Isabelle based) theorem prover Copyright : (c) Liam O'Reilly and Markus Roggenbach, Swansea University 2009 License : GPLv2 or higher, see LICENSE.txt Maintainer : csliam@swansea.ac.uk Stability : provisional Portability : portab...
keithodulaigh/Hets
CspCASLProver/CspCASLProver.hs
gpl-2.0
9,449
0
17
2,399
1,394
734
660
118
3
-- Naive Sieve module NaiveSieve (primes, sieve) where primes :: [Integer] primes = sieve [2..] sieve :: [Integer] -> [Integer] sieve (p : xs) = p : sieve [x | x <- xs, x `mod` p > 0]
dkensinger/haskell
haskell-primes/NaiveSieve.hs
gpl-3.0
187
0
10
41
94
54
40
5
1
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section{Tidying up Core} -} module ETA.Main.TidyPgm ( mkBootModDetailsTc, tidyProgram, globaliseAndTidyId ) where import ETA.TypeCheck.TcRnTypes import ETA.Main.DynFlags import ETA.Core.CoreSyn import ETA.Core.CoreUnfold import ETA.Core.CoreFVs ...
pparkkin/eta
compiler/ETA/Main/TidyPgm.hs
bsd-3-clause
63,405
0
18
19,043
7,592
4,122
3,470
558
5
-- Copyright (c) 2015 Eric McCorkle. All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditi...
emc2/chill
src/IR/FlatIR/SSAConvert.hs
bsd-3-clause
12,283
8
29
3,712
1,817
1,024
793
-1
-1
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, DeriveDataTypeable, CPP, OverloadedStrings #-} {-# OPTIONS -Wall #-} module Language.Hakaru.Simplify ( closeLoop , simplify , toMaple , openLoop , main , Simplifiable(mapleType) , MapleException(MapleException) , InterpreterException(InterpreterExce...
bitemyapp/hakaru
Language/Hakaru/Simplify.hs
bsd-3-clause
6,077
0
17
1,323
1,695
896
799
130
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-rds/gen/Network/AWS/RDS/DescribeDBParameters.hs
mpl-2.0
6,603
0
12
1,470
874
522
352
90
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="tr-TR"> <title>Python Scriptleme</title> <maps> <homeID>top</homeID> <mapref location="...
kingthorin/zap-extensions
addOns/jython/src/main/javahelp/org/zaproxy/zap/extension/jython/resources/help_tr_TR/helpset_tr_TR.hs
apache-2.0
966
77
66
156
410
207
203
-1
-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="az-AZ"> <title>Python Scripting</title> <maps> <homeID>top</homeID> <mapref location="m...
kingthorin/zap-extensions
addOns/jython/src/main/javahelp/org/zaproxy/zap/extension/jython/resources/help_az_AZ/helpset_az_AZ.hs
apache-2.0
962
77
66
156
407
206
201
-1
-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="pl-PL"> <title>Python Scripting</title> <maps> <homeID>top</homeID> <mapref location="m...
kingthorin/zap-extensions
addOns/jython/src/main/javahelp/org/zaproxy/zap/extension/jython/resources/help_pl_PL/helpset_pl_PL.hs
apache-2.0
964
77
66
156
412
208
204
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} -- | Simple interface to complicated program arguments. -- -- This is a "fork" of the @optparse-simple@ package that has some workarounds for -- optparse-applicative issues that become problematic with programs that have many options and -- subcommands. Because it makes the interface ...
MichielDerhaeg/stack
src/Options/Applicative/Complicated.hs
bsd-3-clause
5,893
0
20
1,531
1,319
696
623
113
4
----------------------------------------------------------------------------- -- | -- Module : RefacRemoveField -- Copyright : (c) Christopher Brown 2007 -- -- Maintainer : cmb21@kent.ac.uk -- Stability : provisional -- Portability : portable -- -- This module contains a transformation for HaRe. -- Remov...
kmate/HaRe
old/refactorer/RefacRemoveField.hs
bsd-3-clause
12,828
7
27
4,427
4,320
2,217
2,103
-1
-1
{-@ LIQUID "--no-termination" @-} module Foo (add, remove, deleteMin, deleteMin') where import Language.Haskell.Liquid.Prelude data RBTree a = Leaf | Node Color a !(RBTree a) !(RBTree a) deriving (Show) data Color = B -- ^ Black | R -- ^ Red deriving (Eq,Show) ...
mightymoose/liquidhaskell
docs/slides/BOS14/hs/long/RBTree-ord.hs
bsd-3-clause
5,703
0
17
1,868
1,961
983
978
75
7
module LetIn1 where data Tree a = Leaf a | Branch (Tree a) (Tree a) fringe_global x = let fringe :: Tree a -> [a] fringe (Leaf x ) = [x] fringe (Branch left right) = fringe left ++ fringe right in fringe x
kmate/HaRe
old/testing/subIntroPattern/LetIn1.hs
bsd-3-clause
295
0
11
133
108
55
53
7
2
import System.Exit import Control.Monad.Trans.State.Strict eval :: Int -> State Int a -> a eval p = fst . flip runState p advance :: Int -> State Int () advance = modify' . (+) loc :: State Int Int loc = get emit1 :: State Int () emit1 = advance 1 emitN :: Int -> State Int () -- adding in the 0 case, breaks with H...
ezyang/ghc
testsuite/tests/simplCore/should_run/T14178.hs
bsd-3-clause
669
0
13
165
279
143
136
24
2
{-# LANGUAGE TypeFamilies #-} module T14033 where newtype Zero = Zero newtype Succ a = Succ a type family Add n m :: * where Add Zero m = m Add (Succ n) m = Succ (Add n m)
shlevy/ghc
testsuite/tests/indexed-types/should_fail/T14033.hs
bsd-3-clause
185
1
8
52
70
39
31
-1
-1
module ShouldSucceed where -- import TheUtils import qualified Data.Set as Set import Data.Set (Set) import Data.List (partition ) data Digraph vertex = MkDigraph [vertex] type Edge vertex = (vertex, vertex) type Cycle vertex = [vertex] mkDigraph = MkDigraph stronglyConnComp :: Eq vertex => [Edge vertex] -> [vert...
urbanslug/ghc
testsuite/tests/typecheck/should_compile/tc065.hs
bsd-3-clause
2,795
31
14
711
1,117
627
490
68
4
{-# LANGUAGE TypeFamilies, GADTs #-} module GADT8 where data Pair p where Pair :: p~(a,b) => a -> b -> Pair p -- this works: -- Pair :: a -> b -> Pair (a,b) foo :: Pair ((), ()) -> Pair ((), ()) foo (Pair x y) = Pair x y
urbanslug/ghc
testsuite/tests/indexed-types/should_compile/GADT8.hs
bsd-3-clause
232
0
9
62
99
55
44
6
1
{-# htermination sqrt :: Float -> Float #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_sqrt_1.hs
mit
44
0
2
8
3
2
1
1
0