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
-- mathsprimitives.hs module Math.MathsPrimitives where -- primitive operations on sequences (lists) of numbers -- used in implementation of vectors, matrices, polynomials, cyclotomic fields, etc import List (transpose) infixr 8 */, *// infixl 7 $*, $., $$* infixl 6 $+, $-, $$+, $$- -- addition o...
nfjinjing/bench-euler
src/Math/MathsPrimitives.hs
bsd-3-clause
2,012
0
12
563
728
386
342
35
2
{- | Module : ./GUI/UDGUtils.hs Description : wrapper for uDrawGraph utilities from the uniform workbench Copyright : (c) Christian Maeder DFKI Bremen 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-portable uDrawGrap...
spechub/Hets
GUI/UDGUtils.hs
gpl-2.0
551
0
4
100
55
39
16
8
0
{-# LANGUAGE DeriveDataTypeable #-} {- | Module : $Header$ Description : Abstract syntax fo CspCASL Copyright : (c) Markus Roggenbach and Till Mossakowski and Uni Bremen 2004 License : GPLv2 or higher, see LICENSE.txt Maintainer : a.m.gimblett@swan.ac.uk Stability : provisional Portability : porta...
mariefarrell/Hets
CspCASL/AS_CspCASL.der.hs
gpl-2.0
1,114
0
8
187
203
116
87
21
0
{-# LANGUAGE DeriveDataTypeable #-} module Repos where import Control.Arrow (left) import Control.Applicative ((<*>)) import Data.Binary import Data.Binary.Generic import Data.Data import Data.Functor ((<$>)) import qualified Github.Repos as GH import qualified Github.Users as GH import qualified Github.Users.Followe...
hackclub/orthanc
Repos.hs
gpl-3.0
1,162
1
13
250
309
166
143
33
1
module TupleReorder1 where f :: (Int,Bool) -> Int f (i,b) = if b then i else 0 main :: Int main = f (True,5)
roberth/uu-helium
test/typeerrors/Heuristics/TupleReorder1.hs
gpl-3.0
111
0
6
26
60
36
24
5
2
{-# LANGUAGE TypeSynonymInstances #-} module Rewriting.DPO.TypedGraph.GraphProcess.OccurrenceRelation ( RelationItem(..) , Relation , AbstractRelation , AbstractType (..) , isRuleAndElement , filterRulesOccurrenceRelation , filterElementsOccurrenceRelation , filterCreationRelation , filterDeletionRelation , isCreation...
rodrigo-machado/verigraph
src/library/Rewriting/DPO/TypedGraph/GraphProcess/OccurrenceRelation.hs
gpl-3.0
4,851
0
16
1,474
1,420
771
649
104
4
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} module Database.Design.Ampersand.Output.ToPandoc.ChapterProcessAnalysis where import Database.Design.Ampersand.Output.ToPandoc.SharedAmongChapters import Data.List --DESCR -> the process analysis contains a section for each process in the fSpec --...
guoy34/ampersand
src/Database/Design/Ampersand/Output/ToPandoc/ChapterProcessAnalysis.hs
gpl-3.0
6,645
0
24
2,076
1,581
805
776
103
13
{-# LANGUAGE TypeSynonymInstances,GeneralizedNewtypeDeriving,MultiParamTypeClasses,FlexibleInstances #-} module MigrationsTest ( tests ) where import Test.HUnit import Control.Monad.Identity ( runIdentity, Identity ) import qualified Data.Map as Map import Data.Time.Clock ( UTCTime ) import Database.Schema.Mi...
creswick/dbmigrations
test/MigrationsTest.hs
bsd-3-clause
2,438
0
11
710
580
345
235
52
1
module ParsecExpr {-# DEPRECATED "This module has moved to Text.ParserCombinators.Parsec.Expr" #-} (module Text.ParserCombinators.Parsec.Expr) where import Text.ParserCombinators.Parsec.Expr
FranklinChen/hugs98-plus-Sep2006
fptools/hslibs/text/parsec/ParsecExpr.hs
bsd-3-clause
191
0
5
16
22
16
6
4
0
-- Copyright 2004-present Facebook. All Rights Reserved. {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} module Haxl.Core.CallGraph where import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map #if __GLASGOW_HASKELL__ < 804 import Data.Monoid #endif import Data.Text (Text) import qualified Data.T...
facebook/Haxl
Haxl/Core/CallGraph.hs
bsd-3-clause
1,071
0
9
165
205
126
79
19
1
{- (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1996-1998 TcTyClsDecls: Typecheck type and class declarations -} {-# LANGUAGE TupleSections, CPP #-} module ETA.TypeCheck.TcTyClsDecls ( tcTyAndClassDecls, tcAddImplicits, -- Functions used by TcInstDcls to check ...
pparkkin/eta
compiler/ETA/TypeCheck/TcTyClsDecls.hs
bsd-3-clause
100,831
877
25
29,643
17,851
9,843
8,008
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-redshift/gen/Network/AWS/Redshift/DeleteHsmConfiguration.hs
mpl-2.0
3,346
0
9
647
329
202
127
47
1
{-# OPTIONS -fno-warn-tabs #-} -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and -- detab the module (please do the detabbing in a separate patch). See -- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces -- fo...
nomeata/ghc
compiler/nativeGen/RegAlloc/Linear/StackMap.hs
bsd-3-clause
2,719
26
11
525
304
181
123
30
2
-- | Basic operations on graphs. -- module GraphOps ( addNode, delNode, getNode, lookupNode, modNode, size, union, addConflict, delConflict, addConflicts, addCoalesce, delCoalesce, addExclusion, addExclusions, addPreference, ...
olsner/ghc
compiler/utils/GraphOps.hs
bsd-3-clause
23,303
0
18
8,751
4,796
2,473
2,323
415
2
{-# LANGUAGE RankNTypes, PolyKinds #-} -- NB: -fprint-explicit-runtime-reps enabled in all.T module TypeSkolEscape where import GHC.Types import GHC.Exts type Bad = forall (v :: RuntimeRep) (a :: TYPE v). a
sdiehl/ghc
testsuite/tests/dependent/should_fail/TypeSkolEscape.hs
bsd-3-clause
210
0
8
33
43
28
15
-1
-1
module Time {-( ClockTime, Month(January,February,March,April,May,June, July,August,September,October,November,December), Day(Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday), CalendarTime(CalendarTime, ctYear, ctMonth, ctDay, ctHour, ctMin, ctPicosec, ctWDay, ctYDa...
forste/haReFork
tools/base/tests/HaskellLibraries/Time.hs
bsd-3-clause
5,602
0
16
2,094
1,470
787
683
102
45
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE RankNTypes, ExistentialQuantification #-} -- An interesting interaction of universals and existentials, prompted by -- http://www.haskell.org/pipermail/haskell-cafe/2004-October/007160.html -- -- Note the nested pattern-match in runProg; tc183 checks th...
urbanslug/ghc
testsuite/tests/typecheck/should_fail/tcfail126.hs
bsd-3-clause
1,007
2
10
196
211
116
95
12
1
-- | Check universe constraints. module Idris.Core.Constraints ( ucheck ) where import Idris.Core.TT ( TC(..), UExp(..), UConstraint(..), FC(..), ConstraintFC(..), Err'(..) ) import Control.Applicative import Control.Monad.State.Strict import Data.List ( partition ) import qualified Data.Map.S...
osa1/Idris-dev
src/Idris/Core/Constraints.hs
bsd-3-clause
9,942
0
25
3,884
2,895
1,458
1,437
-1
-1
module Rhodium.Context where import Control.Exception.Base (assert) type Label = String data UpTerm var = UpVar var | UpPred Label [DnTerm var] -- ^ variables and atoms | UpPi (UpTerm var) (UpTerm var) -- ^ dependant product | UpSigma (UpTerm var) (UpTerm var) -- ^ dependant sum | UpWType (UpTerm va...
DrNico/rhodium
tools/rhc-strap/Rhodium/Context.hs
mit
8,149
7
18
2,272
3,023
1,572
1,451
-1
-1
{- {- Nested comment -} -- Note: still commented fibs :: [Int] fibs = 1 : 1 : zipWith (+) fibs (tail fibs) -} main :: IO () main = print [1..]
cgag/loc
tests/data/nested-comments.hs
mit
147
0
6
36
23
12
11
2
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} module Ringo.ArgParser (ProgArgs(..), parseArgs) where import qualified Data.Text as Text import qualified Distribution.Package as P import qualified Distribution.PackageDescription as P import qualified Distribution.C...
quintype/ringo
app/Ringo/ArgParser.hs
mit
5,122
0
32
1,955
902
454
448
108
1
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.MediaKeySystemAccess (getConfiguration, getConfiguration_, createMediaKeys, createMediaKeys_, getKeySyste...
ghcjs/jsaddle-dom
src/JSDOM/Generated/MediaKeySystemAccess.hs
mit
2,815
0
13
388
588
351
237
43
1
{-# LANGUAGE CPP #-} module GHCJS.DOM.RTCDataChannel ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.RTCDataChannel #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI.Gen...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/RTCDataChannel.hs
mit
355
0
5
33
33
26
7
4
0
module Str where import qualified Data.Text as DT -- type Str = BS.ByteString type Str = DT.Text
dancor/melang
src/Str.hs
mit
99
0
5
19
21
15
6
3
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE MultiWayIf #-} module RWPAS.Level.Type ( Level() ...
Noeda/rwpas
src/RWPAS/Level/Type.hs
mit
18,371
0
26
5,273
4,554
2,369
2,185
-1
-1
{-# LANGUAGE FlexibleContexts #-} module Ch27.SyslogUDPClient where import Data.Bits import Network.Socket hiding (sendTo) import Network.Socket.ByteString (sendTo) import Ch27.SyslogTypes import qualified Data.ByteString.Char8 as Strict import qualified Data.ByteString.Lazy.Char8 as Lazy (toStrict) import Data.ByteS...
futtetennista/IntroductionToFunctionalProgramming
RWH/src/Ch27/SyslogUDPClient.hs
mit
4,975
0
19
1,337
1,220
626
594
103
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} module Apollo.Reflection ( Demote' , Demote , ReflectS(..) , Proxiable(..) , Proxy(..) , KProxy(..) ) where import Data.Proxy -- | Type level function that selects a canonical type constructor for a given -- kind. Generally, the sele...
tsani/apollo
src/Apollo/Reflection.hs
mit
1,071
1
8
209
210
124
86
21
0
module Util.GL where import qualified Graphics.Rendering.OpenGL as GL float2gl :: Float -> GL.GLfloat float2gl = realToFrac :: Float -> GL.GLfloat
kaisellgren/ankka
src/Util/GL.hs
mit
149
0
6
22
40
25
15
4
1
{-# LANGUAGE DeriveDataTypeable #-} {- Copyright (C) 2012-2017 Jimmy Liang, Michal Antkiewicz <http://gsd.uwaterloo.ca> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, in...
gsdlab/claferIG
src-cmd/Main.hs
mit
8,717
0
25
2,704
1,584
781
803
142
5
module Y2016.M07.D21.Solution where import Data.Graph import Data.Tree (subForest, rootLabel) import Data.Maybe (maybeToList, mapMaybe) import Y2016.M07.D20.Solution import Y2016.M07.D19.Exercise (figure2) {-- you can get a Graph-Figure of figure from: *Y2016.M07.D21.Solution> let (gr,fnPt,fnVertM) = graphit figure...
geophf/1HaskellADay
exercises/HAD/Y2016/M07/D21/Solution.hs
mit
1,574
0
17
306
312
171
141
18
2
import Data.List.Split main = getContents >>= putStr . main' main' :: String -> String main' cs = unlines $ map getShell (lines cs) getShell :: String -> String getShell ln = last $ splitOn ":" ln
ryuichiueda/UspMagazineHaskell
Study1_Q2/q1_2_1.hs
mit
200
0
8
39
78
40
38
6
1
{- | == Getting Started To get started with golden testing and this library, see <https://ro-che.info/articles/2017-12-04-golden-tests Introduction to golden testing>. This module provides a simplified interface. If you want more, see "Test.Tasty.Golden.Advanced". == Filenames Filenames are looked up in the usual wa...
feuerbach/tasty-golden
Test/Tasty/Golden.hs
mit
11,066
0
17
2,273
1,525
826
699
-1
-1
{-# htermination sin :: Float -> Float #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_sin_1.hs
mit
43
0
2
8
3
2
1
1
0
-- Benchmark.hs -- A set of (micro-) benchmarks for the Haskell -- programming language -- -- vim: ft=haskell sw=2 ts=2 et -- {-# LANGUAGE OverloadedStrings #-} module Main where import System.CPUTime import Fibonacci as Fib import PerfectNumber as Pn import qualified Mandelbrot as M -- a helper fun for timing mea...
kkirstein/proglang-playground
Haskell/src/Benchmark/Benchmark.hs
mit
2,251
0
15
548
499
240
259
51
1
{-# LANGUAGE NoImplicitPrelude, TypeSynonymInstances, FlexibleInstances #-} module IHaskell.Display.Diagrams (diagram) where import ClassyPrelude import System.Directory import qualified Data.ByteString.Char8 as Char import System.IO.Unsafe import Diagrams.Prelude import Diagrams.Backend.Cairo import IHaskell.Disp...
aostiles/LiveHaskell
ihaskell-display/ihaskell-diagrams/IHaskell/Display/Diagrams.hs
mit
1,295
0
16
265
349
177
172
33
3
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.SVGTransformList (js_clear, clear, js_initialize, initialize, js_getItem, getItem, js_insertItemBefore, insertItemBefore, js_replaceItem, replaceItem, js_removeItem, removeItem, js_appendIte...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGTransformList.hs
mit
6,358
78
11
1,113
1,296
720
576
104
1
-- This is a module for constructing bounding volume hierarchies using an octree approach {-# LANGUAGE BangPatterns #-} module Octree(generateSceneGraphUsingOctree, splitBoxIntoOctreeChildren, octreeChildBox, Octree(OctreeNode, OctreeLeaf, OctreeDummy), create, Octree.insert, gather) where import Vector import {-# SO...
TomHammersley/HaskellRenderer
app/src/Octree.hs
gpl-2.0
7,431
0
14
2,083
2,182
1,152
1,030
109
9
-- -- -- (C) 2011-16 Nicola Bonelli <nicola@pfq.io> -- -- 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...
pfq/PFQ
user/pfqd/Setup.hs
gpl-2.0
1,909
0
11
341
291
167
124
20
1
module Handler.Server where import Import import Service.Interface (get_task_types) getServerR :: ServerUrl -> Handler Html getServerR server = do aufgabenTypen <- lift $ liftM (map taskTreeToTextTree) $ get_task_types $ unpack server defaultLayout $ do addStylesheet $ StaticR css_tree_css $(widgetFile "s...
marcellussiegburg/autotool
yesod/Handler/Server.hs
gpl-2.0
467
0
13
80
149
71
78
-1
-1
-- Haskell Practical 3 Lexer for fuller prepositional calculus -- By James Cowgill module Prac3.Lexer where import Data.Char -- Lexer tokens data Token = TokTrue | TokFalse | TokNegate | TokAnd | TokOr | TokImplies | TokEqual | TokLeft | TokRight | TokVar String deriving ...
jcowgill/cs-work
syac/compilers/Prac3/Lexer.hs
gpl-3.0
1,172
0
9
408
297
157
140
33
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} module Utils where import Data.Aeson (ToJSON(..), Value(..), FromJSON) import Data.Aeson.Types (emptyObject) import Data.HashMap.Strict ...
Southern-Exposure-Seed-Exchange/Order-Manager-Prototypes
spock/src/Utils.hs
gpl-3.0
3,040
0
15
851
842
432
410
49
2
------------------------------------------------------------------------------- -- AVL (Adelson-Velskii and Landis) Trees -- -- Data Structures. Grado en Informática. UMA. -- Pepe Gallardo, 2011 ------------------------------------------------------------------------------- module AVL ( AVL , empty , i...
danipozodg/dependency
AVL.hs
gpl-3.0
7,088
0
12
2,080
2,648
1,331
1,317
142
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/GetAgent.hs
mpl-2.0
4,687
0
16
1,154
702
410
292
105
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-bigquery/gen/Network/Google/Resource/BigQuery/DataSets/Patch.hs
mpl-2.0
3,882
0
15
872
470
283
187
74
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/DiskTypes/Get.hs
mpl-2.0
3,593
0
16
878
468
280
188
73
1
----------------------------------------------------------------------------------------- {-| Module : ParseEiffel Copyright : (c) Daan Leijen 2003 License : BSD-style Maintainer : wxhaskell-devel@lists.sourceforge.net Stability : provisional Portability : portable Parse th...
thielema/wxhaskell
wxdirect/src/ParseEiffel.hs
lgpl-2.1
4,915
0
16
1,128
1,150
574
576
107
3
{-#LANGUAGE OverloadedStrings#-} module Data.P440.XML.Instances.ZSO where import qualified Data.P440.Domain.ZSO as ZSO import Data.P440.Domain.SimpleTypes import Data.P440.Domain.ComplexTypes import Data.P440.XML.XML import qualified Data.P440.XML.Instances.SimpleTypes import qualified Data.P440.XML.Instances.Complex...
Macil-dev/440P-old
src/Data/P440/XML/Instances/ZSO.hs
unlicense
2,347
0
12
584
1,102
570
532
42
0
import Control.Applicative main :: IO () main = show . sum . map read . words <$> getLine >>= putStrLn
fabianm/olympiad
2015-2016/round-1/a0.hs
apache-2.0
104
0
9
21
44
22
22
3
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Kubernetes.V1.NamespaceList where import GHC.Generics import Data.Text import Kubernetes.Unversioned.ListMeta import Kubernetes.V1.Namespace im...
minhdoboi/deprecated-openshift-haskell-api
kubernetes/lib/Kubernetes/V1/NamespaceList.hs
apache-2.0
1,441
0
9
192
125
77
48
19
0
module HelperSequences.A000005Spec (main, spec) where import Test.Hspec import HelperSequences.A000005 (a000005) main :: IO () main = hspec spec spec :: Spec spec = describe "A000005" $ it "correctly computes the first 20 elements" $ take 20 (map a000005 [1..]) `shouldBe` expectedValue where expectedValue...
peterokagey/haskellOEIS
test/HelperSequences/A000005Spec.hs
apache-2.0
365
0
10
59
160
95
65
10
1
-- |This module exports functions for testing the compiler on Flapjax source -- files. module Test.FileTests(compileFlapjaxFile,compileFlapjaxFilesIn) where import System.IO import System.Directory import Text.ParserCombinators.Parsec(ParseError,parseFromFile) import Html.Parser(parse) import Flapjax.Compiler(compileP...
brownplt/ovid
src/Test/FileTests.hs
bsd-2-clause
1,531
0
16
310
504
262
242
32
2
-- 1258 import Data.Function(on) import Data.List(group, permutations, sort, sortBy) import Data.Ratio(denominator, numerator) invnum = -101010101 myadd a b | a == invnum || b == invnum = invnum | otherwise = a + b mysub a b | a == invnum || b == invnum = invnum | otherwise = a - b mymul a b | a ==...
higgsd/euler
hs/93.hs
bsd-2-clause
1,601
0
12
446
970
524
446
37
1
{-# OPTIONS_GHC -fwarn-unused-imports #-} module Instances () where import Control.Monad.IO.Control import Data.Enumerator import Control.Monad.IO.Class import Control.Exception.Control instance MonadIO m => MonadControlIO (Iteratee a m) where liftControlIO f = liftIO $ f run' where run' iter = return $ It...
konn/konnfav
Instances.hs
bsd-2-clause
451
0
14
114
127
66
61
13
0
-- vim: sw=2: ts=2: set expandtab: {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, UndecidableInstances, OverloadedStrings, CPP #-} ----------------------------------...
kyagrd/micronax
src/Syntax.hs
bsd-2-clause
1,567
0
10
388
340
205
135
41
0
-- | This module implements various functions that return a probabilistic result, -- defined as unitary operators, and quantum computations. module QIO.QIORandom where import Data.Monoid as Monoid import QIO.QioSyn import QIO.Qdata import QIO.Qio import Data.Complex -- | The exponentiated Pauli-X rotation rX :: RR ...
alexandersgreen/qio-haskell
QIO/QIORandom.hs
bsd-2-clause
4,890
2
15
1,143
1,448
764
684
78
4
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS -Wall #-} module Main ( main ) where import Control.Monad (foldM) import Control.Monad.Trans (liftIO) import qualified Data.ByteString.Char8 as C import Data.Default import qualified Data.IntMap as IM...
kfish/zoom-cache
tools/zoom-cache.hs
bsd-2-clause
8,530
2
17
2,655
2,298
1,266
1,032
198
10
{-# LANGUAGE FlexibleContexts #-} module CubicleMaze (solve) where import Data.Bits (popCount) import Data.Maybe (fromJust) import Data.List (foldl') import qualified Data.OrdPSQ as PSQ import qualified Data.Set as Set import Text.Parsec.Prim (Stream, ParsecT, parse) import Text.Parsec.Char (digit, endOfLine) import ...
cjlarose/advent-2016
src/CubicleMaze.hs
bsd-3-clause
2,012
0
16
432
926
497
429
40
2
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} module Hassistant.Header where import qualified GHC import qualified Exception import qualified DynFlags import qualified Util import qualified Outputable import qualified GHC.Paths import Control.Applicative import qualified Data.Text as T imp...
philopon/hassistant.vim
src/Hassistant/Header.hs
bsd-3-clause
1,841
0
15
390
724
378
346
43
3
-- Copyright (c) 2014-present, Facebook, Inc. -- All rights reserved. -- -- This source code is distributed under the terms of a BSD license, -- found in the LICENSE file. {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiP...
simonmar/Haxl
Haxl/DataSource/ConcurrentIO.hs
bsd-3-clause
2,689
0
18
465
406
234
172
36
1
-- | contains a prettyprinter for the -- Template Haskell datatypes module Language.Haskell.TH.Ppr where -- All of the exports from this module should -- be "public" functions. The main module TH -- re-exports them all. import Text.PrettyPrint (render) import Language.Haskell.TH.PprLib import Language.Ha...
ezyang/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
31,558
0
14
9,124
10,858
5,312
5,546
629
8
module Main where import System.Environment (getArgs) import Network.Factual.API import Data.Factual.Query.DiffsQuery import Data.Factual.Response main :: IO() main = do args <- getArgs let oauthKey = head args let oauthSecret = last args let options = Options { token = generateToken oauthKey oauthSecret, tim...
rudyl313/factual-haskell-driver
examples/DiffsExample.hs
bsd-3-clause
619
0
12
109
205
105
100
16
1
import Control.Monad import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import Data.Char import Data.IORef import Data.Vhd import Data.Vhd.Bat import qualified Data.Vhd.Block as Block import Data.Vhd.Checksum import Data.Vhd.Node import Data.Vhd.Types import System.Environment (getArgs) i...
jonathanknowles/hs-vhd
Vhd.hs
bsd-3-clause
4,579
22
17
1,016
1,439
736
703
92
10
module Environment where import Graphics.Rendering.OpenGL hiding (($=)) import Graphics.UI.GLUT import Control.Applicative import Data.IORef import System.Exit import Graphics.UI.GLUT.Callbacks.Window import Control.Concurrent import Control.Concurrent.MVar import System.Random import System.IO.Unsafe type Cor = (GL...
jailson-dias/Arca
src/Environment.hs
bsd-3-clause
907
2
8
156
380
236
144
30
1
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, StandaloneDeriving, TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Atomo.Pretty (Pretty(..), Prettied) where import Data.Char (isUpper) import Data.IORef import Data.Maybe (isNothing) import Data.Ratio import Data.Typeable import System.IO.Unsa...
vito/atomo
src/Atomo/Pretty.hs
bsd-3-clause
15,361
0
18
4,209
6,257
3,102
3,155
319
6
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. module Duckling.T...
rfranek/duckling
tests/Duckling/Temperature/JA/Tests.hs
bsd-3-clause
612
0
9
96
80
51
29
11
1
{-# LANGUAGE DeriveDataTypeable #-} module Sgf.XMonad.Restartable.Firefox ( FirefoxProfile (..) , FirefoxArgs , firefoxProfile , firefoxNoRemote , firefoxNewInstance , Firefox , defaultFirefox ) where import Data.Typeable import Data.Function (on) import Sgf.Data.List import Sgf.Con...
sgf-dma/sgf-xmonad-modules
src/Sgf/XMonad/Restartable/Firefox.hs
bsd-3-clause
2,369
0
16
907
545
304
241
51
1
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-} module Commi.Task where import Haste.Serialize import Haste.JSON import Data.Typeable import Data.Maybe import Control.Applicative import Genetic.Options data Input = Input { inputCityMatrix :: [[Int]] , inputCityN :: Int , inputIndividLength :: Int ,...
Teaspot-Studio/bmstu-commi-genetics-haste
Commi/Task.hs
bsd-3-clause
2,431
0
13
773
1,094
653
441
53
1
----------------------------------------------------------------------------- -- | -- Module : Language.C.Syntax.ParserMonad -- Copyright : (c) [1999..2004] Manuel M T Chakravarty -- (c) 2005-2007 Duncan Coutts -- License : BSD-style -- Maintainer : benedikt.huber@gmail.com -- Portability...
ian-ross/language-c
src/Language/C/Parser/ParserMonad.hs
bsd-3-clause
6,570
0
14
1,812
1,747
997
750
131
2
{-# LANGUAGE RebindableSyntax #-} {-# LANGUAGE ViewPatterns #-} module Init where import Options import Type import Data.Array.Accelerate as A hiding ( fromInteger, V3 ) import Data.Array.Accelerate.Linear as A import Prelude ( fromInteger ) import...
tmcdonell/accelerate-lulesh
src/Init.hs
bsd-3-clause
3,314
0
20
1,113
932
488
444
68
2
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 This module defines interface types and binders -} {-# LANGUAGE CPP, FlexibleInstances, BangPatterns #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE LambdaCase #-} -- FlexibleInstances for ...
sdiehl/ghc
compiler/GHC/Iface/Type.hs
bsd-3-clause
76,725
2
19
21,467
16,370
8,196
8,174
1,217
32
module Module4.Task29 where import Prelude hiding (lookup) class MapLike m where empty :: m k v lookup :: Ord k => k -> m k v -> Maybe v insert :: Ord k => k -> v -> m k v -> m k v delete :: Ord k => k -> m k v -> m k v fromList :: Ord k => [(k,v)] -> m k v fromList [] = empty fromList ((k,v)...
dstarcev/stepic-haskell
src/Module4/Task29.hs
bsd-3-clause
717
0
11
204
350
180
170
18
0
module Main where import Hexdump main :: IO () main = hexPrint
wangbj/hexdump
app/Main.hs
bsd-3-clause
65
0
6
14
22
13
9
4
1
module Valkyria.Client where import Valkyria.Env import Prelude ()
nfjinjing/source-code-server
src/Valkyria/Client.hs
bsd-3-clause
71
0
4
12
17
11
6
3
0
{-# LANGUAGE PackageImports #-} module Data.Function (module M) where import "base" Data.Function as M
silkapp/base-noprelude
src/Data/Function.hs
bsd-3-clause
108
0
4
18
21
15
6
3
0
module BCalib.Imports ( module X ) where import Control.Lens as X hiding (Empty) import Data.Atlas.Histogramming as X import Data.Monoid as X hiding (First (..), Last (..), (<>)) import Data.Semigroup ...
cspollard/bcalib
src/BCalib/Imports.hs
bsd-3-clause
381
0
6
187
76
54
22
8
0
{-# LANGUAGE ViewPatterns, OverloadedStrings #-} module Text.XML.PList ( {-| This module is like `Text.XML.ToJSON', but it handles plist xml file. -} parseXML , xmlToJSON , tokensToJSON , elementToJSON , plistValue , module Text.XML.ToJSON ) where import Control.Monad (liftM) import Data.Text (Text)...
yihuang/xml2json
Text/XML/PList.hs
bsd-3-clause
3,395
0
16
811
1,034
571
463
70
16
{-# LANGUAGE ScopedTypeVariables #-} import Prelude hiding (sequence, mapM, foldl) import Data.Traversable import Data.Foldable import Control.Monad (void) import Control.Monad.Trans.Either import Control.Monad.IO.Class import qualified Data.Vector as V import qualified Data.Vector.Generic as VG import Data.Vector.Alg...
bgamari/model-fit
LifetimeFit.hs
bsd-3-clause
5,723
0
24
1,691
2,124
1,076
1,048
-1
-1
module Pos.Infra.Slotting.Class ( module X ) where import Pos.Core.Slotting as X
input-output-hk/pos-haskell-prototype
infra/src/Pos/Infra/Slotting/Class.hs
mit
106
0
4
36
22
16
6
3
0
{-# LANGUAGE CPP, MultiParamTypeClasses, FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} module Language.Haskell.GhcMod.FillSig ( sig , refine , auto ) where import Data.Char (isSymbol) import Data.Function (on) import Data.List (find, nub, sortBy) import qualified Data.Map as M import Data.Ma...
cabrera/ghc-mod
Language/Haskell/GhcMod/FillSig.hs
bsd-3-clause
21,204
0
25
5,847
6,267
3,231
3,036
348
7
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ViewPatterns #-} -- | Parsing command line targets module Stack.Build.Target ( --...
AndrewRademacher/stack
src/Stack/Build/Target.hs
bsd-3-clause
13,848
0
21
4,894
3,316
1,758
1,558
290
12
{-#LANGUAGE ForeignFunctionInterface #-} module Cudd.GC ( cuddEnableGarbageCollection, cuddDisableGarbageCollection, cuddGarbageCollectionEnabled, c_preGCHook_sample, c_postGCHook_sample, regPreGCHook, regPostGCHook ) where import System.IO import Foreign import Foreign.Ptr import Fore...
maweki/haskell_cudd
Cudd/GC.hs
bsd-3-clause
1,715
10
8
234
418
219
199
41
1
-- | Process utilities module Haskus.System.Process ( threadDelaySec , threadDelayMilliSec , threadDelayMicroSec , threadWaitRead , threadWaitWrite , yield , sysFork ) where import Haskus.System.Sys import Haskus.System.Linux.Handle import Haskus.Utils.Flow import Haskus.Format.Text (Text) imp...
hsyl20/ViperVM
haskus-system/src/lib/Haskus/System/Process.hs
bsd-3-clause
1,439
0
9
257
408
220
188
32
1
{-# LANGUAGE OverloadedStrings, CPP #-} -- | High-ish level bindings to the HTML5 audio tag and JS API. module Haste.Audio ( module Events, Audio, AudioSettings (..), AudioType (..), AudioSource (..), AudioPreload (..), AudioState (..), Seek (..), defaultAudioSettings, mkSource, newAudio, setSource,...
akru/haste-compiler
libraries/haste-lib/src/Haste/Audio.hs
bsd-3-clause
7,613
0
16
1,807
2,207
1,132
1,075
181
4
{-# LANGUAGE QuasiQuotes #-} module Objc (objcTests) where import Test.Framework import Test.Framework.Providers.HUnit import Test.HUnit (Assertion, (@?=)) import Language.C.Quote.ObjC objcTests :: Test objcTests = testGroup "Objective-C" [ testCase "Objective-C params" objcProp , testCase "Objective-C prop...
mwu-tow/language-c-quote
tests/unit/Objc.hs
bsd-3-clause
4,607
0
12
1,314
737
505
232
86
1
{-# LANGUAGE CPP #-} -- Vectorise a modules type and class declarations. -- -- This produces new type constructors and family instances top be included in the module toplevel -- as well as bindings for worker functions, dfuns, and the like. module Vectorise.Type.Env ( vectTypeEnv, ) where #include "HsVersions.h" ...
shlevy/ghc
compiler/vectorise/Vectorise/Type/Env.hs
bsd-3-clause
22,699
0
19
6,860
2,661
1,435
1,226
212
2
module Propellor.Gpg where import Control.Applicative import System.IO import System.FilePath import System.Directory import Data.Maybe import Data.List.Utils import Propellor.PrivData.Paths import Propellor.Message import Utility.SafeCommand import Utility.Process import Utility.Monad import Utility.Misc import Util...
sjfloat/propellor
src/Propellor/Gpg.hs
bsd-2-clause
2,962
52
15
546
889
467
422
88
2
module MergePullRequest where import qualified Github.PullRequests as Github import Github.Auth import Github.Data main :: IO () main = do mergeResult <- Github.updatePullRequest (GithubOAuth "authtoken") "repoOwner" "repoName" 22 (EditPullRequest { editPullRequestTitle = Just "Brand new title", editPullRequestBod...
bitemyapp/github
samples/Pulls/UpdatePull.hs
bsd-3-clause
513
0
12
85
145
78
67
10
2
{-# OPTIONS_GHC -fwarn-unused-binds #-} module ShouldCompile() where -- Trac #2497; test should compile without language -- pragmas to swith on the forall {-# RULES "id" forall (x :: a). id x = x #-} -- Trac #2213; eq should not be reported as unused eq,beq :: Eq a => a -> a -> Bool eq = (==) -- Used b...
hvr/jhc
regress/tests/1_typecheck/2_pass/ghc/T2497.hs
mit
402
0
7
105
51
35
16
8
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Category -- Copyright : (c) Ashley Yakeley 2007 -- License : BSD-style (see the LICENSE file in the distribution) -- -- Maintainer : ashley@semantic.o...
szatkus/haste-compiler
libraries/ghc-7.8/base/Control/Category.hs
bsd-3-clause
1,211
0
9
319
218
126
92
23
1
{- | Module : System.JBI.Config Description : Run-time configuration settings Copyright : (c) Ivan Lazar Miljenovic License : MIT Maintainer : Ivan.Miljenovic@gmail.com -} module System.JBI.Config where -------------------------------------------------------------------------------- new...
ivan-m/jbi
lib/System/JBI/Config.hs
mit
467
0
6
93
55
35
20
7
1
import System.Environment import System.Exit import System.Process import Data.IORef import Control.Monad import System.Timeout import Data.Maybe import GetFullProgName import Syntax import NarrowingSearch import SearchControl import Check import PrintProof import TPTPSyntax hiding (App, Var, Implies, Forall) import P...
frelindb/agsyHOL
Main.hs
mit
9,758
0
37
2,659
3,171
1,564
1,607
241
15
import qualified System.Environment f s@(x:xs) = x:s sign x | x > 0 = 1 | x == 0 = 0 | x < 0 = -1 test (x:xs) | x == -1 = True | x > 0 = False test [] = False testc xs = case xs of (x:xs) -> x [] -> 0 foo xs = case xs of (x:xs) -> x [] -> [] bar ...
gitrookie/functionalcode
code/Haskell/snippets/test.hs
mit
2,619
0
11
803
965
495
470
78
2
{-# LANGUAGE TemplateHaskell #-} {- Copyright (C) 2012-2017 Luke Brown <http://gsd.uwaterloo.ca> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitati...
gsdlab/claferIG
test/test-suite.hs
mit
4,322
0
14
992
808
439
369
75
4
module Job.Activation ( sendActivationMail ) where import Import import qualified Data.ByteString.Lazy.Char8 as C import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Network.HTTP.Simple as HTTP import Job.Common data Mailc...
Tehnix/campaigns
Job/Activation.hs
mit
3,248
0
24
907
706
356
350
-1
-1
-- https://howistart.org/posts/haskell/1 module Main where import qualified Data.ByteString.Lazy as BL import qualified Data.Vector as V -- from cassava import Data.Csv -- a simple type alias for data type BaseballStats = (BL.ByteString, Int, BL.ByteString, Int) fourth :: (a, b, c, d) -> d fourth (_, _, _, d) = d ...
aitoroses/haskell-starter-repo
src/Main.hs
mit
633
0
13
110
211
120
91
15
1
{-# LANGUAGE MultiParamTypeClasses, TypeOperators , TypeFamilies, UndecidableInstances, CPP , FlexibleContexts #-} type Time = Float --data Time deriving (Ord) --data R = NegInf | R Float | PosInf deriving (Eq,Ord) --data Time = T R | AtLeast R -- semantically, a behavior is a time dependant...
eulerfx/learnfp
functional_reactive_animation.hs
mit
3,136
0
9
763
1,160
609
551
63
2
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} module Language.PureScript.Linter.Imports (findUnusedImports, Name(..), UsedImports()) where import Prelude () import Prelude.Compat import qualified Data.Map as M import Data.Maybe (mapMaybe) import Data.List ((\\), find) import Control.Monad.Er...
michaelficarra/purescript
src/Language/PureScript/Linter/Imports.hs
mit
3,353
0
24
601
1,063
570
493
63
3
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-} module Y2017.M12.D12.Exercise where {-- Okay, I came across an error when I was filtering articles with indexed keywords: time cold_filtered 6495 trump cold_filtered: UnexpectedNull {errSQLType = "text", errSQLTableOid = Just (Oid 50231), errSQLField = "summary"...
geophf/1HaskellADay
exercises/HAD/Y2017/M12/D12/Exercise.hs
mit
2,742
0
9
453
221
142
79
20
1
{-# LANGUAGE ViewPatterns #-} {-# LANGUAGE OverloadedStrings #-} module Yesod.Devel.Capture ( Capture , startCapture , logMessage , outputChunk , waitCaptured ) where import Data.Text (Text) import Data.ByteString (ByteString) import Control.Concurrent.STM import Data.Time (UTCTime, getCurrentT...
snoyberg/yesod-devel-beta
Yesod/Devel/Capture.hs
mit
1,351
0
15
424
385
209
176
39
2
-- | Chan with size module Control.Concurrent.SizedChan (SizedChan, newSizedChan, writeSizedChan, readSizedChan, tryReadSizedChan, peekSizedChan, tryPeekSizedChan, isEmptySizedChan) where import Control.Concurrent.Chan import Data.IORef data SizedChan a = SizedChan (Chan a) -- ^ The channel (IORef Int) --...
banacorn/agda-language-server
src/Control/Concurrent/SizedChan.hs
mit
3,254
0
17
789
776
368
408
74
3