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 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/DescribeReservedInstancesListings.hs
mpl-2.0
7,472
0
15
1,379
781
475
306
92
1
{-# LANGUAGE CPP, ExistentialQuantification, GADTs, ScopedTypeVariables, TypeFamilies, FlexibleInstances, MultiParamTypeClasses, GeneralizedNewtypeDeriving, RankNTypes, BangPatterns, UndecidableInstances, EmptyDataDecls, RecursiveDo, RoleAnnotations, LambdaCase, TypeOperators #-} module Reflex.Spider.Internal where im...
k0001/reflex
src/Reflex/Spider/Internal.hs
bsd-3-clause
70,084
82
37
14,671
16,623
8,144
8,479
-1
-1
-- Local and global IVars -- -- Author: Patrick Maier {-# LANGUAGE RankNTypes , ExistentialQuantification , BangPatterns #-} ----------------------------------------------------------------------------- module Control.Parallel.HdpH.Internal.IVar ( -- * local IVar type IVar, -- synony...
robstewart57/hdph-rs
src/Control/Parallel/HdpH/Internal/IVar.hs
bsd-3-clause
22,211
0
23
5,601
4,322
2,240
2,082
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE QuasiQuotes #-} -- | C code generation for 'Program' module Language.Embedded.Backend.C ( module Language.Embedded.Backend.C.Expression , module Language.Embedded.Backend.C , Default (..) ) where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative import Data.Monoid #...
kmate/imperative-edsl
src/Language/Embedded/Backend/C.hs
bsd-3-clause
10,346
0
14
2,295
2,253
1,192
1,061
-1
-1
{-# LANGUAGE TupleSections #-} {-# LANGUAGE OverloadedStrings #-} module Adjrn.Config ( JrnlConfig(..) , Journals , readConfig ) where import Control.Applicative ((<|>)) import Data.Aeson import Data.Aeson.Types import Data.ByteString (ByteString) import qualifie...
timds/adjourn
src/Adjrn/Config.hs
bsd-3-clause
1,812
0
12
411
530
291
239
52
3
module Language.Vielfache where import Language.Type import Random alpha = [ '0' .. '9' ] vielfache :: Integer -> Language vielfache m = Language { abbreviation = "{ dezimal(n) : " ++ show m ++ " teilt n }" , alphabet = mkSet alpha , contains = \ w -> all isDigit w && ( 0 == (read ...
Erdwolf/autotool-bonn
src/Language/Drei.hs
gpl-2.0
784
10
13
247
304
156
148
22
1
module GameEngine.Graphics.Frustum where import Data.List import Data.Vect.Float import Data.Vect.Float.Instances data Frustum = Frustum { frPlanes :: [(Vec3, Float)] , ntl :: Vec3 , ntr :: Vec3 , nbl :: Vec3 , nbr :: Vec3 , ftl :: Vec3 , ftr :: Vec...
csabahruska/quake3
game-engine/GameEngine/Graphics/Frustum.hs
bsd-3-clause
2,149
0
13
756
1,008
542
466
57
2
{-# LANGUAGE RecordWildCards #-} module Hpack.Yaml where import Data.Yaml decodeYaml :: FromJSON a => FilePath -> IO (Either String a) decodeYaml file = do result <- decodeFileEither file return $ either (Left . errToString) Right result where errToString err = file ++ case err of AesonExcep...
yamadapc/hpack-convert
src/Hpack/Yaml.hs
mit
614
0
18
149
219
107
112
13
4
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveDataTypeable #-} -- | Versions for packages. module Stack.Types.Version (Version ,Cabal...
luigy/stack
src/Stack/Types/Version.hs
bsd-3-clause
7,386
0
15
1,776
2,002
1,059
943
179
5
-- | A test for ensuring that GHC's supporting language extensions remains in -- sync with Cabal's own extension list. -- -- If you have ended up here due to a test failure, please see -- Note [Adding a language extension] in compiler/main/DynFlags.hs. module Main (main) where import Control.Monad import Data.List im...
snoyberg/ghc
testsuite/tests/driver/T4437.hs
bsd-3-clause
2,302
0
16
854
339
181
158
44
1
{-| Module : Idris.Inliner Description : Idris' Inliner. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE PatternGuards #-} module Idris.Inliner(inlineDef, inlineTerm) where import Idris.AbsSyntax import Idris.Core.TT inlineDef :: IState -> [([Name], Term, Term)] -> [([Name], ...
markuspf/Idris-dev
src/Idris/Inliner.hs
bsd-3-clause
1,240
0
12
291
341
186
155
15
5
----------------------------------------------------------------------------- -- -- Code generation for coverage -- -- (c) Galois Connections, Inc. 2006 -- ----------------------------------------------------------------------------- module StgCmmHpc ( initHpc, mkTickBox ) where import StgCmmMonad import MkGraph imp...
wxwxwwxxx/ghc
compiler/codeGen/StgCmmHpc.hs
bsd-3-clause
1,298
0
15
407
281
151
130
28
1
{-# LANGUAGE TypeFamilies, ScopedTypeVariables, FlexibleContexts #-} -- See also Trac #5763 for why we don't really want to see -- an occurs-check error from this program module T4272 where class Family f where terms :: f a -> a class Family (TermFamily a) => TermLike a where type TermFamily a :: * -> * l...
urbanslug/ghc
testsuite/tests/indexed-types/should_fail/T4272.hs
bsd-3-clause
813
0
9
180
160
86
74
10
1
-- Copyright © 2021 Mark Raynsford <code@io7m.com> https://www.io7m.com -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- -- THE SOFTWARE IS PROV...
io7m/jcamera
com.io7m.jcamera.documentation/src/main/resources/com/io7m/jcamera/documentation/haskell/Vector3f.hs
isc
2,351
0
11
596
719
396
323
55
2
{-# LANGUAGE OverloadedStrings #-} -- | This module defines an efficient value representation as well as -- parsing and comparison functions. This is because the standard -- Futhark parser is not able to cope with large values (like arrays -- that are tens of megabytes in size). The representation defined -- here doe...
ihc/futhark
src/Futhark/Test/Values.hs
isc
20,061
0
17
5,086
7,123
3,551
3,572
431
12
module Graphics.Cogh.Text ( Font , newFont , fontSize , newTextureFromText ) where import Foreign.C import Foreign.ForeignPtr import Foreign.Ptr import Graphics.Cogh.Color import Graphics.Cogh.Render import Graphics.Cogh.Window.Internal data Font = Font (ForeignPtr ()) Int type FontPtr = Ptr () t...
ivokosir/cogh
src/Graphics/Cogh/Text.hs
mit
1,365
0
14
309
431
221
210
39
1
{-# LANGUAGE BangPatterns #-} module Tools.Mill (main) where import Data.Map (unions) import Data.Either (rights) import Control.Monad (forM_,forever,replicateM_) import Tools.Mill.Table import Tools.Mill.Query import Text.Parsec.Prim import qualified Data.ByteString.Char8 as C import Data.Map(fromList,lookup) import ...
lucasdicioccio/mill
Tools/Mill.hs
mit
1,953
0
15
464
613
316
297
47
3
-- Generated by protobuf-simple. DO NOT EDIT! module Types.SInt32ListPacked where import Control.Applicative ((<$>)) import Prelude () import qualified Data.ProtoBufInt as PB newtype SInt32ListPacked = SInt32ListPacked { value :: PB.Seq PB.Int32 } deriving (PB.Show, PB.Eq, PB.Ord) instance PB.Default SInt32ListP...
sru-systems/protobuf-simple
test/Types/SInt32ListPacked.hs
mit
1,018
0
13
174
348
186
162
21
0
{-# LANGUAGE OverloadedStrings #-} module Database.EventSafe.HTTP.Client ( apiGetResource , apiCreateEvent ) where import Data.Aeson import qualified Data.ByteString.Lazy.Char8 as BSL import Network.HTTP import Network.URI -- | A helper to build a 'Request BSL.ByteString', settin...
thoferon/eventsafe
src/Database/EventSafe/HTTP/Client.hs
mit
2,189
0
16
649
540
273
267
47
3
module PrettyPrinter (pprDefns, pprExpr) where import Language import Iseq import Types pprDefns :: [(Name,CoreExpr)] -> Iseq pprDefns defns = iInterleave sep (map pprDefn defns) where sep = iConcat [ iStr ";", iNewline ] pprDefn :: (Name, CoreExpr) -> Iseq pprDefn (name, expr) = iConcat...
typedvar/hLand
hcore/PrettyPrinter.hs
mit
1,077
0
11
288
413
215
198
24
1
module Util where liftFst f (x,y) = (f x, y) liftSnd f (x,y) = (x, f y)
bhamrick/puzzlib
Util.hs
mit
73
0
6
18
54
31
23
3
1
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import System.FilePath (FilePath) import qualified Data.Aeson as JSON import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as LBS import qualified Data.Digest.Murmur3 as Hash import qualified Data.Map as Map import qualified Data.Text...
IreneKnapp/modern-data
Tools/DocGen/Haskell/Main.hs
mit
20,717
0
25
7,662
5,012
2,602
2,410
518
29
-- Asteroids game import Graphics.Gloss import World import Render main = do mode <- displayMode print mode play (displayMode width height) black startingState render handleInput stepWorld displayMode :: IO Display displayMode = do putStrLn "Enter window width and height:" width <- prompt "Widt...
Solonarv/Asteroids
Asteroids.hs
mit
492
0
9
108
159
76
83
15
1
{-# LANGUAGE StandaloneDeriving, DeriveDataTypeable, DeriveGeneric #-} {-# LANGUAGE OverloadedLists, TypeFamilies #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Commands.Instances where import Control.Monad.Catch import Text.Parsec (ParseError) import Data.List.NonEmpty (NonEmpty(..)...
sboosali/Haskell-DragonNaturallySpeaking
sources/Commands/Instances.hs
mit
1,756
0
8
330
222
135
87
24
0
{-# LANGUAGE RankNTypes #-} module Bot.Component.Impl.Reputation ( reputation ) where import Bot.Component import Bot.Component.Combinator import Bot.Component.Command import Bot.Component.Impl.NickCluster import Bot.Component.Impl.History import Bot.Component.Stateful import Bot.IO import Control.Applicative i...
numberten/zhenya_bot
Bot/Component/Impl/Reputation.hs
mit
5,438
0
15
1,648
1,059
566
493
88
3
module Main where data Fix f = Fix (f (Fix f)) -- -- Base AST template -- data Expression binOp expr = ExprInt { exprInt :: Int } | ExprBinOp { exprLeft :: expr , exprBinOp :: binOp , exprRight :: expr } -- data BinOp = Add | Sub -- -- Extending wit...
erisco/extensible-ast
example01/main.hs
mit
2,079
0
19
638
646
359
287
45
5
module ProjectEuler.Problem129 ( problem , genInput , computeA ) where import Petbox import ProjectEuler.Types problem :: Problem problem = pureProblem 129 Solved result {- Well, I really hoped that the description is something that normal human would understand. And as always not all things turn out ...
Javran/Project-Euler
src/ProjectEuler/Problem129.hs
mit
2,080
0
12
552
213
119
94
17
2
{- - Strategy (AI) implemented using the negamax algorithm. - -} module Strategy.Negamax ( negamaxStrategy ) where import Control.Lens (view) import Data.List (maximumBy, sortBy, zipWith4) import Data.Maybe (mapMaybe) import Data.Ord (comparing) import Data.Tree import Board import GameState import Strategy.Ev...
joslugd/connect4-haskell
src/Strategy/Negamax.hs
mit
4,998
0
19
1,740
786
434
352
61
5
{-# LANGUAGE FlexibleContexts #-} module Chimera.Scripts.Stage1 ( stage1 ) where import FreeGame import Control.Lens import Data.Default (def) import Data.Reflection import Chimera.State import Chimera.Engine.Core import Chimera.Engine.Scripts import Chimera.Scripts.Common stage1 :: (Given Resource) => Stage (...
myuon/Chimera
Chimera/Scripts/Stage1.hs
mit
7,106
0
29
2,066
3,539
1,721
1,818
177
3
-- | Nix store archives. module Nix.Nar ( module Nix.Nar.Types, module Nix.Nar.Serialization, module Nix.Nar.Subprocess ) where import Nix.Nar.Types import Nix.Nar.Serialization import Nix.Nar.Subprocess
adnelson/nix-binary-cache
src/Nix/Nar.hs
mit
213
0
5
31
48
33
15
7
0
module Main where import Data.IORef import Graphics.Rendering.OpenGL import Graphics.UI.GLUT hiding (exit) import System.Exit (exitSuccess) import Hogldev.Pipeline ( Pipeline(..), getTrans, PersProj(..) ) import...
triplepointfive/hogldev
tutorial26/Tutorial26.hs
mit
5,074
0
14
1,520
1,173
581
592
119
2
{-# LANGUAGE OverloadedStrings #-} module TransformationTest (tests) where import Control.Monad import Test.Tasty import Test.Tasty.SmallCheck import Test.Tasty.HUnit import qualified HotDB.Core.Node as N import qualified HotDB.Core.Operation as O import qualified HotDB.Core.Transformation as T import SCInstances (...
jjwchoy/hotdb
tests/TransformationTest.hs
mit
26,028
0
17
5,528
9,586
4,464
5,122
501
1
--------------------------------------------------------- -- -- Module : Elca -- Copyright : Bartosz Wójcik (2011) -- License : Private -- -- Maintainer : bartek@sudety.it -- Stability : Unstable -- Portability : portable -- -- Early Payment module. ---------------------------------...
bartoszw/elca
LoanEarlyPayment.hs
gpl-2.0
17,584
2
17
7,092
3,340
1,709
1,631
229
5
module Behaviour.ACO.Ant where import Domain import Behaviour.Genetics.Algorithm import Behaviour.ACO.Solver import Data.List initialTour :: Path initialTour = [((0,0),0)] {- Starting from: - the tour - the node Return a new state with the two path updated -} visitNode :: Path -> Node -> Path vis...
benkio/VRP
src/Behaviour/ACO/Ant.hs
gpl-3.0
1,424
0
15
330
573
317
256
28
2
{-# LANGUAGE TupleSections, OverloadedStrings #-} module Handler.SetUserPassword (postSetUserPasswordR) where import Import import Handler.DB import Network.HTTP.Types (status400) import Yesod.Auth import Yesod.Auth.HashDB (setPassword) import qualified Data.Aeson as A postSetUserPasswordR :: UserId -> Handler () po...
tlaitinen/sms
backend/Handler/SetUserPassword.hs
gpl-3.0
1,334
0
24
534
280
142
138
28
4
{-# LANGUAGE QuasiQuotes, OverloadedStrings #-} module CSpec (spec) where import Test.Hspec import Language.Mulang.Ast import Language.Mulang.Ast.Operator import Language.Mulang.Parsers.C import Data.Text (Text, unpack) import NeatInterpolation (text) run ...
mumuki/mulang
spec/CSpec.hs
gpl-3.0
8,175
0
35
3,222
1,853
930
923
119
1
type Two = Either () ()
hmemcpy/milewski-ctfp-pdf
src/content/3.14/code/haskell/snippet01.hs
gpl-3.0
23
0
6
5
16
8
8
1
0
{-# 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/Storelayoutpages/Delete.hs
mpl-2.0
3,341
0
15
755
389
233
156
63
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/AssociateAddress.hs
mpl-2.0
7,697
0
9
1,567
876
533
343
91
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/Lookup.hs
mpl-2.0
4,837
0
17
1,169
783
456
327
113
1
-- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } func :: asd -> ( Trither lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd ) lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd
lspitzner/brittany
data/Test378.hs
agpl-3.0
298
1
9
55
27
12
15
6
0
-- Test file for the SourceView widget. module Main where import Graphics.UI.Gtk import Graphics.UI.Gtk.SourceView main = do initGUI win <- windowNew win `onDestroy` mainQuit -- create the appropriate language lm <- sourceLanguagesManagerNew langM <- sourceLanguagesManagerGetLanguageFromMimeType lm "text...
thiagoarrais/gtk2hs
demo/sourceview/SourceViewTest.hs
lgpl-2.1
1,266
0
16
236
247
117
130
29
2
{-# LANGUAGE RankNTypes #-} import System.Plugins import API src = "../Plugin.hs" apipath = "../api" main = do status <- make src ["-i"++apipath] case status of MakeSuccess _ _ -> f MakeFailure e -> mapM_ putStrLn e where f = do v <- pdynload "../Plugin.o" [apipath]...
Changaco/haskell-plugins
testsuite/pdynload/poly/prog/Main.hs
lgpl-2.1
493
0
10
172
142
68
74
13
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TemplateHaskell #-} module Gossim.Protocol.PingPong ( agent ) where import Data.Text.Format (Only(Only)) import Data.Typeable (Typeable) import Gossim (Agent, AgentId, getSelf, getAgents, broadcast, (!), ...
aartamonau/gossim
src/Gossim/Protocol/PingPong.hs
lgpl-3.0
1,675
0
13
576
446
221
225
49
4
module FreePalace.Domain.Chat where import qualified FreePalace.Domain.User as User import qualified FreePalace.Messages.Inbound as Messages data Communication = Communication { speaker :: User.UserId, target :: Maybe User.UserId, message :: String, chatMode :: ChatMode } deriving Show data ChatMode = Ta...
psfblair/freepalace
src/FreePalace/Domain/Chat.hs
apache-2.0
772
0
10
137
170
108
62
21
1
splitBy :: Char -> String -> [String] splitBy _ [] = [] splitBy a x = let s = takeWhile (/= a) x x'= dropWhile (/= a) x in if x' == [] then [s] else s:(splitBy a $ drop 1 x') f :: Integer -> String -> Integer f n ('n':'^':s) = let m = read s :: Integer in n ^ m ans n t s = let a = spli...
a143753/AOJ
2523.hs
apache-2.0
545
0
12
188
313
158
155
22
2
{-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} module DNA.AST ( -- * AST Expr(..) , Idx(..) , typeOfExpr -- ** Tuple , T...
SKA-ScienceDataProcessor/RC
MS1/dna/DNA/AST.hs
apache-2.0
7,111
0
11
1,743
2,298
1,253
1,045
-1
-1
module Data.Multimap ( Multimap , empty , null , insert , deleteAll , delete , lookup , fromList , elems , size , foldr , foldl , foldrWithKey , foldlWithKey , foldMapWithKey ) where import Prelude hiding (foldl, foldr, lookup, null) import qualified Prelude import ...
henrytill/hecate
src/Data/Multimap.hs
apache-2.0
2,370
0
10
623
1,138
583
555
62
1
import Data.Maybe f n _ [] = Just n f n s (a:as) = if s' < 0 then Nothing else f n s' as where s' = s + a - n ans a@(h:_) = fromJust $ head $ filter (/= Nothing ) $ map (\n -> f n 0 a) $ reverse [1..h] main = do _ <- getLine l <- getLine let i = map read $ words l o = ans i print o
a143753/AOJ
2921.hs
apache-2.0
307
0
11
102
198
97
101
12
2
import Prelude isPrime :: Int -> Bool isPrime n | n <= 0 = error "You must insert a natural number.\n" | otherwise = length [i | i <- [1..n], n `mod` i == 0] == 2 dividesN :: Int -> [Int] -> [Int] dividesN n xs = [x | x <- xs, n `mod` x == 0] primeFactors :: Int -> [Int] primeFactors 1 = [] primeFactors n ...
2dor/99-problems-Haskell
31-41-arithmetic/problem-35.hs
bsd-2-clause
500
0
17
115
259
134
125
12
1
module TimeSeriesData.Counts where import Data.Time (NominalDiffTime) import Data.List (sort) import Control.Exception (assert) import TimeSeriesData.Types (TSInterval) data StartEnd = Start | End deriving (Eq, Ord) counts :: [[TSInterval]] -> [(TSInterval, Int)] counts ss = if null times then [] else counts' 0 (fst...
hectorhon/autotrace2
src/TimeSeriesData/Counts.hs
bsd-3-clause
949
0
12
208
449
251
198
19
4
-- http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_8_D -- Ring -- input: -- vanceknowledgetoad -- advance -- output: -- Yes -- input2: -- vanceknowledgetoad -- advanced -- output2: -- No import qualified Data.List as List (elemIndices) main = do s <- getLine p <- getLine putStrLn $ if el...
ku00/aoj-haskell
src/ITP1_8_D.hs
bsd-3-clause
757
0
14
181
258
138
120
13
2
-------------------------------------------------------------------------------- module Language.Haskell.Stylish.Step.LanguagePragmas.Tests ( tests ) where -------------------------------------------------------------------------------- import Test.Framework (Test, testGroup) import Test.Frame...
silkapp/stylish-haskell
tests/Language/Haskell/Stylish/Step/LanguagePragmas/Tests.hs
bsd-3-clause
7,047
0
9
1,865
971
551
420
144
1
{-# LANGUAGE PatternGuards, ViewPatterns, TupleSections #-} module Config.Haskell( readPragma, readComment ) where import Data.Char import Data.List.Extra import Text.Read import Data.Tuple.Extra import Data.Maybe import Config.Type import Util import Prelude import GHC.Util import GHC.Types.SrcLoc impor...
ndmitchell/hlint
src/Config/Haskell.hs
bsd-3-clause
3,139
0
18
872
1,075
559
516
72
7
{-| Module : Game.GoreAndAsh.Network Description : Network backend API Copyright : (c) Anton Gushcha, 2015-2017 License : BSD3 Maintainer : ncrashed@gmail.com Stability : experimental Portability : POSIX -} module Game.GoreAndAsh.Network.Backend( ChannelId(..) , RemoteAddress , MessageType(..) ,...
Teaspot-Studio/gore-and-ash-network
src/Game/GoreAndAsh/Network/Backend.hs
bsd-3-clause
4,788
0
14
952
796
457
339
-1
-1
module Duck.Hypothesis where import Duck.Types type Hypothesis = (Double -> Double) -- |Builds a named hypothesis. hypothesis :: String -> Hypothesis -> (String, Hypothesis) hypothesis name hp = (name, hp) -- |Default hypothesis function. hp, hpc, hpln, hp2, hp3, hp4 :: Hypothesis hpc n = 1 hp n = n hpln n = n * (l...
gangsterveggies/duck-analyzer
Duck/Hypothesis.hs
bsd-3-clause
372
0
8
76
156
90
66
12
1
-- | This module imports the entire package, except 'Sound.OpenAL.Proto.IO'. module Sound.OpenAL.Proto ( -- * Overview {-| Audio playback and capture prototype with Haskell OpenAL bindings -} -- * Sound.OpenAL.Proto module Sound.OpenAL.Proto.Capture, module Sound.OpenAL.Proto.Conversion, module Sound.OpenAL.Prot...
peterhil/hs-openal-proto
src/Sound/OpenAL/Proto.hs
bsd-3-clause
576
0
5
64
88
65
23
11
0
-- | -- Module : Archive.Nar.UTF8 -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- -- a tiny UTF8 decoding/encoding -- {-# LANGUAGE MagicHash #-} {-# LANGUAGE BangPatterns #-} module Archive.Nar.UTF8 ( utf8Encode , utf...
nar-org/hs-nar
Archive/Nar/UTF8.hs
bsd-3-clause
5,435
0
18
1,564
908
468
440
57
9
{-# LANGUAGE StandaloneDeriving , DataKinds , TypeOperators , TypeFamilies , GeneralizedNewtypeDeriving , TemplateHaskell , QuasiQuotes , MultiParamTypeClasses , FlexibleContexts , FlexibleInstances , TypeSynon...
meteogrid/sigym4-geometry
src/Sigym4/Geometry/Types.hs
bsd-3-clause
27,024
1
15
6,766
5,324
2,880
2,444
-1
-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. {-# LANGUAGE GADTs #-} module Duckling.Rules.NL ( defaultRules , langRules , localeRules ) where import...
facebookincubator/duckling
Duckling/Rules/NL.hs
bsd-3-clause
2,035
0
9
264
563
324
239
44
1
module Vulkan.Utils.ShaderQQ.Backend.Shaderc ( ShadercError , ShadercWarning , processShadercMessages ) where import Control.Monad ( void ) import qualified Data.ByteString.Lazy.Char8 as BSL import Data.Foldable ( asum ) import Text.ParserCombi...
expipiplus1/vulkan
utils/src/Vulkan/Utils/ShaderQQ/Backend/Shaderc.hs
bsd-3-clause
2,683
0
15
711
725
381
344
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS -fno-warn-orphans #-} module Wishlist.Utils where import Control.Monad.Except import Prelude hiding (log) import Servant.API import Wishlist.Types.Common instance Show a => Show (Headers ls a) where show (Headers x _headers) = show x log :: Show a => String -> Contro...
bollmann/lunchtalk
src/Wishlist/Utils.hs
bsd-3-clause
754
0
11
165
279
139
140
21
1
-------------------------------------------------------------------------------- -- | -- Module : Language.Verilog.PrettyPrint -- Copyright : (c) Signali Corp. 2010 -- License : All rights reserved -- -- Maintainer : pweaver@signalicorp.com -- Stability : experimental -- Portability : non-portabl...
githubkleon/ConvenientHDL
src/Language/Verilog/PrettyPrint.hs
bsd-3-clause
21,608
0
16
4,378
7,164
3,580
3,584
452
7
{-# LANGUAGE TemplateHaskell #-} module Test where import Data.Type.Equality import Type import TH _3_4_5 :: Triangle (Succ (Succ (Succ Zero))) (Succ (Succ (Succ (Succ Zero)))) (Succ (Succ (Succ (Succ (Succ Zero))))) _3_4_5 = Refl -- Doesn't typecheck. -- _0_4_5 :: -- Triangle Zero -- ...
nkaretnikov/triangle-inequality
src/Test.hs
bsd-3-clause
762
0
15
195
233
126
107
16
1
module Internal where import Data.Aeson.TH (Options(..), defaultOptions) import Data.Char (toLower) resultOptions :: Options resultOptions = defaultOptions { fieldLabelModifier = drop 7 } rpcOptions :: Options rpcOptions = defaultOptions { fieldLabelModifier = map toLower . drop 4 }
aspidites/aurse
src/Internal.hs
bsd-3-clause
301
0
8
54
81
48
33
11
1
module Main where import BivarInterpolNewtonSpec as BINS import BodeShootingSpec as BSS import EigenPowerSpec as EPS import FunctionSpec as FS import HeatExplicitSpec as HES import LibrarySpec as LS import ...
hrsrashid/nummet
tests/Spec.hs
bsd-3-clause
797
0
8
330
148
88
60
28
1
{-# LANGUAGE BangPatterns #-} module Interpretor ( eval ) where import qualified Data.Map as M import Control.Monad import Control.Monad.Error import Data.Maybe import ParserTypes import Environment import Builtins -- |Evaluate an expression in a certain environment. eval :: Env -> Expr -> ThrowError Expr...
planrich/abstractmachines
src/Interpretor.hs
bsd-3-clause
7,226
0
18
1,940
2,392
1,172
1,220
138
6
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} module Math.Metric.Taxicab where import Math.Metric.Metric (Metric(..), MetricCoord(..)) import Math.Coordinate.Cartesian (Cartesian(..), Point2(..)) data Taxicab = Taxicab deriving Show ----------------------------------------------...
wdanilo/algebraic
src/Math/Metric/Taxicab.hs
bsd-3-clause
661
0
9
91
161
93
68
10
0
-- | Types for Web Application Scanning module Qualys.Types.Was where import Data.Text (Text) import qualified Data.ByteString as B import Data.Time (UTCTime) import Qualys.Internal -- | Was scan data WasScan = WasScan { wsId :: Int -- ^ Scan ID , wsName ...
ahodgen/qualys
Qualys/Types/Was.hs
bsd-3-clause
8,105
0
11
2,585
1,917
1,139
778
233
0
-- -- | This test reads the current directory and dumps a topologically sorted package list -- import Distribution.ArchLinux.SrcRepo import System.IO import System.Directory import Control.Monad main = do dot <- getCurrentDirectory repo <- getRepoFromDir dot case repo of Nothing -> return () Just r -> f...
archhaskell/archlinux
tests/toposort.hs
bsd-3-clause
374
0
14
71
105
54
51
10
2
module Parse.PatternTest where import Elm.Utils ((|>)) import Test.HUnit (Assertion, assertEqual) import Test.Framework import Test.Framework.Providers.HUnit import qualified Data.Text.Lazy as LazyText import Parse.Pattern import Parse.Helpers (IParser, iParse) import AST.V0_16 import AST.Pattern import AST.Variable...
fredcy/elm-format
tests/Parse/PatternTest.hs
bsd-3-clause
6,860
0
23
1,756
3,664
1,865
1,799
81
1
{-# LANGUAGE TypeSynonymInstances #-} module Network.SiteCheck.URLTests where import Test.Framework import Test.Framework.Providers.HUnit (testCase) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.HUnit hiding (Test) import Data.List (sort) import Network.SiteCheck.URL import Network.SiteCheck...
brentonashworth/sitecheck
test/Network/SiteCheck/URLTests.hs
bsd-3-clause
4,514
0
17
1,094
1,289
673
616
101
3
{-# LANGUAGE DoAndIfThenElse #-} module Foreign.HCLR.Parser where import Data.String.HT (trim) import Foreign.HCLR.Ast import Text.Parsec.Char import Text.Parsec.Combinator import Text.Parsec.Pos import Text.Parsec.Prim import Text.Parsec.String parseStringLiteral :: Parser StringLiteral parseStringLiteral = do c...
tim-m89/hclr
Foreign/HCLR/Parser.hs
bsd-3-clause
1,817
0
14
352
674
339
335
59
2
module Test.Integration.Documentation ( spec ) where import Universum import Test.Hspec (Spec, it, shouldSatisfy) import Cardano.Wallet.Client.Http (WalletDocHttpClient) import qualified Cardano.Wallet.Client.Http as Client spec :: WalletDocHttpClient -> Spec spec client = do ...
input-output-hk/pos-haskell-prototype
wallet/test/integration/Test/Integration/Documentation.hs
mit
475
0
13
110
105
61
44
11
1
-- -- -- ----------------- -- Exercise 5.16. ----------------- -- -- -- module E'5'16 where -- [2, 3] contains two items of a type that is defined in the Num typeclass. -- GHCi> :t [2, 3] -- [2, 3] :: Num t => [t] -- [[2, 3]] contains one item of a type that is defined in the Num typeclass. -- [[2, 3]] is of type...
pascal-knodel/haskell-craft
_/links/E'5'16.hs
mit
449
0
2
104
20
19
1
1
0
{- Copyright 2015,2017 Markus Ongyerth, Stephan Guenther This file is part of Monky. Monky is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at y...
Ongy/monky
Monky/Disk.hs
lgpl-3.0
3,628
0
15
757
863
434
429
59
2
-- Test vectors for SHA1 are taken from GEC2: www.secg.org/collateral/gec2.pdf -- Test vectors for SHA224, SHA256, SHA384, SHA512 are taken from RFC 6979 {-# LANGUAGE OverloadedStrings #-} module KAT_PubKey.ECDSA (ecdsaTests) where import Crypto.Number.Serialize import qualified Crypto.PubKey.ECC.ECDSA as ECDSA impor...
vincenthz/cryptonite
tests/KAT_PubKey/ECDSA.hs
bsd-3-clause
35,165
0
12
7,315
3,485
2,062
1,423
447
1
{-# LANGUAGE Haskell2010, CPP, Rank2Types, DeriveDataTypeable, StandaloneDeriving #-} {-# LINE 1 "lib/Data/Time/Clock/Scale.hs" #-} {-# LANGUAGE Trustworthy #-} {-# OPTIONS -fno-warn-unused-imports #-} -- #hide module Data.Time.Clock.Scale ( -- * Universal Time -...
phischu/fragnix
tests/packages/scotty/Data.Time.Clock.Scale.hs
bsd-3-clause
3,960
0
10
798
936
485
451
64
1
module Snap.Snaplet.Auth.Types.Tests ( tests ) where ------------------------------------------------------------------------------ import Control.Exception (SomeException, evaluate, try) import Control.Monad (liftM) import Data.Aeson ...
snapframework/snap
test/suite/Snap/Snaplet/Auth/Types/Tests.hs
bsd-3-clause
7,695
0
17
2,002
1,406
759
647
128
2
module Shift.Verify where import Shift.Type import Shift.Computer import Util.Faktor import Reporter import ToDoc nth :: [Int] -> Int -> [Bool] nth ps q = zustands_folge ps !! q verify :: Int -> Shift -> Reporter Int verify limit sh = do inform $ text "Ich verifiziere" <+> toDoc sh newline let ps = pin...
Erdwolf/autotool-bonn
src/Shift/Verify.hs
gpl-2.0
1,645
22
18
488
592
292
300
47
1
{-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -XGeneralizedNewtypeDeriving #-} module Internal.Types where import Control.Monad.Error import Control.Monad.State.Strict import qualified Data.Map as Map import Data.IORef import qualified TclObj as T import qualified EventMgr as Evt import Util import TclErr import TclC...
muspellsson/hiccup
Internal/Types.hs
lgpl-2.1
3,033
0
12
909
910
515
395
116
2
{- Copyright 2015 Google Inc. 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 applicable law or a...
Ye-Yong-Chi/codeworld
codeworld-base/src/GHC/IO/Handle/Text.hs
apache-2.0
751
0
4
136
27
21
6
4
0
module Heist.TestCommon where ------------------------------------------------------------------------------ import Blaze.ByteString.Builder import Control.Error import Control.Monad.Trans import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 ...
23Skidoo/heist
test/suite/Heist/TestCommon.hs
bsd-3-clause
4,040
0
16
1,014
1,069
539
530
83
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -------------------...
raphaelamorim/fbthrift
thrift/compiler/test/fixtures/service-fuzzer/gen-hs/TestService_Fuzzer.hs
apache-2.0
5,467
0
26
1,032
1,892
1,071
821
102
2
{-# LANGUAGE CPP, GADTs, RankNTypes #-} ----------------------------------------------------------------------------- -- -- Cmm utilities. -- -- (c) The University of Glasgow 2004-2006 -- ----------------------------------------------------------------------------- module CmmUtils( -- CmmType primRepC...
forked-upstream-packages-for-ghcjs/ghc
compiler/cmm/CmmUtils.hs
bsd-3-clause
22,586
0
18
4,797
5,772
3,040
2,732
361
3
main = putStrLn "oneoneone"
MichielDerhaeg/stack
test/integration/tests/2643-copy-compiler-tool/files/Foo.hs
bsd-3-clause
28
0
5
4
9
4
5
1
1
module Distribution.Client.Dependency.Modular.Message ( Message(..), showMessages ) where import qualified Data.List as L import Prelude hiding (pi) import Distribution.Text -- from Cabal import Distribution.Client.Dependency.Modular.Dependency import Distribution.Client.Dependency.Modular.Flag import Dist...
gridaphobe/cabal
cabal-install/Distribution/Client/Dependency/Modular/Message.hs
bsd-3-clause
6,925
0
19
1,836
2,315
1,171
1,144
83
16
module Capture1 where import Control.Parallel.Strategies (rpar, runEval) fib n | n <= 1 = 1 | otherwise = n1_2 + n2_2 + 1 where n1 = fib (n-1) n2 = fib (n-2) (n1_2, n2_2) = runEval (do n1_2 <- rpar n1 n2_2 <- rpar n2...
RefactoringTools/HaRe
old/testing/introThreshold/Capture1_TokOut.hs
bsd-3-clause
384
0
12
184
143
73
70
14
1
module ShowIssue where import qualified Github.Issues as Github main = do possibleIssue <- Github.issue "thoughtbot" "paperclip" 549 putStrLn $ either (\e -> "Error: " ++ show e) formatIssue possibleIssue formatIssue issue = (Github.githubOwnerLogin $ Github.issueUser is...
kfish/github
samples/Issues/ShowIssue.hs
bsd-3-clause
576
0
17
140
166
85
81
14
1
{-# LANGUAGE RoleAnnotations #-} module Roles6 where data Foo a b = MkFoo (a b) type role Foo nominal representational phantom
urbanslug/ghc
testsuite/tests/roles/should_fail/Roles6.hs
bsd-3-clause
131
0
8
25
32
20
12
4
0
module Main (main) where -- See Trac #149 -- Currently (with GHC 7.0) the CSE works, just, -- but it's delicate. import System.CPUTime main :: IO () main = print $ playerMostOccur1 [1..m] m :: Int m = 22 playerMostOccur1 :: [Int] -> Int playerMostOccur1 [a] = a playerMostOccur1 (x:xs) | numOccur x (x:xs) > numO...
oldmanmike/ghc
testsuite/tests/perf/should_run/T149_A.hs
bsd-3-clause
449
0
11
90
166
88
78
13
1
module Kafka.Internal.Shared ( pollEvents , word8PtrToBS , kafkaRespErr , throwOnError , hasError , rdKafkaErrorToEither , kafkaErrorToEither , kafkaErrorToMaybe , maybeToLeft , readPayload , readTopic , readKey , readTimestamp , readBS ) where import Control.Exception (throw) import Control...
haskell-works/kafka-client
src/Kafka/Internal/Shared.hs
mit
3,988
0
15
1,053
1,068
569
499
91
3
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.MediaStreamTrackEvent (js_getTrack, getTrack, MediaStreamTrackEvent, castToMediaStreamTrackEvent, gTypeMediaStreamTrackEvent) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, D...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/MediaStreamTrackEvent.hs
mit
1,428
6
10
160
371
236
135
23
1
module Hpcb.Component.QFP ( qfp_32, qfp_44 ) where import Hpcb.Data.Action import Hpcb.Data.Base import Hpcb.Data.Circuit import Hpcb.Data.Effects import Hpcb.Data.Layer import Hpcb.Data.FpElement import Hpcb.Functions import Data.Monoid -- | QFP32 package qfp_32 :: String -- ^ Reference -> Stri...
iemxblog/hpcb
src/Hpcb/Component/QFP.hs
mit
2,763
0
27
672
1,435
738
697
65
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Data.Text.ICU.ExtrasSpec (spec) where import Control.Applicative ((<$>)) import Control.Lens ((&)) import Data.Text (Text) import Data.Text.ICU.Extras (match, findAndReplace, Segment(..), parseRepl...
fmap/https-everywhere-rules
test/Data/Text/ICU/ExtrasSpec.hs
mit
1,770
0
16
339
520
269
251
34
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module Web.Hastodon.Streaming ( StreamingPayload(..) , StreamingResponse , streamUser , streamPublic , streamLocal , streamHashtag , streamList ) where import Prelude hiding (takeWhile) import Control.Applicative ((<|>)...
syucream/hastodon
Web/Hastodon/Streaming.hs
mit
3,895
0
12
945
1,068
568
500
97
4
{-# LANGUAGE CPP #-} module GHCJS.DOM.HTMLCanvasElement ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.HTMLCanvasElement #else module Graphics.UI.Gtk.WebKit.DOM.HTMLCanvasElement #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASC...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/HTMLCanvasElement.hs
mit
470
0
5
39
33
26
7
4
0
module Wc where import Data.Int import qualified Data.ByteString.Lazy.Char8 as B import qualified Args as A import qualified Data.Text.Lazy.Encoding as E import qualified Data.Text.Lazy as T import Data.Maybe (isJust, fromJust) import Data.Monoid import Data.List (intersperse) import Data.Char (chr) import Coreutils (...
mrak/coreutils.hs
src/wc/Wc.hs
mit
3,236
0
12
848
1,375
725
650
82
6
{-# LANGUAGE CPP, NoImplicitPrelude, PackageImports #-} module Foreign.Marshal.Compat ( module Base ) where import "base-compat" Foreign.Marshal.Compat as Base
haskell-compat/base-compat
base-compat-batteries/src/Foreign/Marshal/Compat.hs
mit
163
0
4
21
23
17
6
4
0
module LLMH_ExpType where -- Haskell datatypes representing abstract syntax of LLMH types and expressions -- for LLMH allow type variables in types data Type = TypeVar String | TypeConst String | Arrow (Type, Type) | Myb Type | -- Myb t represents Maybe t List Type...
jaanos/TPJ-2015-16
homework2/LLMH_ExpType.hs
mit
734
0
7
261
186
118
68
20
0