code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternGuards #-} module Main (main) where import Codec.Compression.Zlib (compress) import Control.Applicative ((<$>)) import Control.Concurrent (forkIO) import Control.Concurrent.MVar import qualified Control.Exception as C import Control.Monad (forM, when) import quali...
noteed/buh
bin/buh.hs
bsd-3-clause
28,165
0
37
7,141
8,496
4,331
4,165
605
14
----------------------------------------------------------------------------- -- | -- Copyright : (C) 2015 Dimitri Sabadie -- License : BSD3 -- -- Maintainer : Dimitri Sabadie <dimitri.sabadie@gmail.com> -- Stability : experimental -- Portability : portable -- -- Position in space is a 3-float vector. --------...
phaazon/quaazar
src/Quaazar/Geometry/Position.hs
bsd-3-clause
1,124
0
13
210
245
141
104
18
1
module Tutorial where import MFlow.Wai.Blaze.Html.All import Data.Monoid -- widget signature : View rendering monad returnValue -- flow aignature: FlowM rendering monad returnValue -- page : View v m a -> FlowM v m a main = runNavigation "" . step $ do r <- page $ h3 << "Basic example with inputs and links" ...
agocorona/MFlow
Demos/Tutorial 1.hs
bsd-3-clause
5,648
1
30
2,011
1,408
681
727
93
3
module Blog.BackEnd.RefererStream where import qualified System.Log.Logger as L import qualified Blog.FrontEnd.Views as V import qualified Blog.Constants as C import qualified Control.Monad as CM import qualified Data.Map as DM import Data.List ( isPrefixOf ) import Control.Concurrent import Control.Concurrent.Chan im...
prb/perpubplat
src/Blog/BackEnd/RefererStream.hs
bsd-3-clause
2,355
3
12
713
672
355
317
49
2
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE IncoherentInstances #-} {-# LANGUAGE NoForeignFunctionInterface #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE...
kumasento/accelerate-cuda
Data/Array/Accelerate/CUDA/Execute.hs
bsd-3-clause
28,128
0
18
8,699
8,273
4,134
4,139
419
38
-- | Bot that spits out core. module Corebot where
chrisdone/corebot
src/Corebot.hs
bsd-3-clause
52
0
2
11
5
4
1
1
0
{-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDer...
david-christiansen/final-pretty-printer
Text/PrettyPrint/Final/Demos/ListDemo.hs
mit
3,428
0
12
633
1,178
646
532
86
2
predecessor = predecessor successor = successor
evolutics/haskell-formatter
testsuite/resources/source/comments/empty_lines/between_top_level_functions/without_type_signature/0/Output.hs
gpl-3.0
48
0
4
6
11
6
5
2
1
{-# OPTIONS -fno-warn-overlapping-patterns #-} module Test.TestUtil ( module Test.TestUtil, module Test.Framework, module Test.Framework.Providers.QuickCheck2 ) where import Test.Framework import Test.Framework.Providers.API import Test.Framework.Providers.QuickCheck2 data Result = Pass | Fail Str...
jwiegley/ghc-release
libraries/time/test/TestUtil.hs
gpl-3.0
999
0
11
214
336
177
159
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Module : Test.AWS.CloudFront.Internal -- Copyright : (c) 2013-2015 Brendan Hay -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- A copy of the ...
fmapfmapfmap/amazonka
amazonka-cloudfront/test/Test/AWS/CloudFront/Internal.hs
mpl-2.0
627
0
4
140
25
21
4
4
0
{-# LANGUAGE NoMonomorphismRestriction, FlexibleContexts, DeriveDataTypeable #-} -- | Diagrams-AST provides a data oriented interface to the <http://hackage.haskell.org/package/diagrams> package. module Diagrams.AST ( -- Functions outputImage, runImage, getAngleFraction, getAngleRadians, getAngleDegrees, ...
beni55/Diagrams-AST
src/Diagrams/AST.hs
bsd-3-clause
7,010
0
13
2,143
2,097
1,133
964
145
1
-- Copyright (c) 2015 Eric McCorkle. All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditi...
emc2/saltlang
src/salt/Control/Monad/ProofNames/Class.hs
bsd-3-clause
2,847
0
9
497
290
170
120
25
0
{-# LANGUAGE GADTs, RecordWildCards, MagicHash, ScopedTypeVariables, CPP, UnboxedTuples #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} -- | -- Execute GHCi messages. -- -- For details on Remote GHCi, see Note [Remote GHCi] in -- compiler/ghci/GHCi.hs. -- module GHCi.Run ( run, redirectInterrupts ) where imp...
sdiehl/ghc
libraries/ghci/GHCi/Run.hs
bsd-3-clause
13,446
0
18
2,942
3,055
1,492
1,563
232
38
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE EmptyDataDecls #-} module Text.Css where import Data.List (intersperse, intercalate) impo...
psibi/shakespeare
Text/Css.hs
mit
17,915
0
15
5,210
5,990
3,122
2,868
-1
-1
-- | A script for generating unrolled versions of three R2 benchmarks -- For example, `makeCoinBias 42` will generate a file `CoinBias42.hs` -- containing an unrolled version of the "coinBias" model that uses an -- array of length 42 module Unroll where import Text.PrettyPrint (parens, space, (<+>), punctuate, int, ...
zaxtax/hakaru
haskell/Tests/Unroll/Unroll.hs
bsd-3-clause
5,683
0
17
1,807
1,546
782
764
124
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module T17296 where import Data.Foldable import Data.Kind import Language.Haskell.TH hiding (Type) import System.IO data family Foo1 :: Type -> Type data instance Foo1 Bool = F...
sdiehl/ghc
testsuite/tests/th/T17296.hs
bsd-3-clause
1,017
6
10
274
297
171
126
-1
-1
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="hu-HU"> <title>Alert Filters | ZAP Extension</title> <maps> <homeID>top</homeID> <mapre...
denniskniep/zap-extensions
addOns/alertFilters/src/main/javahelp/org/zaproxy/zap/extension/alertFilters/resources/help_hu_HU/helpset_hu_HU.hs
apache-2.0
976
78
66
159
416
210
206
-1
-1
module SortProps where import Sort assert S0 = {sort []} ::: [] assert S1 = All x . {sort [x]} === {[x]} assert S2 = All x1 . All x2 . {sort [x1,x2]} === {[x1,x2]} \/ {sort [x1,x2]} === {[x2,x1]} --assert S = S0 /\ S1 /\ S2 ordered [] = True ordered [x] = True ordered (x1:x2:xs) = x1<=x2...
forste/haReFork
tools/hs2alfa/tests/SortProps.hs
bsd-3-clause
931
25
8
223
418
246
172
-1
-1
-- Test the classic "\SOH" ambiguity module Main(main) where main = do { print soh ; print (length (fst (head soh))) ; print so ; print (length (fst (head so))) } where so, soh :: [(String,String)] soh = reads "\"\\SOH\"" -- Should read \SOH so = reads "\"\\SOx\"" -- Should ...
ezyang/ghc
libraries/base/tests/reads001.hs
bsd-3-clause
343
0
13
100
116
63
53
6
1
-- Check that the record selector for maskMB unfolds in the body of f -- At one stage it didn't because the implicit unfolding looked too big -- Trac #2581 module ShouldCompile where import Data.Array.Base data MBloom s a = MB { shiftMB :: {-# UNPACK #-} !Int , maskMB :: {-# UNPACK #-} !Int ,...
bitemyapp/ghc
testsuite/tests/eyeball/record1.hs
bsd-3-clause
453
0
11
133
99
57
42
9
2
{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --no-main #-}
AndrewRademacher/twitter-conduit
tests/Spec.hs
bsd-2-clause
60
0
2
8
3
2
1
1
0
-- Test for trac #2141 module Foo where foo :: () -> () foo x = x { foo = 1 }
wxwxwwxxx/ghc
testsuite/tests/rename/should_fail/rnfail054.hs
bsd-3-clause
80
0
6
24
34
20
14
3
1
module Annfail13 where -- Testing that brackets are mandatory in the ANN syntax {-# ANN f id 1 #-} {-# ANN f 1 :: Int #-} f x = x
urbanslug/ghc
testsuite/tests/annotations/should_fail/annfail13.hs
bsd-3-clause
130
0
5
30
15
10
5
-1
-1
module Main where import Flight main = do input <- readFile "input.txt" let constraints = map parseConstraint (lines input) print $ maxScore 2503 constraints
corajr/adventofcode2015
14/Main.hs
mit
166
0
12
32
54
26
28
6
1
module Rebase.GHC.MVar ( module GHC.MVar ) where import GHC.MVar
nikita-volkov/rebase
library/Rebase/GHC/MVar.hs
mit
68
0
5
12
20
13
7
4
0
insert x [] = [x] insert x (y:ys) | x < y = x:y:ys | otherwise = y : insert x ys isort [] = [] isort (x:xs) = insert x (isort xs) main = do print $ isort [4, 6, 9, 8, 3, 5, 1, 7, 2]
shigemk2/haskell_abc
insert.hs
mit
203
0
9
69
149
77
72
8
1
module Options ( Command(..) , Options(..) , BuildParams(..) , AuthCreds(..) , parseOptions ) where import Options.Applicative import qualified Data.Text as T import qualified Data.ByteString.Char8 as BS import Data.Maybe (mapMaybe) import Jenkins.Types type JobId = T.Text newtype BuildParams = B...
afiore/jenkins-tty.hs
src/Options.hs
mit
3,617
0
14
1,002
964
512
452
87
2
import Control.Monad.Reader.Class (ask) import XMonad.Main (xmonad) import XMonad.Core ( X , spawn , ManageHook , layoutHook , startupHook , manageHook , logHook , modMask , terminal , borderWidth , normalBorderColor , focusedBorderColo...
iambernie/dotfiles
.xmonad/xmonad.hs
mit
3,536
0
13
1,031
776
462
314
86
1
sumSquareDifference :: Int sumSquareDifference = let boundary = 100 sumSquare = sum [i^2 | i <- [1..100]] squareSum = sum [1..100] ^ 2 in squareSum - sumSquare
samidarko/euler
problem006.hs
mit
187
0
13
54
71
37
34
6
1
import qualified Data.Map as Map data Person = Person { firstName :: String , lastName :: String , age :: Int , height :: Float , phoneNumber :: String , flavor :: String } deriving (Show) data Car = Car { compan...
yhoshino11/learning_haskell
ch7/ch7.hs
mit
4,769
3
11
1,377
1,672
905
767
111
3
{-# LANGUAGE MultiWayIf #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} module Language.Jass.Codegen.Type( toLLVMType , toLLVMType' , defaultValue , jassArray , arraySize , sizeOfType , codeTypeSize , codeTypeStruct , pointerSize , get...
NCrashed/hjass
src/library/Language/Jass/Codegen/Type.hs
mit
7,842
0
19
1,392
2,153
1,108
1,045
167
4
{-# LANGUAGE RecordWildCards #-} module Interactive.Pipeline ( run_pipeline, Params' (..), Params, pos ) where -- Modules --import Browser import Document.Document import Documentation.SummaryGen import Utilities.Config hiding ( wait ) import Interactive.Observable import Interactive.Serialize import ...
literate-unitb/literate-unitb
src/Interactive/Pipeline.hs
mit
14,380
1
28
6,002
4,108
2,056
2,052
-1
-1
module System.Flannel.CommandSpec ( spec ) where import System.Flannel.Command import qualified System.Flannel.Params as P import Test.Hspec spec :: Spec spec = do describe "runCommand" $ do it "executes the command" $ do result <- runCommand P.defaultParams $ isSet "no set" ...
nahiluhmot/flannel
spec/System/Flannel/CommandSpec.hs
mit
2,205
0
20
780
600
274
326
51
1
{-# LANGUAGE OverloadedStrings #-} module PillsHs.Config where import Clay -- the maximum width of the container in pixels pillsMaxWidth :: Size Abs pillsMaxWidth = px 1024 pillsWideMaxWidth :: Size Abs pillsWideMaxWidth = px 1180 pillsWiderMaxWidth :: Size Abs pillsWiderMaxWidth = px 1366 -- the minimum width of ...
polo2ro/pillshs
src/PillsHs/Config.hs
mit
588
0
5
98
87
48
39
13
1
module Lambency.UI ( UIWire, WidgetEvent(..), WidgetState(..), Widget(..), screen, animatedSpriteRenderer, spriteRenderer, colorRenderer, textRenderer, dynamicTextRenderer, combineRenderers, hbox, vbox, glue ) where -------------------------------------------------------------------------------- import Contr...
Mokosha/Lambency
lib/Lambency/UI.hs
mit
8,644
0
24
2,213
3,174
1,607
1,567
186
9
module DotName where -- Example from Data.Function -- uses an infix operator as a pattern variable -- I think the only solution is to rename to normal variable and make all uses prefix on :: (b -> b -> c) -> (a -> b) -> a -> a -> c (.*.) `on` f = \x y -> f x .*. f y
antalsz/hs-to-coq
examples/tests/DotName.hs
mit
270
0
8
65
78
44
34
3
1
import Control.Concurrent (threadDelay) import Control.Exception import Control.Monad import qualified Graphics.Rendering.OpenGL as GL import Graphics.Rendering.OpenGL (($=)) import qualified Graphics.UI.GLFW as GLFW import Prelude hiding (catch) main = do -- initialize has to come first. If it doesn't return True, ...
spetz911/progames
GLFW/glfw01.hs
mit
3,192
1
15
734
744
390
354
55
1
module HandBrake.T.Encode ( tests ) where -- base -------------------------------- import Control.Applicative ( pure ) import Data.Function ( ($), (&) ) import Data.List.NonEmpty ( NonEmpty( (:|) ) ) import Data.Tuple ( fst ) import System.Exit ( ExitCode ) import System.IO (...
sixears/handbrake
src/HandBrake/T/Encode.hs
mit
16,599
43
35
7,017
2,751
1,697
1,054
-1
-1
import Diagrams.Prelude import Diagrams.Backend.Cairo import Data.Default import Control.Lens ((^.)) import Data.List import Data.Ord import Diagrams.Plots -- | project a 3d point to 2d projection :: (Double, Double, Double) -- ^ position of camera -> (Double, Double, Double) -- ^ orientation of camera ...
kaizhang/haskell-plot
Test.hs
mit
2,558
0
13
775
1,082
629
453
52
1
{-# LANGUAGE CPP, FlexibleContexts, JavaScriptFFI, OverloadedStrings #-} import Control.Concurrent import Control.Concurrent.STM import Control.Exception import Control.Monad import Control.Monad.State import Data.IORef import qualified Data.Serialize as S import qualified Data.Text as T import System.Random import F...
quyse/pekabeaver
Main.hs
mit
24,202
341
34
5,982
8,019
4,120
3,899
527
42
doubleMe x = x + x doubleUs x y = x*2 + y*2 lucky :: (Integral a) => a -> String lucky 7 = "LUCKY NUMBER SEVEN!" lucky x = "Sorry, you're out of luck, pal!" maximum' :: (Ord a) => [a] -> a maximum' [] = error "maximum of empty list" maximum' [x] = x maximum' (x:xs) | x > maxTail = x | otherwise = m...
dalonng/hellos
haskell.hello/learnyouahaskell01.hs
gpl-2.0
549
0
8
155
234
117
117
18
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} module Lambda where import Data.List (elemIndex, (\\), genericIndex) import Data.Set (Set, toList, delete, union, singleton) import Control.Arrow data NamedTerm = NVar String | NAbs String NamedTerm | NApp NamedTerm NamedTerm der...
robertclancy/tapl
lambda/src/Lambda.hs
gpl-2.0
4,191
0
13
1,638
1,527
778
749
78
4
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, MultiParamTypeClasses #-} module String_Matching.BM.Instance where import String_Matching.Option import Autolib.TES.Identifier import Autolib.ToDoc import Autolib.Reader import Autolib.Set import Data.Typeable data Ord a => Instance a = Instance { alphabe...
Erdwolf/autotool-bonn
src/String_Matching/BM/Instance.hs
gpl-2.0
1,189
6
10
360
314
173
141
26
1
{- | Module : $Header$ Description : Provers for propositional logic Copyright : (c) Dominik Luecke, Uni Bremen 2007 License : GPLv2 or higher, see LICENSE.txt Maintainer : luecke@informatik.uni-bremen.de Stability : experimental Portability : portable This is the connection of the SAT-Solver min...
nevrenato/Hets_Fork
Propositional/Prove.hs
gpl-2.0
10,207
6
22
2,861
1,861
1,000
861
175
4
{-# LANGUAGE GeneralizedNewtypeDeriving, TemplateHaskell #-} {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} module Lamdu.Sugar.Convert.Monad ( OuterScopeInfo(..), osiPos, osiScope , RecursiveRef(..), rrDefI, rrDefType , ScopeInfo(..), siRecordParams, siNullParams, siLetItems, siExtractPos, siFloa...
lamdu/lamdu
src/Lamdu/Sugar/Convert/Monad.hs
gpl-3.0
6,248
0
20
1,440
1,747
957
790
-1
-1
module XMonad.Actions.Fizzixnerd where import XMonad import System.Desktop.Commands.Fizzixnerd waitHalfSecond :: X () waitHalfSecond = do spawn "sleep 0.5" runBrowser :: X () runBrowser = do spawn browser runExplorer :: X () runExplorer = do spawn explorer runSystemMonitor :: X () runSystemMonitor = do sp...
Fizzixnerd/xmonad-config
site-haskell/src/XMonad/Actions/Fizzixnerd.hs
gpl-3.0
944
0
7
178
311
152
159
45
1
{- Merch.Race.UI.DrawingCombinators - Wrapper for Graphics.DrawingCombinators Copyright 2013 Alan Manuel K. Gloria This file is part of Merchant's Race. Merchant's Race 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 Found...
AmkG/merchants-race
Merch/Race/UI/DrawingCombinators.hs
gpl-3.0
5,655
0
18
1,534
1,646
882
764
138
3
module AutocorrectorSpec (spec) where import Test.Hspec import Language.Mulang import Language.Mulang.Analyzer.Autocorrector import Language.Mulang.Analyzer.Analysis hiding (spec) import qualified Language.Mulang.Analyzer.Analysis as A import Data.Maybe (fromJust) impo...
mumuki/mulang
spec/AutocorrectorSpec.hs
gpl-3.0
11,462
0
22
2,259
3,471
1,700
1,771
164
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-sqladmin/gen/Network/Google/Resource/SQL/SSLCerts/List.hs
mpl-2.0
3,248
0
15
786
388
233
155
64
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/NodeTemplates/Delete.hs
mpl-2.0
4,735
0
17
1,072
552
330
222
87
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Composer.Types -- Copyright : (c) 2015-2016 Brendan Ha...
brendanhay/gogol
gogol-composer/gen/Network/Google/Composer/Types.hs
mpl-2.0
5,988
0
7
1,444
624
432
192
177
1
import Data.List -- needed for strict eval foldl, foldl' ------------------------------------------------------ ------- 1. Find the last element of a list. ---------- ------------------------------------------------------ last' :: [xs] -> xs -- .74s - 2.40s - 6.05s last' xs = head (reverse xs) -- with pattern mat...
tonyfischetti/99-haskell-problems
Q1to10.hs
unlicense
7,242
0
11
1,615
1,579
864
715
84
2
{-# LANGUAGE NoMonomorphismRestriction #-} module DetermineTheType where -- simple example example = 1 _1a = (* 9) 6 _1b = head [(0,"doge"),(1,"kitteh")] _1c = head [(0 :: Integer, "doge"),(1,"kitteh")] _1d = if False then True else False _1e = length [1,2,3,4,5] _1f = (length [1,2,3,4]) > (length "TACOCAT") _2 = w...
dmp1ce/Haskell-Programming-Exercises
Chapter 5/determineTheType.hs
unlicense
530
0
8
155
275
162
113
26
2
module Problem021 where import Data.List (group) main = print $ sum $ filter amicable [2..10000] amicable x = x /= x' && sumd x' == x where x' = sumd x sumd x = product (map f1 gs) - product (map f2 gs) where gs = map (\g -> (head g, length g)) $ group $ factors x f1 (p, m) = (p ^ (m + 1) - 1) `div` (...
vasily-kartashov/playground
euler/problem-021.hs
apache-2.0
647
0
13
231
396
206
190
17
1
-- Copyright 2016 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...
polux/snippets
Lamport.hs
apache-2.0
9,470
0
20
2,086
3,457
1,813
1,644
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE RecursiveDo #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections...
gcross/LogicGrowsOnTrees
LogicGrowsOnTrees/tests/test-Examples.hs
bsd-2-clause
3,236
0
27
1,112
714
391
323
69
2
{-# LANGUAGE TemplateHaskell, TypeSynonymInstances, FlexibleInstances, OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Unittests for ganeti-htools. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without ...
grnet/snf-ganeti
test/hs/Test/Ganeti/Objects.hs
bsd-2-clause
29,828
0
25
7,080
5,677
2,928
2,749
535
2
import Test.Hspec import Test.QuickCheck import Control.Exception (evaluate) import GameOfLife main :: IO () main = hspec $ do describe "GameOfLife" $ do describe "NextGeneration" $ do it "Create valid next glider" $ do nextGeneration (glider 5 5) `shouldBe` [ ...
AM636E/HaskellGameOfLife
test/Spec.hs
bsd-3-clause
1,165
0
22
387
421
239
182
24
1
-- jrc -- json-rpc request client import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy.Char8 as B8L import qualified Data.Streaming.Network as NetStream import qualified Options.Applicative as Opts import qualified Network.Socket as Socket import Options.Applicative ((<>)) import qualified JsonR...
shmookey/bc-tools
src/jrc.hs
bsd-3-clause
1,515
0
18
367
399
211
188
41
2
{-# LANGUAGE TypeOperators #-} -- | Test of long-life for dynamics, via three rotations: -- rotate 5 dynamic behaviors -- rotate 6 inputs on left -- rotate 7 inputs on right -- for a total 210 combinations based on clock. module Main ( main ) where import Sirea.Prelude import Sirea.Clock import Si...
dmbarbour/Sirea
tst/RotDyn.hs
bsd-3-clause
1,298
0
11
332
576
307
269
33
1
{-# LANGUAGE OverloadedStrings #-} module Database.Tempodb.Methods.Series ( seriesCreate , seriesGet , seriesList , seriesUpdate , seriesDelete ) where import Control.Monad.Reader import Data.Aeson as A import Data.ByteString.Char8 as C8 import Data.ByteString.Lazy...
ixmatus/hs-tempodb
src/Database/Tempodb/Methods/Series.hs
bsd-3-clause
2,668
0
13
733
853
427
426
70
2
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Dhall.Test.TypeInference where import Control.Exception (SomeException (..)) import Data.Text (Text) import Prelude hiding (FilePath) import Test.Tasty (TestTree) import Turtle (FilePath, (</>)) import qu...
Gabriel439/Haskell-Dhall-Library
dhall/tests/Dhall/Test/TypeInference.hs
bsd-3-clause
4,759
0
17
1,288
952
500
452
84
3
{-# LANGUAGE RankNTypes #-} -- This program must be called with GHC's libdir as the single command line -- argument. module Main where -- import Data.Generics import Data.Data import Data.List import System.IO import GHC import BasicTypes import DynFlags import MonadUtils import Outputable import Bag (filterBag,isEmp...
sdiehl/ghc
testsuite/tests/ghc-api/annotations/parseTree.hs
bsd-3-clause
3,062
1
20
1,053
820
430
390
63
2
{-# LANGUAGE FlexibleInstances, ScopedTypeVariables, TypeSynonymInstances #-} -- |This module contains classes and functions to relate Haskell types -- with OpenGL DataTypes (typically used to describe the values stored -- in arrays) and VariableTypes (used as attributes and uniforms in -- GLSL programs). module GLUtil...
coghex/abridgefaraway
src/GLUtil/TypeMapping.hs
bsd-3-clause
3,818
0
7
512
863
450
413
60
1
{- Provides constants used by the CORDIC algorithm. - `alistF` is a list of angles [ atan 1, atan (1/2), atan (1/4, ... ] - `klistF` is a list of the scaling constants for each iteration - Traditionally these would have been hard-coded for performance; they are - generated programmatically here for simplicity. -} ...
chronon-io/cordic
src/Util.hs
bsd-3-clause
935
0
12
212
209
117
92
15
1
-- | RSS 2.0 feed source. -- Items are produced from RSS 2.0 feeds. -- The itmName, itmURL and itmDescription fields are filled from the -- corresponding RSS fields. -- The itmTags field is populated from the RSS tags. -- -- TODO: support for other feed formats. module Network.LambNyaa.Source.Feed (rssFeed, r...
valderman/lambnyaa
Network/LambNyaa/Source/Feed.hs
bsd-3-clause
1,739
0
19
392
408
219
189
34
2
module Data.TestPolynomial where import Prelude hiding (Rational, gcd, negate, (*), (+), (-), (/), (^)) import Domains.Euclidean import Domains.Ring import Data.Polynomial import Data.Rational import Collins import TestUtil x, x2, x3, ...
pmilne/algebra
test/Data/TestPolynomial.hs
bsd-3-clause
1,512
2
20
502
782
407
375
37
1
{-# LANGUAGE StandaloneDeriving #-} module Data.Text.Index ( Index , lookupWord , lookupPhrase , Weight, toDouble , size , empty , addDocument , removeDocument )where import qualified Data.Search.Results as Results import Data.Foldable (foldMap, for_) import Data.Func...
ariep/text-index
src/Data/Text/Index.hs
bsd-3-clause
7,323
0
19
1,922
2,480
1,325
1,155
164
5
module Callback.MouseMove where import qualified Data.IORef as R import Control.Applicative ((<$>)) import qualified Utils as LU import qualified Graphics.UI.GLFW as GLFW import qualified AppData as AP newMouseMoveCallback :: AP.AppDataRef -> GLFW.CursorPosCallback newMouseMoveCallback appRef = callback where ...
dan-t/layers
src/Callback/MouseMove.hs
bsd-3-clause
480
0
13
86
133
76
57
11
1
module Network.XMPP.Address ( XMPPLocal , localText , localFromText , XMPPDomain , domainText , domainFromText , XMPPResource , resourceText , resourceFromText , XMPPAddress(..) , xmppAddress' , xmppAddress , addressToText ...
abbradar/yaxmpp
src/Network/XMPP/Address.hs
bsd-3-clause
7,050
0
20
1,968
1,789
956
833
-1
-1
{-# OPTIONS -fno-implicit-prelude #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal.Error -- Copyright : (c) The FFI task force 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : ffi@haskell.org -- Stabil...
OS2World/DEV-UTIL-HUGS
libraries/Foreign/Marshal/Error.hs
bsd-3-clause
2,293
0
11
617
412
236
176
24
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TypeFamilies #-} -- | Types used while planning how to build everything in a project. -- -- Primarily this is the 'ElaboratedInstallPlan'. -- module Distribution.Client.ProjectPlanning.Types ( SolverInstallPlan, -- * Elaborated in...
sopvop/cabal
cabal-install/Distribution/Client/ProjectPlanning/Types.hs
bsd-3-clause
20,460
0
13
4,730
2,394
1,434
960
255
3
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE Over...
rfranek/duckling
Duckling/Time/NB/Corpus.hs
bsd-3-clause
22,209
0
11
9,535
7,021
4,275
2,746
479
1
module Test.Property where import Prelude hiding ((>>)) import Elm.Utils ((|>), (>>)) import Test.Tasty import Test.Tasty.HUnit import Test.Tasty.QuickCheck import Test.QuickCheck.IO () import Reporting.Annotation (stripRegion) import qualified AST.Module import qualified Data.Text as Text import qualified Data.May...
nukisman/elm-format-short
tests/Test/Property.hs
bsd-3-clause
3,229
0
17
943
641
340
301
78
1
{-# LANGUAGE PatternGuards #-} module Main where import Tests.Testframe import System.Environment (getArgs) import Data.Char (toLower) import System.Console.GetOpt import System.Exit (ExitCode(..), exitWith) import System.IO (hPutStrLn, stderr) data Flag = Alg String | TestVar String main = do args <- getArgs ...
hakoja/SHA3
main.hs
bsd-3-clause
1,174
0
15
257
330
188
142
27
3
module Main where import Conifer.Types import Control.Monad (when) import System.Exit (exitFailure) import Test.HUnit main = do Counts c t e f <- runTestTT tests when (e > 0 || f > 0) exitFailure tests = TestList [ TestLabel "getUserDataFromJSON_None" $ TestCase getUserDataFromJSON_None , Tes...
bobgru/conifer
test/unit-tests/parserTests.hs
bsd-3-clause
8,654
0
11
4,700
1,074
643
431
135
1
-- | -- Module : Crypto.Internal.DeepSeq -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- -- Simple abstraction module to allow compilation without deepseq -- by defining our own NFData class if not compiling with deepseq -- s...
nomeata/cryptonite
Crypto/Internal/DeepSeq.hs
bsd-3-clause
849
0
5
163
36
29
7
12
0
{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE...
octopuscabbage/UltimateTicTacToeServer
src/Account/Types.hs
bsd-3-clause
948
0
7
226
82
51
31
19
0
{-# LANGUAGE TemplateHaskell #-} module AWS.CloudWatch.Types where import AWS.Lib.FromText data Metric = Metric { metricDimensions :: [Dimension] , metricName :: Text , metricNameSpace :: Text } deriving (Show, Eq) data Dimension = Dimension { dimensionName :: Text , dimensionValue :: T...
IanConnolly/aws-sdk-fork
AWS/CloudWatch/Types.hs
bsd-3-clause
4,515
0
9
915
912
550
362
129
1
#!/usr/bin/env runhaskell import Distribution.Simple main = defaultMain
bcoppens/Lattices
Setup.hs
gpl-3.0
74
0
4
9
12
7
5
2
1
module Tests where import qualified Text.Rudeify.Tests main :: IO () main = Text.Rudeify.Tests.main
AaronShiny/rudeify
tests/Tests.hs
gpl-3.0
102
0
6
15
30
19
11
4
1
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="ru-RU"> <title>Windows WebDrivers</title> <maps> <homeID>top</homeID> <mapref location=...
secdec/zap-extensions
addOns/webdrivers/webdriverwindows/src/main/javahelp/org/zaproxy/zap/extension/webdriverwindows/resources/help_ru_RU/helpset_ru_RU.hs
apache-2.0
963
77
66
156
407
206
201
-1
-1
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="fil-PH"> <title>TLS Debug | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref ...
veggiespam/zap-extensions
addOns/tlsdebug/src/main/javahelp/org/zaproxy/zap/extension/tlsdebug/resources/help_fil_PH/helpset_fil_PH.hs
apache-2.0
985
80
66
162
421
212
209
-1
-1
{- Copyright 2010-2012 Cognimeta Inc. 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 agreed to in writ...
bitemyapp/perdure
src/Database/Perdure/AllocCopy.hs
apache-2.0
2,173
0
13
518
406
208
198
28
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE BangPatterns, MagicHash, CPP, TypeFamilies #-} #if __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-} #endif -- Using TemplateHaskell in text unconditionally is unacceptable, as -- it's a GHC boot library. TemplateHaskellQuotes was added in 8.0, so -- this would s...
bgamari/text
src/Data/Text/Lazy.hs
bsd-2-clause
58,598
0
16
14,073
10,830
5,993
4,837
820
5
{-# LANGUAGE TypeSynonymInstances #-} module Foundation.Math.Trigonometry ( Trigonometry(..) ) where import Basement.Compat.Base import qualified Prelude -- | Method to support basic trigonometric functions class Trigonometry a where -- | the famous pi value pi :: a -- | sine sin ...
vincenthz/hs-foundation
foundation/Foundation/Math/Trigonometry.hs
bsd-3-clause
1,487
0
7
469
361
212
149
47
0
{-# LANGUAGE PatternGuards, CPP, ForeignFunctionInterface #-} ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow 2004-2009. -- -- Package management tool -- ----------------------------------------------------------------------------- module Main (main) wh...
akru/haste-compiler
utils/haste-pkg/haste-pkg.hs
bsd-3-clause
71,975
3
99
19,824
16,873
8,499
8,374
1,279
32
-- -- Copyright © 2013-2014 Anchor Systems, Pty Ltd and Others -- -- The code in this file, and the program it is a part of, is -- made available to you by its authors as open source software: -- you can redistribute it and/or modify it under the terms of -- the 3-clause BSD licence. -- {-# OPTIONS_GHC -fno-warn-orpha...
anchor/marquise
lib/Marquise/IO/SpoolFile.hs
bsd-3-clause
4,886
0
16
1,020
1,079
571
508
98
2
module Blockchain.SampleTransactions where import Prelude hiding (EQ) import qualified Data.ByteString as B import Network.Haskoin.Internals hiding (Address) import Blockchain.Data.Address import Blockchain.Data.Code import Blockchain.Data.Transaction import Blockchain.Constants import Blockchain.ExtendedECDSA imp...
jamshidh/ethereum-vm
src/Blockchain/SampleTransactions.hs
bsd-3-clause
11,275
0
18
4,373
4,503
2,637
1,866
537
1
{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleInstances, MultiParamTypeClasses, TypeFamilies, StandaloneDeriving #-} ----------------------------------------------------------------------------- -- | -- Module : Network.Kontiki.Monad -- Copyright : (c) 201...
NicolasT/kontiki
src/Network/Kontiki/Monad.hs
bsd-3-clause
3,757
0
11
945
846
457
389
57
1
{- A simple homogeneous pair type with useful Functor, Applicative, and Traversable instances. -} {-# LANGUAGE CPP #-} module Pair ( Pair(..), unPair, toPair, swap ) where #include "HsVersions.h" import Outputable import Control.Applicative #if __GLASGOW_HASKELL__ < 709 import Data.Foldable import Data.Monoid impor...
green-haskell/ghc
compiler/utils/Pair.hs
bsd-3-clause
1,191
0
8
253
430
227
203
25
1
{-# language DataKinds #-} {-# language OverloadedLists #-} {-# language OverloadedStrings #-} {-# language QuasiQuotes #-} {-# language Rank2Types #-} {-# language TypeApplications #-} {-# language TypeFamilies #-} module Planetary.Core.Eval.Test (unitTests, runTest, mkLogger) where import Control.Lens import Control...
joelburget/interplanetary-computation
src/Planetary/Core/Eval/Test.hs
bsd-3-clause
11,459
0
24
4,553
2,481
1,275
1,206
-1
-1
{-# LANGUAGE CPP, MagicHash #-} -- | Dynamically lookup up values from modules and loading them. module DynamicLoading ( #ifdef GHCI -- * Loading plugins loadPlugins, loadFrontendPlugin, -- * Force loading information forceLoadModuleInterfaces, forceLoadNameModuleInterf...
vTurbine/ghc
compiler/main/DynamicLoading.hs
bsd-3-clause
11,451
1
24
3,117
1,998
1,041
957
11
1
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="sr-CS"> <title>JSON View</title> <maps> <homeID>jsonview</homeID> <mapref location="map...
thc202/zap-extensions
addOns/jsonview/src/main/javahelp/help_sr_CS/helpset_sr_CS.hs
apache-2.0
959
77
66
156
407
206
201
-1
-1
-- | Put common type definitions here to break recursive module dependencies. module RegAlloc.Linear.Base ( BlockAssignment, Loc(..), regsOfLoc, -- for stats SpillReason(..), RegAllocStats(..), -- the allocator monad RA_State(..), ) where import Ghc...
ezyang/ghc
compiler/nativeGen/RegAlloc/Linear/Base.hs
bsd-3-clause
3,779
0
10
1,161
392
245
147
65
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude, MagicHash #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric -- Copyright : (c) The University of Glasgow 2002 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer...
jwiegley/ghc-release
libraries/base/Numeric.hs
gpl-3.0
7,732
0
13
1,977
1,332
726
606
107
2
module ShouldFail where -- strictness annotations on the argument to a newtype constructor -- are not allowed. newtype N a = T ![a]
urbanslug/ghc
testsuite/tests/parser/should_fail/readFail008.hs
bsd-3-clause
133
2
6
24
20
14
6
4
0
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Network.IPFS.Types ( IPFS (..), Endpoint (..), Multihash (..), Key, Data, Template (..), FileHash (..), Link (..), Node (..), Obj...
basile-henry/hs-ipfs-api
src/Network/IPFS/Types.hs
mit
4,247
0
14
1,313
1,150
657
493
111
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module IHaskell.Display.Widgets.Output ( -- * The Output Widget OutputWidget -- * Constructor , mkOutput -- * Using the output wi...
gibiansky/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Output.hs
mit
3,538
0
17
810
770
408
362
75
1
{-# LANGUAGE ScopedTypeVariables #-} module CNFList (tests) where import BooleanLaws import SimplifyLaws import BooleanModelLaws import FreeBoolean import Test.Tasty import Test.QuickCheck import Control.Applicative import Data.Function (on) import Data.Algebra.Boolean.Negable (Negable, Neg(..)) import Data.Algebr...
phadej/boolean-normal-forms
tests/CNFList.hs
mit
824
0
11
131
266
150
116
23
1