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 OverloadedStrings #-} module LoadBalancer where import Control.Applicative import Control.Concurrent import Data.Aeson -- | Datastructure for single endpoint. data Endpoint = Endpoint { location :: String -- ^ location to service , name :: String -- ^ name of the service , tag :: String ...
odi/load-balancer
src/LoadBalancer.hs
bsd-3-clause
2,448
0
13
541
641
355
286
51
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} module AuthService.Api where import AuthService.Types import Data.Text (Text) import Servant.API hiding (PostNoContent) import SignedAuth import Compat (PostNoContent) type LoginAPI ...
nejla/auth-service
auth-service-core/src/AuthService/Api.hs
bsd-3-clause
4,643
0
17
1,683
812
432
380
92
0
{-# LANGUAGE RankNTypes, OverloadedStrings #-} module WildBind.BindingSpec (main, spec) where import Control.Applicative ((<$>), (<*>), pure) import Control.Monad (void) import Control.Monad.IO.Class (MonadIO, liftIO) import Control.Monad.Trans.Class (lift) import qualified Control.Monad.Trans.Reader as Reader import ...
debug-ito/wild-bind
wild-bind/test/WildBind/BindingSpec.hs
bsd-3-clause
33,684
304
28
10,345
12,403
6,483
5,920
731
5
---------------------------------------------------------------------------- -- | -- Module : Language.Core.Module -- Copyright : (c) Carlos López-Camey, University of Freiburg -- License : BSD-3 -- -- Maintainer : c.lopez@kmels.net -- Stability : stable -- -- -- This module contains functions that w...
kmels/dart-haskell
src/Language/Core/Module.hs
bsd-3-clause
715
0
7
92
88
56
32
6
1
module GMessages.Server ( ConnectionMessage(..), PingMessage(..), WorldMessage(..), ServiceMessage(..), KeyMessage(..) ) where import qualified Linear as L import qualified Network.Socket as NS import Graphics.Rendering.OpenGL (GLfloat) import Data.Time.Clock (UTCTime) import GCommon.Types.Generic (Clien...
cernat-catalin/haskellGame
src/GMessages/Server.hs
bsd-3-clause
1,094
0
9
306
235
146
89
27
0
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE TemplateHaskell #-} -- | A simple timer using ghcjs-dom module Main where import JsImports import GHCJS.DOM import GHCJS.DOM.Document import GHCJS.DOM.Element import GHCJS.DOM.EventTarget import GHCJS.DOM.Event...
bergey/gooey
timer/src/Main.hs
bsd-3-clause
5,437
0
17
1,554
1,720
897
823
139
7
{-# LANGUAGE TypeFamilies, MultiParamTypeClasses #-} -- | -- Module : Simulation.Aivika.Lattice.QueueStrategy -- Copyright : Copyright (c) 2016-2017, David Sorokin <david.sorokin@gmail.com> -- License : BSD3 -- Maintainer : David Sorokin <david.sorokin@gmail.com> -- Stability : experimental -- Tested with: G...
dsorokin/aivika-lattice
Simulation/Aivika/Lattice/QueueStrategy.hs
bsd-3-clause
2,057
0
11
356
376
199
177
29
0
instance Monad Point where return = Point Top >>= k = Top Bot >>= k = Bot Point a >>= k = k a
davdar/quals
writeup-old/sections/04MonadicAAM/02RecoveringConcrete/01PointMonad.hs
bsd-3-clause
102
0
7
32
53
24
29
5
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} module Existential where data Showable where Pack :: forall a. (Show a) => a -> Showable unpackInt :: Showable -> Maybe Int unpackInt (Pack (a :: Int)) = Just a unpackInt _ = Nothing -- instance Show Showable where -- show...
sleexyz/haskell-fun
Existential.hs
bsd-3-clause
386
0
9
78
105
60
45
11
1
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 709 {-# LANGUAGE AutoDeriveTypeable #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Control.Applicative.Lift -- Copyright : (c) Ross Paterson 2010 -- License : BSD-style (see the file LICENSE) -- -- M...
DavidAlphaFox/ghc
libraries/transformers/Control/Applicative/Lift.hs
bsd-3-clause
4,084
5
10
898
1,267
665
602
66
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-...
np/ling
Ling/Norm.hs
bsd-3-clause
11,872
0
13
3,270
4,310
2,252
2,058
-1
-1
{-# LANGUAGE OverloadedStrings, FlexibleInstances, RecordWildCards #-} -- | Docker types. module Stack.Types.Docker where import Control.Applicative import Control.Monad import Control.Monad.Catch (MonadThrow) import Data.Aeson.Extended import Data.Monoid import Data.Text (Text) import qualified Data.Text as T impor...
narrative/stack
src/Stack/Types/Docker.hs
bsd-3-clause
12,645
0
18
2,806
1,900
1,064
836
257
1
{-# LANGUAGE BangPatterns #-} module Hexdump ( hexPrint , hexPrint' , hexDump ) where import Control.Monad.Identity import Control.Monad.RWS.Strict import Data.ByteString (ByteString) import qualified Data.ByteString as B import Data.ByteString.Build...
wangbj/hexdump
src/Hexdump.hs
bsd-3-clause
4,151
0
23
1,006
1,449
737
712
85
2
module Main (main) where -------------------------------------------------------------------------------- import Control.Arrow import Data.ByteString (ByteString) import Data.Default.Class (def) import Network.HTTP.Client import Network.HTTP.Media import Network.HTTP.Types import Network.URI (URI, parseURI, parseRela...
spl/http-client-request-modifiers
test/Main.hs
bsd-3-clause
7,303
0
21
1,261
1,833
945
888
-1
-1
-- Problem 3 -- -- The prime factors of 13195 are 5, 7, 13 and 29. -- -- What is the largest prime factor of the number 600851475143 ? findFactor n = findFactor' n 2 findFactor' n f | n `mod` f == 0 = findFactor' (n `div` f) 2 | (n `mod` f /= 0) && (f * 2 < n) = findFactor' n (f + 1) | (n `mod` f /= 0) &&...
moddyz/euler
p3/p3.hs
mit
388
0
11
105
161
86
75
6
1
{-# LANGUAGE CPP, MultiParamTypeClasses, TypeSynonymInstances , FlexibleInstances #-} {- | Module : $Header$ Description : the incomplete Logic instance for VSE Copyright : (c) C. Maeder, DFKI 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provis...
mariefarrell/Hets
VSE/Logic_VSE.hs
gpl-2.0
3,936
0
14
986
904
453
451
86
1
import Control.DeepSeq (NFData(..)) import Criterion.Main import MatrixTree import SpAMM import System.Random (getStdGen, randomRs, StdGen) instance NFData MTree main = do let sizes = fmap (2^) [5..11] gen <- getStdGen let trees = fmap (makeRandomMTree gen) sizes let sizeTreePairs = zip ...
FreeON/spammpack
src-Haskell/Benchmarking/norm benchmarks.hs
bsd-3-clause
883
0
12
244
345
186
159
19
1
module Idris.Elab.AsPat(desugarAs) where import Idris.Core.TT import Idris.AbsSyntax import Control.Applicative import Control.Monad.State.Strict import Data.Generics.Uniplate.Data (transformM) -- | Desugar by changing x@y on lhs to let x = y in ... or rhs desugarAs :: PTerm -> PTerm -> (PTerm, PTerm) desugarAs lhs...
BartAdv/Idris-dev
src/Idris/Elab/AsPat.hs
bsd-3-clause
1,697
0
14
459
595
310
285
34
3
module Graphics.Wayland.Server ( -- Expose built-in wayland functions module Graphics.Wayland.Internal.Server, Client(..), -- Expose scanned protocol module Graphics.Wayland.Internal.SpliceServer, module Graphics.Wayland.Internal.SpliceServerTypes, ) where import Graphics.Wayland.Internal.Server import G...
abooij/haskell-wayland
Graphics/Wayland/Server.hs
mit
460
0
6
45
80
58
22
9
0
import Geometry import Drawing main = drawPicture myPicture myPicture points = drawLine (a,b) & drawLine (b,c) & drawLine (c,a) & drawPoints [a,b,c] & drawAutoLabels [a,b,c] & message "Lines" where [a,b,c] = take 3 points
alphalambda/hsmath
src/Learn/Geometry/demo02lines.hs
gpl-2.0
254
0
11
66
119
64
55
11
1
------------------------------------------------------------------------------- -- | -- Module : System.Hardware.Haskino.ShallowDeepPlugin.RecurPass -- Copyright : (c) University of Kansas -- License : BSD3 -- Stability : experimental -- -- Recursion Transformation Pass --------------------------------...
ku-fpg/kansas-amber
System/Hardware/Haskino/ShallowDeepPlugin/MutRecurPass.hs
bsd-3-clause
18,703
3
30
5,840
5,359
2,586
2,773
343
12
module Base.Renderable.AskString ( askString, askStringParse, mkAskStringWidget, ) where import Safe import Data.Set (member) import Utils import Graphics.Qt import Base.Types import Base.Polling import Base.Prose import Base.Configuration.Controls import Base.Renderable.WholeScreenPixmap import ...
geocurnoff/nikki
src/Base/Renderable/AskString.hs
lgpl-3.0
2,359
0
21
649
622
317
305
56
5
-- | Event handling for Haste. module Haste.Events ( module Core, module BasicEvents, module KeyEvents, module MouseEvents ) where import Haste.Events.Core as Core import Haste.Events.BasicEvents as BasicEvents import Haste.Events.KeyEvents as KeyEvents import Haste.Events.MouseEvents as MouseEvents
akru/haste-compiler
libraries/haste-lib/src/Haste/Events.hs
bsd-3-clause
319
0
4
53
57
42
15
9
0
{-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} import Prelude hiding (read) import Control.Monad (unless) import GHC.Exts import GHC.Types import System.Mem (performMajorGC) -- The purpose of this test is to confirm that when the GC -- copies (out of the nursery) a SmallMutableArray# that has -- been shrun...
sdiehl/ghc
testsuite/tests/primops/should_run/ShrinkSmallMutableArrayB.hs
bsd-3-clause
1,581
0
15
420
592
293
299
42
1
<?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="fil-PH"> <title>Advanced SQLInjection Scanner</title> <maps> <homeID>sqliplugin</homeID> ...
thc202/zap-extensions
addOns/sqliplugin/src/main/javahelp/help_fil_PH/helpset_fil_PH.hs
apache-2.0
982
77
66
157
409
207
202
-1
-1
{-# LANGUAGE BangPatterns #-} -- See Trac #3403: interaction of pattern match failure and CPR -- The point is that this should run in constant space, with no -- stack growth. In GHC 6.10 the tail call optimisation didn't work. module Main (main) where import qualified Data.Set as Set import Data.Set (Set) data Re...
urbanslug/ghc
testsuite/tests/simplCore/should_run/T3403.hs
bsd-3-clause
898
0
12
221
402
207
195
24
1
import Data.List (foldl', sort) import Data.List.Split import qualified Data.Map.Strict as M import Utils (pairs, numberToDigits, digitsToNumber) import Control.Monad.Reader import Data.Maybe import Data.Tuple (swap) main = do text <- readFile "p098_words.txt" let ws = split (dropDelims $ dropBlanks $ oneOf "\...
arekfu/project_euler
p0098/p0098.hs
mit
2,626
0
13
531
996
516
480
60
3
-- ------------------------------------------------------------------------------------- -- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved. -- For email, run on linux (perl v5.8.5): -- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0...
cbrghostrider/Hacking
Euler/prob1_43.hs
mit
20,913
3
27
5,364
9,331
5,129
4,202
317
10
module Main where import Test.Hspec import SpecHelper import qualified Hasql.Pool as P import qualified Hasql.Transaction.Sessions as HT import PostgREST.App (postgrest) import PostgREST.DbStructure (getDbStructure, getPgVersion) import PostgREST.Types (DbStructure(..), pgVersion95, pgVersion96) import Control.AutoU...
begriffs/postgrest
test/Main.hs
mit
6,364
0
14
1,334
1,337
715
622
102
1
module Solve.Velocity (velocitySteps) where import Stage.Diffusion import Stage.Advection import Stage.Sources import Stage.Project import Model import Config -- The pass that sets boundary conditions is buggy and -- currently disabled. -- import Stage.Boundary velocitySteps :: Config -> Int...
gscalzo/HaskellTheHardWay
gloss-try/gloss-master/gloss-examples/raster/Fluid/src-repa/Solve/Velocity.hs
mit
1,141
0
12
390
234
119
115
26
1
module Codewars.Kata.Watermelon where divide :: Integer -> Bool divide w | (w > 2) && (mod w 2 == 0) = True | otherwise = False
dzeban/haskell-exercises
watermelon.hs
mit
132
0
11
30
62
32
30
5
1
-- making string literals polymorphic over the 'IsString' type class {-# LANGUAGE OverloadedStrings #-} module IG.PostgresStreamHandle where import Database.HDBC import Database.HDBC.PostgreSQL import Lightstreamer -- For creating efficient string import qualified Data.ByteString as DB ...
peteryhwong/ig-haskell-client
src/IG/PostgresStreamHandle.hs
mit
2,894
0
11
664
481
263
218
30
2
{-# LANGUAGE OverloadedStrings #-} module Prim ( primEnv, unop ) where import LispVal ( LispException(NumArgs, IOError, TypeMismatch, ExpectedList), IFunc(IFunc), LispVal(Atom, Fun, Number, String, Bool, Nil, List), Eval ) import Data.Functor ((<&>)) import Data.Text as T ( Text, concat, pack,...
write-you-a-scheme-v2/scheme
src/Prim.hs
mit
7,275
0
12
1,983
3,018
1,573
1,445
153
3
module GHCJS.DOM.HTMLTrackElement ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/HTMLTrackElement.hs
mit
46
0
3
7
10
7
3
1
0
{-# LANGUAGE OverloadedStrings #-} import Control.Exception (catch, throwIO) import Control.Monad (forever) import Data.Char (ord) import Data.Maybe (fromMaybe) import Data.String (fromString) import Network.HostName (getHostName) import System.Exit (exitSuccess) import System.IO (hSetBuffering, hSetBinaryMode, Buffer...
mgsloan/compconfig
env/errlog-filter/errlog-filter.hs
mit
4,112
0
16
860
675
374
301
61
4
module Ch05LogisticRegression.GradientAscent ( gradAscent , sigmoid , stocGradAscent0 , stocGradAscent0History , stocGradAscent1 ) where import qualified Data.Vector.Storable as VS import MLUtil -- cf logRegres.sigmoid sigmoid :: Double -> Double sigmoid x = 1.0 / (1.0 + exp (-x)) -...
rcook/mlutil
ch05-logistic-regression/lib/Ch05LogisticRegression/GradientAscent.hs
mit
3,683
0
20
1,156
1,140
620
520
82
1
{-# LANGUAGE JavaScriptFFI #-} -- | FIXME: doc module GHCJS.Electron.DownloadItem where
taktoa/ghcjs-electron
src/GHCJS/Electron/DownloadItem.hs
mit
89
0
3
12
9
7
2
2
0
module TestShaders where import ShaderNode import Types import Control.Category import Linear import Prelude hiding (id, (.), fst, snd, curry, uncurry, Functor(..)) shaderFn (Diffuse norm f) = f shaderFn (Reflection n eta f) = f shaderFn (Mix fac a b f) = f runTest shader = shaderFn shader $ V3 0.5 0.5 0.5 diffus...
tcsavage/shader-cats
src/TestShaders.hs
mit
920
0
14
226
310
161
149
17
1
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Hadoop.Protos.YarnServerResourceManagerServiceProtos.RefreshAdminAclsResponseProto (RefreshAdminAclsResponseProto(..)) where import Prelude ((+), (/)) import qualifi...
alexbiehl/hoop
hadoop-protos/src/Hadoop/Protos/YarnServerResourceManagerServiceProtos/RefreshAdminAclsResponseProto.hs
mit
3,075
1
16
539
554
291
263
53
0
module BoundSourceSpec (spec) where import Test.Hspec import BoundSource (BoundSource) import qualified BoundSource import Context (Context) import qualified Context import Source (Source) import qualified Source import Table (Table) import qualified Table spec :: Spec spec = do describe "BoundSource.create" $ do ...
rcook/hqdsl
src/spec/BoundSourceSpec.hs
mit
690
0
17
150
208
116
92
22
1
{-# htermination guard :: Bool -> Maybe () #-} import Monad
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Monad_guard_3.hs
mit
60
0
3
11
5
3
2
1
0
{-# LANGUAGE OverloadedStrings #-} module Database.Neo4j.Property where import Control.Exception.Lifted (throw, catch) import qualified Data.Aeson as J import qualified Data.HashMap.Lazy as M import qualified Data.Text as T import qualified Data.Text.Encoding as TE import Database.Neo4j.Types import Database.Neo4j...
asilvestre/haskell-neo4j-rest-client
src/Database/Neo4j/Property.hs
mit
3,229
0
16
758
752
390
362
41
3
{-# LANGUAGE OverloadedStrings, ViewPatterns #-} module Y2018.M05.D30.Solution where {-- Today we're going to look at big(ish) data. What do you do with big(ish) data? Well, 99% you ignore, AND WE WILL FOLLOW THAT FINE TRADITION TODAY! Today's Haskell problem. We have a JSON of MASSIVE proporations (well, a mega- b...
geophf/1HaskellADay
exercises/HAD/Y2018/M05/D30/Solution.hs
mit
3,100
0
13
669
580
324
256
-1
-1
-- The solution of exercise 1.38 -- In 1737, the Swiss mathematician Leonhard Euler published a memoir De -- Fractionibus Continuis, which included a continued fraction expansion -- for `e - 2`, where e is the base of the natural logarithms. In this -- fraction, the N_i are all 1, and the D_i are successively 1, 2, 1, ...
perryleo/sicp
ch1/sicpc1e38.hs
mit
1,444
0
15
367
260
144
116
16
2
module Kraken.Rest where import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Reader (ReaderT,runReaderT,ask) import Crypto.Hash (SHA256,SHA512,HMAC,Digest ,hmac,hash) import Data.Aeson.T...
cmahon/kraken
src/Kraken/Rest.hs
mit
12,443
0
22
3,767
2,560
1,362
1,198
-1
-1
module Static where import Happstack.Lite static :: ServerPart Response static = notFound $ toResponse ()
akru/happsite
Static.hs
mit
108
0
7
17
31
17
14
4
1
-- Example from Shiple/Berry/Touati "Constructive Analysis of Cyclic Circuits". -- Simplified slightly: reduce it to two inputs, eliminating the -- 3-input AND gate. -- The probes show that it takes 3 iterations to reach a fixpoint. -- sim c [(true, true)] module T where import Tests.Basis c = proc (x, z) -> ...
peteg/ADHOC
Tests/01_CyclicCircuits/026_shiple_berry_touati_probe.hs
gpl-2.0
1,016
5
19
346
344
187
157
-1
-1
{-# LANGUAGE OverloadedStrings, TypeSynonymInstances, OverlappingInstances, IncoherentInstances, FlexibleInstances #-} module Sound.Tidal.Parse where import Text.ParserCombinators.Parsec import qualified Text.ParserCombinators.Parsec.Token as P import Text.ParserCombinators.Parsec.Language ( haskellDef ) import Data....
kindohm/Tidal
Sound/Tidal/Parse.hs
gpl-3.0
6,741
0
16
2,441
2,234
1,078
1,156
176
2
-- | Customised entry boxes for formulas. {-# Language OverloadedStrings,DoAndIfThenElse #-} module Sat.GUI.EntryFormula where import Graphics.UI.Gtk hiding (eventButton, eventSent,get,eventClick) import Control.Monad import Control.Lens hiding (set,act) import Control.Monad.Trans.RWS hiding (state) import Control.A...
manugunther/sat
Sat/GUI/EntryFormula.hs
gpl-3.0
15,485
0
33
6,004
3,469
1,748
1,721
-1
-1
{-# LANGUAGE BangPatterns, CPP, NoImplicitPrelude, PackageImports #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Trustworthy #-} #endif -- | -- The Haskell 2010 Prelude: a standard module imported by default -- into all Haskell modules. For more documentation, see the Haskell 2010 -- Report <http://www.haskell.org/o...
jwiegley/ghc-release
libraries/haskell2010/Prelude.hs
gpl-3.0
7,232
0
9
1,575
1,172
855
317
119
1
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} module Controller.IngestTest where import Data.Aeson import Data.Aeson.Types import qualified Data.ByteString as BS import qualified Data.Maybe as MB import Test.Tasty import Test.Tasty.HUnit import Controller.Ingest import Model.Metric import Model.Record impor...
databrary/databrary
test/Controller/IngestTest.hs
agpl-3.0
3,872
0
41
1,340
766
401
365
87
5
{-# LANGUAGE CPP #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} module Graphics.OpenGLES.PixelFormat where import Data.Proxy import Data.Int import Data.Word import Graphics.OpenGLES.Internal import Graphics.Ope...
capsjac/opengles
src/Graphics/OpenGLES/PixelFormat.hs
lgpl-3.0
7,847
3
10
979
2,211
1,251
960
-1
-1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : Gui.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:14 Warning : this file is machine generated - do not modif...
keera-studios/hsQt
Qtc/Gui.hs
bsd-2-clause
33,720
0
5
3,558
6,710
4,721
1,989
995
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} import Control.Applicative ((<$>)) import Control.Monad (unless) import System.Console.CmdArgs import System.IO (hFlush, stdout) import qualified Network as N import qualif...
poliglot/concraft-de
tools/concraft-de.hs
bsd-2-clause
10,479
2
14
2,735
2,635
1,435
1,200
230
5
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module System.EtCetera.Internal.Prim where import Control.Category (Category, id, (.)) import Control.Monad (mplus, mzero) import Data....
paluh/et-cetera
src/System/EtCetera/Internal/Prim.hs
bsd-3-clause
2,308
0
13
558
823
455
368
60
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.ARB.TextureCubeMapArray -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : port...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/ARB/TextureCubeMapArray.hs
bsd-3-clause
926
0
4
96
55
43
12
9
0
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ViewPatterns #-}...
phadej/stack
src/Stack/Build.hs
bsd-3-clause
15,728
0
18
4,911
3,183
1,691
1,492
257
6
{-# LANGUAGE GADTs, TypeFamilies, ScopedTypeVariables, TypeOperators, EmptyDataDecls, PatternGuards, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, UndecidableInstances, TemplateHaskell, QuasiQuotes, ViewPatterns #-} --------------------------------- -- an example : lambda calculus -------------------...
eddywestbrook/hobbits
archival/TermTH.hs
bsd-3-clause
6,037
0
17
1,600
2,314
1,210
1,104
131
6
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[TcPatSyn]{Typechecking pattern synonym declarations} -} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} module TcPatSyn ( tcInferPatSynDecl, tcCheckPatSynDecl , tcPatSynBuilderBind, tcPatSy...
sgillespie/ghc
compiler/typecheck/TcPatSyn.hs
bsd-3-clause
36,097
0
20
12,237
7,600
3,915
3,685
524
20
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.NV.TessellationProgram5 -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : port...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/NV/TessellationProgram5.hs
bsd-3-clause
848
0
4
90
49
39
10
7
0
{-# LANGUAGE Rank2Types, ScopedTypeVariables, FlexibleInstances, OverloadedStrings #-} module Main where import Paskell.Expr import Paskell.Eval import Paskell.EvalM import Paskell.Syntax.Haskell import System.Environment import Paskell.BuiltIns import Control.Monad.State.Lazy import Control.Monad.Error runModule ::...
glutamate/paskell
Paskell/Pask.hs
bsd-3-clause
3,069
0
18
1,440
968
475
493
81
2
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} module Snap.Internal.Http.Server.Date ( getDateString , getLogDateString , getCurrentDateTime) where import Control.Concurrent import Control.Exception import Control.Monad import Data.ByteString (ByteString) import D...
janrain/snap-server
src/Snap/Internal/Http/Server/Date.hs
bsd-3-clause
4,031
0
12
859
828
416
412
92
1
module Language.SimplePoly.TH where
jfischoff/simple-poly
src/Language/SimplePoly/TH.hs
bsd-3-clause
35
0
3
2
7
5
2
1
0
{-# LANGUAGE OverloadedStrings #-} module Web.Mongrel2.Parsing (m2_parse) where import qualified Data.Text.Lazy as T import Control.Applicative hiding (many) import Text.Parsec.Text import Text.Parsec hiding ((<|>)) import Data.Default import qualified Text.JSON as JS import Web.Mongrel2.Types m2_parse :: T.Text -> ...
GunioRobot/web-mongrel2
src/Web/Mongrel2/Parsing.hs
bsd-3-clause
3,349
14
31
1,176
948
491
457
84
6
module Data.MRF.ParamSet.ParamArray ( ParamArray , mkParamArray , MkBounds (..) ) where import Data.List (foldl') import qualified Data.Array.Unboxed as A import qualified Data.Vector.Unboxed as U import Data.Binary (Binary, put, get) import Control.Monad (forM_) import qualified Data.Ix ...
kawu/mrf
Data/MRF/ParamSet/ParamArray.hs
bsd-3-clause
2,077
0
14
680
738
388
350
-1
-1
{-# LANGUAGE ViewPatterns, ScopedTypeVariables, DeriveDataTypeable, TemplateHaskell, OverlappingInstances, UndecidableInstances, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-} module Control.Monad.Incremental.Draw where import Control.Monad.Incremental import Control.Monad.Increm...
cornell-pl/HsAdapton
src/Control/Monad/Incremental/Draw.hs
bsd-3-clause
16,591
30
22
2,615
5,851
3,091
2,760
268
5
{-# OPTIONS_GHC -fglasgow-exts #-} -- -fglasgow-exts: for multi-param type classes, in MonadError -- -- Circuit compiler for the Faerieplay hardware-assisted secure -- computation project at Dartmouth College. -- -- Copyright (C) 2003-2007, Alexander Iliev <sasho@cs.dartmouth.edu> and -- Sean W. Smith <sws@cs.dartmout...
ailiev/faerieplay-compiler
Faerieplay/ErrorWithContext.hs
bsd-3-clause
2,963
0
15
795
389
221
168
-1
-1
module Opaleye.Label where import qualified Opaleye.Internal.Label as L import qualified Opaleye.Internal.QueryArr as Q import qualified Opaleye.Select as S -- | Add a commented label to the generated SQL. label :: String -> S.Select a -> S.Select a label l a = Q.simpleQueryArr (L.label' l . Q.runSimpleQue...
WraithM/haskell-opaleye
src/Opaleye/Label.hs
bsd-3-clause
329
0
9
60
88
51
37
6
1
{-# LANGUAGE OverloadedStrings, PackageImports #-} import Control.Applicative import Control.Monad import "monads-tf" Control.Monad.State import Control.Concurrent import Data.HandleLike import Network import Network.PeyoTLS.Server import Network.PeyoTLS.ReadFile import "crypto-random" Crypto.Random import qualified ...
YoshikuniJujo/forest
subprojects/tls-analysis/server/examples/clcertServer.hs
bsd-3-clause
1,216
10
17
221
430
229
201
35
2
module Mire.Data.Colour ( Colour, invert, AnsiTraits (..), defaultAnsiTraits, get24BitColour, get8BitColour, get4BitColour, get3BitColour, findColour, toGtkColour, C.sRGB24 ) where import Mire.Prelude import Data.Colour () -- for the Show instance on Colour import Data.Colour.SRGB hiding (Colour) impor...
ellej/mire
src/Mire/Data/Colour.hs
bsd-3-clause
3,190
0
11
679
1,088
578
510
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Numeric.Statistics.Histogram -- Copyright : (c) A. V. H. McPhail 2010, 2014 -- License : BSD3 -- -- Maintainer : haskell.vivian.mcphail <at> gmail <dot> com -- Stability : provisional -- Portability : port...
amcphail/hstatistics
lib/Numeric/Statistics/Histogram.hs
bsd-3-clause
2,277
0
12
556
349
206
143
20
4
-- 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. {-# LANGUAGE GADT...
rfranek/duckling
Duckling/Numeral/FR/Rules.hs
bsd-3-clause
8,747
0
19
2,337
2,624
1,474
1,150
259
8
-- ------------------------------------------------------------ {- | Module : Yuuko.Text.XML.HXT.DTDValidation.TypeDefs Copyright : Copyright (C) 2008 Uwe Schmidt License : MIT Maintainer : Uwe Schmidt (uwe@fh-wedel.de) Stability : experimental Portability: portable This module provides...
nfjinjing/yuuko
src/Yuuko/Text/XML/HXT/DTDValidation/DocValidation.hs
bsd-3-clause
15,932
425
18
4,079
2,619
1,516
1,103
267
3
{-# LANGUAGE NamedFieldPuns, TypeSynonymInstances , FlexibleInstances #-} module Core.Pretty where import Pretty import Control.Monad.Writer import Core.Core instance Pretty Literal where pprint LUnit = litClr "()" pprint (LString s) = litClr s pprint (LNumber i) = litClr . show $ i pprint LTrue = ...
demhydraz/waffle
src/Core/Pretty.hs
bsd-3-clause
1,500
0
11
373
652
321
331
37
0
-- | This module provides means for reading and applying 'Template's. -- -- Templates are tools to convert items into a string. They are perfectly suited -- for laying out your site. -- -- Let's look at an example template: -- -- > <html> -- > <head> -- > <title>My crazy homepage - $title$</title> -- > ...
freizl/freizl.github.com-old
src/Hakyll/Web/Template.hs
bsd-3-clause
5,460
0
17
1,582
852
459
393
70
9
----------------------------------------------------------------------------- -- -- GHC Interactive support for inspecting arbitrary closures at runtime -- -- Pepe Iborra (supported by Google SoC) 2006 -- ----------------------------------------------------------------------------- {-# OPTIONS -fno-warn-tabs #-} -- Th...
mcmaniac/ghc
compiler/ghci/RtClosureInspect.hs
bsd-3-clause
49,181
251
24
15,080
10,996
5,703
5,293
-1
-1
{-# LANGUAGE TypeFamilies, FlexibleInstances #-} -- | A prioritized TaskPool. This consists of a 'Queue', which prioritizes tasks, and a 'Room' which restricts the number of tasks that may execute at one time. module PrioritySync.Internal.TaskPool (TaskPool, PrioritySync.Internal.TaskPool.schedule, newT...
clanehin/priority-sync
PrioritySync/Internal/TaskPool.hs
bsd-3-clause
3,436
0
18
702
799
433
366
54
1
module Tc.Kc.KcSubst where import Data.List (union) import Language.Haskell.Exts import Utils.ErrMsg -- this module defines some operations used -- by the unification over kinds. -- a synonym for kind variables and substituions type KVar = Name type KindSubst = [(KVar, Kind)] nullSubst :: KindSubst nullSubst = ...
rodrigogribeiro/mptc
src/Tc/Kc/KcSubst.hs
bsd-3-clause
1,151
0
9
327
426
226
200
28
1
{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Test.AWS.Gen.ELB -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay...
fmapfmapfmap/amazonka
amazonka-elb/test/Test/AWS/Gen/ELB.hs
mpl-2.0
20,223
0
7
3,134
1,663
977
686
289
1
import Distribution.Make main = defaultMain
pharaun/hWeeChat
Setup.hs
apache-2.0
44
1
4
5
14
6
8
2
1
{-# LANGUAGE DeriveGeneric #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Haddock -- Copyright : Isaac Jones 2003-2005 -- License : BSD3 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This module deals ...
gbaz/cabal
Cabal/Distribution/Simple/Haddock.hs
bsd-3-clause
31,950
9
27
9,678
7,074
3,661
3,413
576
7
module Tandoori.Typing.UnifyPred (substMono, resolvePred, satisfies) where import Tandoori.Typing import Tandoori.Typing.Error import Tandoori.Typing.Monad import Tandoori.Typing.MonoEnv import Tandoori.Typing.Substitute import Tandoori.Typing.Unify import ...
themattchan/tandoori
library/Tandoori/Typing/UnifyPred.hs
bsd-3-clause
2,434
0
16
790
764
397
367
46
3
{-# LANGUAGE Haskell2010, CPP, Rank2Types, DeriveDataTypeable, StandaloneDeriving #-} {-# LINE 1 "lib/Data/Time/LocalTime.hs" #-} module Data.Time.LocalTime ( module Data.Time.LocalTime.TimeZone, module Data.Time.LocalTime.TimeOfDay, module Data.Time.LocalTim...
phischu/fragnix
tests/packages/scotty/Data.Time.LocalTime.hs
bsd-3-clause
477
0
5
94
65
47
18
11
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/CreateReplicationGroup.hs
mpl-2.0
19,818
0
10
3,998
2,042
1,249
793
207
1
module Turbinado.Environment.Header ( module Turbinado.Environment.Header, module Network.HTTP.Headers ) where import Data.Maybe import qualified Network.HTTP as HTTP import Network.HTTP.Headers import Turbinado.Controller.Monad import Turbinado.Environment.Types import Turbinado.Environment.Request import Turb...
alsonkemp/turbinado
Turbinado/Environment/Header.hs
bsd-3-clause
892
0
12
208
205
113
92
18
1
module AddOneParameter.FunIn6 where --Default parameters can be added to definition of functions and simple constants. --In this example: add parameter 'y' to 'foo' main :: IO Integer main = do let foo = return [1..4] x <- foo return (sum x)
RefactoringTools/HaRe
test/testdata/AddOneParameter/FunIn6.hs
bsd-3-clause
251
0
11
50
57
29
28
6
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude, MagicHash, ImplicitParams #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Err -- Copyright : (c) The University of Glasgow, 1994-2002 -- License : see libraries...
acowley/ghc
libraries/base/GHC/Err.hs
bsd-3-clause
1,884
0
7
334
160
107
53
15
1
import Foo.Bar import qualified Foo.Baz as Z main = putStrLn "hello" baz = Z.bar + bar
RefactoringTools/HaRe
test/testdata/cabal/foo/src/Main.hs
bsd-3-clause
91
0
6
20
33
19
14
4
1
-- $Id: ExampleScope.hs,v 1.2 2001/04/25 17:38:00 moran Exp $ module ExampleScope where import Syntax import List(find, nub, nubBy, (\\), sortBy, groupBy, union) import Maybe import SyntaxUtil(getTyName) import Scope(Senv(..),patBound,allNames,allTypNames ,instPatToParts,typePatToParts,boundIn...
forste/haReFork
tools/base/SA/ExampleScope.hs
bsd-3-clause
5,641
2
15
1,458
2,060
1,127
933
89
4
-- !!! Defining local type with same name as imported class -- was: Imported class clashes with local type definition module M where import Prelude(Eq,Bool) type Eq = Bool
urbanslug/ghc
testsuite/tests/module/mod31.hs
bsd-3-clause
172
0
5
29
23
16
7
3
0
module LMH_Evaluator where import LMH_ExpType type Env = String -> Exp freevars :: Exp -> [String] freevars (Var y) = [y] freevars (Num _) = [] freevars (Boolean _) = [] freevars (Op(op, exp1, exp2)) = (freevars exp1) ++ (freevars exp2) freevars (Cond(exp0, exp1, exp2)) = (freevars exp0) ++ (freevars exp1) ++ (f...
jaanos/TPJ-2015-16
lmh/LMH_Evaluator.hs
mit
3,123
12
18
806
1,617
836
781
82
8
{-# LANGUAGE OverloadedStrings #-} import Data.Monoid (mappend) import Hakyll import Data.List (sortBy,isSuffixOf) import System.FilePath.Posix (takeBaseName,takeDirectory,(</>)) main :: IO () main = hakyll $ do match "images/*" $ do route idRoute ...
uwaterloo-open-design/uwaterloo-open-design.github.io
site.hs
mit
2,253
0
18
731
536
253
283
59
1
module Main where import Boggle import Control.Monad import Data.List main :: IO () main = do (shuffledTray (4,4)) >>= \tray -> putStrLn $ intercalate "\n" $ [trayString '_' tray, ""] ++ wordsOnTray tray threeLetterWords
jmitchell/boggle
Main.hs
mit
230
0
12
43
87
47
40
8
1
module GridC.Parser where import Control.Applicative ((<$>), (<$), (<*>), (<*), (*>)) import Text.Parsec (parse, option, many, (<|>), eof) import Text.Parsec.Error (ParseError, errorPos) import Text.Parsec.Expr (buildExpressionParser, Operator(..), Assoc(..)) import Text.Parsec.Pos (sourceLine, sourceColumn) import G...
lessandro/gridc
src/GridC/Parser.hs
mit
3,240
0
23
1,014
1,067
553
514
-1
-1
-- | Melvin uses both I/O functions and Text heavily. This module provides -- everything a Melvin module should need. module Melvin.Prelude ( -- base's Prelude module X, st, stP, sb, sbP, LogIO, runStdoutLoggingT, -- retconned Prelude functions (++), show, (<$>), Category, -- IO reading,...
pikajude/melvin
src/Melvin/Prelude.hs
mit
3,228
0
17
1,000
952
554
398
77
3
{-# LANGUAGE OverloadedStrings, QuasiQuotes, TupleSections, RecordWildCards #-} module Vimus.Command ( runCommand , autoComplete , source , tabs -- * exported for testing , MacroName (..) , MacroExpansion (..) , ShellCommand (..) , Volume(..) ) where import Data.Function import Data.List import ...
beni55/vimus
src/Vimus/Command.hs
mit
31,523
0
24
8,274
8,307
4,143
4,164
606
6
module Ethereum.WireSpec(spec) where import Data.Attoparsec.ByteString as A import Ethereum.Wire import Test.Hspec import Test.QuickCheck import Ethereum.Testing spec = do it "should roundtrip message bodies" $ property $ \bytes -> A.parseOnly parseMessage (buildMessage bytes) `shouldBe` Right bytes
bkirwi/ethereum-haskell
test/Ethereum/WireSpec.hs
mit
312
0
12
46
85
48
37
9
1
{-# LANGUAGE Safe #-} module Control.Concurrent.Singular.Event ( Event (), -- * Synchronization sync, -- * Constructors always, -- * Pre/Post Synchronization guard, wrap, -- * Failure withNack, wrapAbort ) where import Control.Concurrent.Singular.Event.Base import Control.Concu...
YellPika/Hannel
src/Control/Concurrent/Singular/Event.hs
mit
546
0
12
135
140
79
61
18
1
{-# LANGUAGE GADTs #-} {-# OPTIONS_GHC -fno-do-lambda-eta-expansion -fno-warn-unused-imports #-} module Text.Regex.Applicative.Types where import Control.Applicative -- The above import is needed for haddock to properly generate links to -- Applicative methods. But it's not actually used in the code, hence -- -fno-war...
phadej/regex-applicative
Text/Regex/Applicative/Types.hs
mit
2,716
0
11
653
391
224
167
28
1
{-# OPTIONS -Wall -Werror #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleInstances #-} module Main (main) where import Prelude import qualified Data.Text.Lazy.IO as T import qualified Data.Text.Lazy as T import qualified Data.Text as TI imp...
great-h/auto_participant
auto_participant.hs
mit
4,641
0
14
1,028
1,503
773
730
119
3