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
{-# OPTIONS -fno-warn-orphans #-} #include "HsConfigure.h" -- #hide module Data.Time.Format.Parse ( -- * UNIX-style parsing #if LANGUAGE_Rank2Types parseTime, readTime, readsTime, #endif ParseTime(..) ) where import Data.Time.Clock.POSIX import Data.Time.Clock import Data.Time.Calendar import Dat...
jwiegley/ghc-release
libraries/time/Data/Time/Format/Parse.hs
gpl-3.0
23,703
0
24
7,273
6,625
3,635
2,990
234
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-ecs/gen/Network/AWS/ECS/StopTask.hs
mpl-2.0
3,512
0
9
847
517
313
204
62
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="ur-PK"> <title>Ruby Scripting</title> <maps> <homeID>top</homeID> <mapref location="ma...
veggiespam/zap-extensions
addOns/jruby/src/main/javahelp/org/zaproxy/zap/extension/jruby/resources/help_ur_PK/helpset_ur_PK.hs
apache-2.0
960
79
66
157
409
207
202
-1
-1
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE OverloadedStrings #-} module Socket (watchFile) where import Control.Concurrent (forkIO, threadDelay) import Control.Exception (SomeException, catch) import qualified Data.ByteString.Char8 as BS import qualified Network.WebSockets as WS import qualified System.FSNotify.Devel as N...
rehno-lindeque/elm-reactor
src/backend/Socket.hs
bsd-3-clause
1,153
0
15
284
346
180
166
33
1
{-# OPTIONS_HADDOCK hide #-} {-# LANGUAGE BangPatterns, OverloadedStrings #-} module SecondTransfer.MainLoop.Logging ( nonce #ifdef SECONDTRANSFER_MONITORING ,logit #endif ) where import System.IO (stderr,openFile) import qualified System.IO as SIO import qualifie...
shimmercat/second-transfer
hs-src/SecondTransfer/MainLoop/Logging.hs
bsd-3-clause
2,466
0
11
586
433
225
208
14
1
{-# LANGUAGE PartialTypeSignatures #-} {-# OPTIONS_GHC -fno-warn-partial-type-signatures #-} module Tut6_Testing where -- This file demonstrates programming testing Feldspar functions with -- QuickCheck. import qualified Prelude import Feldspar.Run import Feldspar.Data.Vector import Test.QuickCheck import Test.Qu...
kmate/raw-feldspar
examples/Tut6_Testing.hs
bsd-3-clause
1,722
0
11
307
240
135
105
19
1
{-# LANGUAGE CPP, DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} #if __GLASGOW_HASKELL__ < 707 {-# LANGUAGE StandaloneDeriving #-} #endif -- Hack approach to support bootstrapping. -- Assume binary <0.8 when MIN_VERSION_binary marco is not available. -- Starting with GHC>=8.0, the compiler will hopefully provid...
trskop/cabal
Cabal/Distribution/Version.hs
bsd-3-clause
32,681
0
17
8,793
6,304
3,397
2,907
455
12
{-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.FramebufferObjects.RenderbufferObjects -- Copyright : (c) Sven Panne, Lars Corbijn 2011-2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne...
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/FramebufferObjects/RenderbufferObjects.hs
bsd-3-clause
2,805
0
10
299
430
246
184
44
1
{-# LANGUAGE BangPatterns, CPP, MultiParamTypeClasses, TypeFamilies, FlexibleContexts #-} #if __GLASGOW_HASKELL__ >= 707 {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} #endif {-# OPTIONS_HADDOCK hide #-} -- | -- Module : Data.Vector.Unboxed.Base -- Copyright : (c) Roman Leshchinskiy 2009-2010 -- Licens...
seckcoder/vector
Data/Vector/Unboxed/Base.hs
bsd-3-clause
14,617
1
9
3,637
3,392
1,794
1,598
-1
-1
{-# LANGUAGE RankNTypes #-} -- This program must be called with GHC's libdir as the single command line -- argument. module Main where -- import Data.Generics import Data.Data import Data.List import System.IO import GHC import BasicTypes import DynFlags import MonadUtils import Outputable import ApiAnnotation import...
fmthoma/ghc
testsuite/tests/ghc-api/annotations/t10312.hs
bsd-3-clause
3,159
1
20
967
862
462
400
64
2
{-# OPTIONS_JHC -fm4 -fno-prelude -fffi #-} module Jhc.Order( module Jhc.Class.Ord, Bool(..), Ordering(..), Eq(..), Ord(..), (&&), (||), not, otherwise ) where import Jhc.Prim.Basics import Jhc.Class.Ord import Jhc.Basics m4_include(Jhc/Order.m4) deriving instance Eq Bool deriving...
hvr/jhc
lib/jhc/Jhc/Order.hs
mit
1,458
0
9
477
742
388
354
-1
-1
-- | -- Module : $Header$ -- Copyright : (c) 2013-2015 Galois, Inc. -- License : BSD3 -- Maintainer : cryptol@galois.com -- Stability : provisional -- Portability : portable {-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} module Main where impor...
ntc2/cryptol
cryptol/Main.hs
bsd-3-clause
6,575
0
19
1,610
1,616
866
750
138
6
{-# LANGUAGE OverloadedStrings #-} module SearchRepos where import qualified Github.Search as Github import qualified Github.Data as Github import Control.Monad (forM,forM_) import Data.Maybe (fromMaybe) import Data.List (intercalate) import System.Environment (getArgs) import Text.Printf (printf) import Data.Time.Clo...
rom1504/github
samples/Search/SearchRepos.hs
bsd-3-clause
1,991
0
18
529
618
328
290
47
3
module Test3 where -- fold against a function with more than 1 argument, both used in the expression f x y = x + y g = f 1 2 h = f 1 1
kmate/HaRe
old/testing/refacFunDef/Test3_TokOut.hs
bsd-3-clause
138
0
5
38
39
21
18
4
1
{-# LANGUAGE TypeFamilies, QuasiQuotes, TemplateHaskell, MultiParamTypeClasses, OverloadedStrings #-} module YesodCoreTest.Csrf (csrfSpec, Widget, resourcesApp) where import Yesod.Core import Test.Hspec import Network.Wai import Network.Wai.Test import Web.Cookie import qualified Data.Map as Map import Data.ByteStri...
s9gf4ult/yesod
yesod-core/test/YesodCoreTest/Csrf.hs
mit
3,536
0
18
810
817
405
412
68
2
{-# LANGUAGE FlexibleContexts #-} {- Copyright (C) 2009 John MacFarlane <jgm@berkeley.edu> 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 lat...
bergmannf/gitit
src/Network/Gitit/Layout.hs
gpl-2.0
7,738
0
34
2,387
1,882
968
914
132
8
{-# LANGUAGE CPP #-} -- ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow 1993-2004 -- -- The native code generator's monad. -- -- ----------------------------------------------------------------------------- module NCGMonad ( NatM_State(..), mkN...
green-haskell/ghc
compiler/nativeGen/NCGMonad.hs
bsd-3-clause
5,312
0
18
1,563
1,624
885
739
144
2
{-# LANGUAGE TemplateHaskell, RankNTypes, TypeOperators, DataKinds, PolyKinds, TypeFamilies, GADTs, TypeInType #-} module RAE_T32a where import Data.Kind data family Sing (k :: *) :: k -> * data TyArr' (a :: *) (b :: *) :: * type TyArr (a :: *) (b :: *) = TyArr' a b -> * type family (a :: TyArr k1 k2) ...
snoyberg/ghc
testsuite/tests/dependent/should_fail/RAE_T32a.hs
bsd-3-clause
1,183
1
13
317
609
350
259
-1
-1
{-# LANGUAGE TemplateHaskell #-} module T12062 where import C $(nothing)
ezyang/ghc
testsuite/tests/driver/T12062/T12062.hs
bsd-3-clause
75
0
6
12
15
9
6
4
0
-- | Module that consolidates persistent and volatile storage for various -- components. -- {-# LANGUAGE Rank2Types #-} module Dfterm3.Dfterm3State ( openStorage , Storage() ) where import Dfterm3.Dfterm3State.Internal.Transactions() import Dfterm3.GameSubscription.Internal.Types import Dfterm3.Admin.Int...
Noeda/dfterm3
src/Dfterm3/Dfterm3State.hs
isc
1,062
0
12
202
208
121
87
30
1
{-# LANGUAGE TemplateHaskell, CPP #-} module Yesod.Routes.TH.RenderRoute ( -- ** RenderRoute mkRenderRouteInstance , mkRenderRouteInstance' , mkRouteCons , mkRenderRouteClauses ) where import Yesod.Routes.TH.Types #if MIN_VERSION_template_haskell(2,11,0) import Language.Haskell.TH (conT) #end...
tolysz/yesod
yesod-core/Yesod/Routes/TH/RenderRoute.hs
mit
6,448
0
21
1,825
2,008
1,030
978
117
9
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} module LambdaCmsOrg.Page.Message ( PageMessage (..) , defaultMessage -- * All languages , englishMessage ) where import Data.Monoid ((<>)) import Data.Text (Text) data PageMessag...
lambdacms/lambdacms.org
lambdacmsorg-page/LambdaCmsOrg/Page/Message.hs
mit
1,750
0
8
463
338
191
147
48
1
module Model.Snippet ( Snippet(..), SnippetFile(..), MetaSnippet(..), snippetContentHash, snippetContentHash', ) where import ClassyPrelude.Yesod import Util.Hash (sha1Text) import Data.Aeson (decode) import Data.Maybe (fromJust) import qualified Data.ByteString.Lazy as L data Snippet = Snippet { ...
vinnymac/glot-www
Model/Snippet.hs
mit
1,725
0
9
345
448
262
186
53
1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Graphics.Urho3D.UI.Slider( Slider , sliderContext , SharedSlider , sliderSetOrientation , sliderSetRange , sliderSetValue , sliderChangeValue , sliderSetRepeatRate , sliderGetOrientation , sliderGetRange , sliderGetValue , sliderGetKnob , sliderGe...
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/UI/Slider.hs
mit
5,429
0
16
964
1,246
691
555
-1
-1
x :: Int x = 3
vyder/learn-haskell
play.hsproj/play.hs
mit
15
0
4
6
11
6
5
2
1
module UI.BreveUI where import qualified BreveLang import qualified BreveEval import qualified Synth import Control.Monad.IO.Class (liftIO) import Data.List ((\\)) import Data.Maybe (fromJust) import Text.Parsec hiding (string) import Text.Parsec.Char hiding (string) import Text.Parsec.Language (haskell) import Text...
Solumin/ScriptNScribe
src/UI/BreveUI.hs
mit
7,024
0
20
1,746
2,140
1,063
1,077
144
5
module Main where import Test.Hspec import qualified Physics.Broadphase.AabbSpec main :: IO () main = hspec $ describe "TemplateSpec" Physics.Broadphase.AabbSpec.spec
ublubu/shapes
shapes/test/Spec.hs
mit
172
0
7
24
44
26
18
6
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TemplateHaskell #-} module Greek.Dictionary.Types ( MorphEntry(..) , Noun(..) , Verb(..) , Preposition(..) , Adverb(..) , Participle(..) , Adjective(..) , Pronoun(..) , NumberGr(..) , Gender(..) , Case(..) , Dia...
boundedvariation/ntbible
Greek/Dictionary/Types.hs
mit
5,531
4
9
1,278
1,886
1,058
828
191
0
----------------------------------------------------------------------------- -- -- Module : PhyQ.Test.Units.SISpec -- Copyright : -- License : MIT -- -- Maintainer : - -- Stability : -- Portability : -- -- | -- module PhyQ.Test.Units.SISpec (spec) where import PhyQ.Test.Common import PhyQ.SI import...
fehu/PhysicalQuantities
test/PhyQ/Test/Units/SISpec.hs
mit
1,305
0
20
355
333
185
148
-1
-1
-- Copyright (c) Microsoft. All rights reserved. -- Licensed under the MIT license. See LICENSE file in the project root for full license information. {-# LANGUAGE OverloadedStrings #-} {-| Copyright : (c) Microsoft License : MIT Maintainer : adamsap@microsoft.com Stability : alpha Portability : portable He...
upsoft/bond
compiler/src/Language/Bond/Util.hs
mit
3,082
0
9
754
671
359
312
47
1
module Type.Subst ( skolemise , subst , subst_ , freeVars , getFreeVars ) where import qualified Data.Map as M import qualified Data.Set as S import Type.Meta import Type.Types skolemise :: Sigma -> TI ([TyVar], Rho) skolemise (TyForall tvs rho) = do sks1 <- mapM newSkolemTyVar tvs (sks2, rho') <- skolemise (subs...
meimisaki/Rin
src/Type/Subst.hs
mit
1,483
0
12
312
696
354
342
41
4
module Widget.Languages ( languagesWidget ) where import Import import qualified Glot.Language as Language languagesWidget :: [Language.Language] -> Widget languagesWidget languages = $(widgetFile "widgets/languages")
prasmussen/glot-www
Widget/Languages.hs
mit
228
0
7
33
51
30
21
-1
-1
{-# LANGUAGE BangPatterns, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} module MachineLearning.Protobufs.Algorithm (Algorithm(..)) where import Prelude ((+), (/), (.)) import qualified Prelude as Prelude' import qualified Data.Typeable as Prelude' import qualified Data.Data as Prelude' import qualif...
ajtulloch/haskell-ml
MachineLearning/Protobufs/Algorithm.hs
mit
2,225
0
11
344
569
308
261
46
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-instanceipv6address.html module Stratosphere.ResourceProperties.EC2InstanceInstanceIpv6Address w...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EC2InstanceInstanceIpv6Address.hs
mit
1,601
0
13
164
174
100
74
23
1
{------------------------------------------------------------------------------- Copyright: The Hatchet Team (see file Contributors) Module: DependAnalysis Description: Compute the dependencies between values. Can be used...
dec9ue/jhc_copygc
src/FrontEnd/DependAnalysis.hs
gpl-2.0
10,624
62
14
3,122
1,657
942
715
115
2
-- (1.5 балла) module Eval ( Eval, runEval , Error, Store , update, getVar ) where import qualified Data.Map as M import Data.List import Control.Monad import Expr type Error = String type Store = M.Map String Value newtype Eval a = Eval { runEval :: Store -> (Maybe a, [Error], Store) } instance Mo...
nkartashov/haskell
hw10/Interpreter/Eval.hs
gpl-2.0
1,046
0
9
188
233
129
104
21
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances #-} import Control.Applicative import Control.Monad.IO.Class import Control.Monad.State import Control.Concurrent.MVar import qualified Data.Text as T import Network.IRC import Network.IRC.Action import Module.CatDetection import Module.Scheme ircNi...
felixsch/ircbot
src/Example.hs
gpl-2.0
3,363
0
16
989
908
480
428
88
2
module QHaskell.Expression.ADTUntypedDebruijn (Exp(..),Fun(..)) where import QHaskell.MyPrelude import QHaskell.Variable.Plain import qualified QHaskell.Type.ADT as TA data Fun = Fun Exp deriving instance Eq Fun deriving instance Show Fun data Exp = ConI Word32 | ConB Bool | ConF Float ...
shayan-najd/QHaskell
QHaskell/Expression/ADTUntypedDebruijn.hs
gpl-3.0
669
0
7
255
187
111
76
-1
-1
import GHC.Exts showUnboxedInt :: Int# -> String showUnboxedInt n = (show $ I# n) ++ "#" main = do print $ showUnboxedInt 1
adarqui/ToyBox
haskell/haskell/ghc-exts/src/ex1.hs
gpl-3.0
127
0
8
26
52
26
26
-1
-1
-- TabCode - A parser for the Tabcode lute tablature language -- -- Copyright (C) 2015-2017 Richard Lewis -- Author: Richard Lewis <richard@rjlewis.me.uk> -- This file is part of TabCode -- TabCode is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as publi...
TransformingMusicology/tabcode-haskell
src/TabCode/Types.hs
gpl-3.0
6,509
0
11
1,288
2,024
1,120
904
194
1
module OpenGL.GLFW.Types ( GLvoid, GLchar, GLenum, GLboolean, GLbitfield, GLbyte, GLshort, GLint, GLsizei, GLubyte, GLushort, GLuint, GLfloat, GLclampf, GLfixed, GLclampx, GLintptr, GLsizeiptr, ) where import Foreign.C.Types type GLvoid = ...
karamellpelle/grid
designer/source/OpenGL/GLFW/Types.hs
gpl-3.0
781
0
5
269
180
120
60
57
0
{-| Defines a 3-layered Vector and relative utilties. -} module Game.TicTacToe3D.Vector3 where import Data.List (unfoldr) import Data.Vector (Vector) import qualified Data.Vector as V {-| Represents a 3-layered structure. -} type Dim3 a b = a (a (a b)) {-| Represents a 3-layered vector. -} type V3 a = D...
ryo0ka/tictactoe3d
src/Game/TicTacToe3D/Vector3.hs
gpl-3.0
1,309
8
12
377
545
300
245
-1
-1
{-# LANGUAGE OverloadedStrings #-} {- hbot - a simple Haskell chat bot for Hipchat Copyright (C) 2014 Louis J. Scoras 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 versio...
ljsc/hbot
tests/Hbot/MsgParser/Test.hs
gpl-3.0
1,899
0
11
432
242
125
117
24
2
module GGen.Geometry.Face ( moveVertex ) where import Data.VectorSpace import GGen.Geometry.Types -- | If the given point v is a vertex of the face, move it to v'. Otherwise -- return the original face. moveVertex :: Face -> P3 -> P3 -> Face moveVertex (Face n (a,b,c)) v v' = let a' = if a =...
bgamari/GGen
GGen/Geometry/Face.hs
gpl-3.0
533
0
10
225
142
82
60
8
4
{-# LANGUAGE OverloadedStrings #-} module Endpoints.ProjectEndpoints where import Data.Acid import Data.Text import Data.Maybe (fromMaybe) import qualified Data.Text.Lazy as LT (fromStrict) import qualified Data.Text.Encoding as TE (encodeUtf8, decodeUtf8) import qualified Data.ByteString.Lazy as LBS (fromStrict, toSt...
DunderRoffe/sjolind.se
src/Endpoints/ProjectEndpoints.hs
gpl-3.0
3,965
0
20
1,074
1,215
597
618
94
3
{-# LANGUAGE DeriveDataTypeable #-} {- | Module : Postmaster.FSM.DataHandler Copyright : (c) 2004-2008 by Peter Simons License : GPL2 Maintainer : simons@cryp.to Stability : provisional Portability : Haskell 2-pre -} module Postmaster.FSM.DataHandler where import Data.Typeable ...
richardfontana/postmaster
Postmaster/FSM/DataHandler.hs
gpl-3.0
720
0
8
146
136
76
60
14
1
module FrSIRSNetwork.Init ( createFrSIRSNetworkRandInfected, createFrSIRSNetworkNumInfected ) where import FrSIRSNetwork.Model import FrSIRSNetwork.Agent import FRP.Yampa import FRP.FrABS import Data.List import System.Random import Control.Monad.Random createFrSIRSNetworkRandInfected :: Double ...
thalerjonathan/phd
coding/libraries/chimera/examples/ABS/SIRExamples/FrSIRSNetwork/Init.hs
gpl-3.0
3,247
0
11
1,032
686
355
331
67
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/List.hs
mpl-2.0
5,122
0
20
1,203
674
392
282
104
1
-- GSoC 2015 - Haskell bindings for OpenCog. {-# LANGUAGE GADTs #-} -- | Simple example on inserting and removing many atoms in a new AtomSpace. import OpenCog.AtomSpace (AtomSpace,insert,get,remove, debug,runOnNewAtomSpace,printAtom,(|>),(\>), A...
virneo/atomspace
examples/haskell/example.hs
agpl-3.0
1,725
0
15
627
481
231
250
40
3
import Graphics.Implicit import Graphics.Implicit.Definitions import Graphics.Implicit.Primitives roundbox:: SymbolicObj3 roundbox = implicit (\(x,y,z) -> x^4 + y^4 + z^4 - 15000) ((-20,-20,-20),(20,20,20)) main = writeSTL 2 "example16.stl" roundbox
krakrjak/ImplicitCAD
Examples/example16.hs
agpl-3.0
252
0
13
29
116
67
49
6
1
-- file: ch13/buildmap.hs import qualified Data.Map as Map -- Functions to generate a Map that represents an association list -- as a map al = [(1, "one"), (2, "two"), (3, "three"), (4, "four")] {- | Create a map representation of 'al' by converting the association - list using Map.fromList -} mapFromAL = Map....
caiorss/Functional-Programming
haskell/rwh/ch13/buildmap.hs
unlicense
651
0
10
144
156
89
67
11
1
import Control.Parallel.Strategies n = 100000000 main = print . sum . withStrategy (parListChunk n r0) $ map (*2) [1..100000000]
Crazycolorz5/Haskell-Code
parTest.hs
unlicense
132
0
9
22
54
29
25
3
1
slice :: [a] -> Int -> Int -> [a] slice (x:xs) _ 1 = [x] slice (x:xs) 1 b = (x:slice xs 1 (b-1)) slice (x:xs) a b = slice xs (a-1) (b-1)
plilja/h99
p18.hs
apache-2.0
138
0
9
34
126
67
59
4
1
{-# LANGUAGE OverloadedStrings #-} module Actions.ManagePlans.Delete.Handler (handler) where import qualified Data.Text.Lazy as TL import Web.Scotty (params, redirect) import App (Action, PGPool, Cookies, runQuery) import Auth (checkLogged) import Persistence.Plan (deletePlan) import Actions.Responses (errorRespon...
DataStewardshipPortal/ds-wizard
DSServer/app/Actions/ManagePlans/Delete/Handler.hs
apache-2.0
793
0
20
154
217
118
99
18
2
module RayCaster.Quaternion where import RayCaster.Utils import RayCaster.Vector data Quaternion = Quaternion Double Vector vectorToQuaternion :: Vector -> Quaternion vectorToQuaternion = Quaternion 0 quaternionToVector :: Quaternion -> Vector quaternionToVector (Quaternion _ vect...
bkach/HaskellRaycaster
src/RayCaster/Quaternion.hs
apache-2.0
1,278
0
11
268
410
221
189
32
1
{- Implement an addressable symbolic memory that can store cells as well as native bytes. -} module Language.Forth.Interpreter.CellMemory (CellMemory, dpOffset, StorageUnit(..), newCellMemory, readCell, writeCell, read8CM...
hth313/hthforth
src/Language/Forth/Interpreter/CellMemory.hs
bsd-2-clause
2,231
0
14
552
712
380
332
40
2
{-# LANGUAGE BangPatterns #-} import Data.Array.Unboxed import Data.Monoid mkIndices rows cols = [ (x, y) | x <- [1..rows], y <- [1..cols]] type Graph = UArray (Int, Int) Int mkGraph :: [[Int]] -> Graph mkGraph words = array ((1,1),(rows, cols)) elems :: Graph where rows = length words cols = length (head w...
wangbj/leet
329.hs
bsd-2-clause
1,751
0
16
520
942
507
435
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : Graphics.Hoodle.Render.Debug -- Copyright : (c) 2011-2013 Ian-Woo Kim -- -- License : BSD3 -- Maintainer : Ian-Woo Kim <ianwookim@gmail.com> -- Stability ...
wavewave/hoodle-render
src/Graphics/Hoodle/Render/Debug.hs
bsd-2-clause
3,819
0
11
762
1,035
542
493
80
2
{-# LANGUAGE OverloadedStrings #-} import Network.AMQP import qualified Data.ByteString.Lazy as BL import Data.Binary.Put import System.Random import Control.Monad (replicateM) import Control.Concurrent as Concurrent randomList :: (Random a) => Int -> a -> a -> IO([a]) randomList n min max = replicateM n $ randomRIO...
PlausibleReality/the-subtle-machine
app/Main.hs
bsd-3-clause
3,966
0
12
767
1,498
768
730
94
1
-- Copyright (c) 2011, Colin Hill -- -- Loosely based on implementation of libnoise by Jason Bevins Copyright (C) 2003, 2004 -- http://libnoise.sourceforge.net -- | Contains 'Noise' class as well as a general coherent noise generating function which -- the specific noise implementations are based on. module Numeric.No...
colinhect/hsnoise
src/Numeric/Noise.hs
bsd-3-clause
14,558
0
15
3,554
5,086
3,098
1,988
328
4
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 The Desugarer: turning HsSyn into Core. -} {-# LANGUAGE CPP #-} module Desugar ( -- * Desugaring operations deSugar, deSugarExpr, -- * Dependency/fingerprinting code (used by MkIface) mkUsageInfo, mkUsedN...
vikraman/ghc
compiler/deSugar/Desugar.hs
bsd-3-clause
31,524
1
20
10,726
4,835
2,568
2,267
412
5
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} module User.RequireAuth where import Servant import Servant.Server.Internal (succeedWith, RouteResult) import Network.Wai ...
hectorhon/autotrace2
app/User/RequireAuth.hs
bsd-3-clause
3,604
0
12
685
1,219
626
593
-1
-1
-- | This module is for internal functions used in more than one place module Language.KansasLava.Internal where import Data.Maybe as Maybe import Language.KansasLava.Stream as Stream import Prelude hiding (tail, lookup) takeMaybe :: Maybe Int -> [a] -> [a] takeMaybe = maybe id take -- surely this exists in the pr...
andygill/kansas-lava
Language/KansasLava/Internal.hs
bsd-3-clause
1,996
2
10
461
783
410
373
45
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} module Test.Mismi.Autoscaling.Core.Data where import Mismi.Autoscaling.Core.Data import P import Test.Mismi.Autoscaling.Core.Arbitrary ...
ambiata/mismi
mismi-autoscaling-core/test/Test/Mismi/Autoscaling/Core/Data.hs
bsd-3-clause
543
0
8
99
95
55
40
15
1
-- Redirect to the URL given by the url parameter. import Network.CGI (MonadCGI, CGIResult, runCGI, getInput, output, redirect) redirectToURL :: MonadCGI m => m CGIResult redirectToURL = getInput "url" >>= maybe (output "url parameter not set!\n") redirect main = runCGI redirectToURL
andersk/haskell-cgi
examples/redirect.hs
bsd-3-clause
296
0
8
52
73
39
34
6
1
module Lib ( runVm ) where import qualified Data.Binary.Get as G import Data.Bits import qualified Data.ByteString.Lazy as BS import Data.Char (chr, ord) import Data.Serialize import qualified Data.Vector.Unboxed as V import Debug.Trace import System.I...
shaunplee/synacor-challenge-hs
src/Lib.hs
bsd-3-clause
9,998
0
20
4,164
4,380
2,225
2,155
255
23
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} module Fragment.Variant.Ast ( module X ) where import Fragment.Variant.Ast.Type as X import Fragment.Variant.Ast.Error as X import Fragment.Variant.Ast.Pattern ...
dalaing/type-systems
src/Fragment/Variant/Ast.hs
bsd-3-clause
363
0
4
59
50
38
12
6
0
{-# LANGUAGe BangPatterns #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGe TemplateHaskell #-} module Mandelbrot.NikolaV2 (mandelbrotImageGenerator) where import Control.Monad (replicateM_) import Data.IORef import Data.Int import Data.Word import Data.Array.Nikola.Backend.CUDA.TH import Data.Array.Repa import ...
mainland/nikola
examples/mandelbrot/Mandelbrot/NikolaV2.hs
bsd-3-clause
3,903
0
14
1,189
1,099
569
530
108
2
-- | Overall duration of fragmented media. module Data.ByteString.IsoBaseFileFormat.Boxes.MovieExtendsHeader where import Data.ByteString.IsoBaseFileFormat.Box import Data.ByteString.IsoBaseFileFormat.ReExports import Data.ByteString.IsoBaseFileFormat.Util.BoxContent import Data.ByteString.IsoBaseFileFormat.Util.BoxFi...
sheyll/isobmff-builder
src/Data/ByteString/IsoBaseFileFormat/Boxes/MovieExtendsHeader.hs
bsd-3-clause
1,013
0
11
110
183
110
73
-1
-1
module ExThreeSpec (main, spec) where import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = do describe "Find the Kth element of a list. First element is number 1" $ do it "should find the Kth element as a Maybe" $ do elementAt [1,2,3] 2 `shouldBe` Just 2 it "should return Nothing for...
abinr/nine
test/ExThreeSpec.hs
bsd-3-clause
824
0
16
206
311
156
155
23
1
{-# LANGUAGE CPP, ConstraintKinds, DeriveDataTypeable, FlexibleContexts, MultiWayIf, NamedFieldPuns, OverloadedStrings, RankNTypes, RecordWildCards, ScopedTypeVariables, TemplateHaskell, TupleSections #-} -- | Run commands in Docker containers module Stack.Docker (cleanup ,CleanupOpts(..)...
mathhun/stack
src/Stack/Docker.hs
bsd-3-clause
42,102
0
28
13,556
9,036
4,653
4,383
822
21
-- 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 GADTs...
rfranek/duckling
Duckling/Numeral/HR/Rules.hs
bsd-3-clause
10,850
0
19
2,924
3,142
1,664
1,478
308
37
{-# LANGUAGE NamedFieldPuns #-} {- ** ********************************************************************* * * * (c) Kathleen Fisher <kathleen.fisher@gmail.com> * * John Launchbury <john.launchbury@gmail.com> ...
athleens/pads-haskell
Language/Pads/PadsParser.hs
bsd-3-clause
13,165
41
20
3,606
4,607
2,491
2,116
242
4
-------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ARB.DrawBuffersBlend -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- -------------...
haskell-opengl/OpenGLRaw
src/Graphics/GL/ARB/DrawBuffersBlend.hs
bsd-3-clause
706
0
4
95
53
40
13
9
0
module Data.Workshop.HashMap ( HashMap(..) , empty , size , isEmpty , keys , values , contains , put , get , delete , clear , dump ) where import qualified Data.Vector as V import qualified Data.Hashable as H ty...
wiggly/workshop
src/Data/Workshop/HashMap.hs
bsd-3-clause
1,675
0
10
453
547
293
254
47
1
module Data.MRF.Generic.ParamSet ( ParamCore (..) , ParamSet (..) , mkParamSet ) where import qualified Data.Set as Set import SGD import Data.MRF.Generic.Feature -- | TODO: c, x type variables superfluous. class (Feature f c x, ParamCore p) => ParamSet p f c x | p -> f where -- | Make parameter set from a list...
kawu/mrf
Data/MRF/Generic/ParamSet.hs
bsd-3-clause
964
0
12
256
232
133
99
-1
-1
module Data.Deciparsec.Internal where import Data.Monoid import Data.Deciparsec.Internal.Types import Data.Deciparsec.TokenSeq (TokenSeq) import qualified Data.Deciparsec.TokenSeq as TS ensure :: (Monad m, TokenSeq s t) => Int -> ParserT s u m s ensure !n = ParserT $ \s0 i0 a0 m0 kf ks -> if TS.length (un...
d3tucker/deciparsec
src/Data/Deciparsec/Internal.hs
bsd-3-clause
3,903
10
20
1,171
1,618
836
782
-1
-1
module Graphics.Volume.MarchingCubesTables ( mcEdges , mcTriangles ) where import qualified Data.Vector as V import Linear -- | Intersecting cube edges for each cube configuration mcEdges :: V.Vector Int mcEdges = V.fromList [ 0x000, 0x109, 0x203, 0x30a, 0x406, 0x50f, 0x605, 0x70c, 0x80c, 0x905, 0xa0f, 0xb06...
fatho/volume
src/Graphics/Volume/MarchingCubesTables.hs
bsd-3-clause
11,546
0
8
3,875
9,814
5,169
4,645
281
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module Confluence.Sync.SyncTool ( sync , ConfluenceConfig(..) , TitleCaseConversion(..) , confluenceXmlApi ) where import Deb...
laurencer/confluence-sync
src/Confluence/Sync/SyncTool.hs
bsd-3-clause
25,964
0
29
5,587
6,091
3,211
2,880
322
6
module Categorizer.Util.IO ( readFileSafe , safeGetEnv , safeReadEnv ) where import Control.Monad(liftM) import Categorizer.Util.Maybe(readSafe) import System.Environment(getEnv) import qualified Control.Exception as E(catch, IOException) readFileSafe :: FilePath -> IO (Maybe String) readFileSafe path =...
ameingast/categorizer
src/Categorizer/Util/IO.hs
bsd-3-clause
858
0
12
200
310
162
148
22
2
{- | - NFA type and related utilities. - - This can be thought of as an upgrade to the Match type, in that it - not only compares values to some possible values, but has sequences, and - branches (splits) of comparisons. - - This can be used for, most notably, regular expressions. -} module Data.NFA (NFA(..), ...
awagner83/haskell-regex-nfa
src/Data/NFA.hs
bsd-3-clause
1,217
0
11
354
397
208
189
19
2
-- 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. {-# LANGUAGE GADTs #-} module Duckling.Rules.SW ( defaultRules , langRules , localeRules ) where impor...
facebookincubator/duckling
Duckling/Rules/SW.hs
bsd-3-clause
1,244
0
9
196
408
216
192
31
1
module Adventofcode where import Control.Arrow import Data.Foldable advent01 :: Integral a => String -> a advent01 = sum . map matchParens advent02 :: Integral a => String -> Maybe a advent02 = maybeResult . dropWhile ((>= 0) . snd) . zip [1..] . accum 0 . map matchParens where accum :: Integral a => a -> [a] ...
nadirs/adventofcode
src/Adventofcode.hs
bsd-3-clause
693
0
12
152
335
178
157
17
2
module Paths_immigrate_haskell ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception import Data.Version (Version(..)) import System.Environment (getEnv) import Prelude catchIO :: IO a -> (Exception.IOException ...
maxgurewitz/immigrate-haskell
dist/dist-sandbox-fd22d9f3/build/autogen/Paths_immigrate_haskell.hs
mit
1,551
0
10
177
362
206
156
28
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/DeleteSnapshotSchedule.hs
mpl-2.0
4,930
0
13
1,008
588
354
234
78
1
{-# LANGUAGE TupleSections #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.WindowBringer -- Copyright : Devin Mullins <me@twifkak.com> -- License : BSD-style (see LICENSE) -- -- Maintainer : Devin Mullins <me@twifkak.com> -- Stability :...
f1u77y/xmonad-contrib
XMonad/Actions/WindowBringer.hs
bsd-3-clause
6,440
0
11
1,410
1,016
576
440
63
1
---------------------------------------------------------------------------- -- -- Pretty-printing of Cmm as (a superset of) C-- -- -- (c) The University of Glasgow 2004-2006 -- ----------------------------------------------------------------------------- -- -- This is where we walk over CmmNode emitting an external re...
mcmaniac/ghc
compiler/cmm/PprCmm.hs
bsd-3-clause
10,613
0
23
3,131
2,580
1,316
1,264
174
24
{-# LANGUAGE CPP, MagicHash #-} -- | -- Module : Data.Primitive.MachDeps -- Copyright : (c) Roman Leshchinskiy 2009-2012 -- License : BSD-style -- -- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au> -- Portability : non-portable -- -- Machine-dependent constants -- module Data.Primitive.MachDeps where ...
dolio/primitive
Data/Primitive/MachDeps.hs
bsd-3-clause
2,093
0
4
278
266
192
74
69
1
module Meetup (Weekday(..), Schedule(..), meetupDay) where import Data.Time.Calendar (Day, addDays, fromGregorian, addGregorianMonthsClip) import Data.Time.Calendar.WeekDate (toWeekDate) data Weekday = Monday | Tuesday | Wednesday | Thursday | Friday | S...
pminten/xhaskell
meetup/example.hs
mit
1,385
0
10
436
402
227
175
40
3
module PackageTests.BuildDeps.TargetSpecificDeps2.Check where import Test.HUnit import PackageTests.PackageTester import System.FilePath import qualified Control.Exception as E suite :: FilePath -> Test suite ghcPath = TestCase $ do let spec = PackageSpec ("PackageTests" </> "BuildDeps" </> "TargetSpecificDeps2"...
jwiegley/ghc-release
libraries/Cabal/cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps2/Check.hs
gpl-3.0
586
0
14
112
153
80
73
14
1
{-# LANGUAGE GADTs, BangPatterns #-} module CmmCommonBlockElim ( elimCommonBlocks ) where import BlockId import Cmm import CmmUtils import CmmSwitch (eqSwitchTargetWith) import CmmContFlowOpt -- import PprCmm () import Prelude hiding (iterate, succ, unzip, zip) import Hoopl hiding (ChangeFlag) import Data.Bits i...
snoyberg/ghc
compiler/cmm/CmmCommonBlockElim.hs
bsd-3-clause
11,972
0
15
2,939
3,441
1,791
1,650
182
25
{-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE RankN...
jtojnar/haste-compiler
libraries/ghc-7.8/base/GHC/TypeLits.hs
bsd-3-clause
6,857
5
12
1,466
1,694
960
734
-1
-1
-- (c) The University of Glasgow 2006 -- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -- -- Storage manager representation of closures {-# LANGUAGE CPP,GeneralizedNewtypeDeriving #-} module SMRep ( -- * Words and bytes WordOff, ByteOff, wordsToBytes, bytesToWordsRoundUp, r...
wxwxwwxxx/ghc
compiler/cmm/SMRep.hs
bsd-3-clause
19,439
0
14
4,644
3,965
2,075
1,890
322
27
module C3 where import D3 instance Same Double where isSame a b = a == b isNotSame a b = a /= b myFringe :: (Tree a) -> [a] myFringe (Leaf x) = [x] myFringe (Branch left right) = myFringe left
kmate/HaRe
old/testing/renaming/C3_AstOut.hs
bsd-3-clause
212
0
7
60
97
51
46
8
1
{-# LANGUAGE TypeFamilies #-} module T4200 where class C a where type In a :: * op :: In a -> Int -- Should be ok; no -XUndecidableInstances required instance (In c ~ Int) => C [c] where type In [c] = In c op x = 3
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/indexed-types/should_compile/T4200.hs
bsd-3-clause
239
0
8
72
82
45
37
8
0
{-# LANGUAGE PartialTypeSignatures, ScopedTypeVariables #-} module PatternSig where bar :: Bool -> Bool bar (x :: _) = True
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/partial-sigs/should_compile/PatternSig.hs
bsd-3-clause
125
0
7
20
29
17
12
4
1
module Main (main) where import Control.Monad import System.IO import System.Random main :: IO () main = do hSetBuffering stdout NoBuffering let q = fold $ zip [1..] (take 200 [500.0,400.0..]) print q putStrLn "Before atMost" let (xs,q') = atMost 0.5 q -- this causes seqfault with -O2 print x...
siddhanathan/ghc
testsuite/tests/codeGen/should_run/T7953.hs
bsd-3-clause
1,594
0
14
508
790
407
383
53
4
module Plivo ( callAPI, APIError(..), InclusiveOrdering(..), -- * Enpoints CreateOutboundCall(..), createOutboundCall, GetCompletedCalls(..), getCompletedCalls ) where import Prelude hiding (Ordering(..)) import Data.Maybe (catMaybes) import Data.List (intercalate) import Data.String (IsString, fromString) imp...
singpolyma/plivo-haskell
Plivo.hs
isc
8,281
392
12
1,367
2,733
1,516
1,217
182
7
{-# LANGUAGE OverloadedStrings #-} module Web.Larceny.Types ( Blank(..) , Fill(..) , Attributes , Name(..) , Substitutions , subs , fallbackSub ...
positiondev/larceny
src/Web/Larceny/Types.hs
isc
6,877
0
11
1,962
1,202
691
511
87
1
-- Finally tagless interpreter -- https://www.codewars.com/kata/5424e3bc430ca2e577000048 {-# LANGUAGE RankNTypes #-} module Tagless where import Data.Function (fix) import Prelude hiding (and, or) class Language r where here :: r (a, h) a before :: r h a -> r (any, h) a lambda :: r (a, h) b -> r h (a -> b) ...
gafiatulin/codewars
src/2 kyu/Tagless.hs
mit
1,663
0
10
590
897
460
437
48
1