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 Cube where import Graphics.Rendering.OpenGL import Graphics.UI.GLUT vertify3 :: [(GLfloat,GLfloat,GLfloat)] -> IO () vertify3 verts = sequence_ $ map (\(a,b,c) -> vertex $ Vertex3 a b c) verts cube w = renderPrimitive Quads $ vertify3 [ ( w, w, w), ( w, w,-w), ( w,-w,-w), ( w,-w, w), ( w, w,...
kjellwinblad/HaskellGravityWorld
Cube.hs
bsd-3-clause
953
0
10
248
843
522
321
19
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} module Main where ------------------------------------------------------------------------------- impor...
Soostone/hadron
examples/WordCountLocal.hs
bsd-3-clause
2,874
0
14
600
871
464
407
52
1
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Github.PostReceive.Types ( Payload (..) , IssueEvent (..) , PullRequestEvent (..) , IssueCommentEvent (..) , PushEvent (..) , StatusEvent (..) , Commit (..) , Repository (..) , User (...
neobrain/github-post-receive
src/Github/PostReceive/Types.hs
bsd-3-clause
19,639
0
139
5,842
4,816
2,699
2,117
578
2
-- 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. {- HLINT ignore "Use foldr1OrError" -} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAG...
facebookincubator/duckling
Duckling/Time/Types.hs
bsd-3-clause
30,048
0
18
6,686
8,957
4,718
4,239
632
6
{-# LANGUAGE NoImplicitPrelude #-} module Structure.Data.Predicate where import Structure.Function import Structure.Commutative import Structure.Monadiclasses.Functor import Structure.Monadiclasses.Conquer import Structure.Monadiclasses.Contravariant.Divide data Bool = False | True (&&) :...
Hexirp/monadiclasses
src/Structure/Data/Predicate.hs
bsd-3-clause
1,144
0
11
361
282
158
124
25
1
--------------------------------------------------------------------------- -- | Module : Math.Statistics.Dirichlet.Density -- Copyright : (c) 2009-2012 Felipe Lessa -- License : BSD3 -- -- Maintainer : felipe.lessa@gmail.com -- Stability : experimental -- Portability : portable -- -------------------------...
meteficha/statistics-dirichlet
src/Math/Statistics/Dirichlet/Density.hs
bsd-3-clause
6,149
0
21
1,752
1,556
811
745
-1
-1
module Graphics.Rendering.GLPlot.Shaders where import Control.Monad.Trans.Either import Control.Monad.IO.Class import qualified Data.ByteString.Char8 as BS import Graphics.Rendering.OpenGL.GL vertexShader = BS.pack $ unlines [ "#version 130" , "in vec2 position;" , "uniform mat4 matrix;" , "voi...
bgamari/gl-plot
Graphics/Rendering/GLPlot/Shaders.hs
bsd-3-clause
1,339
0
12
323
333
172
161
39
2
{-# LANGUAGE OverloadedStrings #-} import LibText import Prelude hiding (readFile) import Data.Text import Data.Text.IO import Data.List as L main :: IO () main = do tokens <- ghcMainTestSpecNew Prelude.putStrLn $ show tokens
clojj/haskell-view
test/MainTest.hs
bsd-3-clause
290
0
8
96
66
37
29
10
1
module Main where import Lib import Test.Hspec import Test.QuickCheck import Data.Typeable import Data.Array.Repa import Codec.Picture import Filters.Figures import IO.Arrays import IO.Files type FigureTester = (Point -> Double -> Figure) -> Int ->Int ->Double ->Int -> Int -> Bool normTester ::...
MajronMan/Himage
test/Spec.hs
bsd-3-clause
2,948
0
15
783
898
460
438
63
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.PackageDescription.Check -- Copyright : Lennart Kolmodin 2008 -- License : BSD3 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This has code for checking for various p...
seereason/cabal
Cabal/Distribution/PackageDescription/Check.hs
bsd-3-clause
67,714
0
22
18,049
12,670
6,611
6,059
1,141
33
module Typed.Generic (benchmarks, decodeBenchmarks) where import Prelude () import Prelude.Compat import Data.Aeson hiding (Result) import Criterion import Data.ByteString.Lazy as L import Twitter.Generic import Typed.Common encodeDirect :: Result -> L.ByteString encodeDirect = encode encodeViaValue :: Result -> L....
sol/aeson
benchmarks/Typed/Generic.hs
bsd-3-clause
1,235
0
12
257
338
179
159
31
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE BangPatterns #-} module Main where import Data.Bool import Data.Function import qualified Data.Map as M import Data.Monoid import Miso...
dmjio/miso
examples/mario/Main.hs
bsd-3-clause
4,707
0
13
1,494
1,367
754
613
160
3
{-| Pretty Printer Types -} module Urbit.Noun.Tank where import ClassyPrelude import Urbit.Noun.Conversions import Urbit.Noun.TH -------------------------------------------------------------------------------- type Tang = [Tank] data Tank = Leaf Tape | Plum Plum | Palm (Tape, Tape, Tape, Tape) [Tan...
jfranklin9000/urbit
pkg/hs/urbit-king/lib/Urbit/Noun/Tank.hs
mit
7,422
0
12
3,186
570
314
256
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} module Main where import Data.ByteString.Char8 ( ByteString ) import Data.Foldable ( for_ ) import Data.Vector.Storable ( Vector ) import qualified Data.Vector.Storable as VS import Foreign.C.Types ( CDouble, CInt ) import Foreign.Ma...
wavewave/HROOT
examples/graph2d.hs
gpl-3.0
2,109
0
20
536
852
453
399
58
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoMonomorphismRestriction #-} module CO4.Example.LoopTrsToyama where import qualified Prelude ; import Prelude (($), (-), (*)) import qualified Data.Maybe as M im...
apunktbau/co4
test/CO4/Example/LoopTrsToyama.hs
gpl-3.0
1,894
1
9
600
462
248
214
39
1
{-# LANGUAGE OverloadedStrings #-} module HROOT.Data.Hist.Class where import FFICXX.Generate.Code.Primitive ( bool , bool_ , cppclass, cppclass_ , cstring , double , double_ ...
wavewave/HROOT
HROOT-generate/lib/HROOT/Data/Hist/Class.hs
gpl-3.0
35,945
0
9
7,768
10,705
5,567
5,138
530
1
{-# LANGUAGE FlexibleContexts #-} {- - Copyright 2011-2015 Per Magnus Therning - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - ...
mmhat/cblrepo
src/Util/Misc.hs
apache-2.0
8,171
0
15
2,160
2,342
1,248
1,094
190
4
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DeriveFunctor #-} {- Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modifica...
apyrgio/ganeti
src/Ganeti/BasicTypes.hs
bsd-2-clause
15,951
0
13
3,482
3,464
1,897
1,567
-1
-1
module Hint.Annotations ( getModuleAnnotations, getValAnnotations ) where import Control.Monad import Data.Data import Annotations import Serialized import Hint.Base import HscTypes (hsc_mod_graph, ms_mod) import qualified Hint.GHC as GHC -- Get the annotations associated with a particular module. getModuleA...
meditans/hint
src/Hint/Annotations.hs
bsd-3-clause
1,009
0
15
187
328
170
158
23
1
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import Common import Prelude () import qualified GitHub main :: IO () main = do auth <- getAuth possibleUsers <- GitHub.executeRequestMaybe auth $ GitHub.usersFollowingR "mike-burns" GitHub.FetchAll putStrLn $ either (("Error: " <>) . tshow) ...
jwiegley/github
samples/Users/Followers/ListFollowers.hs
bsd-3-clause
507
0
13
119
136
74
62
14
1
module RSA.Euclid where -- $Id$ -- | return (x, y) with ax + by = gcd a b euclid :: Integral a => a -> a -> (a, a) euclid a b = if b == 0 then ( 1 , 0 ) else let (q, r) = divMod a b (x, y) = euclid b r -- gcd = b x + r y = b x + (a - q b) y = a y + b (x - q y) in (y, x - q *...
Erdwolf/autotool-bonn
src/RSA/Euclid.hs
gpl-2.0
324
2
10
135
119
66
53
10
2
-- Copyright 2016 TensorFlow authors. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agree...
jcberentsen/haskell
tensorflow/src/TensorFlow/Internal/VarInt.hs
apache-2.0
1,516
0
15
337
262
148
114
22
2
{-| Executing jobs as processes The protocol works as follows (MP = master process, FP = forked process): * MP sets its own livelock as the livelock of the job to be executed. * FP creates its own lock file and sends its name to the MP. * MP updates the lock file name in the job file and confirms the FP it can st...
grnet/snf-ganeti
src/Ganeti/Query/Exec.hs
bsd-2-clause
12,185
14
18
3,039
2,090
1,083
1,007
168
5
module Print where import FFI import Prelude data Foo = Foo { foo :: Double, bar :: String } main :: Fay () main = do callback (Foo 123 "abc") (\(Foo n s) -> do printDouble n printString s) callback :: Foo -> (Foo -> Fay ()) -> Fay () callback = ffi "global.callback(%1,%2...
fpco/fay
examples/obj.hs
bsd-3-clause
461
0
12
124
172
89
83
15
1
module Json2WP where import Text.JSON import Types import Data.Ratio json2WP (JSObject p) = WikiPage title ns sections $ Meta cats (version, lrAuthor, lsTime) (cAuthor, cTime) where -- general matching [ ("title", JSString titleJ) , ("namespace", JSSt...
hendrysuwanda/101dev
tools/mongodbimporter/Json2WP.hs
gpl-3.0
1,919
0
11
686
430
234
196
33
1
{-# LANGUAGE LambdaCase, RankNTypes, ScopedTypeVariables #-} module Streaming.Prelude.Fused (cons, drop, filter, filterM, foldl', fold, fold', foldM, foldM', yield, iterate, iterateM, map, mapM, mapsM, print, repeat, repeatM, replicate, scanr, span, s...
PierreR/streaming
benchmarks/old/Stream/Prelude/Fused.hs
bsd-3-clause
7,769
0
15
2,042
2,915
1,525
1,390
189
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>Directory List v2.3</title> <maps> <homeID>directorylistv2_3</homeID> <m...
thc202/zap-extensions
addOns/directorylistv2_3/src/main/javahelp/help_az_AZ/helpset_az_AZ.hs
apache-2.0
978
78
66
157
412
209
203
-1
-1
module WhereIn6 where --A definition can be demoted to the local 'where' binding of a friend declaration, --if it is only used by this friend declaration. --Demoting a definition narrows down the scope of the definition. --In this example, demote the top level 'addthree' to 'fun' --This example also aims to test the ...
kmate/HaRe
old/testing/demote/WhereIn6.hs
bsd-3-clause
442
0
7
89
68
37
31
4
1
module Guards3 where f = let g :: Int -> Int g 1 = 45 g x = 90 - x in if x == 1 then g (x + 1) else g x where x = 56
kmate/HaRe
old/testing/whereToLet/Guards3_TokOut.hs
bsd-3-clause
191
0
10
112
76
40
36
7
3
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : ...
frantisekfarka/ghc-dsi
libraries/base/Control/Monad.hs
bsd-3-clause
10,705
0
12
2,965
2,657
1,422
1,235
150
2
{-# LANGUAGE Safe #-} {-# LANGUAGE GADTs #-} ----------------------------------------------------------------------------- -- | -- Module : Text.Printf -- Copyright : (c) Lennart Augustsson and Bart Massey 2013 -- License : BSD-style (see the file LICENSE in this distribution) -- -- Maintainer : Bart M...
beni55/haste-compiler
libraries/ghc-7.10/base/Text/Printf.hs
bsd-3-clause
30,711
278
23
8,005
6,052
3,398
2,654
421
13
module Distribution.Client.Dependency.Modular.Index where import Data.List as L import Data.Map as M import Prelude hiding (pi) import Distribution.Client.Dependency.Modular.Dependency import Distribution.Client.Dependency.Modular.Flag import Distribution.Client.Dependency.Modular.Package import Distribution.Client.D...
trskop/cabal
cabal-install/Distribution/Client/Dependency/Modular/Index.hs
bsd-3-clause
1,948
0
14
509
443
259
184
24
1
-- test Lifting instances {-# LANGUAGE TemplateHaskell #-} module TH_Lift where import Language.Haskell.TH.Syntax import Data.Ratio import Data.Word import Data.Int import Numeric.Natural a :: Integer a = $( (\x -> [| x |]) (5 :: Integer) ) b :: Int b = $( (\x -> [| x |]) (5 :: Int) ) b1 :: Int8 b1 = $( (\x -> [|...
ghc-android/ghc
testsuite/tests/th/TH_Lift.hs
bsd-3-clause
1,344
0
9
380
799
489
310
51
1
module Y2018.M12.D05.Exercise where import Y2018.M12.D03.Exercise -- So you have the 5-letter palindromes from yesterday's exercise: palindromes :: [String] palindromes = ["AJAJA","ALALA","ALULA","ANANA","ARARA","CIVIC","KAYAK","KAZAK", "KELEK","LEMEL","LEVEL","MADAM","MESEM","MINIM","RADAR","REFER", ...
geophf/1HaskellADay
exercises/HAD/Y2018/M12/D05/Exercise.hs
mit
1,210
0
7
202
206
126
80
15
1
---------------------------------------------------------------- -- -- | aartifact -- http://www.aartifact.org/ -- -- @src\/ExpSubst.hs@ -- -- Capture-avoiding substitution on expressions. -- ---------------------------------------------------------------- -- module ExpSubst (Subst, emptySubst, match, exmch, subs...
aartifact/aartifact-verifier
src/ExpSubst.hs
mit
7,736
0
16
2,181
4,032
2,096
1,936
121
8
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverlappingInstances #-} module HaskellBinding where import Data.Complex import Data.Ratio import Control.Applicative import Data.IORef import Control.Monad.Trans import LispData import Numbers -- | creates an environment from a list of string lisp value pairs makeEn...
orion-42/my-lisp
HaskellBinding.hs
mit
4,954
0
14
1,293
1,729
892
837
118
1
import Data.Char (digitToInt) {- only intended for positive numbers -} toDigits :: Int -> [Int] toDigits = map digitToInt . show toDigitsRev :: Int -> [Int] toDigitsRev = map digitToInt . reverse . show {- # double every other value from the right # -} -- 1. pattern matching doubleP :: [Int] -> [Int] doubleP [] = []...
mohamedhayibor/haskelling-hard
cs194/validatingCreditCardNumbers.hs
mit
1,049
0
9
187
297
165
132
17
1
module Data.Conduit.Arrow.Combinators ( map , mapE , omapE , scanl , scanl0 , mapM , mapME , omapME , iterM , scanlM , scanl0M ) where import Prelude hiding (map, scanl, mapM) import Control.Monad.Trans.Class import ...
farrellm/conduit-arrow
src/Data/Conduit/Arrow/Combinators.hs
mit
1,783
0
11
470
708
375
333
42
1
{-# LANGUAGE OverloadedStrings #-} module Day6.Parser where import Control.Applicative (many, (<|>)) import Data.Attoparsec.ByteString.Char8 import Day6.Day6 lightActionParser :: Parser LightAction lightActionParser = (string "turn on" >> return TurnOn) <|> (...
brsunter/AdventOfCodeHaskell
src/Day6/Parser.hs
mit
1,141
0
9
316
296
151
145
32
1
{-# LANGUAGE OverloadedStrings #-} module Main where import Crypto.RNCryptor.V3.Decrypt import qualified System.IO.Streams as S import System.Environment import qualified Data.ByteString.Char8 as B main :: IO () main = do args <- getArgs case args of key:_ -> decryptStream (B.pack key) S.stdin S.stdout _ ...
RNCryptor/rncryptor-hs
example/StreamingDecrypter.hs
mit
365
0
13
61
102
58
44
12
2
{-# LANGUAGE OverloadedStrings #-} module Database.Neo4j.Index where import Data.Aeson ((.=)) import qualified Data.Aeson as J import qualified Data.ByteString.Char8 as S import qualified Data.Text as T import qualified Data.Text.Encoding as TE import Database.Neo4j.Types import Database.Neo4j.Http indexPath :: ...
asilvestre/haskell-neo4j-rest-client
src/Database/Neo4j/Index.hs
mit
1,075
0
11
189
331
182
149
20
2
{- | module: Main description: Profiling the higher order logic kernel license: MIT maintainer: Joe Leslie-Hurd <joe@gilith.com> stability: provisional portability: portable -} module Main ( main ) where import qualified System.Environment as Environment import HOL.OpenTheory (readArticle,readPackages) import qual...
gilith/hol
src/Profile.hs
mit
1,028
0
12
202
239
126
113
26
3
import Math.NumberTheory.Primes.Sieve(primes) import Data.List(maximumBy) intPrimes :: [Int] intPrimes = map fromIntegral primes primesProd = (head primes) : zipWith (*) primesProd (tail primes) main = print $ last $ takeWhile (<=1000000) primesProd
dpieroux/euler
0/0069.hs
mit
252
0
8
33
93
52
41
6
1
{-# LANGUAGE TupleSections #-} module P011 where import Euler solution :: EulerType solution = Left . maximum $ map (product . map (listArray ((1, 1), (20, 20)) [ 8, 2, 22, 97, 38, 15, 0, 40, 0, 75, 4, 5, 7, 78, 52, 12, 50, 77, 91, 8, 49, 49, 99, 40, 17, 81, 18, 57, 60, 87, 17, 40, 98, 43, 69, 48, 4, 56, 62...
Undeterminant/euler-haskell
P011.hs
cc0-1.0
2,142
52
19
634
1,565
1,009
556
32
1
{- Author: Nick(Mykola) Pershyn Language: Haskell Program: Dominion Client -} module Main where import System.IO import Text.ParserCombinators.Parsec import Data.Foldable (forM_) --import DominionNotifications -- for testing import DominionTypes (Notification) import DominionPlayers (okayPlayer_v1, playerResponse, Do...
LinuxUser404/haskell-dominion
src/DominionClient.hs
gpl-2.0
1,604
0
16
376
400
201
199
39
3
{- Copyright 2012, 2013, 2014 Colin Woodbury <colingw@gmail.com> This file is part of Aura. Aura 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 ve...
vigoos/Farrago-OS
aura-master/aura-master/src/Aura/Flags.hs
gpl-2.0
12,843
0
12
4,184
3,361
1,967
1,394
274
1
instance Contravariant (Op r) where -- (b -> a) -> Op r a -> Op r b contramap f g = g . f
hmemcpy/milewski-ctfp-pdf
src/content/1.8/code/haskell/snippet26.hs
gpl-3.0
97
0
7
31
30
15
15
2
0
-- |Hascal is a simple, minimalistic, tiny calculator library and program. -- -- * Hascal only understands single-character operators. -- * Hascal only understands infix operators. -- * Hascal does not understand parantheses. -- * @_@ is hard-coded as single prefix for negating numbers. -- * By default, Hascal understa...
mekeor/hascal
Hascal.hs
gpl-3.0
5,724
0
13
1,218
1,067
603
464
69
3
module Errors where import Control.Monad.Error -- An error data ShellError = GeneralError String | ReturnCode String Int | DirectoryNotFound String | ParserError String type ThrowsError = Either ShellError instance Error ShellError where noMsg = GeneralError "An er...
acieroid/hashell
Errors.hs
gpl-3.0
974
0
13
283
280
148
132
24
6
{-# LANGUAGE TemplateHaskell, CPP #-} module Formats ( formats ) where import Test.QuickFuzz.Gen.FormatInfo -- Base import Test.QuickFuzz.Gen.Base -- Document #ifdef DOC import Test.QuickFuzz.Gen.Document #endif -- Archives #ifdef ARCH import Test.QuickFuzz.Gen.Archive #endif -- Media #ifdef MEDIA import Test.Qui...
CIFASIS/QuickFuzz
app/Formats.hs
gpl-3.0
1,586
0
6
326
415
306
109
7
1
module Main where import Format import RedError import Trace noone :: Int -> OrangeComp Int noone i | ftrace (fconcat (format "noone " Bold) (format (show i) Blue)) False = undefined noone 1 = throwError (RedError "NO:" "ones!") noone i = return 1 main :: IO () main = do fprint (format "some text\n" Blue) fp...
Geogi/hscolortest
Main.hs
gpl-3.0
437
0
14
97
186
89
97
17
2
{-# 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/PlayLists/Update.hs
mpl-2.0
5,036
0
14
1,096
493
301
192
74
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-container/gen/Network/Google/Resource/Container/Projects/Locations/Clusters/SetResourceLabels.hs
mpl-2.0
6,023
0
16
1,289
779
455
324
122
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/ImportVolume.hs
mpl-2.0
5,359
0
9
1,227
692
420
272
81
1
module Graph.SpanningTree ( spanningTree ) where import Data.List import Graph.Graph --Initialize the Minimum Spanning Tree Calc --Return Nothing if g is disconnected spanningTree :: Graph -> Maybe Graph spanningTree g = spanning close open es (newGraph n []) where close = [n'] n@(n':open) = getNo...
leormarqs/TrabalhoGrafos
src/Graph/SpanningTree.hs
agpl-3.0
1,640
0
15
450
533
282
251
31
3
{- This file is part of Tractor. Tractor is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Tractor is distribu...
ak1211/tractor
src/ModelDef.hs
agpl-3.0
5,694
0
13
1,815
948
530
418
95
5
module Sound.Analysis.Vamp ( module Sound.Analysis.Vamp.Path , module Sound.Analysis.Vamp.Plugin , module Sound.Analysis.Vamp.PluginDescriptor , module Sound.Analysis.Vamp.TimeStamp ) where import Sound.Analysis.Vamp.Path import Sound.Analysis.Vamp.Plugin import Sound.Analysis.Vamp.PluginDescriptor import So...
kaoskorobase/hvamp
Sound/Analysis/Vamp.hs
lgpl-3.0
348
0
5
35
69
50
19
9
0
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} module Mdb.Serve.TranscodeSpec ( VideoSpecH264(..), AudioSpecAAC(..), TranscodeSpec(..), Stream(..), StreamType(..), Container(..) ) where import Data.Aeson ( FromJSON(..), Value(..), (.:), eitherDecodeStrict' ) import Data...
waldheinz/mdb
src/lib/Mdb/Serve/TranscodeSpec.hs
apache-2.0
2,895
16
13
732
746
407
339
79
0
module Main where import InputOutput main :: IO () main = commandHandler
mboogerd/hello-haskell
app/Main.hs
apache-2.0
74
0
6
13
22
13
9
4
1
{-# LANGUAGE TemplateHaskell #-} module SSync.BlockSize ( BlockSize , blockSize , mkBlockSize , blockSizeWord ) where import Data.Maybe (fromMaybe) import Data.Word (Word32) import Language.Haskell.TH import SSync.Constants (maxBlockSize) newtype BlockSize = BlockSize Word32 deriving (Eq, Ord) blockSize :: Int -...
socrata-platform/ssync
src/main/haskell/SSync/BlockSize.hs
apache-2.0
1,096
0
11
216
335
174
161
32
2
module DefinedNamesBase(module DefinedNames) where -- all instances are exported anyway... import Syntax(HsDeclI,HsTypeI,HsPatI) import DefinedNames import DefinedNamesBaseStruct() {-+ This module contains just the knot tying definitions for the base syntax. The reusable instances for the base structure are located...
forste/haReFork
tools/base/defs/DefinedNamesBase.hs
bsd-3-clause
956
0
7
134
199
111
88
-1
-1
module Main where import VisPar import Control.DeepSeq example :: Par Int example = do one <- new two <- new three <- new fork $ do x <- get one put two (x + 1) fork $ do x <- get one put three (x + 2) put one 1 (+) <$> get two <*> get three main :: IO () main = do print $ runPar ...
MaximilianAlgehed/VisPar
examples/Broadcast.hs
bsd-3-clause
411
0
12
121
186
86
100
21
1
module Main where import Control.Monad (forM_) import Data.Text (Text) import Stuff (urls, getUrl, printResult) main :: IO () main = printSources urls printSources :: [Text] -> IO () printSources urlList = do forM_ urlList fetchAndPrint putStrLn "All done!" fetchAndPrint :: Text -> IO () fetchAndPrint url = get...
toddmohney/concurrency-example
serial/Main.hs
bsd-3-clause
348
0
7
60
127
66
61
12
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-| Module : Stack.Sig.Sign Description : Signing Packages Copyright : (c) FPComplete.com, 2015 License : BSD3 Maintainer : Tim Dysinger <tim@fpco...
MichielDerhaeg/stack
src/Stack/Sig/Sign.hs
bsd-3-clause
4,594
0
22
1,442
932
482
450
87
5
module Main where import CVSU.PixelImage hiding (readPixelImage,writePixelImage) import CVSU.QuadForest import CV.CVSU import ReadArgs -- Segments an image using c implementation of overlap measures for consistency -- and similarity. Works quite well for regions with high variation and texture, -- but tends to overse...
amnipar/hs-cvsu
examples/overlapsegment.hs
bsd-3-clause
1,485
0
11
263
125
77
48
11
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} module Stack.Solver ( checkResolverSpec ...
AndreasPK/stack
src/Stack/Solver.hs
bsd-3-clause
33,215
256
29
10,235
6,650
3,537
3,113
555
8
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module NLP.Semiring.Prob where import NLP.Semiring -- | The 'Prob' semiring keeps track of the likelihood of the known output -- by keeping track of the probability of all paths. newtype Prob = Prob Double deriving (Eq, Show, Num, Fractional, Ord) instance Multipl...
srush/SemiRings
NLP/Semiring/Prob.hs
bsd-3-clause
491
0
6
104
100
58
42
13
0
{-# LANGUAGE FlexibleInstances , UndecidableInstances , TemplateHaskell #-} module Data.StructuralTraversal.Instances where import Data.StructuralTraversal.Class import Control.Applicative import Data.Traversable import Data.StructuralTraversal.TH deriveStructTrav ''[] deriveStructTra...
nboldi/structural-traversal
src/Data/StructuralTraversal/Instances.hs
bsd-3-clause
357
0
7
61
56
30
26
11
0
module Handler.Submit where import Import import Database.Persist.Class.Extra (insertBy') import View.Resource (resourceForm) getSubmitR :: Handler Html getSubmitR = do uid <- requireAuthId (widget, enctype) <- generateFormPost (resourceForm uid) defaultLayout $ do setTitle "dohask...
mitchellwrosen/dohaskell
src/Handler/Submit.hs
bsd-3-clause
2,043
0
25
644
523
256
267
-1
-1
{-# LANGUAGE MultiParamTypeClasses #-} module Util ( Creatable (..) , Cast (..) , defaultRandom , Rect (..) ) where import Data.Serialize class Serialize a => Creatable a where seeded :: Int -> a defaultRandom :: Creatable a => a defaultRandom = seeded 0 -- | Cast laws: -- cast x == cast . cast $ x c...
jonascarpay/convoluted
src/Util.hs
bsd-3-clause
409
0
7
100
134
74
60
22
1
------------------------------------------------------------------------------- -- | -- Module : Control.Applicative.Supply -- Copyright : (C) 2013 Merijn Verstraaten -- License : BSD-style (see the file LICENSE) -- Maintainer : Merijn Verstraaten <merijn@inconsistent.nl> -- Stability : experimental ...
merijn/transformers-supply
Control/Applicative/Supply.hs
bsd-3-clause
7,837
0
10
1,468
1,262
687
575
59
1
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} #endif #if __GLASGOW_HASKELL__ >= 703 {-# LANGUAGE Trustworthy #-} #endif #include "containers.h" ----------------------------------------------------------------------------- -- | -- Module : Data.Tree -- Copyr...
DavidAlphaFox/ghc
libraries/containers/Data/Tree.hs
bsd-3-clause
5,875
0
14
1,319
1,843
992
851
-1
-1
{- This module is used to create a haskell file with static address-arrays in it -} module Data.Encoding.Helper.Data where import Data.Char (ord) import Data.Word (Word8) import Data.Ord (comparing) import Data.Bits (shiftR) import Data.List (sortBy,genericLength) import Data.Encoding.Helper.XML linear :: Word8 -> W...
abuiles/turbinado-blog
tmp/dependencies/encoding-0.4.1/Data/Encoding/Helper/Data.hs
bsd-3-clause
3,380
26
16
522
1,387
768
619
98
2
module Problem35 where import Data.Char isPrime :: Int -> Bool isPrime 1 = False isPrime 2 = True isPrime n = not (any divisible [2..root]) where divisible x = n `mod` x == 0 root = floor (sqrt $ fromIntegral n) digits :: Int -> [Int] digits n = map digitToInt (show n) unDigits :: [Int] -> Int unDigits []...
noraesae/euler
src/Problem35.hs
bsd-3-clause
665
0
10
147
298
154
144
20
1
{- Suggest better pragmas OPTIONS_GHC -cpp => LANGUAGE CPP OPTIONS_GHC -fglasgow-exts => LANGUAGE ... (in HSE) OPTIONS_GHC -XFoo => LANGUAGE Foo LANGUAGE A, A => LANGUAGE A -- do not do LANGUAGE A, LANGUAGE B to combine <TEST> {-# OPTIONS_GHC -cpp #-} -- {-# LANGUAGE CPP #-} {-# OPTIONS -cpp...
fpco/hlint
src/Hint/Pragma.hs
bsd-3-clause
2,623
0
14
571
779
402
377
33
2
-- | AlfaDirect reexports in single module module Finance.Exchange.AlfaDirect ( module X ) where import Finance.Exchange.AlfaDirect.Client as X import Finance.Exchange.AlfaDirect.DataSource as X import Finance.Exchange.AlfaDirect.Simulation as X import Finance.Exchan...
schernichkin/exchange
src/Finance/Exchange/AlfaDirect.hs
bsd-3-clause
350
0
4
88
50
38
12
6
0
module TestArbitraryData where import Test.QuickCheck import Data(LispVal(..)) instance Arbitrary LispVal where arbitrary = let arbitraryList = resize 3 $ listOf arbitrary arbitraryListNotEmpty = resize 3 $ listOf1 arbitrary arbitraryString = resize 20 arbitrary ...
davideGiovannini/scheme-repl
test/TestArbitraryData.hs
bsd-3-clause
768
0
12
325
153
86
67
13
0
----------------------------------------------------------------------------- -- | -- Module : XMonad.Util.NoTaskbar -- Description : Mark a window to be ignored by EWMH taskbars and pagers. -- Copyright : (c) ??? -- License : BSD3-style (see LICENSE) -- -- Maintainer : ??? -- -- Function and manageHook to ...
xmonad/xmonad-contrib
XMonad/Util/NoTaskbar.hs
bsd-3-clause
1,710
0
12
426
224
133
91
19
1
{-# LANGUAGE FlexibleInstances, GeneralizedNewtypeDeriving, DeriveDataTypeable #-} module Data.Algebra.Boolean ( Boolean(..), fromBool, Bitwise(..) ) where import Data.Monoid (Any(..), All(..), Dual(..), Endo(..)) import Data.Bits (Bits, complement, (.|.), (.&.)) import qualified Data.Bits ...
kallisti-dev/cond
src/Data/Algebra/Boolean.hs
bsd-3-clause
5,861
0
11
1,755
2,314
1,260
1,054
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Test.Pos.Block.Arbitrary.Message ( ) where import Test.QuickCheck (Arbitrary (..)) import Test.QuickCheck.Arbitrary.Generic (genericArbitrary, ...
input-output-hk/pos-haskell-prototype
lib/test/Test/Pos/Block/Arbitrary/Message.hs
mit
1,594
0
6
306
250
154
96
36
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} import Generics.SOP (HasDatatypeInfo) data family TF i a :: * data instance TF i a = R class C i a where method :: TF i a instance C i () where instance HasDatatypeInfo a => C i a where method = undefined ...
deepfire/mood
doc/ghc-repro-16095.hs
agpl-3.0
394
0
7
84
124
66
58
14
1
module Protocol.ROCSpec (main, spec) where --import Protocol.FloatSpec import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = do describe "someFunction" $ do it "should work fine" $ do True `shouldBe` False
jqpeterson/roc-translator
test/Protocol/ROCSpec.hs
bsd-3-clause
238
0
13
52
77
41
36
9
1
module Slantbot.Reddit.Subreddits (handleSubreddits) where import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans.Maybe import Data.Char import Data.Coerce import Data.Maybe import Data.Monoid import Data.Te...
tejon/slantbot
src/Slantbot/Reddit/Subreddits.hs
mit
3,051
0
17
854
945
461
484
74
4
module HN.System (module System.Directory ,module System.FilePath ,module System.IO ,defaultTimeLocale ) where import System.Directory import System.FilePath import System.IO import Data.Time
lwm/haskellnews
src/HN/System.hs
bsd-3-clause
206
0
5
33
49
31
18
9
0
{-# LANGUAGE LambdaCase, RankNTypes, ScopedTypeVariables #-} module Streaming.Internal.Folding ( break , concats , cons , drop , enumFrom , enumFromStepN , enumFromTo , enumFromToStep , filter , filterM , foldl , fold , fold' , foldM , foldM' , iterate ...
PierreR/streaming
benchmarks/old/Stream/Prelude/Folding.hs
bsd-3-clause
22,730
0
21
7,188
9,382
4,882
4,500
508
3
{-# LANGUAGE PatternGuards #-} module Distribution.Simple.GHCJS ( configure, getInstalledPackages, getPackageDBContents, buildLib, buildExe, replLib, replExe, startInterpreter, installLib, installExe, libAbiHash, hcPkgInfo, registerPackage, compone...
headprogrammingczar/cabal
Cabal/Distribution/Simple/GHCJS.hs
bsd-3-clause
39,855
0
23
12,862
7,878
4,070
3,808
684
6
{-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving, OverloadedStrings, Rank2Types, RecordWildCards, TypeFamilies #-} -- | -- Module : Data.Attoparsec.Internal.Types -- Copyright : Bryan O'Sullivan 2007-2014 -- License : BSD3 -- -- Maintainer : bos@serpentine.com -- Stability : experimental -- ...
Helkafen/haddock
haddock-library/vendor/attoparsec-0.12.1.1/Data/Attoparsec/Internal/Types.hs
bsd-2-clause
7,316
0
15
1,960
1,829
1,008
821
140
1
module Measures where import Data.Set {-@ LIQUID "--no-termination" @-} {-@ measure elements @-} {-@ measure dups @-} data F a = F a | C a (F a) | E dups :: Ord a => F a -> Set a dups E = empty dups (F a) = empty dups (C x xs) = if member x (elements xs) then singleton x `union` dups xs else dups xs e...
ssaavedra/liquidhaskell
tests/pos/MeasureDups.hs
bsd-3-clause
682
0
8
194
302
153
149
15
2
{-# OPTIONS_GHC -fwarn-unsafe #-} -- | Basic test to see if Safe warning flags compile -- Warn if module is infered unsafe -- In this test the warning _should_ fire module SafeFlags22 where import System.IO.Unsafe f :: Int f = 1
ghc-android/ghc
testsuite/tests/safeHaskell/flags/SafeFlags22.hs
bsd-3-clause
232
0
4
44
24
17
7
5
1
{-# LANGUAGE ForeignFunctionInterface #-} module B044.F where foreign export ccall f :: Int -> Int f :: Int -> Int f n = n + 1
wxwxwwxxx/ghc
testsuite/tests/driver/B044/F.hs
bsd-3-clause
127
0
6
26
42
24
18
5
1
module Draw where --import Control.Monad.State --import Control.Monad.Reader --import Foreign.Ptr (Ptr) import Control.Monad import Control.Monad.Instances import Data.Array.IArray import Data.Array.IO import Data.Array.MArray import Data.Array.Unboxed import Data.IORef import Data.List import Data.Maybe import Data.M...
benjaminjkraft/nmines
Draw.hs
mit
4,875
0
18
980
2,227
1,140
1,087
118
15
{-# LANGUAGE QuasiQuotes #-} module Test.GeocodeData where import Text.RawString.QQ okResponse :: String okResponse = [r| { "results" : [ { "address_components" : [ { "long_name" : "1600", "short_name" : "1600", "types" : [ "street_number" ] ...
jhedev/google-maps
test/Test/GeocodeData.hs
mit
2,110
0
4
985
27
19
8
5
1
import FPPrac codeer :: Number -> Char -> Char codeer shift c | ord c <= ord 'z' && ord c >= ord 'a' = chr (((ord c - ord 'a' + shift) `mod` 26) + ord 'a') | ord c <= ord 'Z' && ord c >= ord 'A' = chr (((ord c - ord 'A' + shift) `mod` 26) + ord 'A') | otherwise = c -- map (codeer 3) "Mor...
tcoenraad/functioneel-programmeren
practica/serie1/2.encode.hs
mit
353
0
14
109
178
85
93
5
1
module Math.NumberTheory.Pell.Test.Reduced ( prop_reduced ) where import Math.NumberTheory.Pell.PQa (reduced) import Math.NumberTheory.Powers.Squares (isSquare, integerSquareRoot) import Test.QuickCheck data Triple = Triple Integer Integer Integer deriving (Show, Eq) isProperTriple :: Triple -> Bool is...
brunjlar/pell
Math/NumberTheory/Pell/Test/Reduced.hs
mit
1,666
0
14
489
683
353
330
41
1
-- Analyzer.hs --- -- -- Filename: Analyzer.hs -- Description: -- Author: Manuel Schneckenreither -- Maintainer: -- Created: Thu Sep 4 23:59:10 2014 (+0200) -- Version: -- Package-Requires: () -- Last-Updated: Mon Apr 8 17:20:49 2019 (+0200) -- By: Manuel Schneckenreither -- Update #: 10 -- URL: -- Doc ...
ComputationWithBoundedResources/ara-inference
src/Data/Rewriting/ARA/ByInferenceRules/Analyzer.hs
mit
691
0
5
137
63
56
7
3
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveLift #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} module Nauva.CSS.Renderer ( renderCSSRule , cssRuleClass ) where import Data.Te...
wereHamster/nauva
pkg/hs/nauva-css/src/Nauva/CSS/Renderer.hs
mit
1,612
0
9
342
428
227
201
34
2
-------------------------------------------------------------------- -- | -- Module : Text.Regex.Applicative.Reference -- Copyright : (c) Roman Cheplyaka -- License : MIT -- -- Maintainer: Roman Cheplyaka <roma@ro-che.info> -- Stability : experimental -- -- Reference implementation (using backtracking). -- -- This...
feuerbach/regex-applicative
Text/Regex/Applicative/Reference.hs
mit
2,225
0
15
659
786
407
379
50
11
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} -- | -- Module : Network.OAuth.Types.Params -- Copyright : (c) Joseph Abrahamson 2013 -- License : MIT -- -- Maintainer : me@jspha.com -- Stability : experimental -- Portability : non-portable -- -- /OAuth Parameters/ -- -- OAuth 1.0...
tel/oauthenticated
src/Network/OAuth/Types/Params.hs
mit
8,687
0
12
1,916
1,052
622
430
84
1
-- Mathematics/Fundamentals/Find Point {-# language TypeApplications #-} module HackerRank.Mathematics.FindPoint where import qualified Sandbox.Util.IO as U symmetryPoint :: Num a => a -> a -> a -> a -> (a, a) symmetryPoint px py qx qy = let dx = qx - px dy = qy - py in (qx + dx, qy + dy) printPair :: Show...
4e6/sandbox
haskell/HackerRank/Mathematics/FindPoint.hs
mit
551
0
13
130
255
135
120
15
1
-- Rule 30 -- http://www.codewars.com/kata/5581e52ac76ffdea700000c1/ module Codewars.Kata.Rule30 where rule30 :: [Int] -> Int -> [Int] rule30 cells n | n <= 0 = cells | otherwise = rule30 g (n-1) where g = zipWith3 r (0:normCells) normCells ((++[0]) . tail $ normCells) ...
gafiatulin/codewars
src/5 kyu/Rule30.hs
mit
581
0
12
289
207
109
98
13
6