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 BangPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE...
SKA-ScienceDataProcessor/RC
MS6/dna/core/DNA/Interpreter/Run.hs
apache-2.0
8,035
0
18
2,528
1,534
779
755
137
13
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} #if __GLASGOW_HASKELL__ >= 786 {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE ViewPatterns #-} #endif module Data.Complex.Polar ( #if __GLASGOW_HASKELL__ >= 800 Polar((:<)), #elif __GLASGOW_HASKELL >= 786 Polar, pattern (:<), #else Polar, #endif ...
kaoskorobase/polar
Data/Complex/Polar.hs
bsd-2-clause
8,785
0
13
2,618
1,799
981
818
124
1
{-# LANGUAGE TemplateHaskell, QuasiQuotes, DeriveDataTypeable, MultiParamTypeClasses, TypeFamilies, FlexibleContexts, FlexibleInstances, OverloadedStrings #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE ScopedTypeVariables #-} module Application.WebLogger.Server.Yesod where import ...
wavewave/weblogger-server
lib/Application/WebLogger/Server/Yesod.hs
bsd-2-clause
3,032
0
22
755
718
374
344
63
4
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE UnboxedTuples #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Codec.Compression.Zlib.OutputWindow ( OutputWindow, emptyWindow, emitExcess, finalizeWindow, addByte, addCh...
GaloisInc/pure-zlib
src/Codec/Compression/Zlib/OutputWindow.hs
bsd-3-clause
4,249
0
13
762
1,310
672
638
84
2
{-# LANGUAGE TupleSections #-} module Main where import Data.Vector.Unboxed as V hiding ((++)) import qualified Data.Vector.Unboxed.Mutable as VM import Data.Word import Data.Bits import qualified Data.List as L import qualified Data.ByteString as B import qualified Control.Monad.State.Strict as S import Control.Mona...
dan-t/dcpu16
Emulator.hs
bsd-3-clause
9,008
10
20
3,049
3,522
1,813
1,709
212
13
-- UUAGC 0.9.38.6 (./src/SistemaL.ag) module SistemaL where {-# LINE 3 "./src/SistemaL.ag" #-} import Data.List {-# LINE 9 "./src/SistemaL.hs" #-} {-# LINE 69 "./src/SistemaL.ag" #-} addIdentProds prods alfa = let prods' = map (\(Simbolo e,_) -> e) prods resto = alfa \\ prods' iprods = ma...
carliros/lsystem
src/SistemaL.hs
bsd-3-clause
19,601
0
19
8,305
2,975
1,755
1,220
385
3
{-# LANGUAGE ScopedTypeVariables #-} -- © 2006 Peter Thiemann {- | Transactional, type-indexed implementation of server-side state. Glossary A transactional entity (TE) is a named multi-versioned global variable. -} module WASH.CGI.Transaction ( T (), init, create, remove, get, set, with, Control (..), TCGI ()...
nh2/WashNGo
WASH/CGI/Transaction.hs
bsd-3-clause
13,274
273
13
3,169
2,633
1,619
1,014
270
11
{-# LANGUAGE TemplateHaskell #-} module Snap.StarterTH where ------------------------------------------------------------------------------ import qualified Data.Foldable as F import Data.List import Language.Haskell.TH import Language.Haskell.TH.Syntax import System.Directory.T...
janrain/snap
src/Snap/StarterTH.hs
bsd-3-clause
2,006
0
13
344
465
252
213
30
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.GHC -- Copyright : Isaac Jones 2003-2007 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This is a fairly large module. It contains most of the GHC-specific code for ...
IreneKnapp/Faction
libfaction/Distribution/Simple/GHC.hs
bsd-3-clause
53,821
0
30
16,170
11,278
5,895
5,383
904
12
-- | == Single URI Authorization -- -- There are cases in which limited and short-term access to a -- protected resource is granted to a third party which does not have -- access to the shared credentials. For example, displaying a -- protected image on a web page accessed by anyone. __Hawk__ provides -- limited suppor...
rvl/hsoz
src/Network/Hawk/URI.hs
bsd-3-clause
2,098
0
11
366
215
135
80
17
1
{-# LANGUAGE RecordWildCards, TypeFamilies, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings, TupleSections #-} module Aws.SimpleDb.Commands.GetAttributes where import Aws.Response import Aws.Signature import Aws.SimpleDb.Info import Aws.SimpleDb.Metadata import ...
jgm/aws
Aws/SimpleDb/Commands/GetAttributes.hs
bsd-3-clause
2,206
0
14
556
464
268
196
46
1
module HaskQuery ( module HaskQuery.AutoIndex, Relation, Cont, empty, emptyWithIndex, reindex, runQuery, select, runQueryM, executeM, selectM, filterM, selectWithIndex, selectDynamic, selectDynamicWithTypeM, insert, insertRows, insertInto, update, delete ) where import qualified Data.IntMap.Lazy import qualified Data...
stevechy/haskellEditor
ext-src/HaskQueryPackage/HaskQuery.hs
bsd-3-clause
5,788
0
15
953
1,921
1,058
863
90
2
-- | Physical constants. module DSMC.Util.Constants ( amu , avogadro , boltzmann , unigas ) where -- | Atomic mass unit 1.660538921(73)e-27, inverse to Avogadro's -- constant. amu :: Double amu = 1.6605389217373737e-27 -- | Avogadro constant 6.02214129(27)e23 avogadro :: Double avogadro = 6.02...
dzhus/dsmc
src/DSMC/Util/Constants.hs
bsd-3-clause
515
0
5
98
71
46
25
13
1
{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-unused-matches -fno-warn-name-shadowing -fno-warn-missing-signatures #-} {-# LANGUAGE FlexibleInstances, DeriveFunctor, MultiParamTypeClasses, UndecidableInstances, FlexibleContexts, TypeSynonymInstances #-} ------------------------------------------------------------...
lingxiao/CIS700
depricated/Play1129.hs
bsd-3-clause
12,496
0
16
2,798
2,853
1,520
1,333
147
2
module Backend.Generic123 ( mpg321Backend , ogg123Backend ) where import Backend import Control.Concurrent import Control.Monad import System.IO import System.Process (shell,CreateProcess(..),StdStream(..),createProcess,waitForProcess) -- | A backend for controlling mpg321. mpg321Backend :: IO Backend mp...
elliottt/din
src/Backend/Generic123.hs
bsd-3-clause
1,842
0
15
515
494
252
242
49
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DataKinds #-} import Test.Tasty.HUnit ((@?=), Assertion, testCase) import Test.Tasty.TH (defaultMainGenerator) import Language.Cypher case_simpleMatchExample :: Assertion case_simpleMatchExample = show (simpleMatch (PNode (Just n) [] ...
HaskellDC/neo4j-cypher
tests/Language/cypher-test-suite.hs
bsd-3-clause
939
0
12
177
291
154
137
24
1
module Main where import Data.Ord (comparing) import qualified Data.Vector.Algorithms.Intro as Intro import qualified Data.Vector.Storable as VS import Data.Vector.Storable.Mutable (IOVector) import Numeric.LinearAlgebra hiding (eig, vector) import Numeric.LinearAlgebra.Arnoldi import Test.Hspec import Test.QuickCheck...
ttuegel/arpack
tests/tests.hs
bsd-3-clause
2,306
0
21
697
807
427
380
57
2
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE Arrows #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE Recursi...
tomberek/rulestesting
Auto.hs
bsd-3-clause
9,312
0
15
3,104
3,040
1,585
1,455
166
2
{-# 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/DeleteBandwidthRateLimit.hs
mpl-2.0
5,353
0
13
1,098
666
397
269
90
1
-- | -- Module: SwiftNav.SBP.ExtEvents -- Copyright: Copyright (C) 2015 Swift Navigation, Inc. -- License: LGPL-3 -- Maintainer: Mark Fine <dev@swiftnav.com> -- Stability: experimental -- Portability: portable -- -- Messages reporting accurately-timestamped external events, e.g. camera -- shutter time. m...
mookerji/libsbp
haskell/src/SwiftNav/SBP/ExtEvents.hs
lgpl-3.0
2,123
0
11
369
361
203
158
-1
-1
{- Copyright 2019 The CodeWorld Authors. All rights reserved. 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 applicab...
alphalambda/codeworld
codeworld-auth/src/CodeWorld/Auth/Secret.hs
apache-2.0
1,714
0
11
381
242
136
106
26
2
<?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="pl-PL"> <title>Authentication Statistics | ZAP Extension</title> <maps> <homeID>top</homeID...
veggiespam/zap-extensions
addOns/authstats/src/main/javahelp/org/zaproxy/zap/extension/authstats/resources/help_pl_PL/helpset_pl_PL.hs
apache-2.0
987
80
66
160
415
210
205
-1
-1
-------------------------------------------------------------------------------- -- | -- Module : HEP.Kinematics.Vector.LorentzTVector -- Copyright : (c) 2014-2017 Chan Beom Park -- License : BSD-style -- Maintainer : Chan Beom Park <cbpark@gmail.com> -- Stability : experimental -- Portability : GHC...
cbpark/hep-kinematics
src/HEP/Kinematics/Vector/LorentzTVector.hs
bsd-3-clause
2,612
0
14
588
757
407
350
47
1
{-# LANGUAGE CPP #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE UndecidableInstances #-} module Language.Embedded.Concurrent.Backend.C where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative #endif import Control.Monad.Operational.Higher import Data.Typeable import Language.Embedded.Expression import Language...
kmate/imperative-edsl
src/Language/Embedded/Concurrent/Backend/C.hs
bsd-3-clause
3,765
0
11
700
1,217
617
600
-1
-1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 2000 FunDeps - functional dependencies It's better to read it as: "if we know these, then we're going to know these" -} {-# LANGUAGE CPP #-} module Eta.TypeCheck.FunDeps ( FDEq (..), Equation(..), pprEquation, ...
rahulmutt/ghcvm
compiler/Eta/TypeCheck/FunDeps.hs
bsd-3-clause
25,305
0
21
8,213
3,015
1,640
1,375
-1
-1
module Settings.Packages.Haddock (haddockPackageArgs) where import Expression haddockPackageArgs :: Args haddockPackageArgs = package haddock ? builder GhcCabal ? pure ["--flag", "in-ghc-tree"]
bgamari/shaking-up-ghc
src/Settings/Packages/Haddock.hs
bsd-3-clause
200
0
7
26
48
27
21
5
1
-- | Basic types used by this library. {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE MultiParamTypeClasses #-} module Brick.Types ( Location(..) , locL , TerminalLocation(..) , CursorLocation(..) , cursorLocationL , cursorLocationNameL , HandleEvent(..) , Name(..) , suffixLenses ) where import Cont...
FranklinChen/brick
src/Brick/Types.hs
bsd-3-clause
2,308
0
11
623
505
289
216
59
1
module Manual where import System.IO(openFile,hClose,IOMode(..),hPutStr,stdout) import Data.Char(isAlpha,isDigit) -- Parts of the manual are generated automatically from the -- sources, by generating LaTex files by observing the -- data structures of the Omega sources import LangEval(vals) import Syntax(metaHaskellO...
cartazio/omega
src/Manual.hs
bsd-3-clause
4,733
0
15
1,408
1,492
767
725
114
2
{- Copyright (C) 2010-2014 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 later version. This program is ...
sapek/pandoc
src/Text/Pandoc/Writers/Textile.hs
gpl-2.0
17,790
0
18
5,272
4,781
2,375
2,406
341
18
module B where import A (message) main :: IO () main = do putStrLn message
sdiehl/ghc
testsuite/tests/driver/T16500/B.hs
bsd-3-clause
81
0
7
21
33
18
15
5
1
{-# LANGUAGE OverloadedStrings #-} module Poly1305 (tests) where import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as B () import Imports import Crypto.Error import qualified Crypto.MAC.Poly1305 as Poly1305 import qualified Data.ByteArray as B (convert) instance Show Poly1305.Auth where ...
tekul/cryptonite
tests/Poly1305.hs
bsd-3-clause
1,410
0
18
306
410
218
192
27
1
module Test15 where f n = n * (f (n - 1)) g = 13 * (f (13 - 1))
SAdams601/HaRe
old/testing/refacFunDef/Test15_AstOut.hs
bsd-3-clause
67
0
9
23
51
28
23
3
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DeriveDataTypeable #-} module TypedIds where import Data.Maybe(isJust) import Data.Generics {-+ Haskell declaration introduce names in two name spaces. Type classes and types live in one n...
kmate/HaRe
old/tools/base/Modules/TypedIds.hs
bsd-3-clause
3,831
2
10
988
1,051
567
484
72
1
-- -- (c) The University of Glasgow -- {-# LANGUAGE DeriveDataTypeable #-} module Avail ( Avails, AvailInfo(..), IsPatSyn(..), avail, patSynAvail, availsToNameSet, availsToNameSetWithSelectors, availsToNameEnv, availName, availNames, availNonFldNames, availNamesWithSelectors, ...
tjakway/ghcjvm
compiler/basicTypes/Avail.hs
bsd-3-clause
7,103
0
15
2,075
1,234
648
586
99
1
module Main where import Control.Concurrent import qualified Control.Exception as E trapHandler :: MVar Int -> MVar () -> IO () trapHandler inVar caughtVar = (do E.mask_ $ do trapMsg <- takeMVar inVar putStrLn ("Handler got: " ++ show trapMsg) trapHandler inVar caughtVar ) `E.catch` ...
ezyang/ghc
testsuite/tests/concurrent/should_run/conc035.hs
bsd-3-clause
1,544
2
16
365
336
161
175
34
1
{-# LANGUAGE RankNTypes, ScopedTypeVariables #-} -- Trac #2494, should generate an error message module Foo where foo :: (forall m. Monad m => Maybe (m a) -> Maybe (m a)) -> Maybe a -> Maybe a foo _ x = x {-# RULES "foo/foo" forall (f :: forall m. Monad m => Maybe (m a) -> Maybe (m a)) (g :: forall m. M...
wxwxwwxxx/ghc
testsuite/tests/typecheck/should_compile/T2494.hs
bsd-3-clause
400
0
12
105
73
38
35
9
1
-- !!! Duplicate export of constructor module M(T(K1,K1)) where data T = K1
urbanslug/ghc
testsuite/tests/module/mod5.hs
bsd-3-clause
76
0
5
13
23
16
7
4
0
{-# OPTIONS_GHC -Wall #-} module CSI where data Boy = Matthew | Peter | Jack | Arnold | Carl deriving (Eq,Show) boys :: [Boy] boys = [Matthew, Peter, Jack, Arnold, Carl] -- says accuser accused = True says :: Boy -> Boy -> Bool -- None of the kids has claimed guilty, so we assume that all of them claim i...
Gurrt/software-testing
week-1/CSI.hs
mit
1,530
0
10
322
408
220
188
26
1
import Data.List import Data.Char data Fig = W | B | WD | BD | E deriving (Show, Eq) type Board = [[Fig]] type Pos = (Int, Int) charToFig :: Char -> Fig charToFig 'w' = W charToFig 'W' = WD charToFig 'b' = B charToFig 'B' = BD charToFig '.' = E figToChar :: Fig -> Char figToChar W = 'w' figToChar WD = 'W' fig...
RAFIRAF/HASKELL
warcaby-trening.hs
mit
4,456
3
13
1,190
1,425
776
649
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TupleSections #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Module : PostgREST.QueryBuilder Description : PostgREST SQL generating functions. This module provides functions to consume data types that represent database objects (e.g. Relation, Schema, SqlQuery) an...
NikolayS/postgrest
src/PostgREST/QueryBuilder.hs
mit
17,914
0
24
4,309
5,520
2,955
2,565
361
8
module Problem45 where {-- Task description: Triangle, pentagonal, and hexagonal numbers are generated by the following formulae: Triangle Tn=n(n+1)/2 1, 3, 6, 10, 15, ... Pentagonal Pn=n(3n−1)/2 1, 5, 12, 22, 35, ... Hexagonal Hn=n(2n−1) 1, 6, 15, 28, 45, ... It can be verified that T285 =...
runjak/projectEuler
src/Problem45.hs
mit
1,073
0
11
282
264
150
114
17
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TemplateHaskell #-} module Main where import Filesystem import Control.Applicative import Control.Monad import Stackage.CLI import Options.Applicative (Parser) import Options.Applicative.Builder (strArgument, metavar, value) import Da...
fpco/stackage-cabal
main/Init.hs
mit
3,252
0
18
580
833
442
391
91
4
{-# LANGUAGE MultiWayIf #-} module Data.Bitsplit.Types (Address, mkAddress, Split, mkSplit, unpackSplit, isEmpty) where import Data.Ratio import Data.Natural import Data.Map (fromList, toList) --import qualified Network.Bitcoin.Types as BT newtype Address = Address String deriving (Eq, Show, Ord) --BT.Address mkAddre...
micmarsh/bitsplit-hs
src/Data/Bitsplit/Types.hs
mit
1,401
0
12
309
417
229
188
28
3
module Jhc.Function where {-# SUPERINLINE id, const, (.), ($), ($!), flip #-} infixr 9 . infixr 0 $, $!, `seq` id x = x const x _ = x f . g = \x -> f (g x) f $ x = f x f $! x = x `seq` f x flip f x y = f y x -- asTypeOf is a type-restricted version of const. It is usually used -- as an infix operator, and its ty...
m-alvarez/jhc
lib/jhc/Jhc/Function.hs
mit
1,869
2
10
549
285
179
106
-1
-1
{-# LANGUAGE CPP #-} module GHCJS.DOM.StyleSheet ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.StyleSheet #else module Graphics.UI.Gtk.WebKit.DOM.StyleSheet #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/StyleSheet.hs
mit
435
0
5
39
33
26
7
4
0
{-# LANGUAGE CPP #-} module GHCJS.DOM.Coordinates ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.Coordinates #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI.Generated...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/Coordinates.hs
mit
346
0
5
33
33
26
7
4
0
module MinHS.Evaluator where import qualified MinHS.Env as E import MinHS.Syntax import MinHS.Pretty import qualified Text.PrettyPrint.ANSI.Leijen as PP type VEnv = E.Env Value data VFun = VFun (Value -> Value) instance Show VFun where show _ = error "Tried to show lambda" data Value = I Integer | B Bo...
pierzchalski/cs3161a1
MinHS/Evaluator.hs
mit
2,781
0
15
863
1,356
685
671
91
18
-- Sum of Digits / Digital Root -- http://www.codewars.com/kata/541c8630095125aba6000c00/ module DigitalRoot where import Data.Char (digitToInt) digitalRoot :: Integral a => a -> a digitalRoot n | (n `div` 10) == 0 = n | otherwise = digitalRoot . fromIntegral . sum . map digitToInt . show . fromIntegra...
gafiatulin/codewars
src/6 kyu/DigitalRoot.hs
mit
326
0
11
67
95
50
45
5
1
module GHCJS.DOM.ClientRectList ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/ClientRectList.hs
mit
44
0
3
7
10
7
3
1
0
-- Code to deal with star colors module Color where data Color = RGB { colorR :: Double , colorG :: Double , colorB :: Double } deriving (Show,Eq) addColors :: Color -> Color -> Color addColors a b = RGB { colorR = ((colorR a) + (colorR b)) , col...
j3camero/galaxyatlas
OldCrap/haskell/stardata/src/Color.hs
mit
577
0
10
208
216
122
94
16
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module NFKD (specs) where import Data.Monoid import Data.Text.Normal.NFKD import Data.String import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck (Arbitrary(..)) import Test.QuickCheck.Instan...
pikajude/text-normal
tests/NFKD.hs
mit
2,103
0
19
593
582
295
287
47
1
{-| This module provides 'xmlFormatter' that can be used with 'Test.Hspec.Runner.hspecWith'. Example usage: > import Test.Hspec.Formatters.Jenkins (xmlFormatter) > import Test.Hspec.Runner > > main :: IO () > main = do > summary <- withFile "results.xml" WriteMode $ \h -> do > let c = defaultCon...
worksap-ate/hspec-jenkins
lib/Test/Hspec/Formatters/Jenkins.hs
mit
1,988
0
16
459
374
201
173
36
2
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} -- |Multi-parameter variant of Applicative. -- The contained data type is an explicit type parameter, -- allowing instances to be made dependent on it. -- -- The Applicative type class is split into two classes: -- @Pure f a@, which provides...
ombocomp/MultiParamMonad
Control/Applicative/MultiParam.hs
mit
2,542
0
10
490
563
311
252
31
0
{-# LANGUAGE Arrows, OverlappingInstances, UndecidableInstances, IncoherentInstances, NoMonomorphismRestriction, MultiParamTypeClasses, FlexibleInstances, RebindableSyntax #-} -- Das Modul \hsSource{Circuit.ShowType.Instance} ...
frosch03/arrowVHDL
src/System/ArrowVHDL/Circuit/ShowType/Instance.hs
cc0-1.0
3,970
0
10
1,636
386
243
143
47
0
module Numerical where import Vec3 type Flt = Double type Vec = Vec3 Flt
reuk/rayverb
src/Numerical.hs
gpl-2.0
75
0
5
16
22
14
8
4
0
name2reply str = "nice to meet you " ++ str ++ "\n" ++ "your name is " ++ show (length str) ++ "long" main :: IO() main = do putStrLn "nazdar" inpStr <- getLine putStrLn (name2reply inpStr)
Tr1p0d/realWorldHaskell
rwh7/callingpure.hs
gpl-2.0
196
0
9
43
78
36
42
7
1
module FP.Env where import FP.Type import Autolib.TES.Identifier import Autolib.FiniteMap import Autolib.ToDoc import Autolib.Reader import Data.Typeable data Env = Env ( FiniteMap Identifier Type ) deriving Typeable instance ToDoc Env where toDoc ( Env env ) = dutch ( text "{" , semi, text "}" ) $ do ...
marcellussiegburg/autotool
collection/src/FP/Env.hs
gpl-2.0
653
0
14
196
223
113
110
22
0
{-# LANGUAGE OverloadedStrings #-} -- | Implements the generic part of the SSH Connection Protocol (RFC 4254). module Ssh.Channel( -- * Data structures ChannelInfo(..) , Channel(..) , Channels(..) , ChannelHandler(..) , GlobalChannelInfo(..) -- * Perform actions on a 'Channel' , runGl...
bcoppens/HaskellSshClient
src/Ssh/Channel.hs
gpl-3.0
13,301
0
18
3,059
2,278
1,177
1,101
181
4
{- The overloaded Standard Prelude for the Helium Compiler -} module Prelude(module Prelude, module PreludePrim, module HeliumLang) where import PreludePrim import HeliumLang infixr 9 . infixl 9 !! infixr 8 ^ -- , **. --infixl 7 `quot`, `rem`, `div`, `mod`, / --infixl 6 +, - ...
Helium4Haskell/helium
lib/Prelude.hs
gpl-3.0
27,837
0
26
9,144
13,068
7,028
6,040
632
3
{-# LANGUAGE MultiParamTypeClasses #-} module While.Concrete where import Abstat.Interface.State hiding (State) import Abstat.Interface.Semantics import Abstat.Common.ConcreteState import While.AST type Domain = Integer interpretAExpr :: AExpr -> State Domain -> Domain interpretAExpr expr state = case expr of (V...
fpoli/abstat
src/While/Concrete.hs
gpl-3.0
2,725
0
12
713
921
449
472
64
7
{-# LANGUAGE CPP, PackageImports #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Safe #-} #endif module Data.Word ( -- * Unsigned integral types -- $notes Word, Word8, Word16, Word32, Word64, ) where import "base" Data.Word -- SDM: removed after 'Prelude.fromIntegral': -- ..., whi...
jwiegley/ghc-release
libraries/haskell2010/Data/Word.hs
gpl-3.0
1,844
0
4
348
48
38
10
5
0
module QFeldspar.NameMonad where import Prelude import Control.Monad.State hiding (mapM,sequence) type NamM m a = StateT Int m a newVar :: Monad m => NamM m String newVar = do i <- get put (i + 1) return ("v" ++ show i) runNamM :: Monad m => NamM m a -> m a runNamM = flip evalStateT 0
shayan-najd/QFeldspar
QFeldspar/NameMonad.hs
gpl-3.0
315
0
10
86
131
68
63
10
1
module PhoneNumber where import Control.Applicative import Text.Trifecta -- 4. Write a parser for US/Canada phone numbers with varying -- formats. -- Examples: -- "123-456-7890" -- "1234567890" -- "(123) 456-7890" -- "1-123-456-7890" -- aka area code type NumberingPlanArea = Int type Exchange = Int type LineNumber =...
nirvinm/Solving-Exercises-in-Haskell-Programming-From-First-Principles
ParserCombinators/src/PhoneNumber.hs
gpl-3.0
1,172
0
9
211
290
149
141
31
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-iam/gen/Network/AWS/IAM/ListInstanceProfilesForRole.hs
mpl-2.0
7,469
0
14
1,506
987
583
404
116
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/SetVaultNotifications.hs
mpl-2.0
6,413
0
9
1,238
528
329
199
66
1
module Model.User.Internal where import Prelude import Data.Text (Text) import Yesod.Markdown (Markdown) data UserUpdate = UserUpdate { userUpdateName :: Maybe Text , userUpdateAvatar :: Maybe Text , userUpdateIrcNick :: Maybe Text , userU...
Happy0/snowdrift
Model/User/Internal.hs
agpl-3.0
519
0
9
171
85
50
35
11
0
module StartingOut ( doubleMe, doubleUs, doubleSmallNumber, listComprehension ) where doubleMe x = x + x doubleUs x y = doubleMe x + doubleMe y doubleSmallNumber x = if x > 100 then x else x*2 -- We usually use ' to either denote a strict version of a functio...
mboogerd/hello-haskell
src/lyah/StartingOut.hs
apache-2.0
1,254
0
9
284
411
231
180
20
2
-- 1234567890 -- oooxoxoooo dec2oct 0 = [] dec2oct n = let a = n `mod` 8 b = n `div` 8 in a:(dec2oct b) oct2ans s [] = s oct2ans s (n:ns) = let n' = if n <= 3 then n else if n <= 4 then n + 1 else n + 2 s' = s * 10 + n' in oct2ans s' ns...
a143753/AOJ
0208.hs
apache-2.0
507
0
13
218
246
125
121
22
3
{-# LANGUAGE BangPatterns, FlexibleContexts #-} -- | -- Module : Statistics.Transform -- Copyright : (c) 2011 Bryan O'Sullivan -- License : BSD3 -- -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : portable -- -- Fourier-related transformations of mathematical functions. -- -- Thes...
fpco/statistics
Statistics/Transform.hs
bsd-2-clause
5,058
0
29
1,485
1,824
928
896
95
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QCalendarWidget.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:35 Warning : this file is machine generated - ...
keera-studios/hsQt
Qtc/Enums/Gui/QCalendarWidget.hs
bsd-2-clause
6,712
0
18
1,385
1,667
823
844
146
1
module Main (main) where import Test.Hspec (hspecX, descriptions) import Control.Monad (msum) import qualified Web.MusicBrainz.Testing.XML as X main :: IO () main = hspecX $ descriptions [X.specs]
ocharles/Web-MusicBrainz
Web/MusicBrainz/Testing/Main.hs
bsd-2-clause
200
0
8
29
69
42
27
6
1
{-# LANGUAGE PackageImports #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds #-} module Propellor.PrivData ( withPrivData, withSomePrivData, addPrivData, setPrivData, unsetPrivData, unsetPriv...
ArchiveTeam/glowing-computing-machine
src/Propellor/PrivData.hs
bsd-2-clause
9,424
155
17
1,621
2,749
1,476
1,273
-1
-1
module TestModuleMany where import HEP.Automation.EventGeneration.Type import HEP.Automation.JobQueue.JobType import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Model.SM import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Type import HEP.Storage.WebDAV.Type psetup :: ProcessSetup ...
wavewave/jobqueue-sender
TestModuleMany.hs
bsd-2-clause
1,097
0
9
309
282
172
110
33
1
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Exception (bracketOnError) import Control.Monad.State.Lazy import Data.Maybe (fromMaybe) import qualified Data.Text as T import qualified Data.Text.IO as T import ...
epost/psc-ide
server/Main.hs
bsd-3-clause
3,181
0
16
958
891
436
455
79
2
module Day20 where {-# LANGUAGE TupleSections #-} -- Improvements to Day18 import Control.Monad.Gen import Control.Monad.Trans.Either import Control.Monad.Reader import qualified Data.Map as Map data Type = Function Type Type -- a -> b | RecordT [(String, Type)] -- a * b | VariantT [(String, Type)] --...
joelburget/daily-typecheckers
src/Day20.hs
bsd-3-clause
12,440
4
20
3,459
3,200
1,595
1,605
-1
-1
module Husky.Wai.FileApplication ( fileApplication ) where import System.FilePath import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString.Char8 as B import qualified Data.ByteString.Lazy.Char8 as LB import Data.Enumerator (yield, Stream(EOF)) import Data.CaseInsensitive ( mk ) ...
abaw/husky
Husky/Wai/FileApplication.hs
bsd-3-clause
1,362
0
16
327
374
203
171
27
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ScopedTypeVariables #-} module Model where import Data.Time.Clock import Database.PostgreSQL.Simple import Database.PostgreSQL.Simple.SqlQQ import Database.PostgreSQL.Simple.Types import Database.PostgreSQL.Sim...
sivteck/hs-pastebin
src/Model.hs
bsd-3-clause
1,248
0
9
269
225
132
93
26
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GADTs #-} module Main where type X a b = Y a b type Function c d = c -> Int -> d -> Int newtype A = B Int data C = D String | E deriving (Show) data Z a b = Z (X a b) (X a b , X a b) data F = F { c :: String, d :: String } deriving (Eq, Show) d...
hecrj/haskell-format
test/specs/types/input.hs
bsd-3-clause
754
0
11
234
344
191
153
34
1
{-# LANGUAGE TypeOperators #-} module LiuMS.Config ( Config (..), Language, SiteInfo (..) , liuMSInfo, mkConfig , askContentPath, askCacheManager, askSiteInfo ) where import Control.Monad.Reader import Control.Monad.Trans.Except import Servant import LiuMS.CacheManager import LiuMS.Compiler import LiuMS.Comp...
notcome/liu-ms-adult
src/LiuMS/Config.hs
bsd-3-clause
1,960
0
10
480
413
247
166
-1
-1
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-} module Obsidian.MonadObsidian.PureAPI where import Obsidian.MonadObsidian.Exp import Obsidian.MonadObsidian.Arr -- import Bitwise --import Data.Bits import Control.Monad import Data.Foldable -------------------------------------------------------...
svenssonjoel/MonadObsidian
Obsidian/MonadObsidian/PureAPI.hs
bsd-3-clause
7,686
0
20
2,736
3,050
1,600
1,450
132
1
-- | -- Module: Control.Proxy.ByteString.List -- Copyright: (c) 2013 Ertugrul Soeylemez -- License: BSD3 -- Maintainer: Ertugrul Soeylemez <es@ertes.de> module Control.Proxy.ByteString.List ( -- * Basic operations fromLazyS, unfoldrS, unpackD, -- * Substreams dropD, dro...
ertes/pipes-bytestring
Control/Proxy/ByteString/List.hs
bsd-3-clause
3,137
0
15
998
870
464
406
-1
-1
{- | Maintainer : simons@cryp.to Stability : experimental Portability : portable The preferred method for rendering a 'Document' or single 'Content' is by using the pretty printing facility defined in "Pretty". Pretty-printing does not work well for cases, however, where the formatting in th...
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/src/Text/XML/HaXml/Verbatim.hs
bsd-3-clause
3,563
0
16
853
480
247
233
26
1
module ReadPNG where import Data.Array.Repa.IO.DevIL import Data.Array.Repa as R import Data.Array.Repa.Repr.ForeignPtr import Data.Array.Accelerate.IO import Data.Array.Accelerate as A import Data.Array.Accelerate.Interpreter import Control.Monad import ReadDist import Codec.BMP import System.Environment exec = do ...
vmchale/EMD
src/ReadPNG.hs
bsd-3-clause
884
0
13
139
339
185
154
23
1
-- | Basebull library module module Basebull where import qualified Data.Foldable as F import qualified Data.ByteString.Lazy as BL import Data.Csv.Streaming -- a simple type alias for data type BaseballStats = (BL.ByteString, Int, BL.ByteString, Int) fourth :: (a, b, c, d) -> d fourth (_, _, _, d) = d baseballSt...
emaphis/Haskell-Practice
basebull/src/Basebull.hs
bsd-3-clause
653
0
10
116
205
120
85
15
1
module Backend.InterpreterSpec where import Test.Hspec import qualified Data.Map as Map import Frontend.Parser import Backend.Interpreter testEnv = Map.fromList [("x", Int 1), ("y", Int 2)] spec :: Spec spec = describe "eval" $ do it "evaluates ints" $ eval (Int 1) testEnv `shouldBe` 1 it "evaluates ...
JCGrant/JLang
test/Backend/InterpreterSpec.hs
bsd-3-clause
690
0
16
160
308
159
149
19
1
{-# LANGUAGE MagicHash,UnboxedTuples #-} module Data.Util.Size ( unsafeSizeof , strictUnsafeSizeof )where import GHC.Exts import Foreign unsafeSizeof :: a -> Int unsafeSizeof a = case unpackClosure# a of (# x, ptrs, nptrs #) -> sizeOf header + I# (sizeofByteArray# (unsafeCoerce...
cutsea110/data-util
Data/Util/Size.hs
bsd-3-clause
486
0
14
123
121
67
54
17
1
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} -- | module VK.App.Actions (VKAction(..) , module Ex...
eryx67/vk-api-example
src/VK/App/Actions.hs
bsd-3-clause
1,208
0
10
418
221
136
85
44
0
{-# LANGUAGE DataKinds, ExplicitForAll, FlexibleContexts, OverloadedStrings #-} {-# LANGUAGE RecursiveDo, ScopedTypeVariables, TypeApplications #-} {-# LANGUAGE TypeFamilies, TypeOperators #-} {-# OPTIONS_GHC -fdefer-typed-holes #-} module Shaped.Reflex where import Ref...
meditans/shaped
src/Shaped/Reflex.hs
bsd-3-clause
8,282
0
23
1,968
2,155
1,090
1,065
103
1
module YandexDirect.Entity ( module YandexDirect.Entity.Core , module YandexDirect.Entity.Ad , module YandexDirect.Entity.AdExtension , module YandexDirect.Entity.AdGroup , module YandexDirect.Entity.Campaign , module YandexDirect.Entity.Dictionary , module YandexDirect.Entity.Keyword , module YandexDir...
effectfully/YandexDirect
src/YandexDirect/Entity.hs
bsd-3-clause
640
0
5
63
112
77
35
17
0
{-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- In the test suite, so OK module Main(main) where import Safe import Safe.Exact import qualified Safe.Foldable as F import Control.DeepSeq import Control.Exception import Control.Monad import Data.Char import Data.List import Data.Maybe imp...
ndmitchell/safe
Test.hs
bsd-3-clause
5,953
0
23
1,734
2,399
1,254
1,145
122
4
module Recommendations(recommendedMoviesFor) where import Data as Data(PersonName, title, name, rate, allItems, tryFindByName) import Utils as Utils(tryList, reverseBy, except, groupBy) recommendedMoviesFor :: PersonName -> (PersonName -> PersonName -> Either String Float) ...
vprokopchuk256/programming-collective-intelligence
src/Recommendations.hs
bsd-3-clause
1,108
0
14
289
393
205
188
20
1
module PreludeList ( map, (++), filter, concat, concatMap, head, last, tail, init, null, length, (!!), foldl, foldl1, scanl, scanl1, foldr, foldr1, scanr, scanr1, iterate, repeat, replicate, cycle, take, drop, splitAt, takeWhile, dropWhile, span, break, lines, words, unlines, unwords, reverse, and, or,...
rodrigogribeiro/mptc
test/Data/Full/PreludeList.hs
bsd-3-clause
6,265
0
12
2,052
3,772
2,026
1,746
184
2
#!/usr/bin/env runhaskell {-# LANGUAGE OverloadedStrings #-} module Main where import Control.Concurrent (threadDelay) import Control.Concurrent.MVar (MVar (..), putMVar, takeMVar) import Control.Exception (tryJust) import Control.Monad (forever, guard) imp...
radix/json-log-viewer
src/Messin.hs
mit
2,922
0
24
959
635
328
307
63
4
{-# LANGUAGE TemplateHaskell #-} module Number.Float.Data where import Prelude hiding ( exponent ) import qualified Number.Base.Data as B import Number.Wert import Autolib.Reader import Autolib.ToDoc import Autolib.Reporter import Autolib.Size import Data.Ratio import Data.Typeable ------------------------------...
florianpilz/autotool
src/Number/Float/Data.hs
gpl-2.0
4,483
12
16
1,465
1,493
751
742
-1
-1
#!/usr/bin/runhaskell {-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE ScopedTypeVariables #-} module Preprocessor (preprocessAll) where import Control.Exception(catch, evaluate) import Data.List(isInfixOf) import FileHandler import Interface.Args import CommandGenerator import Directive.Identifier import Directive.Parse...
kavigupta/SimplePreprocessor
src/Preprocessor.hs
gpl-3.0
3,529
0
19
915
933
470
463
56
3
{-# 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-iam/gen/Network/AWS/IAM/DeleteInstanceProfile.hs
mpl-2.0
3,794
0
9
679
372
231
141
52
1
module Text.HTML.TagSoup2.Str(module Text.StringLike) where import Text.StringLike data Pos str = Pos Position str instance StringLike str => StringLike (Pos str) where position :: Tag (Position str) -> Tag str position = undefined
ndmitchell/tagsoup
src/Text/HTML/TagSoup2/Str.hs
bsd-3-clause
239
0
8
39
80
44
36
6
1
-- dets.hs -- bugs from the Erlang's dets library -- -- Copyright (c) 2017-2020 Rudy Matela. -- Distributed under the 3-Clause BSD licence (see the file LICENSE). -- -- -- In 2016, John Hughes wrote a paper titled: -- -- "Experiences with QuickCheck: Testing the Hard Stuff And Staying Sane" -- -- http://publications.li...
rudymatela/llcheck
bench/dets.hs
bsd-3-clause
6,570
0
15
1,711
873
527
346
77
1
-- |Binary instances for images. Currently it only supports the type -- `Image Grayscale D32`. {-#LANGUAGE ScopedTypeVariables, FlexibleInstances#-} module CV.Binary where import CV.Image (Image,GrayScale,D32) import CV.Conversions import Data.Maybe (fromJust) import Data.Binary import Data.Array.CArray import Data.A...
BeautifulDestinations/CV
CV/Binary.hs
bsd-3-clause
726
0
13
167
167
89
78
16
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} module Main (main) where import Control.Monad (join) import Control.Monad.Reader (ReaderT(..)) import Control.Concurrent.STM (STM, atomically) import Data.Kind (Type) class Monad (Transaction m) => MonadPersist m where...
sdiehl/ghc
testsuite/tests/simplCore/should_run/T16066.hs
bsd-3-clause
778
0
10
137
292
152
140
-1
-1