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 DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
olorin/amazonka
amazonka-ml/gen/Network/AWS/MachineLearning/UpdateDataSource.hs
mpl-2.0
5,117
0
13
1,068
669
400
269
88
1
module Propellor.Property.DnsSec where import Propellor.Base import qualified Propellor.Property.File as File -- | Puts the DNSSEC key files in place from PrivData. -- -- signedPrimary uses this, so this property does not normally need to be -- used directly. keysInstalled :: Domain -> RevertableProperty (HasInfo + U...
ArchiveTeam/glowing-computing-machine
src/Propellor/Property/DnsSec.hs
bsd-2-clause
3,756
83
16
745
965
512
453
-1
-1
module Database.Schema.Migrations.Filesystem.Serialize ( serializeMigration ) where import Data.Time () -- for UTCTime Show instance import Data.Maybe ( catMaybes ) import Data.List ( intercalate ) import Database.Schema.Migrations.Migration ( Migration(..) ) type FieldSerializer = Migration -> Maybe...
creswick/dbmigrations
src/Database/Schema/Migrations/Filesystem/Serialize.hs
bsd-3-clause
2,098
0
13
582
499
267
232
46
2
module Test where import Foo.Bar import Foo.Bar.Blub import Ugah.Argh import qualified Control.Monad import Control.Monad (unless) f :: Int -> Int f = (+ 3)
jystic/hsimport
tests/goldenFiles/SymbolTest9.hs
bsd-3-clause
158
0
5
25
54
34
20
8
1
{-# LANGUAGE CPP, GADTs, NondecreasingIndentation #-} ----------------------------------------------------------------------------- -- -- Generating machine code (instruction selection) -- -- (c) The University of Glasgow 1996-2004 -- ----------------------------------------------------------------------------- -- Th...
lukexi/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
113,982
0
23
38,143
29,903
14,731
15,172
-1
-1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GLU.NURBS -- Copyright : (c) Sven Panne 2002-2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- -- Th...
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GLU/NURBS.hs
bsd-3-clause
12,171
0
17
2,053
2,629
1,365
1,264
207
5
{-# LANGUAGE FlexibleContexts #-} import Plots import Plots.Axis import Plots.Types hiding (B) import Plots.Themes import Data.List import Diagrams.Prelude import Diagrams.Backend.Rasterific import Diagrams.Backend.CmdLine import Data.Monoid.Recommend myaxis :: Axis B V2 Double myaxis = r2Axis &~ do vectorFie...
bergey/plots
examples/vectorfield.hs
bsd-3-clause
986
2
11
186
443
232
211
26
1
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "Network/HPACK/Huffman.hs" #-} module Network.HPACK.Huffman ( -- * Type HuffmanEncoding , HuffmanDecoding -- * Encoding/decoding , encode , encodeHuffman , decode , decodeHuffman ) where import Network.HPACK.Huffman.Decode import Network.HPACK.Huffman.Encode
phischu/fragnix
tests/packages/scotty/Network.HPACK.Huffman.hs
bsd-3-clause
320
0
4
56
45
32
13
11
0
{-| Module : Idris.Elab.Instance Description : Code to elaborate instances. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE PatternGuards #-} module Idris.Elab.Instance(elabInstance) where import Idris.AbsSyntax import Idris.ASTUtils import Idris.DSL import Idris.Error import I...
tpsinnem/Idris-dev
src/Idris/Elab/Instance.hs
bsd-3-clause
20,544
1
28
7,028
7,478
3,721
3,757
390
40
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Keymap.Vim.InsertMap -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable module Yi.Keymap.Vim.InsertMap (defInsertMap) where import ...
TOSPIO/yi
src/library/Yi/Keymap/Vim/InsertMap.hs
gpl-2.0
10,169
7
23
3,356
2,900
1,492
1,408
208
22
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE CPP #-} module BuildTyCl ( buildSynonymTyCon, buildFamilyTyCon, buildAlgTyCon, buildDataCon, buildPatSyn, TcMethInfo, buildClass, distinctAbstractTyCo...
AlexanderPankiv/ghc
compiler/iface/BuildTyCl.hs
bsd-3-clause
16,817
0
19
6,009
2,636
1,444
1,192
236
5
import Test.QuickCheck -- Our QC instances and properties. import Instances import Properties.Delete import Properties.Failure import Properties.Floating import Properties.Focus import Properties.GreedyView import Properties.Insert import Properties.Screen import Properties.Shift import Properties.Stack import Propert...
atupal/xmonad-mirror
xmonad/tests/Properties.hs
mit
8,231
0
15
1,601
1,751
1,005
746
154
3
module PackedString where import qualified Prelude as P import Prelude hiding (null) newtype PackedString = PS String deriving (Eq,Ord) instance Show PackedString where showsPrec n (PS s) r = s++r packString = PS unpackPS (PS s) = s null (PS s) = P.null s
forste/haReFork
tools/base/tests/GhcLibraries/PackedString.hs
bsd-3-clause
263
0
8
51
106
59
47
9
1
module AsPatIn1 where f :: Either a b -> Either a b f x@x_1 = x_1
SAdams601/HaRe
old/testing/subIntroPattern/AsPatIn1.hs
bsd-3-clause
67
0
6
17
34
18
16
3
1
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -Wall #-} module Bug where class C a where type T a data D a m :: a instance C Int deriving instance C Bool
sdiehl/ghc
testsuite/tests/deriving/should_compile/T14094.hs
bsd-3-clause
230
0
6
47
45
27
18
11
0
-- Trac #8806 module T8806 where f :: Int => Int f x = x + 1 g :: (Int => Show a) => Int g = undefined
urbanslug/ghc
testsuite/tests/typecheck/should_fail/T8806.hs
bsd-3-clause
106
0
7
31
51
28
23
-1
-1
module Graphics.Urho3D.Scene.Internal.CustomLogicComponent( CustomLogicComponent , customLogicComponentCntx , sharedCustomLogicComponentPtrCntx , SharedCustomLogicComponent ) where import qualified Language.C.Inline as C import qualified Language.C.Inline.Context as C import qualified Language.C.Types as ...
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Scene/Internal/CustomLogicComponent.hs
mit
650
0
11
88
120
80
40
-1
-1
import Test.Tasty import Test.Tasty.HUnit import InfoTest(infoUnitTests) import InfoInternalTest(infoInternalUnitTests) import QueryTests(queryUnitTests) import UtilitiesTests(utilitiesTests) import DeconstructorTests(deconstructorTests) main = defaultMain tests tests :: TestTree tests = testGroup "Tests" [infoUnitTe...
juventietis/HLINQ
Tests/test.hs
mit
400
0
6
32
90
54
36
10
1
{-# OPTIONS_GHC -F -pgmF hspec-discover #-} import Test.Hspec -- main :: IO () -- main = hspec $ do -- specCaesar
pogin503/vbautil
language/haskell/caesar/test/Spec.hs
mit
117
0
4
24
10
7
3
2
0
{-| Module : PansiteApp.CommandLine Description : Command-line parsers for Pansite app Copyright : (C) Richard Cook, 2017-2018 Licence : MIT Maintainer : rcook@rcook.org Stability : experimental Portability : portable -} module PansiteApp.CommandLine ( Command (..) , ServerConfig (..) , parse...
rcook/pansite
app/PansiteApp/CommandLine.hs
mit
1,871
0
11
379
386
200
186
46
1
-- | Data.TSTP.Parent module. -- Adapted from https://github.com/agomezl/tstp2agda. module Data.TSTP.Parent ( Parent ( Parent ) ) where ------------------------------------------------------------------------------ import Data.TSTP.GData ( GTerm(..) ) ------------------------------------------------------------...
jonaprieto/athena
src/Data/TSTP/Parent.hs
mit
454
0
7
63
69
44
25
7
0
{-# LANGUAGE ScopedTypeVariables #-} module Data.Normalize.Tests where import Data.Normalize import Test.Framework import Test.Framework.Providers.QuickCheck2 import Test.QuickCheck testNormal :: forall a. (Show a, Arbitrary a, Eq a, Normalize a) => a -> Test testNormal _ = testGroup "normalization" [ testProperty...
Soares/Dater.hs
test/Data/Normalize/Tests.hs
mit
416
0
12
72
125
70
55
10
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DeriveDataTypeable #-} -- | A postgresql backend for persistent. module Database.Persist.Postgresql ( withPostgresqlPool , withPostgresqlConn ...
gbwey/persistentold
persistent-postgresql/Database/Persist/Postgresql.hs
mit
28,107
0
32
9,886
7,639
3,946
3,693
-1
-1
module Main where even1 [] = [] even1 (h:t) = if (even h) then (h:even1(t)) else even1(t) even2 x = [n | n <- x, even n] main = do print (even1 [1,2,3,4,5]) print (even2 [1,2,3,4,5])
skywind3000/language
haskell/evenlist.hs
mit
228
0
10
81
149
81
68
7
2
{-# LANGUAGE GADTs, TypeOperators, PatternSynonyms #-} -- | Solving flex-rigid problems module Tactics.Unification where import Prelude hiding (any, elem) import Control.Newtype import Data.Foldable import qualified Data.Monoid as M import Control.Error import DisplayLang.Name import Evidences.Tm import Evidences.E...
kwangkim/pigment
src-lib/Tactics/Unification.hs
mit
4,124
0
17
1,138
1,190
599
591
88
6
module NGL.Rendering where import Graphics.Rendering.OpenGL as GL import Graphics.UI.GLFW as GLFW import Control.Monad import System.Exit ( exitWith, ExitCode(..) ) import Foreign.Marshal.Array import Foreign.Ptr import Foreign.Storable import NGL.LoadShaders import NGL.Shape data Descriptor = Descriptor VertexArray...
ublubu/zombieapaperclypse
NGL/Rendering.hs
mit
3,661
0
19
820
1,149
553
596
91
1
-- | -- Module : Main -- Description : Main module. -- Copyright : (c) Maximilian Nitsch, 2015 -- -- License : MIT -- Maintainer : maximilian.nitsch@gausus.de -- Stability : experimental -- Portability : portable -- -- This module put all functions together and run the spellchecker. module Main where im...
Ma-Ni/haspell
src/Haspell.hs
mit
1,237
0
13
246
249
134
115
19
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} -- | Run actor. -- import Network.AWS.Wolf import Options.Generic -- | Args -- -- Program arguments. -- data Args = Args { config :: FilePath -- ^ Configuration file. , plan :: FilePath -- ^ Plan fil...
swift-nav/wolf
main/decider.hs
mit
591
0
9
139
127
73
54
18
1
-- print1.hs module Print1 where main :: IO () -- IO type: printing to the screen main = putStrLn "hello world!" -- set
younggi/books
haskellbook/practices/print1.hs
mit
129
0
6
32
25
15
10
3
1
-- A small keymap library for gtk -- -- Author : Jens-Ulrik Petersen -- Created: 15 July 2002 -- -- Version: $Revision: 1.6 $ from $Date: 2008/11/03 03:14:11 $ -- -- Copyright (c) 2002, 2008-2009 Jens-Ulrik Holger Petersen -- -- This library is free software; you can redistribute it and/or -- modify it under th...
juhp/hircules
src/Graphics/UI/Gtk/Keymap.hs
mit
2,097
2
13
431
400
228
172
25
2
{-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} module Examples.Rpc.EchoClient (main) where import Data.Function ((&)) import Data.Functor ((<&>)) import Network.Simple.TCP (connect) import qualified Capnp.New as C import Capnp.Rpc (ConnConfig(..), fromClient, handleConn...
zenhack/haskell-capnp
examples/lib/Examples/Rpc/EchoClient.hs
mit
928
0
22
288
245
140
105
23
1
module Whip.Interpreter (runProgram) where import Whip.Types (Expr(..), typeOf) import Control.Monad (foldM) import qualified Data.Map.Lazy as M type Scope = M.Map String Expr library :: Scope library = M.fromList [ "print" ~> Lambda pr , "show" ~> Lambda (String . show) ] where (~>) = (,) pr (St...
L8D/whip-hs
src/Whip/Interpreter.hs
mit
1,198
0
14
350
528
267
261
30
4
module Statistics.FastBayes.Internal ( ) where
cscherrer/fastbayes
src/Statistics/FastBayes/Internal.hs
mit
55
0
3
13
10
7
3
2
0
main = do print $ [f x | x <- xs, p x] == map f (filter p xs) where f = (*2) p = odd xs = take 5 [1..]
fabioyamate/programming-in-haskell
ch07/ex01.hs
mit
131
0
11
59
80
41
39
5
1
yDeferredLighting :: (HasScene a DeferredEntity DeferredEnvironment, HasHDRCamera a, HasDeferredSettings a, DeferredMonad m env) => YageResource (RenderSystem m a (Texture2D PixelRGB8)) yDeferredLighting = do throwWithStack $ glEnable GL_FRAMEBUFFER_SRGB throwWithStack $ buildNamedStrings embeddedShaders ((++) ...
MaxDaten/master-thesis
src/deferred-pbr-pipeline.hs
cc0-1.0
3,497
1
18
1,290
703
352
351
-1
-1
{-# LANGUAGE TemplateHaskell #-} module Rewriting.TRS.Apply where import qualified Rewriting.Apply as A import Rewriting.TRS import Type.Tree import Rewriting.Derive.Instance import Rewriting.TRS.Step import Rewriting.TRS.Steps {- import Rewriting.Derive.Quiz import Rewriting.Derive.Config -} import Autolib.Repor...
marcellussiegburg/autotool
collection/src/Rewriting/TRS/Apply.hs
gpl-2.0
1,234
0
9
292
268
150
118
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Keymap.Vim -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable -- -- The vim keymap. module Yi.Keymap.Vim ( keymapSet , mkKeymapSet ...
ethercrow/yi
yi-keymap-vim/src/Yi/Keymap/Vim.hs
gpl-2.0
7,355
0
19
2,073
1,738
942
796
147
9
module Chap02.Suite where import Test.Framework (testGroup, Test) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.Framework.Providers.HUnit (testCase) import Chap02.Exercise01.Test import Chap02.Exercise05.Test {-import Chap02.Exercise06.Test-} import Chap02.Data.UnbalancedSet (UnbalancedSet)...
stappit/okasaki-pfds
test/Chap02/Suite.hs
gpl-3.0
1,738
0
11
369
382
210
172
32
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Games.Types -- Copyright : (c) 2015-2016 Brendan Hay -...
rueshyna/gogol
gogol-games/gen/Network/Google/Games/Types.hs
mpl-2.0
19,898
0
7
5,332
2,363
1,616
747
715
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-logging/gen/Network/Google/Resource/Logging/Folders/Sinks/List.hs
mpl-2.0
6,591
0
20
1,668
1,047
606
441
146
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/Zones/Clusters/NodePools/SetManagement.hs
mpl-2.0
8,308
0
24
1,919
1,029
600
429
164
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Kubernetes.V1.Capabilities where import GHC.Generics import Kubernetes.V1.Capability import qualified Data.Aeson -- | Adds and removes POSIX c...
minhdoboi/deprecated-openshift-haskell-api
kubernetes/lib/Kubernetes/V1/Capabilities.hs
apache-2.0
625
0
10
91
100
61
39
15
0
import Data.Char ary = ["abcde","fghij","klmno","pqrst","uvwxy","z.?! "] ans [] = Just [] ans (a:[]) = Nothing ans (a:b:s) = let c = if (a <= 0 || a > 6) || (b <= 0 || b > 5) then Nothing else Just ((ary!!(a-1))!!(b-1)) r = ans s in if c == Nothing || r == Nothing then Nothing ...
a143753/AOJ
0127.hs
apache-2.0
638
0
16
243
339
173
166
25
3
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE...
brendanhay/credentials
credentials/src/Credentials/DynamoDB.hs
apache-2.0
10,802
0
19
3,081
2,528
1,324
1,204
227
2
-- starman.hs check :: String -> String -> Char -> (Bool, String) check word display c = (c `elem` word, [if x==c then c else y | (x,y) <- zip word display]) turn :: String -> String -> Int -> IO () turn word display n = do putStrLn ("Word: " ++ display ++ " " ++ "Tries: " ...
romanegunkov/to-learn
haskell/futurelearn/starman.hs
apache-2.0
876
0
14
295
360
182
178
24
3
module Eval ( eval , evalFlat , evalProgram , evalProgramFlat , uidStreamStart , nextUidFromStream , Result (Normal, Failure) , FailureCause (UnboundVariable, AbsentNonLocal, CircularReference) , FlatValue (FlatNull, FlatBool, FlatInt, FlatStr, FlatInstance, FlatHook) ) where import qualified Value as V import qualifi...
tundra/nls
hs/Eval.hs
apache-2.0
18,653
0
13
4,118
5,033
2,657
2,376
336
10
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} -- | Top-Level Declarations in K3. module Language.K3.Core.Declaration ( Declaration(..), Annotation(..), -- * User defined Annotations Polarity(..), AnnMemDecl(..), ...
yliu120/K3
src/Language/K3/Core/Declaration.hs
apache-2.0
13,878
0
23
3,255
4,527
2,362
2,165
275
3
{-# LANGUAGE ScopedTypeVariables #-} module Fifo where import CLaSH.Prelude type Elm = Unsigned 8 type Pntr n = Unsigned (n + 1) type Elms = Vec 4 Elm fifo :: forall n e . (KnownNat n, KnownNat (n+1), KnownNat (n^2)) => (Pntr n, Pntr n, Vec (n^2) e) -> (e, Bool, Bool) -> ((Pntr n,Pntr n,Vec (n^2) e),...
christiaanb/clash-compiler
examples/Fifo.hs
bsd-2-clause
1,726
0
13
374
853
514
339
-1
-1
{-# LANGUAGE TupleSections #-} -- | Let AI pick the best target for an actor. module Game.LambdaHack.Client.AI.PickTargetClient ( targetStrategy, createPath ) where import Control.Applicative import Control.Exception.Assert.Sugar import Control.Monad import qualified Data.EnumMap.Strict as EM import qualified Data...
Concomitant/LambdaHack
Game/LambdaHack/Client/AI/PickTargetClient.hs
bsd-3-clause
18,697
21
71
7,200
4,110
2,138
1,972
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} module Types where import Data.Text (Text) import qualified Data.Text as T import qualified Trac.Convert as T import Network.Conduit.Client hiding (User, Repo) convert :: Text -> Text convert = T.pack . T.convert . T.unpack -- Used as a kind data PHIDType = Tick...
danpalmer/trac-to-phabricator
src/Types.hs
bsd-3-clause
759
0
7
165
232
138
94
20
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} module Budget.Database.Item where import Prelude hiding (id) import qualified Data.Maybe as MB import Data.Text (unpack, pack) import Data.Time (LocalTime) import qualified...
utky/budget
src/Budget/Database/Item.hs
bsd-3-clause
3,219
0
16
746
1,019
538
481
77
1
{-# language CPP #-} -- No documentation found for Chapter "Promoted_From_VK_EXT_host_query_reset" module Vulkan.Core12.Promoted_From_VK_EXT_host_query_reset ( resetQueryPool , PhysicalDeviceHostQueryResetFeatures(..) ...
expipiplus1/vulkan
src/Vulkan/Core12/Promoted_From_VK_EXT_host_query_reset.hs
bsd-3-clause
8,456
0
17
1,391
1,337
795
542
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE Typ...
Garygunn94/DFS
ClientProxy/src/ClientProxyApi.hs
bsd-3-clause
20,133
12
40
5,797
5,115
2,443
2,672
389
12
module NLP.WordNet.PrimTypes where import Data.Array import System.IO import Control.OldException import Data.Dynamic (Typeable) type Offset = Integer -- | The basic part of speech type, either a 'Noun', 'Verb', 'Adj'ective or 'Adv'erb. data POS = Noun | Verb | Adj | Adv deriving (Eq, Ord, Show, Ix, Typeabl...
svoisen/HWordNet
NLP/WordNet/PrimTypes.hs
bsd-3-clause
6,634
0
12
1,791
1,725
963
762
152
1
------------------------------------------------------------------------- -- | -- Module : Control.Kleislify -- Copyright : (c) Dylan Just, 2011 -- License : BSD-style (see the LICENSE file in the distribution) -- -- Maintainer : dylan@techtangents.com -- Stability : experimental -- Portability : po...
techtangents/kleislify
Control/Kleislify.hs
bsd-3-clause
2,150
0
10
445
540
318
222
21
1
module TriangleKata.Day2 (triangle, TriangleType(..)) where data TriangleType = Illegal | Equilateral | Isosceles | Scalene deriving (Eq, Show) type Triangle = (Int, Int, Int) triangle :: Triangle -> TriangleType triangle (0, 0, 0) = Illegal triangle (a, b, c) | a + b < c ...
Alex-Diez/haskell-tdd-kata
old-katas/src/TriangleKata/Day2.hs
bsd-3-clause
556
0
15
238
200
109
91
16
1
{-# LANGUAGE TypeFamilies,FlexibleContexts #-} module Trie where import Data.Array import Data.Monoid class Ix a => FiniteIx a where maxRange :: a -> (a, a) class (FiniteIx (Base a)) => Flat a where type Base a flatten :: a -> [Base a] data Trie k a = Single a | Trie (Array (Base k) (Trie k a)) a nil :...
jystic/QuickSpec
qs1/Trie.hs
bsd-3-clause
1,222
0
12
323
738
376
362
32
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE...
cchalmers/geometry
src/Geometry/Segment.hs
bsd-3-clause
37,298
13
18
10,177
10,713
5,640
5,073
704
3
{-# LANGUAGE OverloadedStrings #-} module CacheDNS.APP.JobQueue ( JobQueue , newJobQueue , addJob , fetchJob ) where import Control.Concurrent import Control.Concurrent.Async import Control.Concurrent.STM import qualified Data.ByteString as BS import qualified CacheDNS.DNS as DNS import qualifi...
DavidAlphaFox/CacheDNS
app/CacheDNS/APP/JobQueue.hs
bsd-3-clause
868
0
12
168
261
144
117
25
1
import Neil main :: IO () main = neil $ do retry 3 $ cmd "cabal install QuickCheck" cmd "hlint test --typecheck --quickcheck" (time,_) <- duration $ cmdCode "hlint src" putStrLn $ "Running HLint on self took " ++ show time ++ "s" cmd "ghc -threaded -rtsopts -isrc -i. src/Paths.hs src/Main.hs --mak...
fpco/hlint
travis.hs
bsd-3-clause
416
0
10
95
98
43
55
10
1
{-# LANGUAGE TemplateHaskell #-} module Client.VidDefT where import Control.Lens (makeLenses) import Types makeLenses ''VidDefT newVidDefT :: VidDefT newVidDefT = VidDefT { _vdWidth = 0 , _vdHeight = 0 , _vdNewWidth = 0 , _vdNewHeight = 0 }
ksaveljev/hake-2
src/Client/VidDefT.hs
bsd-3-clause
293
0
6
89
64
39
25
11
1
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, RankNTypes #-} module XMLSerialization ( chapterToXml ) where -- import Prelude hiding (words) import qualified Data.Map as M import Text.XML.Light import System.Random import Control.Monad.Trans import Control.Monad.Trans.State import Control.Monad.Trans.Except ...
homam/babelbay-ma-parseit
src/XMLSerialization.hs
bsd-3-clause
7,589
0
19
1,476
2,410
1,268
1,142
155
2
module Settings.Builders.GenPrimopCode (genPrimopCodeBuilderArgs) where import Settings.Builders.Common genPrimopCodeBuilderArgs :: Args genPrimopCodeBuilderArgs = builder GenPrimopCode ? mconcat [ output "**/PrimopWrappers.hs" ? arg "--make-haskell-wrappers" , output "**/Prim.hs" ...
sdiehl/ghc
hadrian/src/Settings/Builders/GenPrimopCode.hs
bsd-3-clause
1,580
0
9
371
272
130
142
22
1
module Model.Feed ( getAllFeeds , getFeed , updateFeed , module Model.Feed.Internal ) where import Import import Model.Feed.Internal import Data.ByteString (ByteString) import Database.Esqueleto -- | Get all feed (title, url, type) 3-tuples. getAllFeeds :: YesodDB App [(Text, Text, FeedType)] ge...
duplode/dohaskell
src/Model/Feed.hs
bsd-3-clause
949
0
13
240
308
163
145
25
1
module TestArbitrary (testArbitrary, size) where import Test.Tasty import Test.Tasty.QuickCheck import Data.Maybe import Data.Either import Properties import ArbitraryLambda import BruijnTerm import MakeType import TypeCheck import ShrinkLambda testArbitrary :: TestTree testArbitrary = testGroup "arbitrary" [testGe...
kwibus/myLang
tests/TestArbitrary.hs
bsd-3-clause
1,786
0
20
452
572
301
271
38
2
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- TODO - remove those, once disp for pattern2 is removed {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} -- ghc options {-# OPTIONS_GHC -Wall #-} {-# OPTIO...
reuleaux/pire
src/Pire/Pretty/Expr.hs
bsd-3-clause
23,203
45
18
7,127
7,128
3,531
3,597
430
15
module Predef where import Expr import Parser import Syntax -- import TypeCheck initenv :: BEnv initenv = [ ("nat", nat) , ("fix", fix) , ("zero", zero) , ("suc", suc) , ("one", one) , ("two", two) , ("plus", plus) , ("three", three) , ("...
bixuanzju/full-version
src/Predef.hs
gpl-3.0
1,865
0
12
579
326
193
133
44
1
{-# LANGUAGE DataKinds, PolyKinds, TemplateHaskell, QuasiQuotes, TypeOperators #-} module HLearn.Models.Regression.Parsing where import Data.List import Text.ParserCombinators.Parsec import Text.ParserCombinators.Parsec.Expr import Text.ParserCombinators.Parsec.Language import Text.ParserCombinators.Parsec.Token ...
iamkingmaker/HLearn
src/HLearn/Models/Regression/Parsing.hs
bsd-3-clause
7,734
5
15
1,789
2,648
1,374
1,274
-1
-1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Configure -- Copyright : (c) David Himmelstrup 2005, -- Duncan Coutts 2005 -- License : BSD-like -- -- Maintainer : cabal-devel@haskell.org -- Portab...
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/Configure.hs
bsd-3-clause
16,322
0
22
4,727
2,628
1,429
1,199
285
3
-- | This module defines 'PerformEvent' and 'TriggerEvent', which mediate the -- interaction between a "Reflex"-based program and the external side-effecting -- actions such as 'IO'. {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LAN...
ryantrinkle/reflex
src/Reflex/PerformEvent/Class.hs
bsd-3-clause
2,910
0
13
520
541
293
248
-1
-1
{-# LANGUAGE FlexibleContexts, UndecidableInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Database.Persist.Redis.Store ( execRedisT , RedisBackend )where import Database.Persist import Co...
plow-technologies/persistent
persistent-redis/Database/Persist/Redis/Store.hs
mit
3,780
0
15
976
1,107
554
553
94
2
<?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="da-DK"> <title>Retest Add-On</title> <maps> <homeID>retest</homeID> <mapref location="m...
thc202/zap-extensions
addOns/retest/src/main/javahelp/org/zaproxy/addon/retest/resources/help_da_DK/helpset_da_DK.hs
apache-2.0
961
77
67
156
411
208
203
-1
-1
{-# LANGUAGE GADTs #-} {-# LANGUAGE DataKinds #-} module T17646 where data T a where A :: T True B :: T False g :: () g | B <- A = ()
sdiehl/ghc
testsuite/tests/pmcheck/should_compile/T17646.hs
bsd-3-clause
141
0
8
40
51
29
22
8
1
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[PrimOp]{Primitive operations (machine-level)} -} {-# LANGUAGE CPP #-} module PrimOp ( PrimOp(..), PrimOpVecCat(..), allThePrimOps, primOpType, primOpSig, primOpTag, maxPrimOpTag, primOpOcc, tagToEnumKey, p...
urbanslug/ghc
compiler/prelude/PrimOp.hs
bsd-3-clause
23,414
0
11
6,323
1,586
874
712
-1
-1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} module Aws.Iam.Commands.UpdateAccessKey ( UpdateAccessKey(..) , UpdateAccessKeyResponse(..) ) where import Aws.Core import Aws.Iam....
Soostone/aws
Aws/Iam/Commands/UpdateAccessKey.hs
bsd-3-clause
2,063
0
10
521
311
179
132
38
0
module Pretty ( ppexpr ) where import Syntax import Text.PrettyPrint (Doc, (<>), (<+>)) import qualified Text.PrettyPrint as PP parensIf :: Bool -> Doc -> Doc parensIf True = PP.parens parensIf False = id class Pretty p where ppr :: Int -> p -> Doc instance Pretty Expr where ppr _ Zero = PP.text "0" ppr _...
zanesterling/haskell-compiler
src/TypedPeanoArithmetic/Pretty.hs
bsd-3-clause
766
0
12
195
401
205
196
23
1
{-# LANGUAGE TypeFamilies #-} module ShouldFail where foo :: (a,b) -> (a~b => t) -> (a,b) foo p x = p
urbanslug/ghc
testsuite/tests/indexed-types/should_fail/SimpleFail15.hs
bsd-3-clause
105
0
10
24
52
30
22
-1
-1
-- !!! exporting a field name (but not its type) module M where import Mod123_A f :: T -> Int f x = f1 x
ghc-android/ghc
testsuite/tests/module/mod123.hs
bsd-3-clause
106
0
5
26
28
16
12
4
1
import Text.ParserCombinators.Parsec csvFile = endBy line eol line = sepBy cell (char ',') cell = many (noneOf ",\n") eol = char '\n' parseCSV :: String -> Either ParseError [[String]] parseCSV input = parse csvFile "(unknown)" input
zhangjiji/real-world-haskell
ch16/csv2.hs
mit
236
0
8
38
90
46
44
7
1
{-# LANGUAGE BangPatterns, ScopedTypeVariables #-} -- TODO: Add some comments describing how this implementation works. -- | A reimplementation of Data.WordMap that seems to be 1.4-4x faster. module Data.WordMap.Lazy ( -- * Map type WordMap, Key -- * Operators , (!) , (\\) -- * Query ...
gereeter/bounded-intmap
src/Data/WordMap/Lazy.hs
mit
71,636
0
21
22,348
22,821
11,221
11,600
938
70
{- Author: Jeff Newbern Maintainer: Jeff Newbern <jnewbern@nomaware.com> Time-stamp: <Mon Aug 18 15:20:18 2003> License: GPL -} {- DESCRIPTION Example 19 - Nesting the Continuation monad within the I/O monad Usage: Compile the code and run it. Type an integer value and press enter, and the pr...
maurotrb/hs-exercises
AllAboutMonads/examples/example19.hs
mit
2,747
0
28
1,070
361
183
178
22
1
{-# LANGUAGE RecordWildCards #-} module MLUtil.Graphics.Rendering ( ChartLabels (..) , RPlot () , defaultChartLabels , mkRPlot , renderChartSVG , renderFlowchartSVG ) where import Diagrams.Backend.SVG import Graphics.Rendering.Chart.Backend.Diagrams import Gra...
rcook/mlutil
mlutil/src/MLUtil/Graphics/Rendering.hs
mit
1,362
0
13
315
321
178
143
37
2
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-} module Main where import Yage hiding (Event, at, key) import Yage.Rendering import Yage.Math import Yage.Wire import Yage.Examples.Shared import Data.List import Control.Monad import Control.Monad.Random settin...
MaxDaten/yage-examples
src/YageWireParticles.hs
mit
5,848
3
20
1,883
1,645
840
805
-1
-1
module Output (handleReport, printRemaining) where import Control.Monad import Data.Char import Data.List import System.Console.ANSI import System.Exit import GitMapConfig handleReport :: Bool -> Bool -> IO (Bool, GitMapRepoSpec, String, String) -> [GitMapRepoSpec] -> IO () handleReport status quiet ...
ryanreich/gitmap
src/Output.hs
mit
1,984
0
14
442
608
301
307
54
2
module Main where people :: [(String, String)] people = [("name", "Calvin") ,("wat", "John") ,("name", "Thomas") ] {- generic filterByKey function that accepts a string as keyname -} filterByKey :: Eq a => a -> [(a, t)] -> [t] filterByKey _ [] = [] filterByKey p ((k, v):xs) | p == k = v : filterBy...
calvinchengx/learnhaskell
currying/currying2.hs
mit
725
0
10
179
283
151
132
22
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts, ScopedTypeVariables #-} module Main where import qualified Graphics.UI.FLTK.LowLevel.FL as FL import Graphics.UI.FLTK.LowLevel.Fl_Enumerations import Graphics.UI.FLTK.LowLevel.Fl_Types import Graphics.UI.FLTK.LowLevel.FLTKHS import Control.Monad import D...
deech/fltkhs-demos
src/Examples/doublebuffer.hs
mit
3,488
0
21
796
1,469
711
758
96
2
module Compiler where import Control.Applicative ((<|>)) data Expr = Val Int | Add Expr Expr deriving Show data Op = Push Int | Plus deriving Show type Stack = [Int] type Code = [Op] -- 1. Adding a stack push :: Int -> Stack -> Stack push n st = n:st add :: Stack -> Stack add (x:y:xs) = ...
futtetennista/IntroductionToFunctionalProgramming
PiH/src/Compiler.hs
mit
3,141
0
11
892
1,376
718
658
132
4
greet name = "hello " ++ name square x = x * x fact n = product [1..n] sumsqrs = sum . map square
craynafinal/cs557_functional_languages
practice/week1/defs.hs
mit
103
0
6
29
53
26
27
4
1
------------------------------------------------------------------------------ -- Module : Data.Time.Calendar.BankHoliday -- Maintainer : brady.ouren@gmail.com ------------------------------------------------------------------------------ module Data.Time.Calendar.BankHoliday ( isWeekend , isWeekday , year...
tippenein/BankHoliday
Data/Time/Calendar/BankHoliday.hs
mit
697
0
8
115
141
86
55
13
1
{-# OPTIONS_GHC -F -pgmF htfpp -fno-warn-missing-signatures #-} {-# LANGUAGE QuasiQuotes #-} module Text.Noise.Compiler.Test where import Test.Framework import Data.String.QQ (s) import Data.Maybe import Assertion import Text.Noise.SourceRange (oneLineRange) import qualified Text.Noise.Compiler.Document as D import q...
brow/noise
tests/Text/Noise/Compiler/Test.hs
mit
3,176
0
10
435
581
334
247
65
1
module Filter.NumberRef (numberRef) where import Text.Pandoc.Definition import Text.Pandoc.Walk replaceInline :: Inline -> Inline -> Inline replaceInline r (Str "#") = r replaceInline _ x = x process :: Inline -> Inline process (Link a is t@('#':xs, _)) = let ref = RawInline (Format "tex") $ "{\\ref{" ++ xs ++ "}}...
Thhethssmuz/ppp
src/Filter/NumberRef.hs
mit
437
0
14
80
180
95
85
13
1
{-# LANGUAGE ParallelListComp #-} module Tests.MathPolarTest (mathPolarTestDo) where import Test.HUnit import CornerPoints.CornerPoints(CornerPoints(..), (+++)) import CornerPoints.Points(Point(..)) import CornerPoints.Create( slopeAdjustedForVerticalAngle, adjustRadiusForSlope, createCornerPoint, Slope(..), ...
heathweiss/Tricad
src/Tests/MathPolarTest.hs
gpl-2.0
36,239
0
12
5,099
3,487
1,825
1,662
321
1
{-# language TemplateHaskell #-} {-# language DeriveDataTypeable #-} {-# language FlexibleInstances #-} {-# language MultiParamTypeClasses #-} {-# language DisambiguateRecordFields #-} module DPLLT.Top where import DPLLT.Data import DPLLT.Trace -- import DPLL.Pattern -- import DPLL.Roll import Challenger.Partial im...
marcellussiegburg/autotool
collection/src/DPLLT/Top.hs
gpl-2.0
3,010
0
19
971
596
306
290
59
1
{-# LANGUAGE BangPatterns #-} -- | Miscellaneous functions and types that belong to no other module module Data.VPlan.Util ( -- * Group and Monoid functions -- Note: The functions for monoids/groups in this module are not really efficient, but -- that shouldn't matter most of the time. gquot , gmod ,...
bennofs/vplan
src/Data/VPlan/Util.hs
gpl-3.0
2,256
0
13
626
591
325
266
30
2
module Math.Structure.Multiplicative.Semigroup where import Prelude hiding ( (*), (/), recip, (^), (^^) ) import Numeric.Natural ( Natural(..) ) import Math.Structure.Additive.DecidableZero import Math.Structure.Multiplicative.Magma class MultiplicativeMagma a => MultiplicativeSemigroup a where pow1p :: Natural ...
martinra/algebraic-structures
src/Math/Structure/Multiplicative/Semigroup.hs
gpl-3.0
473
2
8
82
149
90
59
11
1
{- This file is part of HNH. HNH 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 version. HNH is distributed in the hope that ...
fferreira/hnh
GenerateConstraints.hs
gpl-3.0
4,008
0
17
1,121
1,230
602
628
78
2
{-# LANGUAGE TemplateHaskell #-} module Types where import Control.Lens data LCMConfig = LCMConfig { _limit :: Integer } data LCMState = LCMState { _currentprod :: Integer , _counter :: Integer } $(makeLenses ''LCMConfig) $(makeLenses ''LCMState)
ignuki/projecteuler
5/Types.hs
gpl-3.0
262
0
8
50
70
39
31
10
0
func :: ((a, b, c), (a, b, c), (a, b, c))
lspitzner/brittany
data/Test27.hs
agpl-3.0
42
0
6
11
42
27
15
1
0
module HEP.Jet.FastJet.Class.TNamed ( TNamed(..) , ITNamed(..) , upcastTNamed , newTNamed ) where -- import HEP.Jet.FastJet.Class.Interface -- import HEP.Jet.FastJet.Class.Implementation () import HEP.Jet.FastJet.Class.TNamed.RawType import HEP.Jet.FastJet.Class.TNamed.Interface import HEP.Jet.FastJet....
wavewave/HFastJet
oldsrc/HEP/Jet/FastJet/Class/TNamed.hs
lgpl-2.1
349
0
5
43
60
45
15
9
0
{-# LANGUAGE OverloadedStrings #-} module XTag.Model.Type where import Data.Aeson import qualified Data.ByteString.UTF8 as C type BookId = C.ByteString data Book = Book { bookId :: C.ByteString , bookName :: C.ByteString , bookPageCount :: Integer } deriving Show data Book...
yeyan/xtag
src/XTag/Model/Type.hs
lgpl-3.0
788
0
9
214
228
130
98
24
0