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 Gittins.Config ( Config(..) , RuntimeConfig(..) , GroupId , Repository(..) , loadConfig , saveConfig , mkRepoName , modifyRepository , addToGroups ) where import Control.Applicative ((<|>), (<$>)) import Data.Foldable (foldMap) import Data.HashMap.Strict (...
bmjames/gittins
src/Gittins/Config.hs
bsd-3-clause
3,366
0
17
820
1,082
586
496
76
3
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ATI.VertexArrayObject -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portab...
haskell-opengl/OpenGLRaw
src/Graphics/GL/ATI/VertexArrayObject.hs
bsd-3-clause
1,249
0
5
162
125
86
39
27
0
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} module Hamath.Map where import Data.Aeson import Linear.Affine ( Point(..) ) type Rect = ( Float, Float, Float, Float ) data Obstacle = Obstacle !Float !Float !Float !Float deriving ( Show, Eq ) class Collisionable a where toRect :: a -> Rect ...
triplepointfive/hamath
src/Hamath/Map.hs
bsd-3-clause
1,604
0
13
461
605
331
274
66
1
{-# LANGUAGE Rank2Types #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric.AD.Types -- Copyright : (c) Edward Kmett 2010-12 -- License : BSD3 -- Maintainer : ekmett@gmail.com -- Stability : experimental -- Portability : GHC only -- ------------...
yairchu/ad
src/Numeric/AD/Types.hs
bsd-3-clause
1,584
0
12
339
370
210
160
26
1
{- mkindex :: Making index.html for the current directory. -} import Control.Applicative import Data.Time import Data.Time.Clock.POSIX import Locale import System.Directory import System.Posix.Files import Text.Printf import Data.Bits indexFile :: String indexFile = "index.html" main :: IO () main = do contents...
mwotton/sofadb
mkindex.hs
bsd-3-clause
2,458
0
14
518
746
389
357
57
3
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} -- ------------------------------------------------------------ {- | Module : Yuuko.Control.Arrow.ArrowState Copyright : Copyright (C) 2005 Uwe Schmidt License : MIT Maintainer : Uwe Schmidt (uwe\@fh-wedel.de) Stability : experime...
nfjinjing/yuuko
src/Yuuko/Control/Arrow/ArrowState.hs
bsd-3-clause
2,264
25
10
577
250
153
97
15
0
-- -- @file -- -- @brief Regex generation for enums -- -- @copyright BSD License (see LICENSE.md or https://www.libelektra.org) -- {-# LANGUAGE TupleSections #-} module Elektra.EnumDispatcher (enumDispatch) where import Elektra.Key import Elektra.KeySet import Elektra.Dispatch import Elektra.Range i...
e1528532/libelektra
src/plugins/regexdispatcher/Elektra/EnumDispatcher.hs
bsd-3-clause
1,101
0
16
259
300
156
144
24
2
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Program.Db -- Copyright : Isaac Jones 2006, Duncan Coutts 2007-2009 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This provides a 'ProgramDb' type which holds confi...
trskop/cabal
Cabal/Distribution/Simple/Program/Db.hs
bsd-3-clause
17,709
0
19
4,146
2,921
1,606
1,315
257
4
{-# LANGUAGE CPP, BangPatterns, MagicHash, UnboxedTuples #-} {-# OPTIONS_GHC -O #-} -- We always optimise this, otherwise performance of a non-optimised -- compiler is severely affected -- -- (c) The University of Glasgow 2002-2006 -- -- Unboxed mutable Ints module ETA.Utils.FastMutInt( FastMutInt, newFastMutI...
pparkkin/eta
compiler/ETA/Utils/FastMutInt.hs
bsd-3-clause
1,641
0
11
348
514
278
236
37
1
{-# LANGUAGE DataKinds,EmptyDataDecls #-} module HLearn.Metrics.Mahalanobis.Lego where import Control.DeepSeq import Data.List import Data.Proxy import qualified Data.Semigroup as SG import qualified Data.Foldable as F import qualified Data.Vector.Generic as VG import Foreign.Storable import Numeric.LinearAlgebr...
iamkingmaker/HLearn
src/HLearn/Metrics/Mahalanobis/Lego.hs
bsd-3-clause
4,383
0
15
1,086
1,509
814
695
-1
-1
{-# LANGUAGE DeriveDataTypeable, DisambiguateRecordFields, TemplateHaskell #-} module Unify.Config where import Unify.Instance import Prolog.Data import Autolib.ToDoc import Autolib.Reader import Autolib.FiniteMap import Autolib.Set import qualified Autolib.TES.Binu as B import Data.Typeable -- | maps Identifier t...
Erdwolf/autotool-bonn
src/Unify/Config.hs
gpl-2.0
967
0
9
236
211
127
84
29
1
infixr 9 . infixr 5 ++ infixl 4 <$ infix 2 `foo` infixl 1 >>, >>= infixr 1 =<< infixr 0 $, $! infixl 4 <*>, <*, *>, <**>
itchyny/vim-haskell-indent
test/infix/infix.out.hs
mit
132
0
4
40
58
36
22
8
0
{-# LANGUAGE OverloadedStrings #-} module Stack.Options.LogLevelParser where import Control.Monad.Logger (LogLevel (..)) import Data.Monoid.Extra import qualified Data.Text as T import Options.Applicative import Stack.Options.Utils -- | Par...
AndreasPK/stack
src/Stack/Options/LogLevelParser.hs
bsd-3-clause
1,546
0
16
532
359
182
177
39
9
yes = not (a == b)
bitemyapp/apply-refact
tests/examples/Default9.hs
bsd-3-clause
18
0
7
5
16
8
8
1
1
{-# LANGUAGE CPP, ScopedTypeVariables, BangPatterns #-} -- -- Must have rules off, otherwise the fusion rules will replace the rhs -- with the lhs, and we only end up testing lhs == lhs -- -- -- -fhpc interferes with rewrite rules firing. -- import Foreign.Storable import Foreign.ForeignPtr import Foreign.Marshal.All...
markflorisson/hpack
testrepo/bytestring-0.10.4.1/tests/Properties.hs
bsd-3-clause
111,015
4
22
30,767
33,390
17,559
15,831
1,764
3
{-# LANGUAGE CPP #-} #ifdef __GLASGOW_HASKELL__ {-# LANGUAGE Safe #-} #endif ----------------------------------------------------------------------------- -- | -- Module : System.Posix -- Copyright : (c) The University of Glasgow 2002 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Mai...
DavidAlphaFox/ghc
libraries/unix/System/Posix.hs
bsd-3-clause
4,079
0
5
512
245
176
69
34
0
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="da-DK"> <title>Passive Scan Rules | ZAP Extension</title> <maps> <homeID>top</homeID> <...
kingthorin/zap-extensions
addOns/pscanrules/src/main/javahelp/org/zaproxy/zap/extension/pscanrules/resources/help_da_DK/helpset_da_DK.hs
apache-2.0
977
78
66
160
418
211
207
-1
-1
{-# LANGUAGE FlexibleInstances, GeneralizedNewtypeDeriving #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Main (main) where import Data.Hashable (Hashable(hashWithSalt)) import Test.ChasingBottoms.IsBottom import Test.Framework (Test, defaultMain, testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty...
pacak/cuddly-bassoon
unordered-containers-0.2.8.0/tests/Strictness.hs
bsd-3-clause
4,716
0
12
879
1,299
686
613
84
2
module Test where import RIO {-@ LIQUID "--no-termination" @-} {-@ measure counter1 :: World -> Int @-} {-@ measure counter2 :: World -> Int @-} {-@ incr :: RIO <{\x -> true}, {\w1 x w2 -> x = 5}> Int @-} incr :: RIO Int incr = undefined {-@ incr' :: RIO <{\x -> true}, {\w1 x w2 -> x = 5}> Int @-} incr' :: RIO I...
mightymoose/liquidhaskell
benchmarks/icfp15/pos/TestM.hs
bsd-3-clause
487
0
6
121
60
36
24
8
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP , MagicHash , UnboxedTuples , ScopedTypeVariables , RankNTypes #-} {-# OPTIONS_GHC -Wno-deprecations #-} -- kludge for the Control.Concurrent.QSem, Control.Concurrent.QSemN -- and Control.Concurrent.SampleVar imports. ---------...
shlevy/ghc
libraries/base/Control/Concurrent.hs
bsd-3-clause
24,947
0
21
6,071
2,009
1,061
948
133
3
module MyForeignLib.AnotherVal where anotherVal = 189
themoritz/cabal
cabal-testsuite/PackageTests/ForeignLibs/src/MyForeignLib/AnotherVal.hs
bsd-3-clause
55
0
4
7
11
7
4
2
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE MonoLocalBinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} module T13555 where import Data.Functor.Identity (Identity(..)) data T a type Polynomial a = T a newtype GF fp d = GF (Polynomia...
ezyang/ghc
testsuite/tests/polykinds/T13555.hs
bsd-3-clause
717
0
12
142
230
133
97
-1
-1
module T11246 where import GHC.Exts type Key a = Any
ezyang/ghc
testsuite/tests/typecheck/should_compile/T11246.hs
bsd-3-clause
55
0
4
12
16
11
5
3
0
-- | Module for arbitrary transformations of plot items module Iris.Transformation ( Transformation , identity , translation , scale , apply , aspectTrans , rotateX , rotateZ ) where import qualified Graphics.Rendering.OpenGL as GL import qualified Linear...
jdreaver/iris
src/Iris/Transformation.hs
mit
1,958
0
10
470
646
341
305
38
1
{-# LANGUAGE TemplateHaskell #-} module Main where import Prelude hiding (catch,(.)) import System.IO import System.Environment import System.Console.GetOpt import Data.Char import qualified Data.Map as M import Data.List import Data.Lens.Common import Data.Lens.Template import Data.Default import Control.Category im...
danidiaz/concsplit
src/Main.hs
mit
4,259
0
21
1,389
1,225
627
598
96
2
{-# LANGUAGE BangPatterns, PatternGuards, Trustworthy, CPP #-} {-| This module implements a decision procedure for quantifier-free linear arithmetic. The algorithm is based on the following paper: An Online Proof-Producing Decision Procedure for Mixed-Integer Linear Arithmetic by Sergey Berezin, Vijay Ganesh,...
yav/presburger
src/Data/Integer/SAT.hs
mit
29,654
0
20
10,227
10,547
5,421
5,126
619
11
import Data.Array import Data.List (group) import Debug.Trace import qualified Data.Set as Set abundantNumbers = filter isAbundant [12..nmax+5] sum2AbundantNumbers = set where set = Set.fromList [ x + y | x <- abundantNumbers, y <- abundantNumbers, x + y <= nmax ] complement = Set.difference naturals...
arekfu/project_euler
p0023/p0023.hs
mit
434
0
11
85
143
77
66
10
1
-- This program calculates the TVBW representation of the braid -- generator in terms of the structural morphisms of a spherical -- category. To do this, it follows Table 3 of the Finiteness for DW -- MCG reps paper. -- -- We encode a stringnet as a marked CW-complex. -- For now, all duals are right duals. All composi...
PaulGustafson/stringnet
Stringnet.hs
mit
28,519
0
25
10,152
8,056
4,206
3,850
526
9
-- Copyright (c) Microsoft. All rights reserved. -- Licensed under the MIT license. See LICENSE file in the project root for full license information. {-# LANGUAGE QuasiQuotes, OverloadedStrings #-} module Bond.Template.Cpp.Apply_cpp (apply_cpp) where import Data.Text.Lazy (Text) import Text.Shakespeare.Text import ...
innovimax/bond
compiler/Bond/Template/Cpp/Apply_cpp.hs
mit
1,000
0
10
148
155
103
52
13
1
module Main where import Options.Applicative import Data.Maybe import Control.Monad import Numeric import Mortgage data Config = Config { cTotalValue :: Int , cDownPct :: Double , cAPR :: Double , cYears :: Int ,...
wangbj/MortageCalc
app/Main.hs
mit
2,358
0
17
582
732
371
361
42
3
module Handler.Sitemap ( getRobotsR , getSitemapR ) where import Import import Yesod.Sitemap import qualified Data.Conduit.List as CL getRobotsR :: Handler RepPlain getRobotsR = do app <- getYesod txts <- if appPrivate app then return [ "User-agent: *" ...
fpco/schoolofhaskell.com
src/Handler/Sitemap.hs
mit
1,524
0
21
558
439
215
224
-1
-1
import Prelude hiding ((+),(*),(==)) import qualified Prelude as P default (Int) data Expr = Null | Const Int | Var [Char] | Add Expr Expr | Mult Expr Expr class Mathable a where (+) :: (Mathable b) => a -> b -> Expr (*) :: (Mathable b) => a -> b -> Expr toPoly :: a-> Expr (==) :: (Mathable b) => a-> b-> ...
mirhagk/assignments
2S03/bonus/dsl/bare.hs
mit
1,027
10
10
242
533
278
255
34
1
----------------------------------------------------------------------------- -- | -- Module : Reader.Parser.Component -- License : MIT (see the LICENSE file) -- Maintainer : Felix Klein (klein@react.uni-saarland.de) -- -- Parser for the MAIN section. -- ----------------------------------------------------...
reactive-systems/syfco
src/lib/Reader/Parser/Component.hs
mit
5,317
0
23
1,555
1,338
749
589
137
1
-- | Translation of Agda internal @ClauseBody@ to the target logic. {-# LANGUAGE CPP #-} {-# LANGUAGE UnicodeSyntax #-} module Apia.Translation.ClauseBody ( cBodyToFormula , cBodyToTerm , dropProofTermOnCBody ) where ------------------------------------------------------------------------------ i...
asr/apia
old/Translation/ClauseBody.hs
mit
2,636
0
10
515
483
274
209
41
2
----------------------------------------------------------------------------- -- | -- Module : Control.AFSM.Event -- Copyright : (c) Hanzhong Xu, Meng Meng 2016, -- License : MIT License -- -- Maintainer : hanzh.xu@gmail.com -- Stability : experimental -- Portability : portable ------------...
PseudoPower/AFSM
src/Control/AFSM/Event.hs
mit
1,837
0
10
436
550
298
252
38
4
{-# LANGUAGE RecordWildCards, DeriveDataTypeable #-} module Main where import qualified CPython as Py import qualified CPython.Types.Module as Py import qualified CPython.Protocols.Object as Py import qualified CPython.Types.Capsule as PyCapsule import qualified CPython.Types.Dictionary as PyDict import qualified CPyt...
zsedem/haskell-python
app/Main.hs
mit
2,669
0
17
452
683
347
336
54
2
module Language.Rebeca.Fold.Erlang.Refinement where import Control.Monad.Reader import Control.Monad.State import Data.Either (either) import Data.Maybe (fromMaybe) import Language.Fold import Language.Erlang.Builder import Language.Erlang.Syntax import qualified Language.Rebeca.Absrebeca as R import Language.Rebeca....
arnihermann/timedreb2erl
src/Language/Rebeca/Fold/Erlang/Refinement.hs
mit
14,072
0
28
3,915
5,510
2,860
2,650
264
10
module CellularAutomata2D ( -- * Rules Rule(..), -- * Torus shaped space Torus(..), getCell, setCell, setCells, remapIndex, getSpaceSize, initSpace, initSpaceIO, update, -- * Space Utils forSpace, -- * Initializing Spaces randomSpace, initSpaceWithCells, initBoolSpaceWith...
orion-42/cellular-automata-2d
CellularAutomata2D.hs
mit
7,748
0
14
1,499
2,106
1,183
923
-1
-1
module TileRider.DrawTile where import qualified Graphics.UI.SDL.Types as SDL.T import Control.Monad import Control.Applicative import Data.Maybe import Foreign.C.Types import SDL.Geometry import SDL.Draw import Directional import Geometry import TileRider.Drag import TileRider.SlidingGrid import TileRider.SmoothSlidi...
ublubu/tile-rider
src/TileRider/DrawTile.hs
mit
3,662
0
17
843
1,262
646
616
76
4
module Rebase.GHC.IO.Encoding.Iconv ( module GHC.IO.Encoding.Iconv ) where import GHC.IO.Encoding.Iconv
nikita-volkov/rebase
library/Rebase/GHC/IO/Encoding/Iconv.hs
mit
107
0
5
12
26
19
7
4
0
{-| Module : WekaData Description : Works with weka *.arff data and files. License : MIT Stability : development Works with weka *.arff data and files. -} module WekaData ( -- * Raw Data RawWekaData(..) -- * Attributes , WekaDataAttribute(WekaAttrNum, WekaAttrNom) , wekaAttributeName , wekaAttribute2...
fehu/min-dat--weka-data
src/WekaData.hs
mit
9,269
0
13
2,233
2,463
1,300
1,163
-1
-1
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} module Eurocode5.Fasteners.Bolts where import qualified Eurocode5.Wood.WoodCommon as WC data Bolt = Bolt { diam :: Double -- ^ Diameter of bolt [mm] } deriving Show type Degrees = Double type Radians = Double toRadians :: Degrees -...
baalbek/eurocode5
src/Eurocode5/Fasteners/Bolts.hs
gpl-2.0
1,513
0
11
464
442
241
201
37
1
--just need to compare the left most and right most path main = do leftT <- readFile "p067_triangle.txt" let left = reverse $ mapReadInt $ map words . lines $ leftT putStrLn $ show $ bestPath left bestPath triangle = head $ foldl collapse (head triangle) (tail triangle) collapse lower higher = zipWith (+...
NaevaTheCat/Project-Euler-Haskell
P67.hs
gpl-2.0
441
0
13
104
150
72
78
9
1
{- | Module : $Header$ Copyright : (c) Dominik Luecke, Felix Gabriel Mance License : GPLv2 or higher, see LICENSE.txt Maintainer : f.mance@jacobs-university.de Stability : provisional Portability : portable Complexity analysis of OWL2 -} module OWL2.Sublogic where import OWL2.AS import OWL2.MS ...
nevrenato/Hets_Fork
OWL2/Sublogic.hs
gpl-2.0
8,415
0
17
1,896
2,537
1,296
1,241
189
13
{-# LANGUAGE OverloadedStrings #-} import Data.Aeson import Data.Text import Control.Applicative ((<$>)) import Network.HTTP.Types import qualified Data.Map as Map import Network.HTTP.Conduit import qualified Data.HashMap.Lazy as LHashMap import qualified Data.Text.IO as IO (putStrLn) import Data.Vector ((!)) getJSON...
GildedHonour/BitcoinPriceAnalizer
src/Main.hs
gpl-2.0
2,686
0
15
601
811
390
421
64
9
------------------------------------------------------------------ -- | -- Module : Gom.CodeGen.Abstract -- Copyright : (c) Paul Brauner 2009 -- (c) Emilie Balland 2009 -- (c) INRIA 2009 -- Licence : GPL (see COPYING) -- -- Maintainer : paul.brauner@inria.fr -- Stability : prov...
polux/hgom
src/Gom/CodeGen/Abstract.hs
gpl-3.0
2,346
0
16
703
415
227
188
25
3
{-# LANGUAGE KindSignatures,DataKinds,GADTs,ScopedTypeVariables,RankNTypes,TypeOperators,FlexibleContexts #-} module Language.SMTLib2.QuickCheck where import qualified Language.SMTLib2.Internals.Backend as B import Language.SMTLib2.Internals.Expression hiding (AnyFunction) import Language.SMTLib2.Internals.Type import...
hguenther/smtlib2
extras/quickcheck/Language/SMTLib2/QuickCheck.hs
gpl-3.0
12,375
1
23
4,787
4,251
2,160
2,091
-1
-1
import Data.QLogic.BoxWorld import Data.QLogic import Data.List import Data.Poset.ConcretePoset import Data.QLogic import Data.Set (Set) import qualified Data.Set as Set import Data.IntSet (IntSet) import qualified Data.IntSet as IS import Data.QLogic.Utils import Data.Maybe x = Observable 'X' [0, 1] y = Observable '...
ttylec/QLogic
research/concrete3.hs
gpl-3.0
1,198
0
14
306
390
206
184
32
1
{-# LANGUAGE OverloadedStrings #-} module Html (toHtml, htmlDoc) where import Types (Recipe (..), showIngredient) import Prelude hiding (head) tag :: String -> String -> String tag t str = "<" ++ t ++ ">" ++ str ++ "</" ++ t ++ ">\n" h1 :: String -> String h1 = tag "h1" h2 :: String -> String h2 = tag "h2" p :: S...
JackKiefer/herms
src/Html.hs
gpl-3.0
1,548
0
17
534
499
262
237
56
2
mergeSort :: (Ord a) => [a] -> [a] mergeSort [] = [] mergeSort (x:[]) = [x] mergeSort l = merge (mergeSort a) (mergeSort b) where (a,b) = splitMid l splitMid l = splitAt ((length l) `div` 2) l merge a [] = a merge [] b = b merge a@(ah:at) b@(bh:bt) | ah <= bh = a...
apvanzanten/learningMeAHaskell
sorts.hs
gpl-3.0
1,426
0
17
553
747
388
359
34
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Entitlements/Get.hs
mpl-2.0
3,697
0
16
873
461
275
186
75
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 #-} -- ...
olorin/amazonka
amazonka-iam/gen/Network/AWS/IAM/CreateUser.hs
mpl-2.0
4,369
0
13
950
638
385
253
79
1
{-# LANGUAGE TupleSections, OverloadedStrings #-} module Handler.Project where import Import import Data.Filter import Data.Order import Data.Time.Format import Handler.Comment as Com import Handler.Discussion import Handler.Utils import Model.Application import Model.Comment import Model.Comment.ActionPermissions i...
akegalj/snowdrift
Handler/Project.hs
agpl-3.0
55,883
0
32
13,969
12,335
6,045
6,290
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE DoAndIfThenElse #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} module Data.HPB ( -- * Interface for message. FieldNumber , MessageRep , HasMessageRep(..) , emptyMessageRep , Required(..) , PackedStatus(..) , Fi...
GaloisInc/hpb
src/Data/HPB.hs
apache-2.0
28,653
0
23
8,048
7,918
4,069
3,849
679
7
{-# LANGUAGE OverloadedStrings #-} module Actions.ResetPassword.Handler (handler) where import qualified Data.Text.Lazy as TL import Web.Scotty (params, redirect) import qualified Persistence.User as U import qualified Model.ActionKey as AC import qualified Persistence.ActionKey as AC import App (Action, PGPool, ru...
DataStewardshipPortal/ds-wizard
DSServer/app/Actions/ResetPassword/Handler.hs
apache-2.0
1,359
0
24
291
288
155
133
28
4
-- | Specific configuration for Joey Hess's sites. Probably not useful to -- others except as an example. module Propellor.Property.SiteSpecific.JoeySites where import Propellor import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.File as File import qualified Propellor.Property.Gpg as G...
abailly/infra-test
src/Propellor/Property/SiteSpecific/JoeySites.hs
bsd-2-clause
34,535
406
72
5,169
6,209
3,411
2,798
751
2
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QToolTip.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:15 Warning : this file is machine generated - do not ...
keera-studios/hsQt
Qtc/Gui/QToolTip.hs
bsd-2-clause
4,487
0
15
726
1,286
678
608
88
1
-- -- Copyright 2014, General Dynamics C4 Systems -- -- This software may be distributed and modified according to the terms of -- the GNU General Public License version 2. Note that NO WARRANTY is provided. -- See "LICENSE_GPLv2.txt" for details. -- -- @TAG(GD_GPL) -- {-# LANGUAGE EmptyDataDecls, ForeignFunctionInter...
NICTA/seL4
haskell/src/SEL4/Machine/Hardware/ARM/QEmu.hs
bsd-2-clause
7,150
0
14
1,360
1,870
950
920
-1
-1
{-# LANGUAGE PackageImports #-} import "DtekPortalen" Application (getApplicationDev) import Network.Wai.Handler.Warp (runSettings, defaultSettings, settingsPort) import Control.Concurrent (forkIO) import System.Directory (doesFileExist, removeFile) import System.Exit (exitSuccess) import Control.Concurrent (thread...
dtekcth/DtekPortalen
src/devel.hs
bsd-2-clause
713
0
10
123
186
101
85
23
2
{-# LANGUAGE Haskell2010 #-} module Unicode2 where -- | All of the following work with a unicode character ü: -- -- * an italicized /ü/ -- -- * inline code @ü@ -- -- * a code block: -- -- > ü -- -- * a url <https://www.google.com/search?q=ü> -- -- * a link to 'ü' -- ü :: () ü = ()
haskell/haddock
html-test/src/Unicode2.hs
bsd-2-clause
307
0
5
78
33
26
7
4
1
{-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Flexib...
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Constraint/Generate.hs
bsd-3-clause
52,720
8
17
14,729
17,849
9,059
8,790
944
9
module Graphics.UI.Gtk.WebKit.WebFrame where {- -- * Description -- | A WebKitWebView contains a main WebKitWebFrame. A WebKitWebFrame contains the content of one -- URI. The URI and name of the frame can be retrieved, the load status and progress can be observed -- using the signals and can be controlled using the me...
mightybyte/reflex-dom-stubs
src/Graphics/UI/Gtk/WebKit/WebFrame.hs
bsd-3-clause
10,525
0
3
1,836
10
8
2
1
0
{-| -} module Snap.Extension.Session ( MonadSession(..) , Session ) where import Control.Monad import qualified Data.ByteString.Char8 as B import Data.ByteString (ByteString) import Data.Map (Map) import qualified Data.Map as Map import Snap.Types -------------------...
ozataman/snap-extension-session
src/Snap/Extension/Session.hs
bsd-3-clause
2,474
0
10
432
299
175
124
25
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} module Spec.App ( appSpecs ) where import Base import Control.Monad.IO.Class (MonadIO) import Data.Aeson hiding (json) import Data.ByteString (ByteString) import qualified Da...
jamesdabbs/pi-base-2
test/Spec/App.hs
bsd-3-clause
1,776
0
12
396
494
277
217
42
3
import Control.Monad import Data.String.Utils (replace) import System.Environment (getArgs) import System.IO (hGetContents) import System.Process (system, runInteractiveCommand) import Text.Printf (printf) readCommand :: String -> IO String readCommand cmd = do (_, stdout, _, _) <- runInteractiveCommand cmd hGetCo...
nushio3/pdf-vintage
main.hs
bsd-3-clause
1,108
0
21
261
328
161
167
28
1
-- 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.O...
rfranek/duckling
tests/Duckling/Ordinal/DE/Tests.hs
bsd-3-clause
657
0
9
103
94
58
36
12
1
{-+ This module contains experimental stuff to complete the dictionary translation by translating class declarations to record types and instance declaration to record values. Doing this while staying within the source abstract syntax is a bit clumbsy, unfortunately. The default methods in class declarations are place...
forste/haReFork
tools/base/TI/TiClassInst2.hs
bsd-3-clause
7,904
27
19
1,833
860
495
365
-1
-1
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, PatternGuards #-} {- Implements a proof state, some primitive tactics for manipulating proofs, and some high level commands for introducing new theorems, evaluation/checking inside the proof system, etc. --} module Idris.Core.ProofState(ProofState(..), newP...
DanielWaterworth/Idris-dev
src/Idris/Core/ProofState.hs
bsd-3-clause
42,302
0
32
17,208
16,244
8,162
8,082
843
31
module Code02 where import Data.List (sort) -- Sample Data sample :: String sample = "GENERATING" -- Specification msc0 :: Ord a => [a] -> Int msc0 xs = maximum [scount z zs | z:zs <- tails xs] scount :: Ord a => a -> [a] -> Int scount x xs = length (filter (x <) xs) tails :: ...
sampou-org/pfad
Code/Code02.hs
bsd-3-clause
2,799
0
11
964
1,586
863
723
66
3
-- | module Graphics.RecordGL ( module Graphics.RecordGL.Vertex , module Graphics.RecordGL.Uniforms) where import Graphics.RecordGL.Uniforms import Graphics.RecordGL.Vertex
rabipelais/record-gl
src/Graphics/RecordGL.hs
bsd-3-clause
220
0
5
62
35
24
11
4
0
module Common ( module Control.Applicative , module Control.Arrow , module Control.Monad , module Text.ParserCombinators.Parsec ) where import Control.Applicative hiding ((<|>), many, optional, Const) import Control.Arrow import Control.Monad import Text.ParserCombinators.Parsec hiding (State...
facebookarchive/lex-pass
src/Common.hs
bsd-3-clause
337
0
5
60
81
54
27
10
0
module Ottar.Transform.Ottar (ottar2Ottar, fmtOttar, extOttar) where import Text.PrettyPrint.Leijen as PP import Ottar.Model fmtOttar = "ottar" extOttar = ".ottar" ottar2Ottar :: SecComms -> Doc ottar2Ottar prtcl = vsep $ map prettyStep prtcl prettyStep :: SecComm -> Doc prettyStep (SecComm i f t ms) = text f <+> ...
jfdm/ottar
src/Ottar/Transform/Ottar.hs
bsd-3-clause
1,309
0
9
367
382
193
189
27
1
import Network import qualified Network.Websocket as WS config = WS.Config { WS.configPort = 9876, WS.configOrigins = Nothing, WS.configDomains = Nothing, WS.configOnOpen = onOpen, WS.configOnMessage = onMessage, WS.configOnClose = onClos...
michaelmelanson/network-websocket
examples/echo.hs
bsd-3-clause
565
0
8
178
142
76
66
17
1
module Main where import Test.Framework import Test.Framework.Providers.QuickCheck2 import Test.Framework.Providers.HUnit import ParserProperties(prop_parse_identifier) import ParserTests(test_parse_empty_main_class) tests :: [Test] tests = [testGroup "Parser tests" [testProperty "prop_parse_identifier" ...
helino/espresso
test/espresso/Test.hs
bsd-3-clause
486
0
8
85
94
55
39
12
1
module ArithSpec (spec) where import Test.Hspec import Control.Funky import qualified Control.Funky.Compiler.Instances as C import Data.Tensor.TypeLevel hiding ((!)) imm :: a -> Thunk a imm x = Thunk x Vec una :: (a -> a) -> Int -> Thunk a una f x = Thunk f $ vec1 x bin :: (a -> a ->...
nushio3/funky
test/ArithSpec.hs
bsd-3-clause
1,356
0
18
387
588
307
281
46
2
{-# LANGUAGE PackageImports #-} import Control.Monad import "monads-tf" Control.Monad.Trans import Data.Pipe import Data.Pipe.List import System.Environment import qualified Data.ByteString as BS import XmlCreate main :: IO () main = do fn : _ <- getArgs cnt <- BS.readFile fn mu <- runPipe $ fromList [cnt] =$=...
YoshikuniJujo/forest
subprojects/xml-pipe/test.hs
bsd-3-clause
894
0
14
195
369
184
185
-1
-1
{-# LANGUAGE RecursiveDo #-} {-# LANGUAGE FlexibleContexts #-} module Main where import Diagrams.Prelude as D import Diagrams.Backend.Reflex as DR import Reflex as R import Reflex.Dom as R main :: IO () main = mainWidget app app :: MonadWidget t m => m () app = mdo -- svgDyn :: Dynamic t (m (DiaEv Any)) let svg...
diagrams/diagrams-reflex
example/src/Follow.hs
bsd-3-clause
1,144
0
14
273
440
225
215
28
1
{-# LANGUAGE DeriveDataTypeable #-} module Main ( main ) where import Control.Concurrent (threadDelay) import Control.Monad (forM_, when) import Data.Word (Word8) import Foreign (Ptr) import Foreign.Ptr (plusPtr) import Foreign.Storable (peek) import GHC.IO.Exception (IOErrorType(Interrupted), ioe_type) import Grap...
andreyk0/v4l2-webcam-frame-grabber
v4l2-webcam-frame-grabber/Main.hs
bsd-3-clause
3,279
0
24
775
1,096
555
541
75
3
------------------------------------------------------------------------------ -- | Holds D3 level primitives. -- TODO break me up as necessary! ------------------------------------------------------------------------------ {-# LANGUAGE ExtendedDefaultRules #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} module ...
Soostone/hs-d3
src/Graphics/HSD3/Theme.hs
bsd-3-clause
2,146
0
13
464
478
260
218
34
1
{-# OPTIONS_GHC -fno-warn-deprecated-flags #-} {-# LANGUAGE CPP,ScopedTypeVariables,PatternSignatures #-} module CatchExceptions(catchExceptions) where import Prelude hiding (catch) import Control.Exception import System.IO.Unsafe #if __GLASGOW_HASKELL__ >= 610 type AnyException = SomeException #else type AnyExceptio...
jystic/QuickSpec
qs1/CatchExceptions.hs
bsd-3-clause
525
0
13
82
123
69
54
12
1
{-# LANGUAGE RecordWildCards, PatternGuards, ScopedTypeVariables #-} module Text.HTML.TagSoup.Implementation where import Text.HTML.TagSoup.Type import Text.HTML.TagSoup.Options import Text.StringLike as Str import Numeric (readHex) import Data.Char (chr, ord) import Data.Ix import Control.Exception(assert) import Co...
ChristopherKing42/tagsoup
Text/HTML/TagSoup/Implementation.hs
bsd-3-clause
7,703
0
16
2,304
3,584
1,892
1,692
146
29
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, TypeFamilies #-} -- TODO: needs profiling to improve performance. {- real 4m6.950s user 4m5.785s sys 0m1.039s -} import qualified Common.Polynomial.Polynomial as P import Common.NumMod.MkNumMod import Common.Numbers.Primes (pri...
foreverbell/project-euler-solutions
src/537.hs
bsd-3-clause
919
0
11
217
287
151
136
19
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Main where import System.FilePath import System.Directory import Control.Applicative import Control.Monad import Template readTemplate templateFile = parseTemplate <$> readFile templateFile writeTemplate file vars multi template = writeFile file (renderTemplate templ...
tekul/cryptonite
gen/Gen.hs
bsd-3-clause
6,865
0
31
2,466
1,842
999
843
112
4
{-# LANGUAGE OverloadedStrings #-} module HPACKEncode ( run , EncodeStrategy(..) , defaultEncodeStrategy , CompressionAlgo(..) ) where import Control.Monad (when) import Data.ByteString (ByteString) import qualified Data.ByteString.Base16 as B16 import qualified Data.ByteString.Char8 as C8 import Data.Cha...
kazu-yamamoto/http2
test-hpack/HPACKEncode.hs
bsd-3-clause
1,477
0
16
388
509
264
245
47
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} -- | Resolving a build plan for a set of packages in a given Stacka...
vigoo/stack
src/Stack/BuildPlan.hs
bsd-3-clause
31,198
0
32
10,550
7,462
3,828
3,634
586
5
{-# LANGUAGE TemplateHaskell #-} ------------------------------------------------------------------------------ -- | This module defines our application's state type and an alias for its -- handler monad. module Application where ------------------------------------------------------------------------------ import ...
HaskellCNOrg/snaplet-oauth
example/src/Application.hs
bsd-3-clause
1,023
0
11
190
151
88
63
19
0
{-# LANGUAGE OverloadedStrings #-} module Network.FTP.Utils where import qualified Prelude import BasicPrelude import qualified Filesystem.Path as Path import qualified Filesystem.Path.CurrentOS as Path import qualified Data.Text.Encoding as T -- | drop root dropHeadingPathSeparator :: FilePath -> FilePath dropHeadin...
yihuang/haskell-ftp
Network/FTP/Utils.hs
bsd-3-clause
579
0
7
83
128
77
51
13
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} module Database.Persist.Sql.Run where import Database.Persist.Class.PersistStore import Database.Persist.Sql.Types import Database.Persist.Sql.Raw import Control.Monad.Trans.Control imp...
pseudonom/persistent
persistent/Database/Persist/Sql/Run.hs
mit
4,774
0
23
980
1,326
685
641
97
2
module Main where import qualified App.Game as App main :: IO() main = App.run
korczis/skull-haskell
src/Apps/Playground/Playground.hs
mit
81
0
6
16
29
18
11
4
1
{-# LANGUAGE BangPatterns, OverloadedStrings, ScopedTypeVariables, TemplateHaskell #-} {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} module Web.JWTTests ( main , defaultTestGroup ) where import Control.Applicative import Test.Tasty import Test.Tasty.TH import ...
bitemyapp/haskell-jwt
tests/src/Web/JWTTests.hs
mit
8,537
0
15
2,387
1,989
1,003
986
177
2
-- Memcached interface. -- Copyright (C) 2005 Evan Martin <martine@danga.com> module Network.Memcache.Protocol ( Server, connect,disconnect,stats -- server-specific commands ) where -- TODO: -- - use exceptions where appropriate for protocol errors -- - expiration time in store import Network.Memcache import...
olegkat/haskell-memcached
Network/Memcache/Protocol.hs
mit
3,675
0
15
889
1,252
624
628
88
3
module BrowserX.Webkit (browser) where import Graphics.UI.Gtk import Graphics.UI.Gtk.WebKit.WebView import Graphics.UI.Gtk.WebKit.WebFrame import BrowserX.Network -- | Internal browser fucntion. browser settings url = do initGUI window <- windowNew set window [windowTitle := "Browser-X"] windowSetDef...
igniting/browser-x
BrowserX/Webkit.hs
gpl-3.0
4,758
0
19
1,438
1,063
493
570
90
4
module Main where import Data.Int (Int16, Int32, Int64, Int8) import Data.Word (Word16, Word32, Word64, Word8) import Foreign.C.String (CString, withCString) import Foreign.C.Types (CInt (..), CSize (..)) import Forei...
iphydf/apidsl
test/tox/tox.exp.hs
gpl-3.0
111,355
7
10
21,012
3,821
2,969
852
-1
-1
{-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Main -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- module Main (main)...
olorin/amazonka
amazonka-dynamodb/test/Main.hs
mpl-2.0
537
0
8
103
76
47
29
9
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-cloudfront/gen/Network/AWS/CloudFront/GetCloudFrontOriginAccessIdentity.hs
mpl-2.0
5,277
0
13
974
605
363
242
78
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.PackageDescription.PrettyPrint -- Copyright : Jürgen Nicklisch-Franken 2010 -- License : BSD3 -- -- Maintainer : cabal-devel@haskell.org -- Stability : provisional -- Portability : portable -- --...
themoritz/cabal
Cabal/Distribution/PackageDescription/PrettyPrint.hs
bsd-3-clause
16,991
0
17
4,300
4,411
2,245
2,166
287
6
{-# LANGUAGE PatternGuards, ViewPatterns #-} module Idris.Elab.Record(elabRecord) where import Idris.AbsSyntax import Idris.Docstrings import Idris.Error import Idris.Delaborate import Idris.Imports import Idris.Elab.Term import Idris.Coverage import Idris.DataOpts import Idris.Providers import Idris.Primitives import...
uwap/Idris-dev
src/Idris/Elab/Record.hs
bsd-3-clause
20,222
0
22
6,073
6,392
3,408
2,984
314
13
module KAT_MiyaguchiPreneel (tests) where import Crypto.Cipher.AES (AES128) import Crypto.ConstructHash.MiyaguchiPreneel as MiyaguchiPreneel import Imports import qualified Data.ByteString.Char8 as B8 import qualified Data.ByteArray as B import Data.ByteArray.Encoding (Base (Base16), c...
vincenthz/cryptonite
tests/KAT_MiyaguchiPreneel.hs
bsd-3-clause
1,405
0
11
333
367
201
166
36
1
{-# OPTIONS -fno-warn-orphans #-} -- | `DPrim` and `DT` instances for scalar types. module Data.Array.Parallel.Unlifted.Distributed.Data.Scalar.Base where import Data.Array.Parallel.Unlifted.Distributed.Primitive.DPrim import Data.Array.Parallel.Unlifted.Distributed.Primitive import Data.Word import qualified Data.Arr...
mainland/dph
dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Data/Scalar/Base.hs
bsd-3-clause
3,817
0
11
1,281
788
428
360
-1
-1
import Some d :: Int d = a * b
YoshikuniJujo/funpaala
samples/24_adt_module/useSome.hs
bsd-3-clause
32
0
5
11
18
10
8
3
1