code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
module Main ( main ) where import Criterion.Config import Criterion.Main import System.Random import qualified Signal.Wavelet.C1Bench as C1 import qualified Signal.Wavelet.Eval.CommonBench as EC import qualified Signal.Wavelet.Eval1Bench as E1 import qualified Signal.Wavelet.Eval2Bench a...
jstolarek/lattice-structure-hs
bench/MainBenchmarkSuite.hs
bsd-3-clause
8,573
0
14
2,655
1,915
963
952
146
1
{- PiForall language, OPLSS, Summer 2013 -} {-# LANGUAGE TypeSynonymInstances,ExistentialQuantification,FlexibleInstances, UndecidableInstances, FlexibleContexts, ViewPatterns, DefaultSignatures #-} {-# OPTIONS_GHC -Wall -fno-warn-unused-matches -fno-warn-name-shadowing #-} -- | A Pretty Printer. module...
jonsterling/Luitzen
src/PrettyPrint.hs
bsd-3-clause
13,162
0
23
3,881
5,034
2,455
2,579
341
1
-- | -- Module : BenchmarkOps -- Copyright : (c) 2018 Harendra Kumar -- -- License : MIT -- Maintainer : streamly@composewell.com {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} module NestedOps where import Control.Exception (try) import GHC.Exception (ErrorCall) import qualified...
harendra-kumar/asyncly
benchmark/NestedOps.hs
bsd-3-clause
4,633
0
14
1,137
1,666
842
824
123
2
{-# LANGUAGE OverloadedStrings #-} -- reference to L.isPrefixOf -- see Data.List (delete, deleteBy) module Data.Carbonara.LazyByteString where import qualified Data.ByteString.Char8 as S (singleton) import qualified Data.ByteString.Internal as S (w2c,c2w) import Data.Int (Int64) import qualified Data.ByteString....
szehk/Haskell-Carbonara-Library
src/Data/LazyByteString.hs
bsd-3-clause
757
0
8
144
202
129
73
13
2
{-# LANGUAGE OverloadedStrings, FlexibleContexts, PackageImports #-} module Network.XMPiPe.Core.S2S.Client ( -- * Types and Values Mpi(..), Jid(..), Tags(..), tagsNull, tagsType, -- * Functions starttls, sasl, begin, input, output, ) where import "monads-tf" Control.Monad.State import "monads-tf" Control.Monad.E...
YoshikuniJujo/xmpipe
core/Network/XMPiPe/Core/S2S/Client.hs
bsd-3-clause
2,569
28
15
475
1,112
574
538
69
5
module PyHint.Message ( Message(..), ) where import Language.Py.SrcLocation (SrcSpan) data Message = Message String String SrcSpan deriving (Show)
codeq/pyhint
src/PyHint/Message.hs
bsd-3-clause
151
0
6
22
47
29
18
4
0
{-# LANGUAGE PackageImports #-} import "monads-tf" Control.Monad.Trans import Control.Applicative import Data.Conduit import qualified Data.Conduit.List as CL import Data.Conduit.Lazy import Data.Time times :: Int -> ConduitM i UTCTime IO () times 0 = return () times n = lift getCurrentTime >>= yield >> times (n - 1)...
YoshikuniJujo/simple-pipe
try/testConduitLazy.hs
bsd-3-clause
321
0
8
48
101
56
45
10
1
module Text.Highlighter.Lexers.Modelica (lexer) where import qualified Text.Highlighter.Lexers.Html as Html import Text.Regex.PCRE.Light import Text.Highlighter.Types lexer :: Lexer lexer = Lexer { lName = "Modelica" , lAliases = ["modelica"] , lExtensions = [".mo"] , lMimetypes = ["text/x-modelica"] ...
chemist/highlighter
src/Text/Highlighter/Lexers/Modelica.hs
bsd-3-clause
3,475
0
10
516
751
392
359
62
1
module Spec.Tag where data Tag = Tag{ tName :: String , tAuthor :: String , tContact :: String } deriving(Show)
oldmanmike/vulkan
generate/src/Spec/Tag.hs
bsd-3-clause
163
0
8
71
40
25
15
5
0
-- | -- Module: Scheduling -- Description: Rule scheduling -- Copyright: (c) 2013 Tom Hawkins & Lee Pike -- -- Algorithms for scheduling rules in Atom module Language.Atom.Scheduling ( schedule , Schedule , reportSchedule ) where import Text.Printf import Data.List import Language.Atom.Analysis import Langu...
Copilot-Language/atom_for_copilot
Language/Atom/Scheduling.hs
bsd-3-clause
5,686
0
18
1,642
1,811
982
829
86
7
-- munt - cryptographic function composition import qualified Options.Applicative as Opts import qualified Options.Applicative.Help.Chunk as OAHC import qualified System.IO as IO import qualified System.Process as Proc import Data.List (intercalate) import Options.Applicative ((<>)) import Text.Printf (printf) impor...
shmookey/bc-tools
src/munt.hs
bsd-3-clause
3,474
0
14
954
952
551
401
70
2
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeOperators #-} module Evaluator.Types where import Protolude import Evaluator.BuiltIns (builtIns) import Evaluator.Object import Parser.AST (Ident) import Control.Monad.Trans.Class (MonadTrans(..)) newtype EvalError = EvalError Text deriving...
noraesae/monkey-hs
lib/Evaluator/Types.hs
bsd-3-clause
1,702
0
11
312
567
294
273
40
1
{-# LANGUAGE DeriveDataTypeable #-} {- | Module : ./Common/ProofTree.hs Description : a simple proof tree Copyright : (c) DFKI GmbH, Uni Bremen 2002-2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable Datatype for st...
spechub/Hets
Common/ProofTree.hs
gpl-2.0
665
0
8
125
77
43
34
8
1
{-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-} -- | -- Module : Statistics.Distribution.ChiSquared -- Copyright : (c) 2010 Alexey Khudyakov -- License : BSD3 -- -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : portable -- -- The chi-squared distribution. This is a continuous p...
fpco/statistics
Statistics/Distribution/ChiSquared.hs
bsd-2-clause
3,226
0
12
698
867
454
413
72
1
{-# LANGUAGE TupleSections #-} import CoreSyn import CoreUtils import Id import Type import MkCore import CallArity (callArityRHS) import MkId import SysTools import DynFlags import ErrUtils import Outputable import TysWiredIn import Literal import GHC import Control.Monad import Control.Monad.IO.Class import System.En...
olsner/ghc
testsuite/tests/callarity/unittest/CallArity1.hs
bsd-3-clause
9,920
0
25
2,975
4,348
2,402
1,946
202
2
{-# LANGUAGE BangPatterns #-} import Control.Monad import Data.List import StackTest main :: IO () main = repl [] $ do replCommand ":main" line <- replGetLine when (line /= "Hello World!") $ error "Main module didn't load correctly."
AndrewRademacher/stack
test/integration/tests/module-added-multiple-times/Main.hs
bsd-3-clause
256
0
11
59
72
35
37
10
1
{- Copyright 2015 Google Inc. All rights reserved. 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 a...
Ye-Yong-Chi/codeworld
codeworld-base/src/GHC/Pack.hs
apache-2.0
731
0
4
136
23
17
6
4
0
module Main where import Prelude hiding (lines) import Control.Monad import Data.IORef import Data.Time.Clock import Graphics.Rendering.OpenGL (($=)) import qualified Graphics.Rendering.OpenGL as GL import qualified Graphics.UI.GLUT as GLUT import Game import Keyboard import Matrix fps :: (Fractional a) => a fps = 1...
sordina/purewars
Main.hs
bsd-3-clause
2,469
0
12
435
833
411
422
70
1
module Tuura.Concept ( module Data.Monoid, module Tuura.Concept.Abstract, module Tuura.Concept.Circuit, ) where import Data.Monoid import Tuura.Concept.Abstract import Tuura.Concept.Circuit
tuura/concepts
src/Tuura/Concept.hs
bsd-3-clause
207
0
5
34
46
31
15
7
0
----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.Plane -- Copyright : (c) Marco Túlio Gontijo e Silva <marcot@riseup.net>, -- Leonardo Serra <leoserra@minaslivre.org> -- License : BSD3-style (see LICENSE) -- -- Maintainer : ...
markus1189/xmonad-contrib-710
XMonad/Actions/Plane.hs
bsd-3-clause
7,811
0
24
2,455
1,459
788
671
130
7
module Main where import Load main = testload
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/testsuite/pdynload/bayley1/prog/Main.hs
bsd-3-clause
47
0
4
9
12
8
4
3
1
{-# LANGUAGE CPP, ForeignFunctionInterface #-} module Network.Wai.Handler.Warp.SendFile ( sendFile , readSendFile , packHeader -- for testing #ifndef WINDOWS , positionRead #endif ) where import Control.Monad (void, when) import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Ne...
utdemir/wai
warp/Network/Wai/Handler/Warp/SendFile.hs
mit
4,692
0
16
1,240
951
490
461
78
3
import Graphics.UI.Gtk import Data.IORef import System.Random (randomRIO) main:: IO () main= do initGUI window <- windowNew set window [ windowTitle := "Guess a Number", windowDefaultWidth := 300, windowDefaultHeight := 250] mb <- vBoxNew False 0 containerAdd window mb ...
thiagoarrais/gtk2hs
docs/tutorial/Tutorial_Port/Example_Code/GtkChap6-1.hs
lgpl-2.1
2,777
0
15
894
944
439
505
67
3
{- (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...
forked-upstream-packages-for-ghcjs/ghc
compiler/iface/BuildTyCl.hs
bsd-3-clause
14,205
0
17
5,114
2,228
1,231
997
196
4
-- provides a simple testing-tool for using ApplyXmlDiff upon a proper Xml-File import Static.XSimplePath import System.Environment import Control.Monad import Text.XML.Light main :: IO () main = do args <- getArgs case args of ("-p" : p1 : ps) -> printDiff p1 ps (p1 : ps) -> testDiff p1 ps _ -> pu...
keithodulaigh/Hets
Static/testApplyDiff.hs
gpl-2.0
1,080
0
19
328
356
168
188
30
3
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="pl-PL"> <title>Passive Scan Rules | ZAP Extension</title> <maps> <homeID>top</homeID> <...
kingthorin/zap-extensions
addOns/pscanrules/src/main/javahelp/org/zaproxy/zap/extension/pscanrules/resources/help_pl_PL/helpset_pl_PL.hs
apache-2.0
982
78
66
160
420
212
208
-1
-1
module Multi2 where import Multi1 g = fib fib_gen 46
RefactoringTools/HaRe
old/testing/introThreshold/Multi2_TokOut.hs
bsd-3-clause
55
0
5
12
17
10
7
3
1
module ListSort () where import Language.Haskell.Liquid.Prelude append k [] ys = k:ys append k (x:xs) ys = x:(append k xs ys) takeL x [] = [] takeL x (y:ys) = if (y<x) then y:(takeL x ys) else takeL x ys takeGE x [] = [] takeGE x (y:ys) = if (y>=x) then y:(takeGE x ys) else takeGE x ys {-@ quicksort ...
ssaavedra/liquidhaskell
tests/neg/ListQSort.hs
bsd-3-clause
763
2
11
231
364
189
175
19
2
{-# LANGUAGE CPP, FlexibleContexts, OverloadedStrings, TupleSections, ScopedTypeVariables, ExtendedDefaultRules, LambdaCase #-} module Main where import Control.Applicative import Control.Monad import Control.Monad.IO.Class import Control.Lens (over, _1) import Contro...
beni55/ghcjs
test/TestRunner.hs
mit
30,626
1
38
9,358
8,347
4,261
4,086
525
8
module T11167 where data SomeException newtype ContT r m a = ContT {runContT :: (a -> m r) -> m r} runContT' :: ContT r m a -> (a -> m r) -> m r runContT' = runContT catch_ :: IO a -> (SomeException -> IO a) -> IO a catch_ = undefined foo :: IO () foo = (undefined :: ContT () IO a) `runContT` (undefined ::...
olsner/ghc
testsuite/tests/rename/should_compile/T11167.hs
bsd-3-clause
542
0
10
145
256
141
115
-1
-1
{-# LANGUAGE StaticPointers #-} module StaticPointers01 where import GHC.StaticPtr f0 :: StaticPtr (Int -> Int) f0 = static g f1 :: StaticPtr (Bool -> Bool -> Bool) f1 = static (&&) f2 :: StaticPtr (Bool -> Bool -> Bool) f2 = static ((&&) . id) g :: Int -> Int g = id
ghc-android/ghc
testsuite/tests/typecheck/should_compile/TcStaticPointers01.hs
bsd-3-clause
274
0
8
59
112
63
49
11
1
{-# LANGUAGE Rank2Types #-} -- Tests subsumption for infix operators (in this case (.)) -- Broke GHC 6.4! -- Now it breaks the impredicativity story -- (id {a}) . (id {a}) :: a -> a -- And (forall m. Monad m => m a) /~ IO a module Main(main) where foo :: (forall m. Monad m => m a) -> IO a foo = id . id main :: I...
urbanslug/ghc
testsuite/tests/typecheck/should_run/tcrun035.hs
bsd-3-clause
348
0
9
83
80
45
35
6
1
import Test.HUnit (Assertion, (@=?), runTestTT, Test(..)) import Control.Monad (void) import DNA (hammingDistance) testCase :: String -> Assertion -> Test testCase label assertion = TestLabel label (TestCase assertion) main :: IO () main = void $ runTestTT $ TestList [ TestList hammingDistanceTests ] hammingD...
tfausak/exercism-solutions
haskell/point-mutations/point-mutations_test.hs
mit
1,630
0
9
299
344
175
169
36
1
module TestSuites.ParserCSVSpec (spec) where import Test.Hspec.Contrib.HUnit(fromHUnitTest) import Test.HUnit import HsPredictor.ParserCSV import HsPredictor.Types spec = fromHUnitTest $ TestList [ TestLabel ">>readMatches" test_readMatches ] test_readMatches = TestCase $ do let r1 = ["2012.08.24,Dortmund,Bre...
Taketrung/HsPredictor
tests/TestSuites/ParserCSVSpec.hs
mit
1,458
0
12
258
407
203
204
43
1
-- | -- Module: BigE.TextRenderer.Font -- Copyright: (c) 2017 Patrik Sandahl -- Licence: MIT -- Maintainer: Patrik Sandahl <patrik.sandahl@gmail.com> -- Stability: experimental -- Portability: portable module BigE.TextRenderer.Font ( Font (..) , fromFile , enable , disable , delete ) where impo...
psandahl/big-engine
src/BigE/TextRenderer/Font.hs
mit
3,787
0
23
1,330
842
458
384
80
3
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, UndecidableInstances #-} {- | The HList library (C) 2004-2006, Oleg Kiselyov, Ralf Laemmel, Keean Schupke A model of label as needed for extensible records. Record labels are simply type-level naturals. This models is as simple and as portable as...
bjornbm/HList-classic
Data/HList/Label1.hs
mit
991
0
9
207
213
115
98
15
1
{-# LANGUAGE QuasiQuotes #-} import Here str :: String str = [here|test test test test |] main :: IO() main = do putStrLn str
Pnom/haskell-ast-pretty
Test/examples/QuasiQuoteLines.hs
mit
132
0
7
30
40
23
17
6
1
module Shipper.Outputs ( startDebugOutput, startZMQ4Output, startRedisOutput, ) where import Shipper.Outputs.Debug import Shipper.Outputs.ZMQ4 import Shipper.Outputs.Redis
christian-marie/pill-bug
Shipper/Outputs.hs
mit
185
0
4
27
36
24
12
7
0
module Analysis where data Criticality = Maximum | Minimum | Inflection deriving (Eq, Show, Read) data Extremum p = Extremum { exPoint :: p , exType :: Criticality } deriving (Eq, Show) instance Functor Extremum where fmap f (Extremum p c) = Extremum (f p) c extremum :: (Fractional t, Ord t) =>...
neilmayhew/Tides
Analysis.hs
mit
1,094
0
12
322
563
299
264
28
2
module Game.Client where import Network.Simple.TCP import Control.Concurrent.MVar import Control.Applicative import Game.Position import Game.Player import qualified Game.GameWorld as G import qualified Game.Resources as R import qualified Game.Unit as U -- | Client kuvaa koko asiakasohjelman tilaa data Client = Clie...
maqqr/psycho-bongo-fight
Game/Client.hs
mit
1,318
0
15
336
392
216
176
38
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Views.Pages.Error (errorView) where import BasicPrelude import Text.Blaze.Html5 (Html, toHtml, (!)) import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A import Routes (Route) import Views.Layout (layoutV...
nicolashery/example-marvel-haskell
Views/Pages/Error.hs
mit
572
0
13
94
160
91
69
16
1
import Control.Applicative import Data.Char import Data.Tuple newtype Parser result = Parser { runParser :: String -> [(String, result)] } succeed :: r -> Parser r succeed v = Parser $ \stream -> [(stream, v)] instance Functor Parser where fmap f (Parser pattern) = P...
markstoehr/cs161
_site/fls/Lab5_flymake.hs
cc0-1.0
1,570
0
13
383
730
379
351
42
2
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.Texturing.Queries -- Copyright : (c) Sven Panne 2002-2009 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : sven.panne@aedion.de -- Stability ...
ducis/haAni
hs/common/Graphics/Rendering/OpenGL/GL/Texturing/Queries.hs
gpl-2.0
6,462
0
15
968
1,120
606
514
125
16
{- This module was generated from data in the Kate syntax highlighting file bibtex.xml, version 1.17, by Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)+Thomas Braun (thomas.braun@virtuell-zuhause.de) -} module Text.Highlighting.Kate.Syntax.Bibtex (highlight, parseExpression, syntaxName, syntaxExtensions) w...
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Bibtex.hs
gpl-2.0
6,973
0
23
1,106
1,931
1,025
906
131
10
{-# LANGUAGE CPP, ScopedTypeVariables, MultiParamTypeClasses #-} -- | This module contains plain tree indexing code. The index itself is a -- CACHE: you should only ever use it as an optimisation and never as a primary -- storage. In practice, this means that when we change index format, the -- application is expected...
DavidAlphaFox/darcs
hashed-storage/Storage/Hashed/Index.hs
gpl-2.0
24,401
0
19
7,280
5,496
2,857
2,639
359
6
module Tree.AVL where -- import Test.QuickCheck -- import Test.QuickCheck.All import Tree.BinarySearchTree as BST -- Some examples of structure in code t3 :: Tree Int t3 = Node 10 (leaf 8) (leaf 15) t4 :: Tree Int t4 = Node 17 (Node 12 (Node 5 (leaf 4) (leaf 8)) (leaf 15)) ...
ardumont/haskell-lab
src/Tree/AVL.hs
gpl-2.0
10,327
0
13
3,460
2,362
1,303
1,059
110
3
import Control.Concurrent.MVar import Control.Monad (void, when) import Control.Monad.IO.Class (MonadIO, liftIO) import Sound.SC3.UGen import Sound.SC3.Server.State.Monad import Sound.SC3.Server.State.Monad.Command -- You need the hsc3-server-internal package ...
kaoskorobase/hsc3-server
examples/sine-grains.hs
gpl-2.0
3,150
7
13
739
726
370
356
52
1
module Main where import Test.DocTest main :: IO () main = doctest ["-isrc", "src/Regex/Parser.hs", "src/Regex/Enumerator.hs"]
tadeboro/reglang
test/doctest.hs
gpl-3.0
129
0
6
17
36
21
15
4
1
{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} module Language.Bitcoin.Interpreter -- export {{{1 ( run_interpreter, exec ) where -- import {{{1 import Data.Bits (complement, (.|.), (.&.), xor) import Data.Word (Word8) import Data.Int (Int32) import Control.Arrow ((***), Arrow) import Language.Bitcoin.Types import...
copton/bitcoin-script-tools
src/Language/Bitcoin/Interpreter.hs
gpl-3.0
12,478
4
19
2,503
5,222
2,672
2,550
244
17
{-# LANGUAGE OverloadedStrings #-} module ShellSpec (spec) where import Control.Monad.Trans.Either import qualified Data.Array as A import Data.Monoid ((<>)) import Test.Hspec import Shell import Kiss sampleDir :: [Char] sampleDir = "t...
huggablemonad/smooch
app/tests/ShellSpec.hs
gpl-3.0
2,669
0
17
524
507
264
243
41
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE RecordWildCards #-} module HEP.Physics.Analysis.Common.Merge where import Control.Applicative -- import HEP.Parser.LHCOAnalysis.PhysObj -- tau2Jet :: PhyObj Tau -> PhyObj Jet tau2Jet (ObjTau x _ _) = ObjJet x 1.777 1 bJet2Jet :: PhyObj BJet -> PhyObj Jet bJet2Jet (ObjBJet x m n)...
wavewave/lhc-analysis-collection
lib/HEP/Physics/Analysis/Common/Merge.hs
gpl-3.0
765
0
14
147
252
138
114
17
1
-- HsParser: A Parsec builder, a toy for experimenting things: -- 1) Generic parser to explore automated parser generation -- 2) A Email parsing tool -- 3) Quantum Chemistry Basis sets parsing... (The Haskell HartreeFock Project ) -- @2013 Angel Alvarez, Felipe Zapata, from The ResMol Group module Main where impo...
AngelitoJ/HsParser
src/Main.hs
gpl-3.0
4,588
0
14
1,185
1,073
586
487
87
2
{-# LANGUAGE UnicodeSyntax, NoImplicitPrelude #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module WithPlus ( WithPlus(..) , fromList , singleton , toString , parseString ) where import BasePrelude hiding (toList, fromList, singleton) import Prelude.Unicode import Data.Monoid.Unicode ((∅)) i...
39aldo39/klfc
src/WithPlus.hs
gpl-3.0
1,721
0
12
322
604
331
273
40
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/TargetPools/RemoveInstance.hs
mpl-2.0
4,472
0
18
1,055
547
324
223
89
1
{-# LANGUAGE OverloadedStrings, TupleSections #-} module Main where import Control.Applicative hiding ((<|>)) import Control.Monad import Prelude hiding (interact) import Data.Default import Data.List import Data.Maybe import qualified Data.Text.Lazy as LT import Data.ByteString.Lazy.Char8 (interact) import Text.Parse...
astro/remind2ics
src/Main.hs
agpl-3.0
6,367
0
20
3,034
1,648
896
752
176
4
{-# LANGUAGE OverloadedStrings #-} {- Copyright 2019 The CodeWorld Authors. All rights reserved. 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/LICENS...
alphalambda/codeworld
codeworld-error-sanitizer/test/Main.hs
apache-2.0
1,410
0
10
244
205
101
104
21
1
{-# LANGUAGE TypeOperators #-} ------------------------------------------------------------------------------ module OpenArms.App where ------------------------------------------------------------------------------ import Control.Monad.Reader import Servant import Network.Wai import Control.Monad.Trans.Either ---------...
dmjio/openarms
src/OpenArms/App.hs
bsd-2-clause
969
0
10
132
169
95
74
19
1
{-# LANGUAGE DataKinds, RecordWildCards, TypeOperators #-} module Sprockell where import CLaSH.Prelude {------------------------------------------------------------- | SPROCKELL: Simple PROCessor in hasKELL :-) | | j.kuper@utwente.nl | October 28, 2012 -------------------------------------------------------...
christiaanb/clash-compiler
examples/Sprockell.hs
bsd-2-clause
11,221
4
11
4,775
1,461
919
542
123
15
-- 161667 import Data.List(sort, group) nn = 1500000 -- generate all primitive pythagorean triples w/ Euclid's formula -- a = m^2 - n^2, b = 2mn, c = m^2 + n^2 -- m - n is odd and m and n are coprime genTri x m n | n >= m = genTri x (m+1) 1 -- invalid pair, next m | n == 1 && p > x = [] -...
higgsd/euler
hs/75.hs
bsd-2-clause
947
8
12
281
364
177
187
13
1
{-# LANGUAGE TypeSynonymInstances, TypeOperators, FlexibleInstances, StandaloneDeriving, DeriveFunctor, DeriveFoldable, DeriveTraversable #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Xournal.Select -- Copyright : (c) 2011, ...
wavewave/xournal-types
src/Data/Xournal/Select.hs
bsd-2-clause
4,701
0
19
1,194
1,935
1,041
894
102
3
module Day14_2 where import Data.List import Data.List.Split type DeerInfo = (Int, String, Int, Int, Int) main :: IO () main = do f <- readFile "input.txt" let deers = map parse $ map (splitOn " ") (lines f) distAt = [distanceAtTime d 1 | d <- deers] score = foldl calc deers [1..2503] ...
ksallberg/adventofcode
2015/src/Day14_2.hs
bsd-2-clause
1,508
0
14
360
662
359
303
35
1
module Infinity.Util ( -- * Functions unlessM, whenM, mkdate, mktime, mkdir, ci, run, -- * Types User, Channel, Command, Nick, Cmds ) where import Data.List import System.IO import System.Exit import System.Time import Control.Monad import System.Process import System.FilePath import System.Directory import Contro...
thoughtpolice/infinity
src/Infinity/Util.hs
bsd-3-clause
2,442
0
15
532
791
412
379
55
3
module Sword.Daemon where import Prelude hiding (Either(..)) import qualified Data.Map as Map import Data.Time (UTCTime, getCurrentTime, diffUTCTime) import Network.Socket import System.IO import Control.Exception import Control.Concurrent import Control.Concurrent.Chan import Control.Monad import Control.Monad.Fix (f...
kmerz/the_sword
src/Sword/Daemon.hs
bsd-3-clause
3,924
0
18
958
1,474
745
729
114
10
-- Turnir -- a tool for tournament management. -- -- Author : Ivan N. Veselov -- Created: 20-Sep-2010 -- -- Copyright (C) 2010 Ivan N. Veselov -- -- License: BSD3 -- -- | Pretty printing of miscelanneous data structures. -- Uses wonderful HughesPJ pretty-printing combinator library. -- module Pretty ( ppTable, ppRo...
sphynx/turnir
src/Pretty.hs
bsd-3-clause
3,320
0
14
935
1,130
609
521
64
2
{-# LANGUAGE OverloadedStrings #-} module Main where import Test.Framework import Test.Framework.Providers.HUnit import Test.HUnit import Text.IPv6Addr main :: IO () main = defaultMain $ hUnitTestToTests tests tests :: Test.HUnit.Test tests = TestList [ (~?=) (maybeIPv6Addr ":") Nothing , (~?=) (maybeIPv6Addr...
MichelBoucey/IPv6Addr
tests/Main.hs
bsd-3-clause
7,625
0
11
808
2,263
1,230
1,033
102
1
{-# LANGUAGE TupleSections #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE RecordWildCards #-} module Refact.Fixity (applyFixities) where import SrcLoc import Refact.Utils import BasicTypes (Fixity(..), defaultFixity, compareFixity, negateFixity, FixityDirection(..)) import HsExpr import RdrName import OccName import ...
bitemyapp/apply-refact
src/Refact/Fixity.hs
bsd-3-clause
5,164
0
14
1,163
1,652
898
754
107
1
{- Copyright (c) 2015, Joshua Brot All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the fol...
Pamelloes/AAGenAlg
Setup.hs
bsd-3-clause
1,572
0
4
284
12
7
5
2
1
module IptAdmin.AddChainPage where import Control.Monad.Error import Happstack.Server.SimpleHTTP import IptAdmin.EditChainForm.Parse import IptAdmin.EditChainForm.Render import IptAdmin.Render import IptAdmin.System import IptAdmin.Types import IptAdmin.Utils import Iptables import Iptables.Types import Text.ParserCo...
etarasov/iptadmin
src/IptAdmin/AddChainPage.hs
bsd-3-clause
2,515
0
25
773
545
272
273
50
9
{-# LANGUAGE RecordWildCards #-} module Main (main) where import Control.Monad import Data.Binary.Get import qualified Data.ByteString.Lazy as BL import Data.List import Text.Printf import Codec.Tracker.S3M import Codec.Tracker.S3M.Header import C...
riottracker/modfile
examples/readS3M.hs
bsd-3-clause
2,265
0
15
517
671
319
352
61
1
{-# LANGUAGE ScopedTypeVariables #-} import Data.Typeable import Control.Exception import GHC.IO.Exception import System.IO import Network main :: IO () main = test `catch` ioHandle test :: IO () test = do h <- connectTo "localhost" $ PortNumber 54492 hGetLine h >>= putStrLn (hGetLine h >>= putStrLn) `catch` ioH...
YoshikuniJujo/xmpipe
test/exClient.hs
bsd-3-clause
539
0
10
100
200
96
104
22
1
module Graphics.Pastel.WX ( module Graphics.Pastel.WX.Draw , module Graphics.Pastel.WX.Test ) where import Graphics.Pastel.WX.Draw import Graphics.Pastel.WX.Test
willdonnelly/pastel
Graphics/Pastel/WX.hs
bsd-3-clause
175
0
5
27
39
28
11
5
0
module GameStage ( GameStage , gameStage ) where import Control.Applicative import Control.Monad import Data.Set import qualified Data.Map as M import qualified Data.List as L import Data.Unique import qualified Class.GameScene as GS import Class.Sprite import KeyBind import GlobalValue import qualified Sound ...
c000/PaperPuppet
src/GameStage.hs
bsd-3-clause
5,848
0
20
2,775
1,521
798
723
134
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Utility functions on @Core@ syntax -} {-# LANGUAGE CPP #-} -- | Commonly useful utilites for manipulating the Core language module CoreUtils ( -- * Constructing expressions mkCast, mkTick, mkTicks...
nushio3/ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
88,132
0
21
25,774
14,831
7,644
7,187
846
14
module Main where import Data.Lens.Common ((^.), (^=)) import Prelude hiding (Either(..)) import System.Console.ANSI import System.IO import Console import Level import Types -- operator to add 2 coordinates together (|+|) :: Coord -> Coord -> Coord (|+|) (x1, y1) (x2, y2) = (x1 + x2, y1 + y2) -- receive a charac...
jamiltron/Thieflike
src/Main.hs
bsd-3-clause
2,227
0
12
579
667
346
321
62
6
{-# LANGUAGE EmptyDataDecls, TypeSynonymInstances #-} {-# OPTIONS_GHC -fcontext-stack47 #-} module Games.Chaos2010.Database.Spells_with_order where import Games.Chaos2010.Database.Fields import Database.HaskellDB.DBLayout type Spells_with_order = Record (HCons (LVPair Spell_category (Expr (Maybe String))...
JakeWheat/Chaos-2010
Games/Chaos2010/Database/Spells_with_order.hs
bsd-3-clause
826
0
25
192
244
128
116
16
1
module Euler.E2 ( fib , every ) where fib :: [Int] fib = scanl (+) 1 (1:fib) every :: Int -> [a] -> [a] every _ [] = [] every n (x:xs) = x : every n (drop (n-1) xs)
lslah/euler
src/Euler/E2.hs
bsd-3-clause
184
0
10
59
117
65
52
8
1
module Language.GDL.Unify ( Substitution , unify ) where import qualified Data.Map as M import Language.GDL.Syntax type Substitution = M.Map Identifier Term occurs :: Identifier -> Term -> Bool occurs _ (Atom _) = False occurs ident (Var identr) = ident == identr occurs ident (Compound children...
ian-ross/ggp
Language/GDL/Unify.hs
bsd-3-clause
1,333
0
15
318
549
273
276
31
6
module WASH.CGI.AbstractSelector -- the public interface -- ( as_rows, as_cols, table_io, getText, selectionGroup, selectionButton, selectionDisplay) where import WASH.CGI.BaseCombinators (unsafe_io, once) import WASH.CGI.CGIInternals (HTMLField, INVALID, ValidationError (..)) import WASH.CGI.CGIMonad hiding (lif...
nh2/WashNGo
WASH/CGI/AbstractSelector.hs
bsd-3-clause
7,097
86
22
1,736
2,310
1,197
1,113
171
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Rank2Types #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Bits.Lens -- Copyright : (C) 2012-14 Edward Kmett -- License : BSD-style (see the file LICENSE) -- Maintainer : Edward Kmett <ekmett@gmail.com...
hvr/lens
src/Data/Bits/Lens.hs
bsd-3-clause
7,823
0
14
1,921
1,528
897
631
67
2
import XMonad import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Layout.NoBorders import XMonad.Util.Run(spawnPipe) import XMonad.Util.EZConfig(additionalKeys) import System.IO main = do xmobarProcess <- spawnPipe "start-xmobar" trayerProcess <- spawnPipe "start-trayer" xmonad $ default...
justinlynn/monadix
src/Main.hs
bsd-3-clause
949
1
15
304
197
108
89
20
1
module ClassInContext where class FFF a where fff :: a -> a data S a = S a instance FFF Int where fff x = x instance (Eq a, FFF a) => Eq (S a) where (S x) == (S y) = (fff x) == (fff y) cmpr :: S Int -> S Int -> Bool cmpr = (==)
phischu/fragnix
tests/quick/ClassInContext/ClassInContext.hs
bsd-3-clause
246
0
8
77
142
74
68
10
1
{-# Language BangPatterns #-} {-| Module : Irc.Modes Description : Operations for interpreting mode changes Copyright : (c) Eric Mertens, 2016 License : ISC Maintainer : emertens@gmail.com This module provides support for interpreting the modes changed by a MODE command. -} module Irc.Modes ( -- * In...
glguy/irc-core
lib/src/Irc/Modes.hs
isc
4,540
0
21
1,192
1,267
703
564
90
5
{-# LANGUAGE CPP #-} {-# LANGUAGE PatternGuards #-} module AddHandler (addHandler) where import Prelude hiding (readFile) import System.IO (hFlush, stdout) import Data.Char (isLower, toLower, isSpace) import Data.List (isPrefixOf, isSuffixOf, stripPrefix) import Data.Maybe (fromMaybe, listToMaybe) import qualified ...
geraldus/yesod
yesod-bin/AddHandler.hs
mit
8,191
0
18
2,293
2,280
1,160
1,120
194
4
module QualGenerator where f :: Int -> [Int] f x = [ a | a <- x ]
roberth/uu-helium
test/typeerrors/Examples/QualGenerator.hs
gpl-3.0
67
0
7
19
35
20
15
3
1
module RecursiveRef where {-# ANN module "HLint: ignore Eta reduce" #-} -- Recursive function call without type signature targets the monomorphic -- binding. This verifies that we handle the case. -- - @recNoSig defines/binding FunRNS recNoSig x = -- - @recNoSig ref FunRNS recNoSig x -- - @localRecNoSig ref F...
google/haskell-indexer
kythe-verification/testdata/basic/RecursiveRef.hs
apache-2.0
997
0
7
196
86
54
32
14
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} -- | -- Module : Documentation.Haddock.Parser -- Copyright : (c) Mateusz Kowalczyk 2013-2014, -- Simon Hengel 2013 -- License : BSD-like -- -- Maintainer : haddock@projects.haskell.org -- Stability : experimental...
Fuuzetsu/haddock
haddock-library/src/Documentation/Haddock/Parser.hs
bsd-2-clause
29,240
0
22
7,519
7,925
4,119
3,806
473
25
module Settings.Packages.Base (basePackageArgs) where import Expression import Settings basePackageArgs :: Args basePackageArgs = package base ? do integerLibraryName <- pkgName <$> getIntegerPackage mconcat [ builder GhcCabal ? arg ("--flags=" ++ integerLibraryName) -- This fixes the 'unknown sym...
bgamari/shaking-up-ghc
src/Settings/Packages/Base.hs
bsd-3-clause
471
0
13
96
93
49
44
8
1
module Graphics.Gnuplot.Frame ( Frame.T, cons, simple, empty, ) where import qualified Graphics.Gnuplot.Frame.OptionSet as OptionSet import qualified Graphics.Gnuplot.Private.Frame as Frame import qualified Graphics.Gnuplot.Private.Plot as Plot import qualified Graphics.Gnuplot.Private.GraphEmpty as Empty imp...
wavewave/gnuplot
src/Graphics/Gnuplot/Frame.hs
bsd-3-clause
597
0
8
85
175
105
70
14
1
{-# LANGUAGE DeriveDataTypeable, PatternGuards #-} module Tim.Smallpt.Render( Context(..), Refl(..), Sphere(..), Vec(..), Work(..), (|*|), (|+|), (|-|), clamp, cross, dot, line, makeWork, norm, vmult) where import Control.Applicative import Control.Monad.State import Data.Data import...
timrobinson/smallpt-haskell
Tim/Smallpt/Render.hs
bsd-3-clause
10,331
0
26
5,544
3,678
1,928
1,750
164
6
{- | Module : Database.HDBC.PostgreSQL Copyright : Copyright (C) 2005-2011 John Goerzen License : BSD3 Maintainer : John Goerzen <jgoerzen@complete.org> Stability : provisional Portability: portable HDBC driver interface for PostgreSQL 8.x Written by John Goerzen, jgoerzen\@complete.org /...
cabrera/hdbc-postgresql
Database/HDBC/PostgreSQL.hs
bsd-3-clause
2,143
0
6
487
83
60
23
11
0
----------------------------------------------------------------------------- -- | -- Module : RefacSlicing -- Copyright : (c) Christopher Brown 2005 -- -- Maintainer : cmb21@kent.ac.uk -- Stability : provisional -- Portability : portable -- -- This module contains a transformation for HaRe. -- Symoblic ...
kmate/HaRe
old/refactorer/RefacSlicing.hs
bsd-3-clause
6,790
0
18
2,285
1,605
848
757
-1
-1
module Poly4 () where import Language.Haskell.Liquid.Prelude x = choose 0 baz y = y prop = liquidAssertB (baz True)
abakst/liquidhaskell
tests/pos/poly4.hs
bsd-3-clause
125
0
7
28
44
25
19
5
1
module Test10 where f x = x + y where y = 37 g = 1 + 37
SAdams601/HaRe
old/testing/refacFunDef/Test10_AstOut.hs
bsd-3-clause
59
0
6
21
32
18
14
3
1
{-# LANGUAGE TemplateHaskell, FlexibleInstances, MultiParamTypeClasses #-} module Graphics.UI.Bottle.Animation ( R, Size, Layer , PositionedImage(..), piImage, piRect , Frame(..), fSubImages, onImages , draw, nextFrame, mapIdentities , unitSquare, backgroundColor , translate, scale, onDepth , unitIntoRec...
aleksj/lamdu
bottlelib/Graphics/UI/Bottle/Animation.hs
gpl-3.0
7,916
0
16
1,724
2,864
1,526
1,338
199
2
{-# LANGUAGE TemplateHaskell #-} -- test the representation of unboxed literals module Main where $( [d| foo :: Int -> Int foo x | x == 5 = 6 foo x = 7 |] ) $( [d| bar :: Maybe Int -> Int bar x | Just y <- x = y bar _ = 9 |] ) ...
danse/ghcjs
test/ghc/th/tH_repGuardOutput.hs
mit
484
0
10
214
105
54
51
19
1
-- There was a lot of discussion about various ways of computing -- Bernouilli numbers (whatever they are) on haskell-cafe in March 2003 -- Here's one of the programs. -- It's not a very good test, I suspect, because it manipulates big integers, -- and so probably spends most of its time in GMP. import Data.Ratio i...
beni55/ghcjs
test/nofib/imaginary/bernouilli/Main.hs
mit
1,320
6
16
292
446
233
213
24
2
{-# LANGUAGE RankNTypes #-} module T9196 where f :: (forall a. Eq a) => a -> a f x = x g :: (Eq a => Ord a) => a -> a g x = x
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/typecheck/should_fail/T9196.hs
bsd-3-clause
128
0
7
38
69
38
31
-1
-1
module Channel where import qualified Data.ByteString as Bs import qualified Data.Set as S import qualified Control.Concurrent as C (ThreadId) import qualified Network.Socket as So hiding (send, sendTo, recv, recvFrom) -- | Holds the configuration of a channel. data ChannelConfig = ChannelConfig { socket :: So.S...
Autopawn/haskell-secureUDP
Channel.hs
mit
4,347
0
15
886
1,074
587
487
87
2
module GroupCreator.Evaluation ( Condition(..) , fitness ) where import GroupCreator.Groupings import GroupCreator.People import Data.List import Data.Ord import Data.Map import Data.Hash (hash, asWord64) data Condition = SizeRestriction { groupSize :: Int } --make groups of this many people ...
cambraca/group-creator
GroupCreator/Evaluation.hs
mit
2,580
0
14
573
741
397
344
34
2
{-# htermination index :: Ix a => (a,a) -> a -> Int #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_index_1.hs
mit
56
0
2
13
3
2
1
1
0