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
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[RnExpr]{Renaming of expressions} Basically dependency analysis. Handles @Match@, @GRHSs@, @HsExpr@, and @Qualifier@ datatypes. In general, all of these functions return a renamed thing, and a set of free variables. -} {-# LANGUAGE CPP #-} {-# LA...
tjakway/ghcjvm
compiler/rename/RnExpr.hs
bsd-3-clause
78,767
107
22
22,769
19,964
10,601
9,363
1,165
15
-- * Signature module Resolution ( rename , termMatch , resolveClauses , incorporate , basicResolution , resolution , positiveResolution , sosResolution ) where -- * Imports import Util.Prelude import qualified Fol as Fol import qualified Formula as F import FormulaSyn import qualified Prop as P...
etu-fkti5301-bgu/alt-exam_automated_theorem_proving
src/Resolution.hs
bsd-3-clause
13,216
0
19
2,788
2,769
1,426
1,343
155
5
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-} {- | Module : ./Comorphisms/CoCFOL2IsabelleHOL.hs Description : Extension of CFOL2IsabelleHOL to CoCASL Copyright : (c) Till Mossakowski and Uni Bremen 2003-2005 License : GPLv2 or higher, see LICENSE.txt Maintainer : haus...
spechub/Hets
Comorphisms/CoCFOL2IsabelleHOL.hs
gpl-2.0
5,795
0
24
1,676
1,306
691
615
102
5
{- | Module : ./ATC/Sml_cats.hs Description : conversions to and from old SML aterm format Copyright : (c) Klaus Luettich and Uni Bremen 2002-2004 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-portable (imports Logic.Grot...
spechub/Hets
ATC/Sml_cats.hs
gpl-2.0
80,073
8
24
31,924
19,925
10,081
9,844
1,672
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-cognito-identity/gen/Network/AWS/CognitoIdentity/UpdateIdentityPool.hs
mpl-2.0
9,244
0
21
2,036
1,187
703
484
145
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-redshift/gen/Network/AWS/Redshift/DescribeReservedNodeOfferings.hs
mpl-2.0
8,080
0
16
1,594
931
555
376
108
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/DescribeEvents.hs
mpl-2.0
8,617
0
12
1,871
1,319
775
544
125
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.CloudWatch.Waiters -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public Licen...
fmapfmapfmap/amazonka
amazonka-cloudwatch/gen/Network/AWS/CloudWatch/Waiters.hs
mpl-2.0
633
0
4
122
39
31
8
7
0
-- |This modules bundles all vectorised versions of Prelude definitions. -- -- /This module should not be explicitly imported in user code anymore./ -- User code should only import 'Data.Array.Parallel' and, until the -- vectoriser supports type classes, the type-specific -- modules 'Data.Array.Parallel.Prelude.*'....
mainland/dph
dph-lifted-vseg/Data/Array/Parallel/Prelude.hs
bsd-3-clause
733
0
5
100
94
71
23
9
0
-- Compile this with 'ghc -o Game Game.hs' and run it with './Game'. import Data.List import Graphics.Gloss.Game -- Window size width = 600 height = 400 -- A sprite representing our character slimeSprite = scale 0.5 0.5 (bmp "Slime.bmp") slimeWidth = fst (snd (boundingBox slimeSprite)) slimeHeight = snd (snd (bou...
mchakravarty/lets-program
step6/Game.hs
bsd-3-clause
4,817
0
17
1,219
1,348
736
612
54
3
-- | Validate and Transform Constraints to Ensure various Invariants ------------------------- -- 1. Each binder must be associated with a UNIQUE sort {-# LANGUAGE TupleSections #-} module Language.Fixpoint.Solver.Validate ( -- * Validate FInfo validate -- * Transform FInfo to enforce invar...
rolph-recto/liquid-fixpoint
src/Language/Fixpoint/Solver/Validate.hs
bsd-3-clause
8,797
0
14
1,686
2,331
1,268
1,063
116
1
{-# LANGUAGE TypeFamilies, DataKinds, UndecidableInstances #-} module T6018failclosed9 where type family E2 (a :: Bool) = r | r -> a where E2 False = True E2 True = False E2 a = False
acowley/ghc
testsuite/tests/typecheck/should_fail/T6018failclosed9.hs
bsd-3-clause
197
0
6
47
50
31
19
6
0
{-# OPTIONS -cpp #-} -- -- Copyright (c) 2004 Don Stewart - http://www.cse.unsw.edu.au/~dons -- LGPL version 2.1 or later (see http://www.gnu.org/copyleft/lesser.html) -- module TestIO ( resource, resource_dyn ) where import API import Data.Dynamic import Distribution.Package import Language.Haskell.Parser import N...
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/testsuite/load/io/TestIO.hs
bsd-3-clause
2,648
0
13
709
455
256
199
38
1
{-# LANGUAGE Haskell98, MultiParamTypeClasses, FunctionalDependencies, TypeSynonymInstances, FlexibleInstances, FlexibleContexts #-} {-# LINE 1 "Text/Regex/Base/Impl.hs" #-} ----------------------------------------------------------------------------- -- | -- Module : Text.Regex.Impl -- Copyright : (c) Chris K...
phischu/fragnix
tests/packages/scotty/Text.Regex.Base.Impl.hs
bsd-3-clause
1,942
0
10
329
345
204
141
21
2
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : IDE.SourceCandy -- Copyright : (c) Juergen Nicklisch-Franken, Hamish Mackenzie -- License : GNU-GPL -- -- Maintainer : <maintainer at leksah.org> -- Stability : provisional ...
573/leksah
src/IDE/SourceCandy.hs
gpl-2.0
13,578
18
29
4,968
3,456
1,703
1,753
265
9
{-#LANGUAGE ParallelListComp#-} module ShapeMatch where import CV.Image import CV.TemplateMatching import qualified CV.ImageMath as IM import System.Directory import Control.Applicative import Data.Maybe import Control.Monad import Data.List import CV.Drawing import CV.Transforms import CV.ImageOp main = do file...
BeautifulDestinations/CV
examples/ShapeMatch.hs
bsd-3-clause
921
2
19
250
296
162
134
-1
-1
-- | We decided to rename the Builder modules. Sorry about that. -- -- The old names will hang about for at least once release cycle before we -- deprecate them and then later remove them. -- module Data.ByteString.Lazy.Builder ( module Data.ByteString.Builder ) where import Data.ByteString.Builder
markflorisson/hpack
testrepo/bytestring-0.10.4.1/Data/ByteString/Lazy/Builder.hs
bsd-3-clause
304
0
5
49
28
21
7
3
0
module Foo () where moo = insert 4 [1, 2, 3] {-@ insert :: (Ord a) => x:a -> xs: [a]<{\fld v -> (v >= fld)}> -> {v: [a]<{\fld v -> (v >= fld)}> | len(v) = (1 + len(xs)) } @-} insert y [] = [y] insert y (x : xs) | y > {- <= -} x = y : x : xs | otherwise =...
mightymoose/liquidhaskell
tests/neg/grty2.hs
bsd-3-clause
338
0
8
140
96
51
45
5
1
module C3 where import D3 (pow) anotherFun ((x : xs)) = (x ^ pow) + (anotherFun xs) anotherFun [] = 0
kmate/HaRe
old/testing/liftToToplevel/C3_AstOut.hs
bsd-3-clause
103
0
8
22
57
32
25
4
1
-- Record field selectors imported alone; should be ok module M where import Rn042_A( field )
ghc-android/ghc
testsuite/tests/rename/should_compile/rn042.hs
bsd-3-clause
97
0
5
19
13
9
4
2
0
{-# LANGUAGE DisambiguateRecordFields #-} {-# LANGUAGE DuplicateRecordFields #-} {-| Hoon's `map` and `set` types and conversions to/from Nouns. -} module Urbit.Noun.Tree ( HoonSet, setToHoonSet, setFromHoonSet , HoonMap, mapToHoonMap, mapFromHoonMap ) where import ClassyPrelude import Control.Lens...
urbit/urbit
pkg/hs/urbit-noun/lib/Urbit/Noun/Tree.hs
mit
5,369
0
17
1,763
2,458
1,233
1,225
-1
-1
{- Self powers Problem 48 The series, 1^1 + 2^2 + 3^3 + ... + 10^10 = 10405071317. Find the last ten digits of the series, 1^1 + 2^2 + 3^3 + ... + 1000^1000. -} last_ten_digits i = i `mod` (10^10) spow n = spow' n n 1 where spow' n i out | out==0 = out | i == 0 = out | i > 0 = spow' n (i-1) ...
bertdouglas/euler-haskell
001-050/48a.hs
mit
454
3
10
135
178
83
95
10
1
class Queue a where empty :: a b isEmpty :: a b -> Bool snoc :: a b -> b -> a b _head :: a b -> b _tail :: a b -> a b data BatchedQueue a = BatchedQueue [a] [a] deriving (Show) instance Queue BatchedQueue where empty = BatchedQueue [] [] isEmpty (BatchedQueue f r) = null r snoc (Batch...
NonLogicalDev/ucsd_cat125
materials/test.hs
mit
648
19
9
182
331
165
166
18
1
main = putStrLn "Hola, mundo!"
INGSOFT3-FACENA/ProbandoGit
Joaquín/holamundo.hs
mit
31
1
4
5
12
4
8
1
1
{-# OPTIONS_GHC -fno-warn-type-defaults #-} {-# LANGUAGE RecordWildCards #-} import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Hamming (distance) main :: IO () main = hspecWith defaultConfig {configFastFa...
exercism/xhaskell
exercises/practice/hamming/test/Tests.hs
mit
2,558
7
8
1,135
487
289
198
54
1
module NLP.Senna.Functions ( createContext , createContextFromPath , freeContext , withContext , withContextFromPath , tokenize ) where import Control.Applicative ((<$>)) import Control.Exception (bracket) import Foreign.C.String (newCString) import NLP.Senna.Foreign import NLP.Senna.Types import Pat...
slyrz/hase
src/NLP/Senna/Functions.hs
mit
2,120
0
9
355
313
183
130
36
1
module Add where add :: Int -> Int -> Int add = (+)
tattsun/travis-test
src/Add.hs
mit
53
0
6
14
24
15
9
3
1
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Hadoop.Protos.HdfsProtos.VersionRequestProto (VersionRequestProto(..)) where import Prelude ((+), (/)) import qualified Prelude as Prelude' import qualified Data.Typ...
alexbiehl/hoop
hadoop-protos/src/Hadoop/Protos/HdfsProtos/VersionRequestProto.hs
mit
2,761
1
16
529
554
291
263
53
0
import Data.Char import Data.Numbers.Primes cand :: Int -> Int -> Int -> [Int] cand n d k | n < k = [] | n == 0 = [0] | k == 0 = notD | otherwise = notD ++ inD where notD = [prev*10 + now | prev <- cand (n-1) d k, now <- filter (/=d) [0..9]] inD = [prev*10 + d | prev <- cand (n-1) d (k-1)...
jwvg0425/HaskellScratchPad
src/euler111.hs
mit
711
3
12
271
477
230
247
20
2
import Ratio (numerator, denominator, (%)) import Scaled import ScaledBinary import Test.QuickCheck makeScaledBinary :: Integer -> Int -> ScaledBinary makeScaledBinary n s | s >= 0 = toScaledBinary (ratio n (2 ^ s)) s siGen :: Gen Integer -- signed integer siGen = choose (-49,49) piGen :: Gen Integer ...
nzok/decimal
ScaledBinaryTest.hs
mit
9,502
262
13
2,628
3,190
1,666
1,524
-1
-1
module EvalSpec (spec) where import Data.Monoid (mconcat) import Data.List (intersperse) import Test.Hspec import Text.Parsec (parse) import Text.Printf (printf) import qualified Eval eval = Eval.eval "<test>" evaluatesTo i o = it (printf "%s ⇒ %s" i (nl2comma o)) $ eval i `shouldBe` Right o ...
hgiddens/virtue
test/EvalSpec.hs
mit
1,547
0
11
444
384
207
177
36
3
{-# OPTIONS_GHC -fno-warn-orphans #-} module Graphics.Urho3D.Graphics.AnimationState( AnimationState , SharedAnimationState , AnimationBlendMode(..) , animationStateContext , animationStateSetStartBone , animationStateSetLooped , animationStateSetWeight , animationStateSetBlendMode , animationStateS...
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Graphics/AnimationState.hs
mit
14,926
0
13
2,635
3,081
1,656
1,425
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Smutt.HTTP.Server.Simple ( module X, simpleHTTP ) where import Smutt.HTTP.StatusCodes as StatusCode import Smutt.HTTP.Server.Settings as X import Smutt.HTTP.Server.Request as X import Smutt.HTTP.Server.Response as X import qualified Data.ByteString as B import qual...
black0range/Smutt
src/Smutt/HTTP/Server/Simple.hs
mit
4,502
0
19
772
1,228
646
582
89
3
module CSharp.PrinterTests (tests) where import CSharp.Definitions import CSharp.Printer import Test.Framework import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.QuickCheck import Test.QuickCheck.Property as Property tests :: [Test] tests = [ ]
danstiner/transpiler
test/CSharp/PrinterTests.hs
mit
284
0
5
45
66
42
24
10
1
{-# LANGUAGE MagicHash #-} import GHC.Exts putByteArray :: Int# -> Int# putByteArray s# = s# +# 1# floatFoo :: Float# -> Float floatFoo f# = F# (f# `plusFloat#` 1.2e2#) charFun :: Char# -> Bool charFun c# = c# `gtChar#` 'a'#
Pnom/haskell-ast-pretty
Test/examples/MagicHash.hs
mit
228
0
7
43
98
48
50
8
1
-- Copyright (C) 2002-2003,2005 David Roundy -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2, or (at your option) -- any later version. -- -- This program is distrib...
DavidAlphaFox/darcs
src/Darcs/UI/Commands/MarkConflicts.hs
gpl-2.0
6,886
0
22
1,779
1,278
715
563
-1
-1
{-| Implementation of the LUXI loader. -} {- Copyright (C) 2009, 2010, 2011 Google Inc. 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 lat...
ekohl/ganeti
htools/Ganeti/HTools/Luxi.hs
gpl-2.0
8,147
0
14
1,915
1,962
1,006
956
146
3
-- Defines an LED cube display. module BiLedCube ( Cube (..), Lyr (..), Grounds, Layer, succLayer, drawLayer, drawCube ) where import Control.Monad import Control.Monad.IO.Class import Data.Maybe import Data.Functor import Data.Traversable import Data.Foldable as F import Data.List import Data.Tuple.Homo...
ryo0ka/tictactoe3d-arduino
src/BiLedCube.hs
gpl-3.0
2,118
15
13
466
665
368
297
45
2
module QFeldspar.Variable.Scoped (Var(..),prd,inc) where import QFeldspar.MyPrelude import qualified QFeldspar.Nat.ADT as NA data Var :: NA.Nat -> * where Zro :: Var ('NA.Suc n) Suc :: Var n -> Var ('NA.Suc n) deriving instance Eq (Var n) deriving instance Ord (Var n) int :: Var n -> Word32 int Zro = ...
shayan-najd/QFeldspar
QFeldspar/Variable/Scoped.hs
gpl-3.0
591
0
11
155
326
168
158
-1
-1
module Setting where import Affection import GEGL as G import qualified SDL import qualified Data.Map as M import Control.Monad (when) import Types import MouseInteractable import Commons import Debug.Trace settingLoad :: Affection UserData () settingLoad = do ud <- getAffection liftIO $ gegl_node_set (nodeGra...
nek0/countdown.hs
src/Setting.hs
gpl-3.0
1,656
0
18
402
533
263
270
51
5
square x = x * x mis :: Maybe [Int] mis = Just [1, 2, 3] mis2 = fmap (fmap square) mis
hmemcpy/milewski-ctfp-pdf
src/content/1.7/code/haskell/snippet30.hs
gpl-3.0
88
0
7
23
57
30
27
4
1
module HEP.Physics.TTBar.Analysis.TopPairParton where import HEP.Util.Functions import HEP.Parser.LHE.Type import HEP.Parser.LHE.DecayTop import Control.Monad import Control.Monad.Trans import Data.Conduit import qualified Data.Conduit.List as CL import Data.IORef -- | type DecayTopSink a b m c = Sink (Maybe (a,b...
wavewave/ttbar
lib/HEP/Physics/TTBar/Analysis/TopPairParton.hs
gpl-3.0
5,648
0
24
1,544
2,162
1,155
1,007
95
3
fmap f Nothing = Nothing fmap f (Just x) = Just (f x)
hmemcpy/milewski-ctfp-pdf
src/content/1.10/code/haskell/snippet11.hs
gpl-3.0
53
0
7
12
36
17
19
2
1
module Main where import System.Environment import System.Console.Haskeline import Data.List.Split import Control.Monad.Except import Reliquary.Core.AST import Reliquary.Core.TypeCheck import Reliquary.Core.Evaluate import Reliquary.Core.Utils import Reliquary.Parser import Reliquary.Evaluate import Reliquary.Dic...
chameco/reliquary
main/Main.hs
gpl-3.0
3,018
0
16
798
1,042
520
522
49
6
{----------------------------------------------------------------- (c) 2008-2013 Markus Dittrich This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation. This program is distribut...
markusle/pasty
src/pasty.hs
gpl-3.0
1,741
0
16
433
184
104
80
17
2
module Hadolint.Rule.DL3049 (rule) where import qualified Data.Map as Map import qualified Data.Set as Set import qualified Data.Sequence as Seq import qualified Data.Text as Text import Hadolint.Rule import Language.Docker.Syntax rule :: LabelSchema -> Rule args rule labelschema = mconcat $ fmap missingLabelRule (...
lukasmartinelli/hadolint
src/Hadolint/Rule/DL3049.hs
gpl-3.0
2,143
0
14
436
760
396
364
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-androidmanagement/gen/Network/Google/Resource/AndroidManagement/Enterprises/Devices/Delete.hs
mpl-2.0
5,960
0
17
1,312
873
508
365
126
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-translate/gen/Network/Google/Resource/Translate/Projects/Locations/Operations/Cancel.hs
mpl-2.0
6,710
0
16
1,372
797
472
325
116
1
{-# LANGUAGE ScopedTypeVariables,ExistentialQuantification #-} module Program where import MemoryModel import TypeDesc import InstrDesc import Data.Map as Map hiding (foldl) import Data.Set as Set hiding (foldl) import Foreign.Ptr as FFI import Prelude as P hiding (foldl,concat) import Foreign.C.String import Foreign...
hguenther/nbis
Program.hs
agpl-3.0
13,101
0
27
4,970
3,517
1,774
1,743
275
7
module Main where {- import HLol.API.MatchHistory import HLol.API.Match import HLol.API.Summoner import HLol.API.Champion import HLol.API.Game import HLol.API.League import HLol.API.LolStaticData import HLol.API.LolStatus import HLol.API.Stats import HLol.API.Team import qualified HLol.Data.Match as Match import qual...
tetigi/hlol
src/Main.hs
agpl-3.0
1,673
0
7
309
27
15
12
4
1
module Moonbase.Util.StrutProperties ( setStrutProperties , StrutProperties(..) , newStrutProp ) where import Graphics.UI.Gtk import Foreign import Foreign.C.Types import Unsafe.Coerce ( unsafeCoerce ) data StrutProperties = StrutProperties { left :: Int , right :: Int , top :: Int ...
felixsch/moonbase-ng
src/Moonbase/Util/StrutProperties.hs
lgpl-2.1
1,340
0
10
361
358
204
154
37
1
-- pattern match lucky :: Int -> String lucky 7 = "LUCKY NUMBER SEVEN!" lucky x = "Sorry, you're out of luck, pal!" factorial :: Int -> Int factorial 0 = 1 factorial n = n * factorial(n - 1) -- 'Num a =>' a is instance of Num class addVectors :: Num a => (a, a) -> (a, a) -> (a, a) addVectors (x1, y1) (x2, y2) = (x1 ...
mikoim/musor
haskell/Learn You a Haskell for Great Good!/function.hs
unlicense
724
0
9
173
312
165
147
16
1
module Main where import Lib --import Text.Printf (printf) main :: IO () main = do putStr "Verifying List is a valid Functor and Applicative using 'checkers' library" verifyListIsFunctor verifyListIsApplicative putStr "\n Verifying ZipList' is a valid Functor and Applicative using 'checkers' library" verif...
dmp1ce/Haskell-Programming-Exercises
Chapter 17/ListApplicative/app/Main.hs
unlicense
369
0
7
59
47
22
25
10
1
import Foreign.Ptr import Foreign.ForeignPtr import Foreign.Marshal.Array -- for printing the value of a bad array import Foreign.Marshal.Alloc -- for free import Foreign.Storable import Data.Int -- Int64 (long) import Data.Word -- Word64 (unsigned long) foreign import ccall rand::...
Crazycolorz5/Haskell-Code
ImperativeQuicksort.hs
unlicense
2,747
0
16
902
853
416
437
61
6
module HEP.Parser.StdHep.MCFIO where import HEP.Parser.StdHep.MCFIO.Internal mcfioInit :: IO () mcfioInit = c'mcfioC_Init
wavewave/HsStdHep
lib/HEP/Parser/StdHep/MCFIO.hs
bsd-2-clause
125
0
6
15
31
20
11
4
1
module Language.Drasil.Derivation where import Language.Drasil.Sentence (Sentence(EmptyS, S), (+:)) -- Derivations are an ordered list of sentences and expressions. -- They are rendered in order as paragraphs and equation blocks to display -- the derivation. data Derivation = Derivation Sentence [Sentence] mkDeriv :...
JacquesCarette/literate-scientific-software
code/drasil-lang/Language/Drasil/Derivation.hs
bsd-2-clause
575
0
8
81
124
74
50
9
1
{-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} module Main where import Data.Void (Void) import Test.Tasty (TestTree) import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy import qualified Data.Text import qualified Data.Text.IO import qualified Dhall.Core ...
Gabriel439/Haskell-Dhall-Library
dhall-json/tasty/Main.hs
bsd-3-clause
6,775
0
15
1,484
1,336
682
654
135
3
{-# OPTIONS_GHC -fno-warn-orphans #-} module Multiarg.Maddash.Instances where import Control.Applicative import Test.QuickCheck import Multiarg.Maddash import Multiarg.Types.Instances () instance Arbitrary OptionError where arbitrary = oneof [ BadOption <$> arbitrary , LongArgumentForZeroArgumentOption <$> ...
massysett/multiarg
tests/Multiarg/Maddash/Instances.hs
bsd-3-clause
751
0
9
155
197
105
92
22
0
module Handler.HandoutShareSpec (spec) where import TestImport spec :: Spec spec = withApp $ do describe "getHandoutShareR" $ do error "Spec not implemented: getHandoutShareR"
sulami/hGM
test/Handler/HandoutShareSpec.hs
bsd-3-clause
202
0
11
49
44
23
21
6
1
{-# LANGUAGE TemplateHaskell, OverloadedStrings, DeriveGeneric, StandaloneDeriving #-} module Test.Client where import GHC.Generics import Control.Monad.IO.Class import Data.Maybe import qualified Data.Map as M import qualified Data.Text as T import Data.Text (Text) import Data.Aeson import Network.YAML import qual...
portnov/yaml-rpc
Test/Client.hs
bsd-3-clause
746
0
12
107
200
111
89
24
1
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-} {-# LANGUAGE CPP, FlexibleInstances, UnboxedTuples, MagicHash #-} module DebuggerImpl where import GHC hiding (resume, back, forward) import qualified GHC (resume, back, forward) import qualified InteractiveEval import GHC.Paths ( libdir ) import DynFlags import GhcMonad (...
octomarat/HaskellDebugger
src/DebuggerImpl.hs
bsd-3-clause
30,240
285
24
9,399
6,940
3,639
3,301
535
5
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} module Network.Protocol.Snmp.AgentX.Service ( agent , runAgent , Client(..) , request , requestWithResponse ) where import Network.Socket (close, Socket, socket, Family(AF_UNIX), SocketType(Stream), connect, SockAd...
chemist/agentx
src/Network/Protocol/Snmp/AgentX/Service.hs
bsd-3-clause
9,147
63
15
2,123
2,796
1,426
1,370
195
2
{-# LANGUAGE ScopedTypeVariables #-} module Data.VCD ( module Data.VCD.Types , module Data.VCD ) where import Prelude import Control.Applicative import Control.Monad.Trans.State.Strict import qualified Data.Attoparsec.ByteString.Char8 as AP import Data.ByteString.Char8 (ByteString) import Pipes import P...
liyang/value-change-dump
Data/VCD.hs
bsd-3-clause
2,690
0
16
734
1,045
541
504
58
4
module Helpers ( ChronicTest , MonadChronic , runChronicTest , timeLiteral , fmt , parserUnderTest , parserUnderTestM ) where import qualified Control.Monad.State as CMS import Data.Maybe (fromJust) import qualified Data.Time as DT import System.Locale (defaultTimeLocale) import Parsing.Chronic newtyp...
mavenraven/chronic-haskell
tests/Helpers.hs
bsd-3-clause
1,454
0
14
258
435
235
200
32
2
-- -- Copyright (c) 2009-2011, ERICSSON AB -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- this list...
emwap/feldspar-language
src/Feldspar/Core/Frontend/Eq.hs
bsd-3-clause
2,814
0
9
613
610
338
272
37
0
module Main where import Control.Monad import Data.IORef import System.Environment import System.IO import qualified LambdaManCPU main :: IO () main = do [fname] <- getArgs s <- readFile fname let prog :: [LambdaManCPU.Inst] prog = map read (lines s) m <- LambdaManCPU.newMachine prog La...
msakai/icfpc2014
rungcc.hs
bsd-3-clause
443
0
13
104
158
78
80
17
1
{-# LANGUAGE ExistentialQuantification, GeneralizedNewtypeDeriving, RankNTypes #-} module UnificationSolver ( FZip(..) , Free(..) , Solver , alloc , normalize , unify , instantiate , runSolver ) where import Prelude hiding (mapM_, elem) import qualified Data.Map as Map import qual...
luqui/tigress
UnificationSolver.hs
bsd-3-clause
3,094
0
16
840
1,390
723
667
80
4
module Pipes.Text ( fromLazy , toLazy , toLazyM , decodeUtf8 , encodeUtf8 , pack , unpack , head , null , length , toCaseFold , toLower , toUpper , foldl , concatMap , any , all , maximum , minimum , scanl , take , takeWhile , drop , dropWhile , stripStart , nextChar ...
ibotty/pipes-text
src/Pipes/Text.hs
bsd-3-clause
6,712
0
20
2,177
2,310
1,182
1,128
187
3
{-# LANGUAGE RecursiveDo #-} {-# LANGUAGE OverloadedStrings #-} module Lib where import GHCJS.Foreign () import GHCJS.Types import GHCJS.DOM import Control.Applicative (liftA2) import Control.Monad (join) import Data.Maybe (maybe) import Reflex import Reflex.Dom import qualified Data.Map as Map import Safe (readMa...
parsonsmatt/ql-reflex
src/Lib.hs
bsd-3-clause
1,441
4
16
323
480
247
233
40
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.SGI -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- -- A convenience module, combi...
haskell-opengl/OpenGLRaw
src/Graphics/GL/SGI.hs
bsd-3-clause
715
0
5
92
67
52
15
7
0
{-| Module : Git.Fmt.Version Description : Haskell constant of the binary version. Copyright : (c) Henry J. Wylde, 2015 License : BSD3 Maintainer : public@hjwylde.com Haskell constant of the binary version. -} module Git.Fmt.Version ( -- * Version -- | The binary version. version, ) where i...
hjwylde/git-fmt
app/Git/Fmt/Version.hs
bsd-3-clause
351
0
5
78
24
17
7
3
0
-- | A renderer that produces a native Haskell 'String', mostly meant for -- debugging purposes. -- {-# LANGUAGE OverloadedStrings #-} module Text.Blaze.Renderer.String ( fromChoiceString , renderMarkup , renderHtml ) where import Data.List (isInfixOf) import Text.Blaze.In...
Soostone/blaze-markup-haste
src/Text/Blaze/Renderer/String.hs
bsd-3-clause
3,411
0
14
977
933
491
442
64
10
{-# LANGUAGE TemplateHaskell, TypeFamilies, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, UndecidableInstances, TypeOperators #-} module Papps.State where import Control.Monad.Reader import Control.Monad.State (modify) import Data.List import qualified Data.Map as M impor...
teneighty/papps
src/Papps/State.hs
bsd-3-clause
3,105
0
19
817
860
462
398
86
2
module Colours (green, red, blue, yellow) where import Helm.Color green = rgb 0.0 1.0 0.0 red = rgb 1.0 0.0 0.0 blue = rgb 0.0 0.0 1.0 yellow = rgb 1.0 1.0 0.0
croyzor/very-circle
src/Colours.hs
bsd-3-clause
162
0
5
35
71
39
32
6
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE CPP #-} -- -- Ivory types QuasiQuoter. -- -- Copyright (C) 2014, Galois, Inc. -- All rights reserved. -- module Ivory.Language.Syntax.Concrete.QQ.TypeQQ where import Prelude hiding (exp, init) import Data.List (nub) import Control....
Hodapp87/ivory
ivory/src/Ivory/Language/Syntax/Concrete/QQ/TypeQQ.hs
bsd-3-clause
7,251
0
15
1,845
2,162
1,128
1,034
165
16
module D14Spec (main, spec) where import Test.Hspec import D14Lib main :: IO () main = hspec spec spec :: Spec spec = parallel $ do describe "rep3Char" $ it "find repeated chars, or nothing" $ do rep3Char "abc" `shouldBe` Nothing rep3Char "aaa" `shouldBe` Just 'a' rep...
wfleming/advent-of-code-2016
2016/test/D14Spec.hs
bsd-3-clause
1,393
0
18
447
403
194
209
35
1
-- | When you have a value of @f a@, but you can not possibly have -- some constraint on @a@, you often can not use type class instances -- of @f a@, because they require instances for @a@. This module -- provides type classes that mirror existing type classes but do not -- have the constraint on @a@, usually at the co...
roberth/freer-converse
src/Data/Functor/Classes/FreerConverse/Parametric.hs
bsd-3-clause
2,297
0
9
459
369
203
166
29
1
{-# LANGUAGE MagicHash, DeriveDataTypeable, UnliftedFFITypes #-} -- | -- Stability : experimental -- Portability : GHC -- -- This module is intended to be imported @qualified@ in order to -- avoid name clashes with the "Prelude", "Data.ByteString", and -- "Data.ByteString.Lazy" modules. E.g.: -- -- > import qualifie...
hvr/bytestring-plain
Data/ByteString/Plain.hs
bsd-3-clause
5,901
0
12
1,266
736
430
306
61
1
{-# Language OverloadedStrings #-} {-| Module : Client.Commands.Certificate Description : Certificate management commands Copyright : (c) Eric Mertens, 2016-2020 License : ISC Maintainer : emertens@gmail.com -} module Client.Commands.Certificate (newCertificateCommand) where import Client.Comman...
dolio/irc-core
src/Client/Commands/Certificate.hs
isc
4,543
0
19
1,250
1,077
555
522
80
4
{-# LANGUAGE OverloadedStrings, TemplateHaskell, QuasiQuotes, TypeFamilies, MultiParamTypeClasses, ViewPatterns #-} module YesodCoreTest.Header ( headerTest , Widget , resourcesApp ) where import Data.Text (Text) import Network.HTTP.Types (decodePathSegments) import Network.Wai import Network.Wai.Test impor...
geraldus/yesod
yesod-core/test/YesodCoreTest/Header.hs
mit
2,116
0
14
374
553
268
285
65
1
#!/usr/bin/env ./execthirdline.sh -- execute it with runghc -- set -e && port=`echo ${3} | awk -F/ '{print $(3)}'` && docker run -it -p ${port}:${port} -v $(pwd):/work testtls bash -c "runghc /work/${1} ${2} ${3}" -- set -e && port=`echo ${3} | awk -F/ '{print $(3)}'` && docker run -it -p ${port}:${port} -v /c/Use...
transient-haskell/transient-universe
tests/testtls.hs
mit
7,353
0
17
1,822
1,468
802
666
-1
-1
module Haskmon.Types(module X) where import Haskmon.Types.Game as X import Haskmon.Types.Move as X import Haskmon.Types.Type as X import Haskmon.Types.Sprite as X import Haskmon.Types.Ability as X import Haskmon.Types.Pokemon as X import Haskmon.Types.MetaData as X import Haskmon.Types.EggGroup as X import Haskmon.Typ...
bitemyapp/Haskmon
src/Haskmon/Types.hs
mit
377
0
4
45
92
68
24
11
0
-- -- -- ---------------- -- Exercise 5.6. ---------------- -- -- -- module E'5''6 where -- type ShopItem = (String, Int) data ShopItem = ShopItem String Int deriving ( Eq , Show )
pascal-knodel/haskell-craft
_/links/E'5''6.hs
mit
208
0
6
59
36
25
11
3
0
-- -- Copyright (c) 2014 Citrix Systems, Inc. -- -- 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 progra...
eric-ch/manager
xenmgr/XenMgr/Host.hs
gpl-2.0
25,459
0
20
6,489
6,728
3,474
3,254
586
9
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} -- | This module builds Docker (OpenContainer) images. ...
mathhun/stack
src/Stack/Image.hs
bsd-3-clause
8,400
0
24
2,650
1,539
789
750
178
2
{-# LANGUAGE ScopedTypeVariables #-} module Network.BitTorrent.DHT.SessionSpec (spec) where import Control.Applicative import Control.Concurrent import Control.Exception import Control.Monad.Reader import Control.Monad.Trans.Resource import Data.Conduit.Lazy import Data.Default import Data.List as L import Test.Hspec i...
DavidAlphaFox/bittorrent
tests/Network/BitTorrent/DHT/SessionSpec.hs
bsd-3-clause
3,212
0
23
853
974
482
492
91
1
{-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-unused-imports -fno-warn-unused-matches #-} module F2J where import qualified Src import qualified Core import Parser import TypeCheck import Desugar import Simplify import PrettyUtils import qualified Language.Java.Syntax as J (Op(..)) import System.Directory...
bixuanzju/fcore
lib/Test.hs
bsd-2-clause
1,224
0
15
280
261
142
119
32
2
{-# LANGUAGE OverloadedStrings #-} module Web.Offset.HTTP where import Control.Lens import Data.Aeson import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as LBS import qualified Data.CaseInsensitive as CI import Data.Monoid ((<>)...
dbp/snaplet-wordpress
src/Web/Offset/HTTP.hs
bsd-3-clause
1,775
0
18
696
460
260
200
37
2
module Dotnet.System.Xml.XPath.XPathNamespaceScope where import Dotnet import qualified IOExts import qualified Dotnet.System.Type import qualified Dotnet.System.Enum data XPathNamespaceScope_ a type XPathNamespaceScope a = Dotnet.System.Enum.Enum (XPathNamespaceScope_ a) data XPathNamespaceScopeTy = All | Exclude...
FranklinChen/Hugs
dotnet/lib/Dotnet/System/Xml/XPath/XPathNamespaceScope.hs
bsd-3-clause
863
0
12
82
184
105
79
-1
-1
module Let1 where f3 x = let ls = x + 1 rs = x - 1 in (ls, rs) f1 :: Int -> Int f1 x = let ls = x + 1 in ls f2 :: Int -> Int f2 x = let rs = x - 1 in rs
mpickering/HaRe
old/testing/merging/Let1AST.hs
bsd-3-clause
202
0
9
101
106
55
51
9
1
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 ************************************************************************ * * \section[OccurAnal]{Occurrence analysis pass} * ...
green-haskell/ghc
compiler/simplCore/OccurAnal.hs
bsd-3-clause
75,990
0
16
21,150
7,989
4,360
3,629
558
7
{-# LANGUAGE PolyKinds, MultiParamTypeClasses, DataKinds, TypeFamilies #-} module T15591b where import Data.Proxy import Data.Kind class C2 (a :: Type) (b :: Proxy a) (c :: Proxy b) where type T4 a c
sdiehl/ghc
testsuite/tests/dependent/should_fail/T15591b.hs
bsd-3-clause
205
0
8
37
57
34
23
6
0
-- | Code generation for the Static Pointer Table -- -- (c) 2014 I/O Tweag -- -- Each module that uses 'static' keyword declares an initialization function of -- the form hs_spt_init_<module>() which is emitted into the _stub.c file and -- annotated with __attribute__((constructor)) so that it gets executed at -- start...
olsner/ghc
compiler/main/StaticPtrTable.hs
bsd-3-clause
4,589
0
23
1,155
850
449
401
59
5
main :: IO() main = putStrLn "T12625"
sdiehl/ghc
testsuite/tests/driver/T12625.hs
bsd-3-clause
38
0
6
7
19
9
10
2
1
module T14590 where f1, f2, f3, f4 :: Int -> Int -> Int f1 x y = (x `_`) y f2 x y = (x `_a`) y f3 x y = (`_` x) y f4 x y = (`_a` x) y
sdiehl/ghc
testsuite/tests/typecheck/should_compile/T14590.hs
bsd-3-clause
137
0
6
44
99
60
39
6
1
module Dependent where import Dependency main :: IO () main = putStr $ show dependency
dsyang/buck
test/com/facebook/buck/haskell/testdata/binary_test/Dependent.hs
apache-2.0
89
0
6
17
29
16
13
4
1
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module ShouldCompile where -- tests deterministic order of fixities in the interface file infixl 1 `f` infixr 2 \\\ infix 3 :==> infix 4 `MkFoo` data Foo = MkFoo Int | Float :==> Double f :: a -> b -> a x `f` y = x (\\\) :: (Eq a) => [a] -> [a] -> [a] (\\\) xs ...
ezyang/ghc
testsuite/tests/determinism/determ010/A.hs
bsd-3-clause
329
0
8
73
115
71
44
11
1
#!/usr/bin/env runhaskell -------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} import Data.Monoid import qualified Data.Text as T import qualified Data.Text.IO as T import Data.Monoid (mappend) import Hakyll -----------------...
nushio3/nushio3.github.io
site.hs
mit
4,882
0
24
1,442
1,024
470
554
117
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} ---------------------------------------------------------------------- -- | -- Module: Web.Slack.Chat -- Description: -- -- -- ---------------------------------------------------------------------- module Web.Slack.Chat...
jpvillaisaza/slack-web
src/Web/Slack/Chat.hs
mit
2,856
0
9
602
636
377
259
80
1
-- import Control.Applicative -- import Control.DeepSeq -- import Data.Time import Cmn.Lcmc main :: IO () main = do myMain {- putStrLn "Reading corpus words." time0 <- getCurrentTime wds <- flattenCorpus <$> readLcmcCorpus wds `deepseq` do time1 <- getCurrentTime putStrLn $ "Read c...
dancor/melang
src/Main/proc-lcmc.hs
mit
592
0
6
148
30
18
12
4
1