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 FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} -- | This module provides the execution of DSH queries as SQL query bundles and the -- construction of nested values from the resulting vector b...
ulricha/dsh-sql
src/Database/DSH/Backend/Sql.hs
bsd-3-clause
5,960
0
11
1,454
1,277
657
620
102
3
----------------------------------------------------------------------------- -- | -- Copyright : (C) 2015 Dimitri Sabadie -- License : BSD3 -- -- Maintainer : Dimitri Sabadie <dimitri.sabadie@gmail.com> -- Stability : experimental -- Portability : portable -----------------------------------------------------...
apriori/luminance
src/Graphics/Luminance/Vertex.hs
bsd-3-clause
2,513
22
13
536
1,060
555
505
-1
-1
-- |The Vectorisation monad. module Vectorise.Monad.Base ( -- * The Vectorisation Monad VResult(..), VM(..), -- * Lifting liftDs, -- * Error Handling cantVectorise, maybeCantVectorise, maybeCantVectoriseM, -- * Debugging emitVt, traceVt, dumpOptVt, dumpVt, -- * Control noV, traceNoV, ...
nomeata/ghc
compiler/vectorise/Vectorise/Monad/Base.hs
bsd-3-clause
7,104
0
17
1,963
1,862
959
903
129
2
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} module Main where import Util import System.Exit ( exitFailure, exitSuccess ) import Test.HUnit testTakeUntil = "takeUntil" ~: [takeUntil (> 2) [2, 3] ~=? [2, 3]] testTwo = [testTakeUntil] main = do cnt <- runTestTT (t...
guillaume-nargeot/hpc-coveralls-testing2
test2/TestTwo.hs
bsd-3-clause
421
0
10
85
118
67
51
13
2
{-# LANGUAGE UnicodeSyntax #-} import Prelude.Unicode data Tree a = Empty | Branch a (Tree a) (Tree a) deriving (Show, Eq) type TreeRes a = Tree (a, (Int, Int)) tree7 = Branch 'a' (Branch 'b' (Branch 'c' Empty Empty) (Branch 'd' Empty Empty)) (Branch 'e'...
m00nlight/99-problems
haskell/p-66.hs
bsd-3-clause
1,079
3
12
640
273
133
140
22
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} module Database.Relational.Schema.SQLServerSyscat.Indexes where --import Data.ByteString (ByteString) import Data.Int (Int32) import Database.Record.TH (derivingShow) import Database.Relational.Query.TH (defineTableTypesAndRecordDefault) $(defineTab...
yuga/haskell-relational-record-driver-sqlserver
src/Database/Relational/Schema/SQLServerSyscat/Indexes.hs
bsd-3-clause
2,438
0
9
936
140
107
33
13
0
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : Hasmin.Types.FilterFunction -- Copyright : (c) 2017 Cristian Adrián Ontivero -- License : BSD3 -- Stability : experimental -- Portability : unknown -- --------------------------...
contivero/hasmin
src/Hasmin/Types/FilterFunction.hs
bsd-3-clause
5,629
0
14
1,727
1,687
814
873
101
3
module Problem187 where import Prime import qualified Data.Map.Strict as M n :: Int n = 10 ^ 8 ps :: [Int] ps = getPrimesUpto n ps' :: M.Map Int Int ps' = M.fromAscList $ zip ps [1 ..] main :: IO () -- p*q < n & p<=q => p^2<n & q < ceil[n/p] main = print $ go (zip (takeWhile (\p -> p * p < n) ps) [1 ..]) (reverse $ ...
adityagupta1089/Project-Euler-Haskell
src/problems/Problem187.hs
bsd-3-clause
543
0
14
171
299
162
137
17
2
module Main (main) where import Test.DocTest main :: IO () main = doctest ["-isrc", "src/Music/Theory/Note.hs"]
daoo/musictheory
tests/DocTest.hs
bsd-3-clause
114
0
6
17
38
22
16
4
1
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} module Ast.Term.Var ( HasTmVarSupply(..) , ToTmVar(.....
dalaing/type-systems
src/Ast/Term/Var.hs
bsd-3-clause
904
0
10
174
241
132
109
25
1
{-# LANGUAGE CPP, NoImplicitPrelude, NoMonomorphismRestriction, RankNTypes #-} {-# OPTIONS -Wall #-} -- | an extension of the standard Prelude for paraiso. module Language.Paraiso.Prelude ( Boolean(..), Text, showT, (++)) where {- import Control.Applicative (Applicative(..), (<$>)) import ...
nushio3/Paraiso
Language/Paraiso/Prelude.hs
bsd-3-clause
1,129
0
8
252
280
179
101
33
1
type Table a = IO
roberth/uu-helium
test/kinderrors/KindCorrect1.hs
gpl-3.0
18
0
4
5
8
5
3
1
0
{-# 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-ec2/gen/Network/AWS/EC2/CreateKeyPair.hs
mpl-2.0
5,874
0
16
1,226
792
481
311
98
1
{- - Copyright (c) 2017 The Agile Monkeys S.L. <hackers@theam.io> - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless requir...
J2RGEZ/haskell-do
src/ghc-specific/Foreign/CodeMirror.hs
apache-2.0
926
0
7
164
93
47
46
9
1
{-# LANGUAGE GADTs #-} module Language.K3.TypeSystem.Simplification.Common ( SimplificationConfig(..) , SimplificationResult(..) , VariableSubstitution , substitutionLookup , substitutionLookupAny , prettySubstitution , Simplifier , SimplifyM , tellSubstitution , runSimplifyM , runConfigSimplifyM ) where import Contr...
DaMSL/K3
src/Language/K3/TypeSystem/Simplification/Common.hs
apache-2.0
3,812
1
15
726
874
476
398
70
2
-- | -- Module : Basement.String.Builder -- License : BSD-style -- Maintainer : Foundation -- -- String builder {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Basement.String.Builder ( Builder , run , runUnsafe -- * Emit functions , emit , emitChar -- * unsafe , unsafeS...
vincenthz/hs-foundation
basement/Basement/String/Builder.hs
bsd-3-clause
1,569
0
13
322
346
201
145
32
1
-- Copyright 2016 TensorFlow authors. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agree...
judah/tensorflow-haskell
tensorflow-ops/tests/NNTest.hs
apache-2.0
3,626
0
17
960
924
499
425
-1
-1
module Dotnet.System.IO.SeekOrigin where import Dotnet import qualified Dotnet.System.Enum data SeekOrigin_ a type SeekOrigin a = Dotnet.System.Enum.Enum (SeekOrigin_ a)
FranklinChen/Hugs
dotnet/lib/Dotnet/System/IO/SeekOrigin.hs
bsd-3-clause
174
0
7
22
42
28
14
-1
-1
module M4 where --Any type/data constructor name declared in this module can be renamed. --Any type variable can be renamed. --Rename type Constructor 'BTree' to 'MyBTree' data BTree a = Empty | T a (BTree a) (BTree a) deriving Show buildtree :: Ord a => [a] -> (BTree a) buildtree [] = Empty buildt...
SAdams601/HaRe
old/testing/asPatterns/M4.hs
bsd-3-clause
1,007
0
17
421
347
172
175
22
3
{-# LANGUAGE ScopedTypeVariables #-} module Bug where f1 :: forall a. [a] -> [a] f1 (x:xs) = xs ++ [ x :: a ] -- OK f2 :: forall a. [a] -> [a] f2 = \(x:xs) -> xs ++ [ x :: a ] -- OK -- This pair is a cut-down version of #2030 isSafe alts = isSafeAlts alts isSafeAlts :: forall m . Int -> m Int isSafeAlts x = err...
sdiehl/ghc
testsuite/tests/typecheck/should_compile/tc242.hs
bsd-3-clause
413
0
8
107
170
96
74
11
1
module Generators where -- tmp generators = []
forste/haReFork
tools/evman/servers/QuickCheck/lib/Generators.hs
bsd-3-clause
51
0
5
12
12
8
4
2
1
{-# LANGUAGE MagicHash #-} {-# LANGUAGE EmptyDataDecls #-} {- OPTIONS_GHC -cpp #-} {- OPTIONS_GHC -cpp -fglasgow-exts -} module Language.Haskell.Liquid.Prelude where ------------------------------------------------------------------- --------------------------- Arithmetic ---------------------------- ----------...
abakst/liquidhaskell
include/Language/Haskell/Liquid/Prelude.hs
bsd-3-clause
4,353
0
8
902
703
394
309
69
1
{-# LANGUAGE ScopedTypeVariables #-} module Properties.Shift where import Test.QuickCheck import Instances import Utils import XMonad.StackSet hiding (filter) import qualified Data.List as L -- --------------------------------------------------------------------- -- shift -- shift is fully reversible on current wi...
atupal/xmonad-mirror
xmonad/tests/Properties/Shift.hs
mit
2,557
9
19
534
665
344
321
38
2
----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.OnScreen -- Copyright : (c) 2009 Nils Schweinsberg -- License : BSD3-style (see LICENSE) -- -- Maintainer : Nils Schweinsberg <mail@n-sch.de> -- Stability : unstable -- Portability : unporta...
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Actions/OnScreen.hs
bsd-2-clause
6,638
0
13
1,978
915
511
404
91
3
-- !!! hiding class members (but not class.) module M where import Prelude hiding ( (<), (>)) x :: Ord a => a -> a x = undefined
lukexi/ghc
testsuite/tests/module/mod129.hs
bsd-3-clause
132
0
6
31
42
27
15
4
1
{-# LANGUAGE PartialTypeSignatures, NamedWildCards #-} module NamedTyVar where foo :: (_a, b) -> (a, _b) foo (x, y) = (x, y)
urbanslug/ghc
testsuite/tests/partial-sigs/should_compile/NamedTyVar.hs
bsd-3-clause
126
0
6
22
46
29
17
4
1
-- Test for trac #1588: unrequested generalized newtype deriving? newtype MaybeT m a = MaybeT { runMaybeT :: m (Maybe a) } deriving Eq data MaybeT' m a = MaybeT' { runMaybeT' :: m (Maybe a) } deriving Eq
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/deriving/should_fail/drvfail013.hs
bsd-3-clause
213
0
11
47
58
35
23
2
0
module T8221b where data Link a = Link a !(Link a)
urbanslug/ghc
testsuite/tests/simplCore/should_compile/T8221b.hs
bsd-3-clause
52
0
9
12
23
13
10
4
0
{-# LANGUAGE CPP #-} module GHCJS.DOM.NodeIterator ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.NodeIterator #else module Graphics.UI.Gtk.WebKit.DOM.NodeIterator #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !d...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/NodeIterator.hs
mit
445
0
5
39
33
26
7
4
0
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Hadoop.Protos.ZKFCProtocolProtos.CedeActiveResponseProto (CedeActiveResponseProto(..)) where import Prelude ((+), (/)) import qualified Prelude as Prelude' import qu...
alexbiehl/hoop
hadoop-protos/src/Hadoop/Protos/ZKFCProtocolProtos/CedeActiveResponseProto.hs
mit
2,879
6
14
533
453
255
198
53
0
{-# LANGUAGE FlexibleContexts, NoMonomorphismRestriction #-} {-# LANGUAGE TypeOperators, DataKinds #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TemplateHaskell #-} module Control.Eff.Logic.NDet.Test (testGroups, gen_testCA, gen_ifte_test) where import Test.HUnit hiding (State) import Control.Applicative import ...
suhailshergill/extensible-effects
test/Control/Eff/Logic/NDet/Test.hs
mit
6,454
0
15
1,632
2,159
1,211
948
-1
-1
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE JavaScriptFFI #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE InterruptibleFFI #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnliftedFFITypes #-} {-# LANGUAGE GHCForeignImportPrim #-} {-# LANGUAGE UnboxedTuples #-} module Java...
NewByteOrder/ghcjs-base
JavaScript/Web/WebSocket.hs
mit
6,648
47
18
1,794
1,541
811
730
141
3
module Aut_COMP_HW1(accept) where delta :: Int -> Char -> Int delta 0 c |c=='e' = 5|c=='a' = 6|c=='b' = 3 delta 2 c |c=='b' = 3|c=='c' = 4 delta 3 c |c=='b' = 3 delta 4 c |c=='c' = 4 delta 5 c |c=='f' = 1 delta 6 c |c=='a' = 6|c=='b' = 2 delta _ _ = -1 initialState::Int initialState = 0 finalStates::[Int] finalState...
migulorama/AutoAnalyze
dot_dfa_examples/COMP_HW1.hs
mit
419
0
8
83
271
135
136
15
1
{-# LANGUAGE ScopedTypeVariables #-} module Main where import Control.Monad (filterM) import System.Environment (getArgs) import System.Exit import System.FilePath (takeExtension) import Text.JSON import Text.JSON.Git.Pretty import Util.File (recurs...
phylake/json-for-git
json-for-git.hs
mit
1,321
0
14
368
376
183
193
39
3
module Atomo.Internals where import Control.Concurrent import Control.Concurrent.Chan import Control.Monad.Error import Data.List (intercalate) import Debug.Trace import Text.Parsec (ParseError) import Text.Parsec.Pos (newPos, sourceName, sourceLine, sourceColumn, SourcePos) dump s x = trace (s ++ ": " ++ show x) (re...
vito/atomo-old
Atomo/Internals.hs
mit
13,070
0
15
4,288
5,215
2,637
2,578
263
4
import Control.Arrow encode :: Eq a => [a] -> [(Int, a)] encode = map (length &&& head) . group
tamasgal/haskell_exercises
99questions/Problem10.hs
mit
97
0
8
20
53
29
24
3
1
{-# LANGUAGE TupleSections #-} module Graphics.Render.Quad( quadWithNormal , quadNoShading ) where import Graphics.GPipe import Graphics.Quad import Graphics.Camera2D import Graphics.Light import Graphics.Render.Camera import Graphics.Render.Light import Data.Vec as Vec import Control.Applicative import Dat...
NCrashed/sinister
src/client/Graphics/Render/Quad.hs
mit
2,163
0
19
442
464
251
213
45
1
{-# LANGUAGE DeriveDataTypeable #-} module HWB.Plugin.Keybinding ( Keybinding(..), tryKeybindings ) where import Control.Applicative ((<$>), (<*>), (<$)) import Control.Concurrent.MVar (MVar, newMVar, putMVar, takeMVar) import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Class (MonadTrans(lift)) imp...
fmap/hwb
src/HWB/Plugin/Keybinding.hs
mit
2,160
0
17
356
822
449
373
48
2
import Data.List main = print $ length [ (n,d) | d <- [1..12000], n <- [1..d], gcd d n == 1, toFloat (n,d) < toFloat (1,2), toFloat (n,d) > toFloat (1,3) ] toFloat :: (Int, Int) -> Float toFloat (a,b) = (fromIntegral a) / (fromIntegral b)
lekto/haskell
Project-Euler-Solutions/problem0073.hs
mit
241
0
11
48
163
88
75
4
1
{-# LANGUAGE RecordWildCards #-} module LightingTechnique ( LightingTechnique(..) , DirectionLight(..) , changeAmbIntensity , changeDiffIntensity , initLightingTechnique , setLightingWVP , setLightingWorldMatrix , setLightingTextureUnit , setDirectionalLight , setEyeWorldPos , setMatSpecularPowe...
triplepointfive/hogldev
tutorial19/LightingTechnique.hs
mit
4,908
0
11
1,154
957
499
458
129
1
{-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} #ifndef NO_OVERLAP {-# LANGUAGE OverlappingInstances #-} #endif module Database.Persist.Sql.Class ( RawSql (..) , Pers...
junjihashimoto/persistent
persistent/Database/Persist/Sql/Class.hs
mit
10,109
0
17
2,608
3,613
2,048
1,565
-1
-1
module Currification (tests) where import Test.Hspec (Spec, describe, it) import Test.HUnit (assertBool, assertEqual) tests :: Spec tests = describe "Currification" $ do testCurrificationPlus testCurrificationMap testCurrificationFilter failError msg = const $ error $ "You should try using \x1B[33;1m\...
leroux/HaskellKoans
test/Currification.hs
mit
976
0
12
218
335
174
161
28
1
module Euler.E30 where import Euler.Lib (intToList) euler30 :: Int -> Int euler30 n = sum $ [ x | x <- [2 .. upperLimit n], isSumOfDigitsPow n x] upperLimit :: Int -> Int upperLimit n = aux $ last $ takeWhile (helper) $ dropWhile (not . helper) [1..] where aux :: Int -> Int aux = (* 9^n) helper :: Int -> Bool...
D4r1/project-euler
Euler/E30.hs
mit
509
0
11
119
246
131
115
14
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE ScopedTypeVariables #-} module PostgREST.Middleware where import Data.Maybe (fromMaybe) import Data.Text import Data.String.Conversions (cs) import Data.Time.Clock (NominalDiffTime) import...
NikolayS/postgrest
src/PostgREST/Middleware.hs
mit
2,726
0
19
868
657
363
294
59
4
import Text.Parsec data Point = P { getX :: Int, getY :: Int } deriving (Show, Ord, Eq) data Vect = V { getVX :: Int, getVY :: Int } deriving (Show, Ord, Eq) data Triangle = T { getP1 :: Point, getP2 :: Point, getP3 :: Point } deriving (Show, Ord, Eq) (~-~) :: Point -> Point -> Vect (P x0 y0) ~-~ (P x1 y1) = V (x0-x1...
arekfu/project_euler
p0102/p0102.hs
mit
1,716
20
15
558
753
362
391
46
2
{-| Module : Language.Vigil.Simplify.Expr Description : Copyright : (c) Jacob Errington and Frederic Lafrance, 2016 License : MIT Maintainer : goto@mail.jerrington.me Stability : experimental Simplifications for expressions. -} {-# LANGUAGE ViewPatterns #-} module Language.Vigil.Simplify.Expr ( SimpleE...
djeik/goto
libgoto/Language/Vigil/Simplify/Expr.hs
mit
18,149
28
22
7,135
4,313
2,194
2,119
310
71
module Game.Core ( Area(Area), Cells, Difference(Difference), Position, mutate, blink, difference, createCells, isAlive, inside, positionsInside, neighbors, ) where import qualified Data.Set as Set data Area = Area { lowerX :: Int, lowerY :: Int, upperX :: Int, upperY :: Int } deriving (Eq, ...
airt/game-of-life
src/Game/Core.hs
mit
1,823
0
11
338
643
353
290
51
3
module Braun (Braun ,empty, size ,fromList, toList ,pushFront, pushBack, popFront, popBack ,glb, insert, delete ) where data Pre a = Nil | More a (Pre a) (Pre a) deriving (Show) data Braun a = Braun Int (Pre a) deriv...
jbapple/unique
Braun.hs
mit
4,616
9
19
1,735
2,159
1,122
1,037
118
11
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ViewPatterns #-} module AIChallenger.Match ( launchBotsAndSimulateMatch , simulateMatch ) where import Control.Exception import Control.Monad import Data.List.Non...
ethercrow/ai-challenger
src/AIChallenger/Match.hs
mit
4,884
11
24
1,526
1,492
746
746
104
6
{-| Module: Flaw.BinaryCache Description: Class of binary cache. License: MIT -} {-# LANGUAGE GADTs #-} module Flaw.BinaryCache ( BinaryCache(..) , SomeBinaryCache(..) , NullBinaryCache(..) , BinaryCacheHashMap(..) , newBinaryCacheHashMap ) where import qualified Data.ByteString as B import qualified Dat...
quyse/flaw
flaw-base/Flaw/BinaryCache.hs
mit
1,203
0
12
176
307
166
141
25
1
module Data.Set where import Prelude hiding (filter,foldl,foldr,null,map,take,drop,splitAt) import qualified Data.List as List -- This should at the minimum allow adding and removing elements, and -- holding identical elements at most once. -- I'm not sure I can effectively use Ord without type classes. -- Could...
bredelings/BAli-Phy
haskell/Data/Set.hs
gpl-2.0
2,566
0
12
663
945
498
447
45
2
#!/usr/bin/env runhaskell import Distribution.PackageDescription import Distribution.Simple import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Program import qualified Distribution.Verbosity as Verbosity import Data.List main = defaultMainWithHooks defaultUserHooks { hookedPrograms = [pyCon...
jgoerzen/missingpy
Setup.hs
gpl-2.0
1,459
3
12
281
295
152
143
25
1
{-# LANGUAGE DeriveDataTypeable #-} module DataStructures.Sequences where import qualified Data.List as L import qualified Data.Set as S import qualified DataStructures.Sets as Sets import Control.Exception import Data.Typeable type Seq a = [a] data SeqsException = IndexOutOfRange Int deriving (Show...
ricardopenyamari/ir2haskell
clir-parser-haskell-master/src/DataStructures/Sequences.hs
gpl-2.0
5,983
1
15
1,258
2,541
1,315
1,226
81
6
module Language.PiCalc.Syntax.Term( NameId , PiName(..) , PiTerm , PiPrefTerm , PiProg , PiDefs , PiDef , noName , maxNameId , nestRestr , nestPrl , numSeq , module AST ) where -- TODO: polish exports, redefining AST function so they are restricted to PiTerm. impor...
bordaigorl/jamesbound
src/Language/PiCalc/Syntax/Term.hs
gpl-2.0
2,826
0
10
713
781
426
355
62
1
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} {- | Module : $Header$ Copyright : (c) Felix Gabriel Mance License : GPLv2 or higher, see LICENSE.txt Maintainer : f.mance@jacobs-university.de Stability : provisional Portability : portable Renames prefixes in OntologyDocuments, so that th...
nevrenato/Hets_Fork
OWL2/Rename.hs
gpl-2.0
3,510
0
16
881
1,110
578
532
77
3
module Main where --import System.FilePath.Glob (glob) import Test.DocTest (doctest) main = do doctest ["src/Config.hs", "src/Pipeline.hs"] --main = glob "src/**/*.hs" >>= doctest
averagehat/Pathogen.hs
test/DocTest.hs
gpl-2.0
184
0
8
25
33
20
13
4
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} module BN.EdgeSet where import BN.Common import qualified Data.Map as M import qualified Data.Set as S import qualified Data.List as L import Data.Function(on) ...
VictorCMiraldo/hs-bn
BN/EdgeSet.hs
gpl-2.0
7,932
0
22
2,061
2,860
1,509
1,351
145
2
module TestReplace ( testReplace ) where import Data.List import Language.Python.Common.AST import Language.Python.Common.Pretty (prettyText) import Language.Python.Version2.Parser import Prelude hiding (fail) import Test.HUnit.Base import Quenelle.Match import Quenelle.Normalize import Quenelle.Replace import Qu...
philipturnbull/quenelle
test/TestReplace.hs
gpl-2.0
5,709
0
25
1,737
1,303
668
635
118
7
module Data.FileQ ( f ) where import Language.Haskell.TH (stringE) import Language.Haskell.TH.Quote (QuasiQuoter (QuasiQuoter), quoteDec, quoteExp, quoteFile, quotePat, quoteType) f :: QuasiQuoter f = quoteFile QuasiQuoter { quoteDec = undefined, quoteExp = stringE, quotePat = undefined, ...
khalilfazal/IANA
src/Data/FileQ.hs
gpl-2.0
344
0
7
70
92
59
33
10
1
-- Copyright (C) 2001, 2004 Ian Lynagh <igloo@earth.li> -- -- 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, or (at your option) -- any later version. -- -- This program is di...
DavidAlphaFox/darcs
src/Darcs/Util/Crypt/SHA1.hs
gpl-2.0
9,467
0
18
3,141
4,475
2,296
2,179
183
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} module Text.Lit.C3js (chart) where import qualified Text.Pandoc.Builder as P import qualified Data.Aeson as A import Data.Aeson (toJSON, encode) import Data.Typeable (Typeable) import Text.Lit.Report (ConfigVar, fromTag, modify, get, Report) impo...
andersjel/hlit
hlit-c3js/src/Text/Lit/C3js.hs
gpl-3.0
973
0
13
172
303
167
136
24
1
module Language.FIRRTL.Parser.Expression ( expr ) where import Control.Applicative import qualified Data.Char as C import Data.List (foldl', intersperse) import Data.Text (Text, append, unpack) import Text.Parser.Expression import Text.Parser.Token hiding (binary, oc...
quivade/screwdriver
src/Language/FIRRTL/Parser/Expression.hs
gpl-3.0
5,697
0
38
1,467
1,955
979
976
148
5
{-# LANGUAGE DeriveDataTypeable #-} module Ampersand.Basics.PandocExtended ( PandocFormat(..) , Markup(..) , aMarkup2String , string2Blocks ) where import Ampersand.Basics.Languages import Ampersand.Basics.Prelude import Ampersand.Basics.Unique import Ampersand.B...
AmpersandTarski/ampersand
src/Ampersand/Basics/PandocExtended.hs
gpl-3.0
2,250
0
14
621
501
270
231
44
7
module Main where import Data.Array (Array, array, Ix) import Data.List.Split (splitOn) import System.IO import qualified Data.Vector as V import Data.Vector (Vector) import Data.Maybe import Data.List import Town import TravellingSalesPerson import ConvexHull -- | Reads towns from tab seperated format to the Town ty...
Jiggins/Travelling-Sales-Person
Main.hs
gpl-3.0
1,598
0
16
328
416
225
191
27
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} module Config.Reservation where import Config.Class(ConfigClass(..), readInclude, lookupInt, lookupInteger, lookupText, lookupString,lookupWord) import Config.Env(Env(..)) data ReservationCommandArg = ArgDevice...
shinjiro-itagaki/shinjirecs
shinjirecs-api/src/Config/Reservation.hs
gpl-3.0
1,103
0
10
174
239
144
95
24
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.IAM.Types.Product -- Copy...
olorin/amazonka
amazonka-iam/gen/Network/AWS/IAM/Types/Product.hs
mpl-2.0
91,056
0
18
19,019
15,538
9,126
6,412
1,468
1
module Graphics.Drawable (Drawable) where -- An object that can be draw over a surface class Drawable a where draw :: a -> IO ()
trbecker/haskell-musings
Drawable/src/Graphics/Drawable.hs
unlicense
130
0
9
25
35
19
16
3
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="ru-RU"> <title>Active Scan Rules - Alpha | ZAP Extension</title> <maps> <homeID>top</homeID>...
secdec/zap-extensions
addOns/ascanrulesAlpha/src/main/javahelp/org/zaproxy/zap/extension/ascanrulesAlpha/resources/help_ru_RU/helpset_ru_RU.hs
apache-2.0
997
95
29
162
437
224
213
-1
-1
module Chase where import Data.Map (Map) import qualified Data.Map as M import Data.Array import Data.Maybe (mapMaybe,catMaybes) import Data.List (maximumBy,delete) import Data.Ord (comparing) import Debug.Trace -- Colloborate Diffusion -- http://en.wikipedia.org/wiki/Antiobjects type Desirability = Double type Sce...
fffej/haskellprojects
chase/Chase.hs
bsd-2-clause
4,934
0
16
1,551
2,112
1,127
985
106
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} module Radiation.Parsers.Internal.WithAttoparsec where import Control.Monad (forM_) import Data.Attoparsec.ByteString.Char8 as BP import Data.Attoparsec.ByteString.Lazy as Lazy import qualified Data.ByteString as BS import qualified Data.ByteS...
jrahm/Radiation
src/Radiation/Parsers/Internal/WithAttoparsec.hs
bsd-2-clause
1,360
0
13
322
385
211
174
28
2
module Problem39 where isPythagoreanTriples :: Int -> Int -> Int -> Bool isPythagoreanTriples a b c = a^2 + b^2 == c^2 pythagorianTriples :: Int -> [(Int, Int, Int)] pythagorianTriples n = [(a, b, c) | a <- [1..(n`div`3)], let rest = n - a, b <- ...
noraesae/euler
src/Problem39.hs
bsd-3-clause
624
0
10
244
280
152
128
13
1
module Data.Functor.Plus where import Data.Functor.Alt class Alt f => Plus f where zero :: f a
tonymorris/type-class
src/Data/Functor/Plus.hs
bsd-3-clause
102
0
7
23
37
20
17
5
0
{- - Intel Concurrent Collections for Haskell - Copyright (c) 2010, Intel Corporation. - - This program is free software; you can redistribute it and/or modify it - under the terms and conditions of the GNU Lesser General Public License, - version 2.1, as published by the Free Software Foundation. - - This prog...
rrnewton/Haskell-CnC
examples/hello_world.hs
bsd-3-clause
1,471
5
10
328
182
77
105
16
1
-- TODO MUCH Faster rendering. -- TODO GHCJS? -- TODO Record more data. -- TODO Lists instead of structs/bools? -- This: [Calories, Teeth, OneMeal] -- Instad of: emptyMeal {calories=True, teeth=True, oneMeal=True} -- Yeah! Then just score with (length . nub). {-# LANGUAGE DeriveFunctor #-} {-# LANGUA...
bsummer4/chart
src/Main.hs
bsd-3-clause
6,219
0
13
2,190
2,162
1,105
1,057
111
5
{-# LANGUAGE FlexibleContexts #-} module Ex4 where import Data.Vector import Control.Monad.Random hiding (fromList) import Ex3 randomVec :: Random a => Int -> Rnd (Vector a) randomVec = randomVec' (\x -> getRandom) randomVecR :: Random a => Int -> (a, a) -> Rnd (Vector a) randomVecR i r = randomVec' (\x -> getRand...
bobbyrauchenberg/haskellCourse
src/Ex4.hs
bsd-3-clause
379
0
10
69
152
82
70
10
1
{-# LANGUAGE OverloadedStrings, BangPatterns, RecordWildCards, ViewPatterns, DoAndIfThenElse, PatternGuards, ScopedTypeVariables, TupleSections #-} {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} -- | HTTP downloader tailored for web-crawler needs. -- -- * Handles all possible http-conduit exc...
pavelkogan/http-conduit-downloader
Network/HTTP/Conduit/Downloader.hs
bsd-3-clause
24,986
0
34
7,989
4,731
2,523
2,208
376
27
{-# LANGUAGE LambdaCase #-} {- | The __TUI__ (__T__ext __U__ser __I__nterface) works like the command line of the OS-shell or GHCi. This example runs a 'UI.Dialogui.voidController' using TUI: >>> let setup = writeLn "Hello" <> writeLn "World" >>> runTUI setup voidController Hello World > ^D Bye! >>> (As you can see, ...
astynax/dialogui
src/UI/Dialogui/TUI.hs
bsd-3-clause
1,691
0
19
474
407
207
200
39
2
module ProjectEuler.Problem073 (solution073) where endNumerator :: Int -> Int endNumerator d = if 2 * n < d then n else n - 1 where n = quot d 2 countForDenominator :: Int -> Int countForDenominator d = countForDenominator' (1 + quot d 3) 0 where countForDenominator' n count = if n > endNum ...
guillaume-nargeot/project-euler-haskell
src/ProjectEuler/Problem073.hs
bsd-3-clause
629
0
12
156
207
109
98
16
3
module MagentoTest where import Data.Maybe (fromJust) import Test.Tasty import Test.Tasty.HUnit import Text.Printf (printf) import System.FilePath.Posix import qualified Magento root :: String root = "/magento/root" module_ :: String module_ = "Foo_Bar" tests :: TestTree tests = testGroup "Magento" [ moduleTests ...
dxtr/hagento
test/MagentoTest.hs
bsd-3-clause
2,126
0
13
414
577
307
270
41
1
module Feldspar.Multicore.Compile.Parallella.Access where import Data.TypedStruct import Feldspar.Multicore.Compile.Parallella.Imports import Language.C.Monad as C (CEnv, CGen, Flags (..), defaultCEnv, runCGen) import Language.C.Syntax as C (Type) import Language.Embedded.Expression (VarId) import qualified Language...
kmate/raw-feldspar-mcs
src/Feldspar/Multicore/Compile/Parallella/Access.hs
bsd-3-clause
1,328
0
14
164
362
201
161
-1
-1
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Web.RTBBidder.Protocol.Adx.BidRequest.AdSlot.NonBrowserSource (NonBrowserSource(..)) where import Prelude ((+), (/), (.)) import qualified Prelude as Prelude' i...
hiratara/hs-rtb-bidder
src/Web/RTBBidder/Protocol/Adx/BidRequest/AdSlot/NonBrowserSource.hs
bsd-3-clause
2,866
0
11
457
636
351
285
59
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module ...
mstksg/quotiented
src/Numeric/Quotient.hs
bsd-3-clause
1,090
0
11
275
291
156
135
-1
-1
{-# OPTIONS_GHC -fno-warn-tabs #-} import Common import Hex import Xor main = do putStrLn "=== Challange3 ===" putStrLn $ vecToStr $ xorWithSingleByte enc $ breakSingleKeyXor enc where enc = hexDecode "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736"
andrewcchen/matasano-cryptopals-solutions
set1/Challange3.hs
bsd-3-clause
278
2
9
37
60
26
34
8
1
module Experiment (experiment, generators) where import Data.Monoid import Control.Arrow import Simulation.Aivika import Simulation.Aivika.Experiment import Simulation.Aivika.Experiment.Chart import qualified Simulation.Aivika.Results.Transform as T -- | The simulation specs. specs = Specs { spcStartTime = 0.0, ...
dsorokin/aivika-experiment-chart
examples/MachineBreakdowns/Experiment.hs
bsd-3-clause
3,253
0
9
602
562
334
228
79
1
module Ciphers where import Data.Char charToRight :: Int -> Char -> Char charToRight n x | ord x >= 97 && ord x <= 122 = go n x ['a'..'z'] 97 | ord x >= 65 && ord x <= 90 = go n x ['A'..'Z'] 65 | otherwise = x where go nn xx xxs off | ord xx - off + nn < 0 = go nn xx xxs (off - 26) ...
dmvianna/ciphers
src/Ciphers.hs
bsd-3-clause
1,802
0
25
871
681
346
335
42
5
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} module Main where import qualified Data.Text as T import Snap import Snap.Snaplet.Heist import Snap.Snaplet.Auth import Snap.Snaplet.Auth.Backends.JsonFile import Snap.Snaplet.Session import Snap.Snaplet.Session.Backends.CookieSession import Snap.B...
noteed/snaplet-auth-example
snaplet-auth-example.hs
bsd-3-clause
3,524
0
23
1,082
1,086
529
557
97
2
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Bead.Persistence.SQL.Assignment where import Control.Applicative import Control.Monad.IO.Class import Data.Maybe import qualified Data.Text as Text import Data.Time hiding (TimeZone) import Database.Persis...
andorp/bead
src/Bead/Persistence/SQL/Assignment.hs
bsd-3-clause
10,868
0
16
2,512
2,428
1,152
1,276
104
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Program.Mighty.Process ( getMightyPid ) where import Control.Monad.Trans.Resource (runResourceT) import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as BS import Data.Conduit import qualified Data.Conduit.Binary as CB im...
kazu-yamamoto/mighttpd2
Program/Mighty/Process.hs
bsd-3-clause
2,546
0
14
559
778
429
349
60
3
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE UndecidableInstances, OverlappingInstances, FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversab...
pepeiborra/muterm-framework-charts
MuTerm/Framework/DotRep.hs
bsd-3-clause
3,035
0
11
585
567
322
245
47
2
module Day18 where import qualified Data.HashMap.Strict as M import Data.Maybe {- Day 18: Like a GIF For Your Yard -} type Coord = (Int,Int) data LightStatus = LightOpen | LightClosed deriving (Show, Eq) type Grid = M.HashMap Coord LightStatus parseGrid :: String -> Grid parseGrid = fst . foldl parseChar ...
Rydgel/advent-of-code
src/Day18.hs
bsd-3-clause
2,144
0
11
575
924
491
433
50
5
{-# LANGUAGE CPP, BangPatterns, DoAndIfThenElse, RecordWildCards #-} {-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-} ------------------------------------------------------------------------------ -- | -- Module: Database.PostgreSQL.Simple.Internal -- Copyright: (c) 2011-2015 Leon P Smit...
tolysz/postgresql-simple
src/Database/PostgreSQL/Simple/Internal.hs
bsd-3-clause
22,496
0
19
6,651
3,999
2,114
1,885
372
13
module Network.XmlPush.Tls.Client ( TlsArgs(..) ) where import Data.X509 import Data.X509.CertificateStore import Network.PeyoTLS.Client import Text.XML.Pipe data TlsArgs = TlsArgs { serverName :: String, checkServerName :: Bool, checkCertificate :: XmlNode -> Maybe (SignedCertificate -> Bool), cipherSuites :: ...
YoshikuniJujo/xml-push
src/Network/XmlPush/Tls/Client.hs
bsd-3-clause
433
18
12
55
129
80
49
13
0
-- | This module is a convenience module that re-exports all the other Aurora -- configuration. Due to field name conflicts, not all fields may be exported, -- but in most common cases, you can get away with just: -- -- > import Aurora.Config -- -- In some rarer cases, you may need to add these two imports as well: --...
Gabriel439/Haskell-Aurora-Library
src/Aurora/Config.hs
bsd-3-clause
3,541
0
5
1,102
286
215
71
39
0
{-# LANGUAGE CPP #-} module TcInteract ( solveSimpleGivens, -- Solves [EvVar],GivenLoc solveSimpleWanteds -- Solves Cts ) where #include "HsVersions.h" import BasicTypes ( infinity, IntWithInf, intGtLimit ) import HsTypes ( hsIPNameFS ) import FastString import TcCanonical import TcFlatten import Var...
elieux/ghc
compiler/typecheck/TcInteract.hs
bsd-3-clause
87,201
29
22
25,708
12,810
6,621
6,189
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module GitLab.Issue where import Data.Monoid (mconcat) import qualified Data.Text.Encoding as TE import Data.Conduit import Network.HTTP.Conduit import Web.PathPieces (toPathPiece) import GitLab.Rest (restSource) import GitLab.Types listIssues ::...
maoe/gitlab
src/GitLab/Issue.hs
bsd-3-clause
746
0
12
138
201
115
86
24
1
{-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} -- | Methods that operate on 'SscGlobalState' and 'VssCertificatesMap'. module Pos.DB.Ssc.State.Global ( -- * Certs getGlobalCerts , getStableCerts -- * Global state , sscLoadGlobalState , sscGetGlobalState...
input-output-hk/pos-haskell-prototype
db/src/Pos/DB/Ssc/State/Global.hs
mit
2,170
0
12
464
392
230
162
43
1
{-# LANGUAGE OverloadedStrings #-} module Config where {- import Control.Lens import Control.Monad.State.Strict (runState) import Data.Aeson (Value, decode) import Data.Aeson.Lens (key) import Data.Default ...
ababkin/qmuli
tests/Config.hs
mit
1,259
0
2
464
6
5
1
2
0
{-# LANGUAGE DeriveTraversable, GeneralizedNewtypeDeriving, DeriveDataTypeable #-} -- | -- Copyright : (c) 2010 Benedikt Schmidt -- License : GPL v3 (see LICENSE) -- -- Maintainer : Benedikt Schmidt <beschmi@gmail.com> -- Portability : GHC only -- -- Types and instances to handle series of disjunctions and conj...
samscott89/tamarin-prover
lib/utils/src/Logic/Connectives.hs
gpl-3.0
1,180
0
8
217
256
147
109
17
0
module LayoutBad5 where x = let y = 4 z = 5 } in 6
roberth/uu-helium
test/parser/LayoutBad5.hs
gpl-3.0
76
1
8
40
27
15
12
-1
-1
module Data.Map.Extended ( module Data.Map , setMapIntersection , unionWithM ) where import Data.Map import Data.Set (Set) import Prelude setMapIntersection :: Ord k => Set k -> Map k a -> Map k a setMapIntersection s m = m `intersection` fromSet (const ()) s unionWithM :: (Applicative f, Ord k) => ...
lamdu/lamdu
src/Data/Map/Extended.hs
gpl-3.0
740
0
12
232
395
207
188
21
3