code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables, MagicHash #-} {-# LANGUAGE BangPatterns #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.List -- Copyright : (c) The University of Glasgow 1...
green-haskell/ghc
libraries/base/GHC/List.hs
bsd-3-clause
35,163
0
14
9,782
5,542
3,170
2,372
412
3
{- (c) The University of Glasgow 2006-2012 (c) The GRASP Project, Glasgow University, 1992-2002 Various types used during typechecking, please see TcRnMonad as well for operations on these types. You probably want to import it, instead of this module. All the monads exported here are built on top of the same IOEnv m...
ghc-android/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
96,226
0
16
28,219
11,382
6,544
4,838
915
5
<?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="ar-SA"> <title>SAML Support</title> <maps> <homeID>saml</homeID> <mapref location="map....
thc202/zap-extensions
addOns/saml/src/main/javahelp/help_ar_SA/helpset_ar_SA.hs
apache-2.0
958
77
66
156
407
206
201
-1
-1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Version -- Copyright : (c) The University of Glasgow 2004 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : exper...
m-alvarez/jhc
lib/haskell-extras/Data/Version.hs
mit
4,457
0
10
1,005
265
165
100
18
1
-- !!! ambiguous re-exportation. module M (module M,module Prelude) where id x = x;
urbanslug/ghc
testsuite/tests/module/mod150.hs
bsd-3-clause
84
0
5
14
24
16
8
1
1
{-# LANGUAGE GADTs #-} -- A program very like this triggered a kind error with GHC 6.6 module Foo where data PatchSeq p a b where Nil :: PatchSeq p a b U :: p a b -> PatchSeq p a b (:-) :: PatchSeq p a b -> PatchSeq p b c -> PatchSeq p a c -- is_normal :: PatchSeq p a b -> Bool is_normal Nil = True...
urbanslug/ghc
testsuite/tests/typecheck/should_compile/tc221.hs
bsd-3-clause
396
0
8
112
131
70
61
10
1
-- -*- mode: haskell; -*- module Main (main) where import Cards import Cards.Output import Data.List import Poker import System.Environment import System.Random import Control.Monad import Data.Monoid import Data.Maybe import Control.Applicative import Data.Ratio import Control.DeepSeq import Debug.Trace (trace) impo...
wiggly/functional-pokering
src/ParallelMain.hs
mit
3,288
0
15
924
950
499
451
64
2
module Main where solution :: [Int] -> [Int] -> [Int] solution p s = innerSolution (zip p s) [] innerSolution :: [(Int, Int)] -> [Int] -> [Int] innerSolution [] acc = reverse acc innerSolution ps acc | 0 < finishCount = innerSolution (drop finishCount ps) (finishCount:acc) | otherwise = innerSolution (oneDa...
funfunStudy/algorithm
haskell/src/main/haskell/programmers/Main.hs
mit
570
0
12
126
301
160
141
15
1
-- | -- Copyright : (c) Sam T. 2013 -- License : MIT -- Maintainer : pxqr.sta@gmail.com -- Stability : experimental -- Portability : portable -- -- -- This module implements reasonably fast incremental levenshtein distance -- algorithm in pure functional fashion. -- -- We use funny data st...
pxqr/regex-fuzzy
src/Text/Regex/Fuzzy/Dist.hs
mit
5,466
0
13
1,601
1,475
832
643
69
3
module GroupCreator.Groupings ( Grouping(..) , crossover , mutate ) where import Data.List data Grouping = Grouping [[Int]] deriving (Eq, Show) --a = Grouping [[8,10,0],[3,16,4,13],[7,20],[17,15,2],[12],[1,6,19],[9,14,18],[5,11]] --b = Grouping [[11,8],[14,18,0,4],[2,15,1],[5,20,10],[12,3],[6,19,17],[9,13,16,7]] c...
cambraca/group-creator
GroupCreator/Groupings.hs
mit
2,872
0
10
564
971
522
449
51
3
{-# LANGUAGE OverloadedStrings #-} module Messaging.Exchanges ( featureCreatureExchange ) where import qualified Config.Internal.RabbitMQ as Config import qualified Network.AMQP.MessageBus as MB featureCreatureExchange :: Config.RabbitMQConfig -> MB.WithConn () featureCreatureExchange cfg = let exch = MB.Exchange ...
gust/feature-creature
legacy/lib/Messaging/Exchanges.hs
mit
391
0
12
48
89
50
39
9
1
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module GameNg ( initialStateFromConfig , getViews , updateState , actionForGameRunning , GameState(..) , GameRunning(..) , GameOver(..) , gameRunningRogueHistory , getGameOverVie...
Haskell-Praxis/core-catcher
src/GameNg.hs
mit
8,490
0
20
2,397
1,589
848
741
191
3
module Math.Geom.Shapes where import Math.Vec import Math.Geom.Primitives data Shape = Sphere Point Double -- center radius | Triangle (Point, Point, Point) | Quad (Point, Point, Point, Point) | Box Vec3 -- center dimensions (w,h,l) deriving (Show)
davidyu/Slowpoke
hs/src/Math/Geom/shapes.hs
mit
306
0
7
93
74
47
27
8
0
module TestSpec (spec) where import Test.Hspec import Test.QuickCheck import Control.Exception (evaluate) spec :: Spec spec = do describe "Prelude.head" $ do it "returns the first element of a list" $ do head [23 ..] `shouldBe` (23 :: Int) it "returns the first element of an *arbitrary* list" $ ...
igorbonadio/haskell_template
test/TestSpec.hs
mit
480
0
17
111
152
80
72
13
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-| Module : Murl.Api.Statuses Description : Status API implementation. Copyright : (c) 2016 murl developers License : MIT Maintainer : alunduil@alunduil.com Stability : experimental Portability : portable A generic status API for...
alunduil/murl
src/Murl/Api/Statuses.hs
mit
788
0
12
195
97
55
42
11
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} module Main where import Tracking.Server import Control.Concurrent import Control.Concurrent.Async import Control.Concurrent.STM import qualified Data.Map.Strict as M runLogger :: MemoryLogger -> IO () runLogger = run M.empty where run m logger = do m' <-...
schell/xybish
src/Main.hs
mit
758
0
14
276
198
98
100
23
2
module TBR.Types ( Author , Book(..) , BookList , Section(..) , Title ) where import Data.Monoid import Data.Ord (comparing) import Data.Set (Set) import Data.Text (Text, unpack) type Author = Text type Title = Text type BookList = Set Book dat...
abhinav/tbr
TBR/Types.hs
mit
837
0
8
316
225
129
96
29
0
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} {- There is a lot of code copied from GHC here, and some conditional compilation. Instead of fixing all warnings and making it much more ...
erikd/yesod
yesod-bin/GhcBuild.hs
mit
22,116
0
25
6,028
4,601
2,438
2,163
336
6
-- | Canon API. -- Records SimpleCanon, ScalesCanon, Canon embodying musical -- canon type with increasing levels of parameterization. -- Functions simpleCanonToScore, scalesCanonToScore, -- canonToScore answer Score for different Canon types. module Canon ( SimpleCanon(..) , simpleCanonToScore , Scales...
tomtitchener/Canon
src/Canon.hs
cc0-1.0
432
0
5
75
51
36
15
9
0
#!/usr/bin/env runhaskell -- | Transcribing DNA into RNA -- Usage: RNA <dataset.txt> import System.Environment(getArgs) import qualified Data.ByteString.Char8 as C main = do (file:_) <- getArgs rna <- C.readFile file C.putStrLn $ C.map t2u . head . C.lines $ rna where t2u x = if x == 'T' then 'U' else x
kerkomen/rosalind-haskell
stronghold/RNA.hs
gpl-2.0
312
0
12
58
104
56
48
7
2
module BST ( Tree , singleton , treeInsert , treeElem , fmap ) where data Tree a = EmptyTree | Node a (Tree a) (Tree a) deriving (Show, Read, Eq) singleton :: a -> Tree a singleton x = Node x EmptyTree EmptyTree treeInsert :: (Ord a)=> a -> Tree a -> Tree a treeInsert x EmptyTree = singleton x treeInsert x (Node a l...
softwaremechanic/Miscellaneous
Haskell/BST.hs
gpl-2.0
1,420
0
8
372
357
192
165
21
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-| Module : Database/Hedsql/Drivers/MariaDB/Constructor.hs Description : MariaDB specific constructors. Copyright : ...
momomimachli/Hedsql
src/Database/Hedsql/Drivers/MariaDB/Constructor.hs
gpl-3.0
1,557
0
5
219
122
80
42
21
1
{-# LANGUAGE UndecidableInstances #-} module HLinear.Hook.LeftTransformation.QuickCheck where import HLinear.Utility.Prelude import qualified Prelude as P import qualified Data.Vector as V import qualified Data.Vector.Mutable as VM import Math.Structure.Tasty () import Test.QuickCheck ( suchThat, Gen ) import Test....
martinra/hlinear
src/HLinear/Hook/LeftTransformation/QuickCheck.hs
gpl-3.0
2,421
0
19
655
685
369
316
-1
-1
{-# LANGUAGE PackageImports #-} import Test.HUnit import Test.QuickCheck import Sound import SoundIO import Music import "monads-tf" Control.Monad.State(execState,runState,evalState) import qualified Data.Map as Map amplitude_multiply_wave_samples d = amplitude d wave' == map (*d) wave' where wave' = wave 44...
abailly/haskell-synthesizer
SoundTest.hs
gpl-3.0
2,871
0
14
608
831
445
386
58
1
import Prelude hiding (lines) import System.Console.Haskeline import System.Directory import System.Process import Data.List hiding (lines) import Data.Conduit hiding (mapM_) import Data.Conduit.List (consume) import Data.Conduit.ProcessOld import Data.ByteString.Char8 (ByteString,pack,unpack,lines) import Control.Appl...
phi16/Todo
Main.hs
gpl-3.0
2,632
5
22
668
970
509
461
83
7
{- Algoritmo de Matching Asociativo Conmutativo. Basado en el algoritmo eager del paper "Lazy AC-Pattern Matching for Rewriting", Belkhir y Giorgetti-} module Equ.Matching.Matching where import Equ.PreExpr hiding (rename) import Equ.Theories.Common (folOr,folAnd,folEquiv) import Equ.Matching.Monad import Equ....
miguelpagano/equ
Equ/Matching/Matching.hs
gpl-3.0
5,629
0
15
1,920
1,906
1,011
895
101
3
module Example.Eg50 (eg50) where import Graphics.Radian import ExampleUtils eg50 :: IO Html eg50 = do d <- readCSV "iris.csv" [ "sepal_length","sepal_width","petal_length" ,"petal_width","species" ] let plot = Plot [ps] # [ width.=600, aspect.=1, axisXLabel.="...
openbrainsrc/hRadian
examples/Example/Eg50.hs
mpl-2.0
822
3
14
258
220
123
97
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-translate/gen/Network/Google/Resource/Translate/Projects/Locations/Glossaries/List.hs
mpl-2.0
7,854
0
19
1,712
985
578
407
140
1
data TravelGuide = TravelGuide { title::String, authors::[String], price::Double} deriving (Show, Eq, Ord) instance Ord TravelGuide where (TravelGuide t1 a1 p1) <= (TravelGuide t2 a2 p2) = p1 < p2 || (p1 == p2 && ( t1 < t2 || (t1 == t2 && a1 <= a2)))
wangyixiang/beginninghaskell
chapter4/src/Chapter4/MinimumPrice.hs
unlicense
256
2
14
51
132
71
61
4
0
module Set1 ( module Challenge1, module Challenge2, module Challenge3, module Challenge4, module Challenge5, module Challenge6, module Challenge7, module Challenge8, ) where import qualified Set1.Challenge1 as Challenge1 import qualified Set1....
stallmanifold/matasano-crypto-challenges
src/Set1.hs
apache-2.0
657
0
4
141
108
80
28
19
0
module WebToInk.Converter.OpfGeneration(generateOpf) where import WebToInk.Converter.Constants import WebToInk.Converter.Utils (getTabs) import System.FilePath (dropExtension) generateOpf :: [FilePath] -> [FilePath] -> String -> String -> String -> String generateOpf pages images title language creator = unlines $ ...
thlorenz/WebToInk
webtoink-converter/WebToInk/Converter/OpfGeneration.hs
bsd-2-clause
2,845
0
17
707
724
384
340
57
1
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} module Database.Narc.AST ( Term'(..), Term, VarName, PlainTerm, TypedTerm, fvs, substTerm, strip, retagulate, rename, variables, (!), fieldsOf, -- unit_, Const, cnst_, primApp_, var_, abs_, app_, table_, ifthenelse_, -- singleton_, nil_, union_, re...
ezrakilty/narc
Database/Narc/AST.hs
bsd-2-clause
11,873
2
14
3,070
5,620
2,975
2,645
246
1
import Data.Char import Data.List import Control.Applicative import System.Environment moveForward card deck | (c : x : xs) <- deck, c == card = x : c : xs | (x : xs) <- deck, last xs == card = x : card : init xs | (x : xs) <- deck = x : moveForward card x...
mightymoose/RubyQuiz
quiz_1/solution.hs
bsd-2-clause
1,601
0
11
366
619
318
301
42
1
{-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-} module Data.Authenticated.Generic (Auth1(..)) where import Data.Authenticated import GHC.Generics newtype Auth1 f a = Auth1 { getAuth1 :: Auth (f a) a } -- These two instances are what ...
derekelkins/ads
Data/Authenticated/Generic.hs
bsd-2-clause
1,445
0
10
285
541
280
261
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UndecidableInstances #-} module Grammar where {-| System F -} import Unbound.LocallyNameless -- Expression Variable Name type ExpN = Name Expr -- Type Variable Name...
maxsnew/TAPL
Polymorphic/Grammar.hs
bsd-3-clause
925
0
10
213
272
147
125
32
0
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE Sco...
mstksg/tensor-ops
src/TensorOps/Learn/NeuralNet/FeedForward.hs
bsd-3-clause
6,423
0
20
2,244
2,732
1,471
1,261
216
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -f...
futufeld/eclogues
eclogues-mock/src/Eclogues/Persist.hs
bsd-3-clause
4,166
0
12
782
1,014
570
444
71
1
{-# language CPP #-} -- | = Name -- -- VK_KHR_driver_properties - device extension -- -- == VK_KHR_driver_properties -- -- [__Name String__] -- @VK_KHR_driver_properties@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 197 -- -- [__Revision__] -- 1 -- -- [__Exte...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_KHR_driver_properties.hs
bsd-3-clause
10,556
0
8
2,206
767
535
232
-1
-1
module Main where import Prelude hiding (pred, succ) import Data.List (nub) goal = 200 succ x | x == 200 = 0 | x == 100 = 200 | x == 50 = 100 | x == 20 = 50 | x == 10 = 20 | x == 5 = 10 | x == 2 = 5 | x == 1 = 2 pred x | x == 200 = 100 | x == 100 = 50 | x == 50 = 20 |...
stulli/projectEuler
eu31.hs
bsd-3-clause
1,354
0
11
402
693
342
351
47
2
{-# LANGUAGE CPP, TypeFamilies, FlexibleInstances, UndecidableInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.ST.Class -- Copyright : (C) 2011 Edward Kmett -- License : BSD-style (see the file LICENSE) -- -- Maintainer : Edward K...
ekmett/monad-st
Control/Monad/ST/Class.hs
bsd-3-clause
1,021
0
10
174
216
125
91
-1
-1
module Ghazan.Weight ( ) where
Cortlandd/ConversionFormulas
src/Ghazan/Weight.hs
bsd-3-clause
36
0
3
10
9
6
3
1
0
module Main where import System.Environment ( getArgs ) import System.IO ( hPutStrLn, stderr ) import System.Exit ( exitWith, ExitCode( ExitFailure ) ) import Text.XML.HXT.Parser.XmlParsec ( xreadDoc ) import Text.XML.HXT.DOM.TypeDefs ( XmlTrees, XmlTree, XNode(..) ) import Text.XML.HXT.DOM.QualifiedName ( localPart ...
sebug/TranslationLister
Main.hs
bsd-3-clause
1,485
0
31
364
457
241
216
36
4
{-# LANGUAGE DeriveDataTypeable , DeriveGeneric , TemplateHaskell , TypeFamilies #-} module Type.CustomerSignupError where import Data.Aeson import Data.JSON.Schema import Data.Typeable import GHC.Generics import Generics.Regular import Generics.Regular.XmlPickler import Rest.Error import Text.XML.HXT.Arro...
tinkerthaler/basic-invoice-rest
example-api/Type/CustomerSignupError.hs
bsd-3-clause
844
0
6
105
161
90
71
24
0
module ParionsFDJ.Parse.Event ( ) where
vquintin/parionsfdj
src/ParionsFDJ/Parse/Event.hs
bsd-3-clause
44
0
3
9
10
7
3
2
0
import Distribution.PackageDescription import Distribution.PackageDescription.Parse import Distribution.Verbosity import Distribution.System import Distribution.Simple import Distribution.Simple.Utils import Distribution.Simple.Setup import Distribution.Simple.Command import Distribution.Simple.Program import Distribut...
flowbox-public/cufft
Setup.hs
bsd-3-clause
17,373
0
16
3,627
3,159
1,657
1,502
252
7
module Paths_Gluon ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception import Data.Version (Version(..)) import System.Environment (getEnv) import Prelude catchIO :: IO a -> (Exception.IOException -> IO a) -> ...
Coggroach/Gluon
.stack-work/dist/2672c1f3/build/autogen/Paths_Gluon.hs
bsd-3-clause
1,603
0
10
177
362
206
156
28
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} -- | The web server. module Ircbrowse.Server where import Ircbrowse.Types import qualified Ircbrowse.Controllers as C import Snap.App import Snap.Http.Server hiding (Config) import Snap.Util.FileServe ...
chrisdone/ircbrowse
src/Ircbrowse/Server.hs
bsd-3-clause
1,821
0
10
462
266
155
111
23
1
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.Examples.CodeGeneration.GCD -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Computing GCD symbolically, and generating C code fo...
Copilot-Language/sbv-for-copilot
Data/SBV/Examples/CodeGeneration/GCD.hs
bsd-3-clause
6,286
0
11
1,598
444
284
160
23
1
-- schreiersims.hs module Math.SchreierSims where import Math.CombinatoricsGeneration (cartProd) import Math.RedBlackTree import Math.RandomGenerator import Math.PermutationGroups -- Both implementations are taken from Seress, Permutation Group Algorithms -- COSET REPRESENTATIVES FOR STABILISER OF A ...
nfjinjing/bench-euler
src/Math/SchreierSims.hs
bsd-3-clause
7,376
66
18
1,691
2,376
1,283
1,093
126
5
{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving #-} module Clay.Property where import Control.Arrow (second) import Control.Monad.Writer import Data.Fixed (Fixed, HasResolution (resolution), showFixed) import Data.List (partition, sort) import Data.Maybe import Data.String import Data.Text (Text, replace) ...
psfblair/clay
src/Clay/Property.hs
bsd-3-clause
2,850
0
17
603
1,192
637
555
73
1
module BinTree where import Data.String import VizHaskell.TreeRepresentation(TreeRepresentable(..)) data BSTree a = Empty | Node (BSTree a) a (BSTree a) deriving (Show, Eq, Ord) instance TreeRepresentable BSTree where contents Empty = Nothing contents (Node _ x _) = Just x children Empty ...
robarago/vizhaskell
hs/BinTree.hs
gpl-2.0
1,719
0
8
364
578
298
280
34
1
{-# LANGUAGE OverloadedStrings #-} module Mnemonic where import qualified Data.Map as Map import Data.Maybe import Data.Word import Data.Bits import Control.Arrow (first) import qualified Data.ByteString as B8 import qualified Data.ByteString.Base16 as B16 -- Electrum compatible mnemonic conversions type W = B8.Byte...
np/hx
Mnemonic.hs
gpl-3.0
16,474
0
14
988
5,781
3,751
2,030
221
1
module Test.GameKeys.Keys.API where import Test.Tasty(TestTree, testGroup) import Control.Monad.Writer(execWriter) import Test.Tasty.QuickCheck as QC(testProperty) import GameKeys.Keys.API import GameKeys.Keys.Header props :: TestTree props = testGroup "GameKeys.Keys.API" [ bindstoProps , nestButtonProps ...
kwrooijen/game-keys
tests/Test/GameKeys/Keys/API.hs
gpl-3.0
2,486
0
16
629
818
454
364
48
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 #-} -- ...
fmapfmapfmap/amazonka
amazonka-dynamodb/gen/Network/AWS/DynamoDB/BatchWriteItem.hs
mpl-2.0
15,060
0
15
3,061
1,172
754
418
113
1
module Handler.Trademarks where import Import import Widgets.Doc getTrademarksR :: Handler Html getTrademarksR = defaultLayout $ do snowdriftTitle "Trademarks" renderDoc "Trademarks"
chreekat/snowdrift
Handler/Trademarks.hs
agpl-3.0
193
0
8
30
43
22
21
7
1
{-# OPTIONS_GHC -fno-implicit-prelude #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Dynamic -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -...
alekar/hugs
packages/base/Data/Dynamic.hs
bsd-3-clause
5,080
30
14
1,036
687
391
296
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANG...
rrnewton/accelerate
Data/Array/Accelerate/Smart.hs
bsd-3-clause
79,320
0
34
20,988
36,474
19,713
16,761
1,213
5
{-# LANGUAGE Haskell2010, CPP, Rank2Types, DeriveDataTypeable, StandaloneDeriving #-} {-# LINE 1 "lib/Data/Time/Calendar/Private.hs" #-} -- #hide module Data.Time.Calendar.Private where import Data.Fixed type NumericPadOption = Maybe Char pad1 :: NumericPadOption -> S...
phischu/fragnix
tests/packages/scotty/Data.Time.Calendar.Private.hs
bsd-3-clause
1,497
0
11
375
697
351
346
38
1
{-# LANGUAGE DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Package -- Copyright : Isaac Jones 2003-2004 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- Defines a package identifier along with a pa...
jwiegley/ghc-release
libraries/Cabal/cabal/Distribution/Package.hs
gpl-3.0
7,549
0
13
1,466
1,116
624
492
88
1
{-# LANGUAGE PatternGuards #-} -- | Parse events from @clog@ output, such as the files -- at <http://tunes.org/~nef/logs/haskell/>. -- -- IRC has no single standard character encoding. This -- module decodes messages as UTF-8 following common -- practice on Freenode. module Data.IRC.CLog.Parse ( -- * Parsing...
chrisdone/ircbrowse
upstream/clogparse/Data/IRC/CLog/Parse.hs
bsd-3-clause
4,900
0
16
1,115
1,517
820
697
99
3
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.Utils.Boolean -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Abstraction of booleans. Unfortunately, Haskell makes Bool's very ...
TomMD/cryptol
sbv/Data/SBV/Utils/Boolean.hs
bsd-3-clause
2,196
0
10
560
610
350
260
40
1
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE TypeFamilies, FlexibleContexts #-} {-# LANGUAGE EmptyDataDecls, FlexibleInstances, UndecidableInstances #-} module InstContextNorm where import Data.Kind (Type) data EX _x _y (p :: Type -> Type) data ANY class Base p class Base (Def p) => Prop p wher...
sdiehl/ghc
testsuite/tests/indexed-types/should_compile/InstContextNorm.hs
bsd-3-clause
761
0
10
167
267
144
123
-1
-1
{-# Language GADTs, OverloadedStrings, CPP #-} {-| Module : Config.Schema.Load.Error Description : Error types and rendering for Load module Copyright : (c) Eric Mertens, 2019 License : ISC Maintainer : emertens@gmail.com This module provides a complete skeleton of the failures that occurred when trying to...
glguy/config-schema
src/Config/Schema/Load/Error.hs
isc
9,060
0
17
2,130
1,802
969
833
142
8
{-# LANGUAGE OverloadedStrings #-} module Hirc.Types where import Control.Concurrent.Chan import Control.Monad.State import Data.Text (Text) import System.IO import qualified Database.SQLite.Simple as SQ data Connections = Connections { connsServers :: [Connection] } data Connection = Connection { connServer :: Ser...
xintron/Hirc
Hirc/Types.hs
mit
1,748
0
10
576
422
264
158
48
0
module Main (main) where import Control.Concurrent import qualified Control.Exception as E import Data.Char import Network import System.IO import GridC.Parser import GridC.Codegen port :: PortNumber port = 30303 server :: String server = "lzmhttpd/0.1" -- IOError handler errorHandler :: IOError -> IO String error...
lessandro/gridc
src/Httpd.hs
mit
4,283
0
14
1,083
1,351
649
702
114
3
-- | Example for test purposes - enhancing code copied from http://www.haskell.org/haskellwiki/OpenGLTutorial1. -- For all rights see there - this code adds a menu. module Menu ( main ) where import qualified Graphics.UI.GLUT.Menu as Menu import qualified Graphics.UI.GLUT.Begin as Begin test = do print "test" ma...
tnrangwi/grill
test/experimental/opengl/Menu.hs
mit
445
0
9
82
77
47
30
9
1
module State (module X) where import State.Types as X import State.Operations as X import State.XML as X
mplamann/magic-spieler
src/State.hs
mit
107
0
4
19
31
22
9
4
0
-- | -- -- Module : Main -- License : MIT -- -- Usage: DataMiningWeka [-h] exec-conf param-conf data-conf -- -- exec-conf | applications YAML configuration -- -- param-conf | applications parameters YAML configuration -- -- data-conf | data files YAML configuration module Main ( main ) ...
fehu/min-dat--data-mining-arff
src/Main.hs
mit
1,333
0
14
302
254
129
125
21
1
-- Find Numbers with Same Amount of Divisors -- https://www.codewars.com/kata/55f1614853ddee8bd4000014 module Codewars.G964.Samenbdivisors(countPairsInt) where countPairsInt :: Int -> Int -> Int countPairsInt diff nMax = sum . zipWith (\x y -> if x == y then 1 else 0) (take (nMax - diff) list) . drop diff $ list lis...
gafiatulin/codewars
src/6 kyu/Samenbdivisors.hs
mit
556
0
18
119
231
128
103
6
2
import Complexity main = do -- (inputSize, nOperations): -- case nOp ~= 2.5 inputSize => O(1) let pO1_1 = (10000, round (10000 * 2.5)) -- case nOp ~= 0.9 inputSize => O(1) let pO1_2 = (20000, round (20000 * 0.99)) let pO1_3 = (20000, round (20000 * 1.0)) putStrLn "Testing complexity infere...
range12/there-is-no-B-side
tests/ComplexityTest.hs
mit
3,548
0
14
930
1,124
526
598
68
1
module PutJSON where import Data.List (intercalate) import SimpleJSON renderJValue :: JValue -> String renderJValue (JString s) = show s renderJValue (JNumber n) = show n renderJValue (JBool True) = "true" renderJValue (JBool False) = "false" renderJValue JNull = "null" renderJValue (JObject o) = "{" ++ pairs o ++ "...
zhangjiji/real-world-haskell
ch5/PutJSON.hs
mit
663
0
9
143
271
135
136
18
3
module Euler31 where -- Use a dynamic programming solution to find the number of ways -- to assemble an amount from smaller amounts -- Threading the DP table through the computation as a State monad import Control.Monad.State import qualified Data.Map as M (empty, Map, insert, lookup) runWays :: Int -> Int runWays n...
nlim/haskell-playground
src/Euler31.hs
mit
814
0
12
168
361
196
165
18
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -- | Provide ability to upload tarballs to Hackage. module Stackage.Upload ( -- * Upload mkUploader , Uploader , upload , UploadSettings , default...
fpco/stackage-upload
Stackage/Upload.hs
mit
12,964
0
26
4,809
2,300
1,255
1,045
244
5
{-| A WAI adapter to the HTML5 Server-Sent Events API. If running through a proxy like Nginx you might need to add the headers: > [ ("X-Accel-Buffering", "no"), ("Cache-Control", "no-cache")] -} module Network.Wai.EventSource ( ServerEvent(..), eventSourceAppChan, eventSourceAppIO ) wh...
creichert/wai
wai-extra/Network/Wai/EventSource.hs
mit
1,396
0
16
341
264
146
118
24
2
{-# LANGUAGE DeriveDataTypeable, CPP, ScopedTypeVariables #-} module Jakway.Blackjack.IO.DatabaseCommon ( createTables, cardIdMap, cardPermutations, cardSqlArr, cardsSqlValues, cardToForeignKeyId, idCardMap, singleCardToSqlValues, dropTables, dropAllTables ) where import Jakway.Blackjack.Visibility import Jakway.Black...
tjakway/blackjack-simulator
src/Jakway/Blackjack/IO/DatabaseCommon.hs
mit
5,451
0
15
1,411
1,074
593
481
70
3
module Indexer ( indexFeatures , deleteFeatures ) where import Config.Config (ElasticSearchConfig, GitConfig) import Control.Exception (IOException, bracket, handle) import Control.Monad.Except (runExceptT) import Data.Text (pack) import qualified Features.Feature as F import qualified Features.SearchableFeature as SF...
gust/feature-creature
legacy/lib/Indexer.hs
mit
2,951
0
26
580
733
388
345
47
3
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.SVGPathSegArcRel (js_setX, setX, js_getX, getX, js_setY, setY, js_getY, getY, js_setR1, setR1, js_getR1, getR1, js_setR2, setR2, js_getR2, getR2, js_setAngle, setAngle, js_getAngle, getAngle...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGPathSegArcRel.hs
mit
6,051
98
8
841
1,374
763
611
78
1
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.Location (assign, replace, reload, setHref, getHref, setProtocol, getProtocol, setHost, getHost, setHostn...
ghcjs/jsaddle-dom
src/JSDOM/Generated/Location.hs
mit
6,660
0
12
961
1,626
889
737
88
1
module Main where import Control.Monad import Language.Haskell.HLint import System.Exit main :: IO () main = do hints <- hlint ["src"] unless (null hints) exitFailure
IMOKURI/IMOKURI.github.io
tests/Tests.hs
mit
174
0
9
31
62
33
29
8
1
-------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} import Control.Applicative ((<$>)) import Control.Arrow ((***)) import Data.Monoid (mappend) import Data.List (stripPrefix, sortBy) impo...
arthuraa/poleiro
site.hs
mit
7,621
0
21
2,252
1,870
909
961
-1
-1
module Main where import qualified Codec.Compression.GZip as GZ import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as CBS import qualified Data.ByteString.Lazy.Char8 as LBS import Data.Foldable import Database.Kioku import System.Environment import ...
flipstone/kioku
example/Main.hs
mit
2,251
0
21
678
701
356
345
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE NoMonomorphismRestriction#-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-...
paldepind/t-diagram
src/Element.hs
mit
5,891
0
11
1,368
2,067
1,078
989
126
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module System.Etc.Internal.Extra.EnvMisspell ( EnvMisspell (..) , getEnvMisspellings , getEnvMisspellingsPure , renderEnvMisspellings ...
roman/Haskell-etc
etc/src/System/Etc/Internal/Extra/EnvMisspell.hs
mit
2,716
0
20
619
663
351
312
66
2
import Drawing import Exercises import Geometry main = drawPicture myPicture myPicture points = drawPoints [a,b,c,d,e,f] & drawLabels [a,b,c,d,e,f] ["A","B","C","D","E","F"] & drawPolygon [a,b,c,d,e,f] & drawPointLabel o "O" & drawSegment (o,a) & drawSegment (o,b) & drawSegment (o,c) & ...
alphalambda/hsmath
src/Learn/Geometry/hexagon.hs
gpl-2.0
641
0
18
168
365
205
160
22
1
module Cake.Rules where import Cake.Core import Cake.Process import Cake.Tex import qualified Text.ParserCombinators.Parsek as Parsek ------------------------------------------------------ -- Patterns extension :: String -> P (String,String) extension s = do base <- Parsek.many Parsek.anySymbol _ <- Parsek.string...
jyp/Cake
Cake/Rules.hs
gpl-2.0
1,595
0
12
289
438
237
201
33
1
module PFQDaemon where import Config import Network.PFQ.Lang import Network.PFQ.Lang.Default import Network.PFQ.Lang.Experimental config = [] :: [Group]
pfq/PFQ
user/pfqd/pfqd.hs
gpl-2.0
155
0
5
18
40
27
13
6
1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : IDE.Metainfo.Provider -- Copyright : (c) Juergen Nicklisch-Franken, Hamish Mackenzie -- License : GNU-GPL --...
JPMoresmau/leksah
src/IDE/Metainfo/Provider.hs
gpl-2.0
42,106
0
32
14,691
9,784
5,000
4,784
741
8
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Keymap.Vim.NormalMap -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable module Yi.Keymap.Vim.NormalMap (defNormalM...
atsukotakahashi/wi
src/library/Yi/Keymap/Vim/NormalMap.hs
gpl-2.0
19,416
0
21
5,623
5,322
2,786
2,536
398
4
module Game.MCubed.World where import Control.Arrow import Control.Monad import Data.Lens.Lazy import qualified Data.Maybe as Maybe import Data.CubeTree (CubeTree) import qualified Data.CubeTree as CubeTree import Data.Coord (Coord) import qualified Data.Coord as Coord data World = World { getSize :: CubeTree.Heigh...
dflemstr/mcubed
Game/MCubed/World.hs
gpl-3.0
2,272
0
11
526
664
351
313
54
1
module StdLib (builtins) where import AST import ASTErrors import Misc import Data.List (transpose, (\\)) import Control.Monad (zipWithM, foldM) add :: SourcePos -> [ASTDatatype] -> Eval ASTDatatype add _ [List a, List b] = goRight (List (a ++ b)) add pos [Vector a, Vector b] | (length a == length b) = mapM (add...
Jem777/deepthought
src/StdLib.hs
gpl-3.0
3,824
0
13
814
2,276
1,149
1,127
80
1
module Shipment where import Control.Monad.Reader import qualified Control.Applicative as C import qualified Data.Acid as A import Data.Acid.Remote import Data.SafeCopy import Data.Typeable import qualified Data.Map as M import qualified Data.Tree as Tr import qualified Data.Aeson as J import qualified Data.Text.Lazy.E...
dservgun/erp
src/common/Shipment.hs
gpl-3.0
2,902
0
11
509
876
501
375
-1
-1
module Main where import qualified Data.List as L englishLetters = ['a'..'z'] ++ ['A'..'Z'] lettersCount :: String -> (Int, Int) lettersCount text = let (res, _) = L.mapAccumL f (0,0) text in res where f (a, t) x | x `elem` englishLetters = ((a + 1, t + 1), x) f (a, t) x | otherwise ...
graninas/Haskell-Algorithms
Tests/TextRatio.hs
gpl-3.0
714
0
10
202
293
154
139
16
2
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module Repo.Project ( Project(Project, projectName, projectPath) , getProjectHead , findCommit -- TODO: should not be exported , withProject ) where import Control.Applicativ...
aartamonau/repo-bisect
src/Repo/Project.hs
gpl-3.0
1,632
0
14
464
456
244
212
44
3
-- Copyright 2016, 2017 Robin Raymond -- -- This file is part of Purple Muon -- -- Purple Muon 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) an...
r-raymond/purple-muon
src/Client/Network.hs
gpl-3.0
1,001
0
3
200
26
23
3
2
0
module LiveSource where {-# OPTIONS_GHC -fno-cse #-} import Control.Applicative import DynFlags import GHC import GHC.Paths import GhcMonad (liftIO) import Unsafe.Coerce import Control.Exception import Control.Concurrent import System.Directory import System.Time import System.Environment import Data.IORef import ...
xpika/live-source
src/LiveSource.hs
gpl-3.0
5,981
0
20
2,028
1,153
534
619
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Accounts/Proposals/Accept.hs
mpl-2.0
6,502
0
19
1,449
872
512
360
127
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/ListInstances.hs
mpl-2.0
9,100
0
23
2,025
993
589
404
146
1
module TestIO (resource) where import Control.Monad (forever) import API resource :: CLIInterface resource = testio { repl = loop } loop :: IO () loop = forever $ getLine >>= putStrLn
stepcut/plugins
testsuite/load/plain/TestIO.hs
lgpl-2.1
188
0
6
35
63
37
26
7
1
{-# LANGUAGE OverloadedStrings #-} module Stubby ( stubby , Stubby , getAdmin , getStubs , wait ) where import Stubby.Settings (Settings, getQuiet, getDatafile) import Stubby.CLI.Logging (info,stored) import Stubby.Net.Admin (adminserver) import Stubby.Net.Stubs (stubserver) import Stubby...
mrak/stubby4hs
src/lib/Stubby.hs
apache-2.0
1,976
0
13
460
646
342
304
52
2
-- Copyright 2013 Joseph Tel Abrahamson -- -- 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 agre...
tel/hs-nanomsg
src/Network/Addresses.hs
apache-2.0
4,347
0
15
1,120
1,121
595
526
83
2