Dataset Viewer
Auto-converted to Parquet Duplicate
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
answer = sum [1..100] ^ 2 - foldl (\x y -> y^2 + x) 0 [1..100]
tamasgal/haskell_exercises
ProjectEuler/p006.hs
mit
63
0
10
16
52
27
25
1
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} module DirectoryAPI.API ( directoryAPIProxy , DirectoryAPI ) where import Servant import AuthAPI.API (AuthToken) import Models (File, Node, NodeId) type DirectoryAPI = "ls" :> -- List all files AuthToken :> G...
houli/distributed-file-system
dfs-shared/src/DirectoryAPI/API.hs
mit
1,213
0
20
421
198
113
85
24
1
module BlocVoting.Tally.Resolution where import qualified Data.ByteString as BS data Resolution = Resolution { rCategories :: Int , rEndTimestamp :: Int , rName :: BS.ByteString , rUrl :: BS.ByteString , rVotesFor :: Integer , rVotesTotal :: Integer , rResolved :: Bool } deriving (Show, Eq) update...
XertroV/blocvoting
src/BlocVoting/Tally/Resolution.hs
mit
565
0
9
104
157
91
66
14
1
{-# LANGUAGE CPP #-} module Database.Orville.PostgreSQL.Plan.Explanation ( Explanation , noExplanation , explainStep , explanationSteps ) where newtype Explanation = Explanation ([String] -> [String]) #if MIN_VERSION_base(4,11,0) instance Semigroup Explanation where (<>) = appendExplanation #endif inst...
flipstone/orville
orville-postgresql/src/Database/Orville/PostgreSQL/Plan/Explanation.hs
mit
800
0
8
121
193
110
83
23
1
import Data.List (permutations, sort) solve :: String solve = (sort $ permutations "0123456789") !! 999999 main = putStrLn $ solve
pshendry/project-euler-solutions
0024/solution.hs
mit
133
0
8
22
47
26
21
4
1
module Lesson08 where -- Now let's have some real fun: a two player, online five card stud game, -- with a full betting system. The betting system is actually the biggest -- addition versus what we've done previously, so most of our attention -- will be focused on that. Most of the other code will be very similar -- t...
snoyberg/haskell-impatient-poker-players
src/Lesson08.hs
mit
5,286
0
19
1,643
1,450
706
744
104
4
{- hpodder component Copyright (C) 2006 John Goerzen <[email protected]> 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. T...
jgoerzen/hpodder
FeedParser.hs
gpl-2.0
6,088
1
16
2,117
1,532
797
735
115
7
{- | Module : $EmptyHeader$ Description : <optional short description entry> Copyright : (c) <Authors or Affiliations> License : GPLv2 or higher, see LICENSE.txt Maintainer : <email> Stability : unstable | experimental | provisional | stable | frozen Portability : portable | non-portable (<reason>...
nevrenato/Hets_Fork
GMP/versioning/gmp-0.0.1/GMP/Main.hs
gpl-2.0
3,633
3
16
1,112
822
416
406
67
6
{-# LANGUAGE ScopedTypeVariables #-} import Bench import Bench.Triangulations main = print (qVertexSolBench trs)
DanielSchuessler/hstri
scratch6.hs
gpl-3.0
115
0
7
15
24
13
11
4
1
{-# LANGUAGE OverloadedStrings #-} module Response.Export (pdfResponse) where import Happstack.Server import qualified Data.ByteString.Lazy as BS import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString.Base64.Lazy as BEnc import ImageConversion import TimetableImageCreator (renderTable) import Sy...
pkukulak/courseography
hs/Response/Export.hs
gpl-3.0
1,487
0
12
284
380
192
188
36
1
module Hazel.StringWriter where import Control.Monad.State ------------- StringState ------------- type StringState = State String (Maybe Bool) eval :: StringState -> String eval s = execState s "" newLine :: StringState append :: String -> StringState apply :: (String -> String) -> StringState newLine = app...
hazel-el/hazel
Hazel/StringWriter.hs
gpl-3.0
860
1
8
250
155
92
63
11
1
{-# LANGUAGE FlexibleContexts, CPP, JavaScriptFFI #-} module Carnap.GHCJS.Action.TreeDeductionCheck (treeDeductionCheckAction) where import Lib hiding (content) import Data.Tree import Data.Either import Data.Map as M (lookup,Map, toList) import Data.IORef (IORef, readIORef, newIORef, writeIORef) import Data.Typeable ...
gleachkr/Carnap
Carnap-GHCJS/src/Carnap/GHCJS/Action/TreeDeductionCheck.hs
gpl-3.0
15,280
0
25
6,177
3,919
1,946
1,973
-1
-1
-- Move generator logic module Kurt.GoEngine ( genMove , simulatePlayout , EngineState(..) , newEngineState , updateEngineState , newUctTree ) where import Control.Arrow ...
lefant/kurt
src/Kurt/GoEngine.hs
gpl-3.0
11,157
0
21
4,063
3,147
1,659
1,488
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-cloudwatch-logs/gen/Network/AWS/CloudWatchLogs/PutLogEvents.hs
mpl-2.0
5,362
0
10
1,135
687
412
275
76
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Get.hs
mpl-2.0
5,179
0
17
1,145
704
411
293
106
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-storage/gen/Network/Google/Resource/Storage/Objects/Update.hs
mpl-2.0
8,463
0
24
2,060
1,290
738
552
177
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebProperties/Update.hs
mpl-2.0
4,070
0
16
926
466
278
188
78
1
{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE GeneralizedNewty...
pontarius/pontarius-service
source/PontariusService/Types.hs
agpl-3.0
6,475
0
14
1,907
1,507
798
709
-1
-1
-- | This module provides the data type and parser for a trait file module Trait ( Trait(..) , defaultTrait , trait ) where import Maker import Modifier import Scoped(Label) data Trait = Trait { trait_name :: Label , agnatic :: Bool , birth :: Double -- ^ Chance of being assigned on birth. Default 0 ...
joelwilliamson/validator
Trait.hs
agpl-3.0
3,593
0
41
970
847
492
355
-1
-1
-- Copyright (C) 2016-2017 Red Hat, Inc. -- -- 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 Free Software Foundation; either -- version 2.1 of the License, or (at your option) any later version. -- -- This libr...
dashea/bdcs
importer/BDCS/RPM/Sources.hs
lgpl-2.1
1,380
0
11
234
192
116
76
13
1
{-| Module : Main-nowx Description : Модуль с точкой входа для консольной версии приложения License : LGPLv3 -} module Main where import Kernel import PlayerConsole import DrawingConsole import Controller import AIPlayer -- | Точка входа для консольной версии программы main :: IO () main = do ...
cmc-haskell-2015/checkers
src/Main-nowx.hs
lgpl-3.0
805
0
13
188
155
81
74
18
2
{-# LANGUAGE OverloadedStrings #-} module Mdb.Status ( doStatus ) where import Control.Monad ( when ) import Control.Monad.Catch (MonadMask) import Control.Monad.IO.Class ( MonadIO, liftIO ) import Control.Monad.Logger ( logWarnN, logDebugN, logInfoN ) import Control...
waldheinz/mdb
src/lib/Mdb/Status.hs
apache-2.0
1,802
0
23
523
569
307
262
37
2
module Serf.Event where import Serf.Member import Control.Applicative import Control.Monad.IO.Class import System.Environment import System.Exit import System.IO import Text.Parsec type SerfError = String data SerfEvent = MemberJoin Member | MemberLeave Member | Memb...
lstephen/box
src/main/ansible/roles/serf/files/Serf/Event.hs
apache-2.0
2,110
0
12
576
572
289
283
51
9
{-# LANGUAGE ExplicitForAll, Rank2Types #-} -- | An implementation of Reagents (http://www.mpi-sws.org/~turon/reagents.pdf) -- NOTE: currently this is just a very tiny core of the Reagent design. Needs -- lots of work. module Data.Concurrent.Internal.Reagent where import Data.IORef import Data.Atomics import P...
rrnewton/concurrent-skiplist
src/Data/Concurrent/Internal/Reagent.hs
apache-2.0
1,287
0
13
297
420
216
204
27
3
{-# LANGUAGE TemplateHaskell #-} -- Copyright (C) 2010-2012 John Millikin <[email protected]> -- -- 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/license...
jmillikin/haskell-dbus
tests/DBusTests/Signature.hs
apache-2.0
4,901
16
16
860
1,580
786
794
119
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE...
dorchard/camfort
src/Language/Fortran/Model/Types.hs
apache-2.0
9,913
0
20
2,416
1,791
939
852
114
1
{-# LANGUAGE TupleSections #-} module Arbitrary.TestModule where import Data.Integrated.TestModule import Test.QuickCheck import Data.ModulePath import Control.Applicative import Arbitrary.Properties import Test.Util import Filesystem.Path.CurrentOS import Prelude hiding (FilePath) import qualified Arbitrary.ModulePat...
jfeltz/tasty-integrate
tests/Arbitrary/TestModule.hs
bsd-2-clause
1,129
0
12
186
314
165
149
28
1
{-# LANGUAGE TemplateHaskell, QuasiQuotes, OverloadedStrings #-} module Handler.Root where import Foundation -- This is a handler function for the GET request method on the RootR -- resource pattern. All of your resource patterns are defined in -- config/routes -- -- The majority of the code you will write in Yesod l...
periodic/Simple-Yesod-ToDo
Handler/Root.hs
bsd-2-clause
625
0
12
123
63
34
29
9
1
{-- Copyright (c) 2014-2020, Clockwork Dev Studio 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 conditions a...
clockworkdevstudio/Idlewild-Lang
Arguments.hs
bsd-2-clause
5,916
0
22
1,368
1,000
518
482
92
3
module Convert.LRChirotope where -- standard modules import Data.List import qualified Data.Map as Map import Data.Maybe import qualified Data.Set as Set -- local modules import Basics import Calculus.FlipFlop import Helpful.General --import Debug.Trace {--------------------------------------------------------------...
spatial-reasoning/zeno
src/Convert/LRChirotope.hs
bsd-2-clause
1,839
0
26
767
422
224
198
38
4
{-# LANGUAGE FlexibleContexts #-} module BRC.Solver.Error where import Control.Monad.Error (Error(..), MonadError(..)) -- | Solver errors, really just a container for a possibly useful error message. data SolverError = SolverError String deriving (Eq, Ord) instance Show (SolverError) where show (SolverError msg) ...
kcharter/brc-solver
BRC/Solver/Error.hs
bsd-2-clause
565
0
8
95
124
71
53
10
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module NW.Monster where import NW.Stats data MonsterClass = MCFighter | MCMage deriving (Eq, Show) data Monster = Monster { mClass :: MonsterClass , mName :: String , mStatsBase :: [Stat] , mLootBonus :: Int } deriving (Eq, Show) type Mons...
listx/netherworld
src/NW/Monster.hs
bsd-2-clause
338
8
9
63
98
60
38
15
0
{-# LANGUAGE TemplateHaskell #-} {-| Contains TemplateHaskell stuff I don't want to recompile every time I make changes to other files, a pre-compiled header, so to say. Don't know if that even works. -} module FeedGipeda.THGenerated ( benchmarkClosure , stringDict , __remoteTable ) where import ...
sgraf812/feed-gipeda
src/FeedGipeda/THGenerated.hs
bsd-3-clause
1,466
0
11
454
272
156
116
24
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TupleSections #-} {-# OP...
zohl/postgresql-simple-bind
tests/Test/PGConstant.hs
bsd-3-clause
1,133
0
12
177
253
149
104
36
1
{-# LANGUAGE OverloadedStrings #-} module WildBind.SeqSpec (main,spec) where import Control.Applicative ((<*>)) import Control.Monad (forM_) import Control.Monad.IO.Class (liftIO) import qualified Control.Monad.Trans.State as State import Data.Monoid ((<>)) import Data.IORef (modifyIORef, newIORef, readIORef) import T...
debug-ito/wild-bind
wild-bind/test/WildBind/SeqSpec.hs
bsd-3-clause
7,072
0
23
2,072
2,930
1,501
1,429
175
2
{-# LANGUAGE TemplateHaskell #-} module Data.Comp.Trans.DeriveUntrans ( deriveUntrans ) where import Control.Lens ( view ,(^.)) import Control.Monad ( liftM ) import Control.Monad.Trans ( lift ) import Data.Comp.Multi ( Alg, cata, (:&:)(..) ) import Language.Haskell.TH import Data.Comp.Trans.Util ----------...
jkoppel/comptrans
Data/Comp/Trans/DeriveUntrans.hs
bsd-3-clause
8,030
0
20
3,281
1,942
992
950
100
4
module Mistral.Schedule.Value ( Env , groupEnv , lookupEnv , bindType , bindValue , bindParam , NodeTags , bindNode , lookupTag, lookupTags , Value(..) , SNetwork(..), mapWhen, modifyNode , SNode(..), addTask , STask(..), hasConstraints , SConstraint(..), target ) where import Mistral...
GaloisInc/mistral
src/Mistral/Schedule/Value.hs
bsd-3-clause
5,624
0
14
1,727
1,680
920
760
121
2
{-# LANGUAGE ParallelListComp #-} module OldHMM (Prob, HMM(..), train, bestSequence, sequenceProb) where import qualified Data.Map as M import Data.List (sort, groupBy, maximumBy, foldl') import Data.Maybe (fromMaybe, fromJust) import Data.Ord (comparing) import Data.Function (on) import Control.Monad import ...
mikeizbicki/hmm
OldHMM.hs
bsd-3-clause
5,845
8
16
1,773
1,640
907
733
91
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} ...
bitemyapp/hspec-snap
src/Test/Hspec/Snap.hs
bsd-3-clause
22,986
0
22
7,031
5,474
2,827
2,647
387
8
{-# LANGUAGE TypeOperators, MultiParamTypeClasses, FunctionalDependencies , UndecidableInstances #-} -- For ghc 6.6 compatibility -- {-# OPTIONS -fglasgow-exts -fallow-undecidable-instances #-} ---------------------------------------------------------------------- -- | -- Module : Data.FunArr -- Cop...
conal/DeepArrow
src/Data/FunArr.hs
bsd-3-clause
2,075
2
10
435
310
184
126
17
0
module Main where import Build_doctests (flags, pkgs, module_sources) import Data.Foldable (traverse_) import Test.DocTest (doctest) main :: IO () main = do traverse_ putStrLn args doctest args where args = ["-XOverloadedStrings"] ++ flags ++ pkgs ++ module_sources
kazu-yamamoto/unix-time
test/doctests.hs
bsd-3-clause
282
0
10
52
89
49
40
9
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Configure -- Copyright : (c) David Himmelstrup 2005, -- Duncan Coutts 2005 -- License : BSD-like -- -- Maintainer : [email protected] -- Portability : portable -- ...
alphaHeavy/cabal
cabal-install/Distribution/Client/Configure.hs
bsd-3-clause
8,529
0
20
2,277
1,429
793
636
144
5
module Text.OpenGL.Xml.ReadRegistry ( readRegistry, parseRegistry, PreProcess ) where import Prelude hiding ((.), id) import Control.Category import Text.OpenGL.Types import Text.OpenGL.Xml.Pickle() import Text.OpenGL.Xml.PreProcess import Text.XML.HXT.Core type PreProcess = Bool -- TODO RelaxNG valid...
Laar/opengl-xmlspec
src/Text/OpenGL/Xml/ReadRegistry.hs
bsd-3-clause
1,468
0
12
298
395
213
182
34
3
{-# Language OverloadedStrings #-} module XMonad.Actions.XHints.Render where import XMonad hiding (drawString) import Data.Text (Text) import qualified Data.Text as T import Foreign.C import Graphics.X11.Xlib.Types import qualified Data.Text.Foreign as TF import qualified Data.ByteString as BS import Codec.Binary.UTF8...
netogallo/XHints
src/XMonad/Actions/XHints/Render.hs
bsd-3-clause
1,227
0
13
272
381
202
179
31
1
End of preview. Expand in Data Studio

Dataset Card for "github-code-haskell-file"

Rows: 339k Download Size: 806M

This dataset is extracted from github-code-clean.

Each row also contains attribute values for my personal analysis project. 12.6% (43k) of the rows have cyclomatic complexity and LOC valued at -1 because homplexity failed in parsing the row's uncommented_code.

Downloads last month
85