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
-- import System.Random -- -- data Coin = Heads | Tails deriving (Show, Enum, Bounded) -- -- instance Random Coin where -- randomR (a, b) g = -- case randomR (fromEnum a, fromEnum b) g of -- (x, g') -> (toEnum x, g') -- random g = randomR (minBound, maxBound) g -- -- main = do -- g <- newStdGen -- pri...
vbalalla/financial_contract_language
Test.hs
mit
3,316
0
14
824
905
504
401
35
2
module Main where import Control.Applicative import Control.Monad import System.Environment import System.IO import Data.List import Language.BrainFuck.Compile import Language.BrainFuck.Parse import Language.BrainFuck.Interpret main = do (inHdl, outHdl) <- getHandles cProgram <- liftM (compile . parse) (hGetCont...
mgaut72/cbf
compiler/Main.hs
mit
658
0
19
129
232
121
111
22
2
import Control.Monad import Data.ByteString as BS (ByteString, pack, unpack) import Data.ByteString.Base16 as BS16 (encode) import Data.ByteString.Char8 as BSC8 (pack, unpack) import Data.ByteString.Lazy as BSL (pack, unpack, hPut) import Data.ByteString.Lazy.Char8...
rjw57/cloudsync
mksnapshot/mksnapshot.hs
mit
3,624
0
12
933
890
479
411
67
1
{- | Module : $Header$ Description : Maude Comorphisms Copyright : (c) Adrian Riesco, Facultad de Informatica UCM 2009 License : GPLv2 or higher, see LICENSE.txt Maintainer : ariesco@fdi.ucm.es Stability : experimental Portability : portable Comorphism from Maude to CASL. -} module Maude.PreComo...
nevrenato/HetsAlloy
Maude/PreComorphism.hs
gpl-2.0
54,078
0
20
14,277
14,569
7,554
7,015
919
4
{-# LANGUAGE TemplateHaskell, EmptyDataDecls, MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances, DeriveDataTypeable, Rank2Types #-} -- -- Copyright (c) 2008 Gustav Munkby -- -- | An implementation of NSTextStorage that uses Yi's FBuffer as -- the backing store. module Yi.UI.Coco...
codemac/yi-editor
src/Yi/UI/Cocoa/TextStorage.hs
gpl-2.0
19,848
0
24
3,810
5,352
2,772
2,580
309
6
-- -- Copyright (c) 2005 Don Stewart - http://www.cse.unsw.edu.au/~dons -- -- 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 ...
cpennington/h4sh
Command.hs
gpl-2.0
14,760
0
14
4,602
1,996
1,236
760
320
1
module Helium.StaticAnalysis.Heuristics.RepairSystem (repairSystem) where {-| Module : RepairSystem License : GPL Maintainer : helium@cs.uu.nl Stability : experimental Portability : portable The work of Arjen Langebaerd to try out all kinds of repairs up to a particular depth...
Helium4Haskell/helium
src/Helium/StaticAnalysis/Heuristics/RepairSystem.hs
gpl-3.0
7,508
0
20
2,287
1,503
746
757
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving, DisambiguateRecordFields, NamedFieldPuns, StandaloneDeriving, FlexibleContexts, NoMonomorphismRestriction, FlexibleInstances, BangPatterns, MultiParamTypeClasses, TypeSynonymInstances, DeriveGeneric, TemplateHaskell, DeriveDataTypeable, OverlappingInstances #-} module CommonType...
arirahikkala/straylight-divergence
src/CommonTypes.hs
gpl-3.0
8,346
0
14
1,569
2,227
1,219
1,008
179
1
{-# LANGUAGE BangPatterns , FlexibleInstances , MagicHash , MultiParamTypeClasses , RecordWildCards , ViewPatterns #-} {-# LANGUAGE Trustworthy #-} -- | Clause, supporting pointer-based equality module SAT.Mios.Clause ( Clause (..) -- , isLit -- , getLit , newClauseFr...
shnarazk/mios
MultiConflict/SAT/Mios/Clause.hs
gpl-3.0
5,229
0
13
1,273
655
363
292
77
2
{- The authors of this work have released all rights to it and placed it in the public domain under the Creative Commons CC0 1.0 waiver (http://creativecommons.org/publicdomain/zero/1.0/). THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTI...
dkensinger/haskell
prime_sieve_better_test.hs
gpl-3.0
1,494
0
11
374
420
225
195
23
3
module Pipes.DSP.ReferenceSignals where import Pipes import qualified Pipes.Prelude as P type Time = Double type SignalValue = Double type FreqHz = Double type Coef = Double type Phase = Double -- |Signal producer signalP :: Monad m => (Time -> SignalValue) -- ^ x(t) -> FreqHz -- ^ Sampling Fre...
imalsogreg/pipes-dsp
src/Pipes/DSP/ReferenceSignals.hs
gpl-3.0
1,597
0
14
493
470
264
206
37
1
{- The Delve Programming Language Copyright 2009 John Morrice Distributed under the terms of the GNU General Public License v3, or ( at your option ) any later version. This file is part of Delve. Delve is free software: you can redistribute it and/or modify it under the terms of the GNU Gene...
elginer/Delve
src/VirtualMachineExtension.hs
gpl-3.0
15,459
0
19
3,821
6,128
3,227
2,901
324
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE IncoherentInstances #-} {-# LANGUAGE DeriveGeneric #-} module Test.QuickFuzz.Gen.Code.Go where import Data.Default import Test.QuickCheck import Control.DeepSeq import Control.Monad import Control.Monad.Trans import Control.Monad.Trans....
CIFASIS/QuickFuzz
src/Test/QuickFuzz/Gen/Code/Go.hs
gpl-3.0
961
0
9
125
202
131
71
31
1
module Database.Design.Ampersand.FSpec.Switchboard (SwitchBdDiagram(..),switchboardAct,sbDiagram,processModel) where import Data.GraphViz import Data.GraphViz.Attributes.Complete import Data.List import Database.Design.Ampersand.Basics (fatalMsg,Named(..), flp) import Database.Design.Ampersand.ADL1 imp...
guoy34/ampersand
src/Database/Design/Ampersand/FSpec/Switchboard.hs
gpl-3.0
12,170
0
23
5,076
3,665
1,952
1,713
180
21
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Search.hs
mpl-2.0
6,262
0
19
1,506
877
513
364
126
1
main = do a <- getLine b <- getLine return $ a ++ b -- fmap = <$> -- apply = <*> -- -- Execution sequence is -- (++) fmap getLine ==> IO (++ . getLine) -- then apply -- IO (getLine ++ getLine) -- main1 = (++) <$> getLine <*> getLine main2 = do a <- (++) <$> getLine <*> getLine putStrLn $ "Concatenated Line...
dongarerahul/lyah
chapter11-functorApplicativeMonad/Applicative.hs
apache-2.0
1,134
0
12
276
253
152
101
14
1
module TUT20190115A where data Tree a = Tree a [Tree a] deriving Show data Tree2 a = Leaf a | Branch a [Tree2 a] deriving Show visit :: Tree a -> [a] visit (Tree a []) = [a] visit (Tree a childern) = foldl (++) [a] (map visit childern) -- visit2 (Leaf a ) = [a] -- visit2 (Tree a leaves...
riccardotommasini/plp16
haskell/tutoring/TUT20190115A.hs
apache-2.0
871
0
8
275
309
169
140
14
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QDialog_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:15 Warning : this file is machine generated - do not...
uduki/hsQt
Qtc/Gui/QDialog_h.hs
bsd-2-clause
62,076
91
19
13,844
21,164
10,202
10,962
-1
-1
module CodeGen.Platform.ARM where import CmmExpr #define MACHREGS_NO_REGS 0 #define MACHREGS_arm 1 #include "../../../../includes/CodeGen.Platform.hs"
nomeata/ghc
compiler/codeGen/CodeGen/Platform/ARM.hs
bsd-3-clause
155
0
3
17
13
10
3
2
0
-- | -- This module reexports the commonly used infix operators -- from the \"lens\" package. module Prelude.Lens.BasicInfix ( module E ) where import Control.Lens as E ( (^.) , (^..) , (^?) , (.~) )
andrewthad/lens-prelude
src/Prelude/Lens/BasicInfix.hs
bsd-3-clause
219
0
5
55
45
34
11
7
0
{-# LANGUAGE ScopedTypeVariables #-} module HistogramExec where import Histogram import Prelude hiding (replicate) import Prelude as P import Obsidian import Obsidian.Run.CUDA.Exec import qualified Data.Vector.Storable as V import Control.Monad.State import Data.Word -- allocaVector does not zero out the memory...
svenssonjoel/ObsidianGFX
Examples/Simple/HistogramExec.hs
bsd-3-clause
971
0
17
284
325
168
157
32
1
#define IncludedListLemmata appendGroup :: List a -> List a -> List a -> List a -> List a -> Proof {-@ appendGroup :: x1:List a -> x2:List a -> x3:List a -> x4:List a -> x5:List a -> { (append (append x1 x2) (append (append x3 x4) x5)) == (append x1 (append (append (append x2 x3) x4) x5)) ...
nikivazou/verified_string_matching
src/Proofs/ListLemmata.hs
bsd-3-clause
2,097
0
20
609
873
426
447
38
1
module Main where -- Quickly sums numbers form 1 to N quicksum :: Integer -> Integer quicksum n = (n + 1) * n `div` 2 diff :: Integer -> Integer diff n = toInteger $ floor $ (fromInteger (quicksum n) :: Float) ** 2 - sumOfSquares n where sumOfSquares n = sum $ map (\x -> (fromInteger x) ** 2) [1..n] ...
tomob/euler
006/006.hs
bsd-3-clause
426
0
13
111
177
92
85
9
1
-- | -- Module : Core.Primitive.Types -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : portable -- {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} module Core.Primitive.Types ( PrimType(..) ) where import GHC...
vincenthz/hs-xyz-test
Core/Primitive/Types.hs
bsd-3-clause
8,380
0
17
2,815
2,277
1,171
1,106
-1
-1
module Data.Builder.Textual where class Textual a where textual :: a -> Builder class Textual a => FormatTexutal a where data Format a format :: Format a -> a -> Builder -------------------------------------------------------------------------------- class ParseTextual a where parseTextual :: Pars...
winterland1989/stdio
Data/Textual.hs
bsd-3-clause
325
0
8
61
79
41
38
-1
-1
{-# LANGUAGE OverloadedStrings,DuplicateRecordFields,OverloadedLabels,InstanceSigs,RecordWildCards,ViewPatterns,PatternSynonyms,ScopedTypeVariables #-} module Api.Stockfighter.Jailbreak.Decompiler.Passes where import Api.Stockfighter.Jailbreak.Decompiler.AST import Api.Stockfighter.Jailbreak.Types import Control.Mon...
MichaelBurge/stockfighter-jailbreak
src/Api/Stockfighter/Jailbreak/Decompiler/Passes.hs
bsd-3-clause
41,938
956
16
10,457
16,006
8,352
7,654
-1
-1
{-# LANGUAGE FlexibleContexts #-} -- | -- Module : Database.HyperDex.Internal.Util.Resource -- Copyright : (c) Aaron Friel 2014 -- License : BSD-style -- Maintainer : mayreply@aaronfriel.com -- Stability : unstable -- Portability : portable -- module Database.HyperDex.Internal.Util.Resource ( -- ...
AaronFriel/hyhac
src/Database/HyperDex/Internal/Util/Resource.hs
bsd-3-clause
6,618
0
15
1,420
1,138
618
520
89
2
{-# LANGUAGE OverloadedStrings, RankNTypes #-} module Main where import Control.Monad.Trans import Data.Attoparsec import Prelude hiding (catch) import System.Console.Haskeline import System.Environment (getArgs, getEnv) import System.FilePath ((</>)) import qualified Data.ByteString as BS import Hummus.Types import ...
vito/hummus
src/Main.hs
bsd-3-clause
2,002
0
25
644
723
356
367
62
7
-- | -- Module: $Header$ -- Description: Data type representing environment variable. -- Copyright: (c) 2018-2020 Peter Trško -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com -- Stability: experimental -- Portability: GHC specific language extensions. -- -- Data type representing environment varia...
trskop/command-wrapper
command-wrapper-core/src/CommandWrapper/Core/Config/Environment.hs
bsd-3-clause
1,754
0
8
290
220
146
74
-1
-1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Utility functions on @Core@ syntax -} {-# LANGUAGE CPP #-} module CoreSubst ( -- * Main data types Subst(..), -- Implementation exported for supercompiler's Renaming.hs only TvSubstEnv, IdSubstEnv,...
olsner/ghc
compiler/coreSyn/CoreSubst.hs
bsd-3-clause
60,824
1
16
15,584
11,701
6,135
5,566
694
13
module Ch3 ( myTail, setHead, myDrop, myDropWhile, myInit, foldRight, sum2, product2, myLength, foldLeft, sum3, product3, myReverse, append2, succAll, toStringAll, myFilter, flatMap, filter2, sumList, myZipWith, allSubList, ...
eunmin/fpis-hs
src/Ch3.hs
bsd-3-clause
3,797
0
11
1,142
1,954
1,046
908
117
2
{-# LANGUAGE TemplateHaskell #-} module EFA.Test.Sequence where import qualified EFA.Signal.Sequence as Sequ import qualified EFA.Signal.Chop as Chop import qualified EFA.Signal.Signal as Signal import EFA.Signal.Record (PowerRecord, Record(Record)) import qualified EFA.Graph.Topology.Node as Node import qualified ...
energyflowanalysis/efa-2.1
test/EFA/Test/Sequence.hs
bsd-3-clause
2,538
0
14
534
741
388
353
61
1
{-# LANGUAGE NoMonomorphismRestriction #-} module Main where import Graphics.UI.Gtk as Gtk import Data.IORef import Diagrams.Prelude import Diagrams.Backend.Gtk import Control.Monad.IO.Class (liftIO) import Types import Graphics import Game createMainWindow :: IORef GameState -> IO Window createMainWindow gameStat...
korrix/Warcaby
Main.hs
bsd-3-clause
1,479
0
20
306
473
230
243
44
1
-- just variants, records, functions module Day4 where type RecordDesc = [ ( String -- name , Desc -- what it points to ) ] -- wow it looks the same as RecordDesc :P type VariantDesc = [(String, Desc)] data FunDesc = Arrow Desc Desc deriving (Show, Eq) data Desc = DescRecord RecordDesc | DescVariant V...
joelburget/daily-typecheckers
src/Day4.hs
bsd-3-clause
1,596
0
11
366
403
237
166
-1
-1
module Language.TheExperiment.Parser.Lexer where import Data.Char import Text.Parsec import Text.Parsec.Expr import qualified Text.Parsec.Token as T import Control.Monad import qualified Control.Monad.Trans.State as S import Language.TheExperiment.AST.Expression type ParserOperator = Operator String Operators (S.S...
jvranish/TheExperiment
src/Language/TheExperiment/Parser/Lexer.hs
bsd-3-clause
3,700
0
16
792
1,455
748
707
91
1
import Test.DocTest main :: IO () main = doctest [ "-isrc" , "-ignore-package", "monads-tf" , "Database.Monarch.Utils" ]
notogawa/monarch
test/doctests.hs
bsd-3-clause
167
0
6
63
36
20
16
5
1
--------------------------------------------------------------- -- | -- Module : Data.Minecraft.Release18.Version -- Copyright : (c) 2016 Michael Carpenter -- License : BSD3 -- Maintainer : Michael Carpenter <oldmanmike.dev@gmail.com> -- Stability : experimental -- Portability : portable -- --...
oldmanmike/hs-minecraft-protocol
src/Data/Minecraft/Release18/Version.hs
bsd-3-clause
613
0
4
101
59
41
18
10
1
{-# LANGUAGE TypeFamilies#-} {-# OPTIONS -Wall #-} module FiniteStateMachine.Programs.FSM2 ( mach ) where import Basic.MemoryImpl (ListMem, fillMem) import FiniteStateMachine.Machine2 -------------------------------------------------------------------------- --------------------------specilized model operations ...
davidzhulijun/TAM
FiniteStateMachine/Programs/FSM2.hs
bsd-3-clause
883
0
7
124
211
119
92
21
1
{-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDer...
davdar/pretty-monadic-printer
Text/PrettyPrint/Final/Extensions/Environment.hs
mit
2,836
0
13
547
657
362
295
-1
-1
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} module Tests.Readers.RST (tests) where import Text.Pandoc.Definition import Test.Framework import Tests.Helpers import Tests.Arbitrary() import Text.Pandoc.Builder import Text.Pandoc import Data.Monoid (mempty) rst :: String -> Pandoc rst = readRST def{ readerSt...
bgamari/pandoc
tests/Tests/Readers/RST.hs
gpl-2.0
3,027
0
18
1,151
552
306
246
63
1
-- | -- Copyright : (c) 2019 Robert Künnemann -- License : GPL v3 (see LICENSE) -- -- Maintainer : Robert Künnemann <robert@kunnemann.de> -- Portability : GHC only -- -- Compute annotations for locks. module Sapic.Locks ( annotateLocks ) where import Control.Exception import Control.Monad...
kmilner/tamarin-prover
lib/sapic/src/Sapic/Locks.hs
gpl-3.0
3,389
0
14
1,078
700
351
349
47
2
{-# LANGUAGE StrictData #-} {-# LANGUAGE Trustworthy #-} module Network.Tox.DHT.NodesRequestSpec where import Test.Hspec import Data.Proxy (Proxy (..)) import qualified Network.Tox.Crypto.KeyPair as KeyPair import Network.Tox.DHT.NodesRequest (NodesRequest (..)) impo...
iphydf/hs-toxcore
test/Network/Tox/DHT/NodesRequestSpec.hs
gpl-3.0
673
0
16
156
172
95
77
17
1
module Play.Events ( handlePlayEvent ) where import Graphics.Gloss.Interface.Pure.Game import Level.Level import Play.PlayState handlePlayEvent :: Event -> PlayState -> PlayState handlePlayEvent event pl@(PlayState { drawing = dwg , drawnWalls = ws ...
beni55/pinhole
Pinhole/Play/Events.hs
gpl-3.0
1,478
0
16
625
442
236
206
36
12
module Config ( serverHost, serverPort, autoJoin, botNick, markovOrder, opList ) where import Prelude hiding () --import Main (imitate, imitateall) import qualified Data.List as List (concat, map, concatMap) import qualified Data.Map as Map (Map(..), fromList) type Map = Map.Map imitate ...
tonyolag/mako
Config.hs
mpl-2.0
1,027
0
14
387
252
157
95
30
1
module Examples.LexProd ( lpbwspExample ) where import Algebra.Constructs.Lexico import Examples.ShortestPath import Examples.WidestPath lpbwspExample 0 = lexico (wpExamples 1) (spExamples 4) lpbwspExample 1 = lexico (wpExamples 2) (spExamples 5) lpbwspExample 2 = lexico (wpExamples 3) (spExamples 8)
sdynerow/Semirings-Library
haskell/Examples/LexProd.hs
apache-2.0
305
0
7
39
102
53
49
8
1
module Resize where import CLaSH.Prelude topEntity :: Signed 4 -> Signed 3 topEntity = resize testInput :: Signal (Signed 4) testInput = stimuliGenerator $(v ([minBound .. maxBound]::[Signed 4])) expectedOutput :: Signal (Signed 3) -> Signal Bool expectedOutput = outputVerifier $(v ([-4,-3,-2,-1,-4,-3,-2,-1,0,1,2,3...
christiaanb/clash-compiler
tests/shouldwork/Numbers/Resize.hs
bsd-2-clause
344
0
11
46
188
105
83
-1
-1
-- This program compares the sizes of corresponding files in two tress -- $ ./compareSizes --hi ~/ghc/darcs/ghc ~/ghc/6.12-branch/ghc -- Size | Change | Filename -- 25644 | -0.99% | compiler/stage1/build/Demand.hi -- 21103 | -0.98% | compiler/stage2/build/Demand.hi -- 180044 | -0.98% | libraries...
mcmaniac/ghc
utils/compare_sizes/Main.hs
bsd-3-clause
6,600
0
16
1,959
1,734
901
833
117
4
{-# LANGUAGE DataKinds,EmptyDataDecls #-} module HLearn.Metrics.Mahalanobis.Mega where import Control.DeepSeq import Control.Monad import Control.Monad.ST import Data.STRef import Data.List import qualified Data.Semigroup as SG import qualified Data.Foldable as F import qualified Data.Vector as V import qualified...
iamkingmaker/HLearn
src/HLearn/Metrics/Mahalanobis/Mega.hs
bsd-3-clause
11,407
0
26
3,501
3,373
1,842
1,531
-1
-1
module Lang.LamIf.Analyses where import FP import MAAM import Lang.LamIf.Val import Lang.LamIf.Semantics import Lang.LamIf.Monads import Lang.LamIf.CPS -- import Lang.LamIf.StateSpace -- These instances are defined in MAAM.Time timeChoices :: [(String, ExTime)] timeChoices = [ ("*" , ExTime (W :: UniTime (Cτ Ψ)) ...
FranklinChen/maam
src/Lang/LamIf/Analyses.hs
bsd-3-clause
1,400
18
11
287
494
289
205
-1
-1
module PackageTests.Tests(tests) where import PackageTests.PackageTester import qualified PackageTests.BenchmarkStanza.Check import qualified PackageTests.TestStanza.Check import qualified PackageTests.DeterministicAr.Check import qualified PackageTests.TestSuiteTests.ExeV10.Check import Control.Monad import Data.V...
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/tests/PackageTests/Tests.hs
bsd-3-clause
12,804
0
22
3,220
2,242
1,063
1,179
192
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} module Data.PSQ.Class.Tests ( tests ) where import Prelude hiding (null, lookup, map, foldr) import Control.Applicative ((<$>)) imp...
phadej/psqueues
tests/Data/PSQ/Class/Tests.hs
bsd-3-clause
16,433
0
22
5,579
6,284
3,283
3,001
373
3
{-# OPTIONS_GHC -Wunused-imports -Wunused-top-binds #-} module T10347 (N, mkN, mkSum) where import Data.Coerce import Data.Monoid (Sum(Sum)) newtype N a = MkN Int mkN :: Int -> N a mkN = coerce -- Should mark MkN (a locally defined constructor) as used mkSum :: Int -> Sum Int mkSum = coerce -- Should mark Sum (an i...
sdiehl/ghc
testsuite/tests/typecheck/should_compile/T10347.hs
bsd-3-clause
349
0
6
63
80
49
31
9
1
module PackageTests.MultipleSource.Check ( tests ) where import PackageTests.PackageTester import Test.Framework as TF (Test) import Test.Framework.Providers.HUnit (testCase) import Control.Monad (void, when) import System.Directory (doesDirectoryExist) import System.FilePath ((</>...
DavidAlphaFox/ghc
libraries/Cabal/cabal-install/tests/PackageTests/MultipleSource/Check.hs
bsd-3-clause
961
0
11
215
235
128
107
20
1
module TerminationExpr where {-@ showSep :: _ -> xs:_ -> _ / [xs] @-} -- use xs as reducing param showSep :: String -> [String] -> String showSep sep [] = "" showSep sep [x] = x showSep sep (x:xs) = x ++ sep ++ showSep sep xs
mightymoose/liquidhaskell
tests/error_messages/crash/TerminationExpr1.hs
bsd-3-clause
235
0
7
57
77
42
35
5
1
{-# LANGUAGE CPP, ForeignFunctionInterface #-} ----------------------------------------------------------------------------- {- | Module : Numeric.GSL.Polynomials Copyright : (c) Alberto Ruiz 2006 License : GPL-style Maintainer : Alberto Ruiz (aruiz at um dot es) Stability : provisional Portability ...
mightymoose/liquidhaskell
benchmarks/hmatrix-0.15.0.1/lib/Numeric/GSL/Polynomials.hs
bsd-3-clause
1,736
0
13
268
201
108
93
15
1
import qualified Data.Vector as U import Data.Bits main = print . U.length . U.init . U.replicate 1000000 $ (7 :: Int)
dolio/vector
old-testsuite/microsuite/init.hs
bsd-3-clause
120
0
9
22
50
28
22
3
1
{-# LANGUAGE UnliftedFFITypes, MagicHash #-} -- !!! illegal types in foreign export delarations module ShouldFail where import GHC.Exts foreign export ccall foo :: Int# -> IO () foo i | isTrue# (i ==# 0#) = return () foreign export ccall bar :: Int -> Int# bar _ = 42#
ghc-android/ghc
testsuite/tests/ffi/should_fail/ccfail003.hs
bsd-3-clause
272
0
10
52
81
43
38
7
1
{-# LANGUAGE RecordWildCards, TransformListComp, NamedFieldPuns #-} module T3901 where import GHC.Exts (groupWith) data Rec = Rec {a :: Int} deriving (Show) recs1 = [a | Rec {a=a} <- [Rec 1], then group by a using groupWith] recs2 = [a | Rec {a} <- [Rec 1], then group by a using groupWith] recs3 = [a | Rec {..} <...
urbanslug/ghc
testsuite/tests/rename/should_compile/T3901.hs
bsd-3-clause
449
0
10
91
199
112
87
9
1
module SyntheticWeb.Client.SizeUrl ( SizeUrl , Payload , Url , fromSize , toUrl , toPayload ) where import Control.Monad.IO.Class (MonadIO) import SyntheticWeb.Plan.Types (Bytes, Size (..)) import SyntheticWeb.Statistical (Statistical (Exactly), sample) import System.Random.MWC (GenIO) impo...
kosmoskatten/synthetic-web
src/SyntheticWeb/Client/SizeUrl.hs
mit
1,112
0
8
206
284
165
119
25
1
-- Question 1 -- - Make a list of suits and list of rank -- - Loop in list of suits and pick only one rank randomly for each suit
martindavid/code-sandbox
comp90048/workshop/my_answer/workshop1.hs
mit
132
0
2
32
5
4
1
1
0
foo bar = baz
chreekat/vim-haskell-syntax
test/golden/toplevel/arg.hs
mit
14
0
4
4
9
4
5
1
1
{-| Module : PansiteApp.PandocTool Description : Pandoc tool Copyright : (C) Richard Cook, 2017-2018 Licence : MIT Maintainer : rcook@rcook.org Stability : experimental Portability : portable -} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module PansiteApp.PandocTool (pandocTool)...
rcook/pansite
app/PansiteApp/PandocTool.hs
mit
6,565
0
25
1,846
1,364
712
652
128
5
module Types ( module Data.Direction , module Types.Size , module Types.Jewel , module Types.Item , module Types.Consumable , module Types.Block , module Types.Enemy , module Types.GroundItem , ...
5outh/textlunky
src/Types.hs
mit
1,006
0
5
334
193
123
70
35
0
module InitialUniverseProperties where import Test.Tasty import Test.Tasty.QuickCheck import qualified Data.Map as M import Rules import Data.AdditiveGroup import Data.List initialUniverseTests :: TestTree initialUniverseTests = testGroup "Initial universe tests" [ testProperty "There are workplaces with resour...
martin-kolinek/some-board-game-rules
test/InitialUniverseProperties.hs
mit
780
0
15
136
173
92
81
18
1
{-# LANGUAGE OverloadedStrings, QuasiQuotes, TemplateHaskell #-} module Language.C.Inline.Win32 (win32Ctx) where import Data.Monoid (mempty) import Language.C.Inline import Language.C.Inline.Context import System.Win32.Types import qualified Data.Map as Map import qualified Language.C.Types as C import qualified Langu...
anton-dessiatov/inline-c-win32
src/Language/C/Inline/Win32.hs
mit
1,855
0
9
323
707
469
238
46
1
module Language.Scheme.Error where import Language.Scheme.Error.Types import Control.Monad.Except (catchError) -- | We purposely leave extractValue undefined for a Left constructor, because that represents a programmer error. We intend to use extractValue only after a catchError, so it's better to fail fast than to i...
stefaneng/scheme48
src/Language/Scheme/Error.hs
mit
513
0
7
78
73
42
31
6
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- NOTE: re-exported from Test.Hspec.Core.Spec module Test.Hspec.Core.Spec.Monad ( Spec , SpecWith , SpecM (..) , runSpecM , fromSpecList , runIO , mapSpecForest , mapSpecItem , mapSpecItem_ , modifyParams , modifyConfig ) where import Prelude () import ...
hspec/hspec
hspec-core/src/Test/Hspec/Core/Spec/Monad.hs
mit
2,458
0
13
488
656
361
295
43
1
module Handler.DeleteMember where import Import postDeleteMemberR :: TutorialName -> TutorialNames -> Handler Html postDeleteMemberR tn tns = do Entity _ Profile {..} <- requireProfile let parent | null tns = UserR profileHandle | otherwise = UserTutorialR profileHandle tn $ allButLas...
fpco/schoolofhaskell.com
src/Handler/DeleteMember.hs
mit
4,760
18
13
2,336
806
394
412
-1
-1
module Control.AutoUpdate.Util ( requestAnimationFrame , cancelAnimationFrame , waitForAnimationFrame , handle , cb ) where import GHCJS.Types import GHCJS.Foreign import Control.Concurrent.MVar (putMVar, takeMVar, newEmptyMVar) import System.IO hiding (Handle) newtype Handle = Handle (JSRef Handle) foreign import ...
arianvp/ghcjs-auto-update
Control/AutoUpdate/Util.hs
mit
1,139
9
14
175
321
166
155
29
1
module Zwerg.Graphics.Brick where import Zwerg.Prelude hiding ((<>)) import Zwerg import Zwerg.Event.Queue import Zwerg.Game import Zwerg.Graphics.Brick.Builder import Zwerg.Random import Zwerg.UI.Input import Brick.AttrMap import Brick.Util (on, fg) import Brick.Widgets.ProgressBar import Control.Monad.IO.Class (Mo...
zmeadows/zwerg
lib/Zwerg/Graphics/Brick.hs
mit
2,666
0
18
631
855
468
387
-1
-1
-- FrostyX's XMonad configuration -- -- This XMonad configuration is a mess. I am a newbie trying to hack things together -- and experiment. Do not take anything from this configuration unles you know what -- you are doing. Because the odds are, that I am not. -- -- Reload configuration: -- xmonad --recompile; xmonad...
FrostyX/dotfiles
.xmonad/xmonad.hs
gpl-2.0
12,456
7
12
3,111
1,549
975
574
132
1
{-# LANGUAGE OverloadedStrings #-} module Tests.Readers.Markdown (tests) where import Text.Pandoc.Definition import Test.Framework import Tests.Helpers import Tests.Arbitrary() import Text.Pandoc.Builder import qualified Data.Set as Set -- import Text.Pandoc.Shared ( normalize ) import Text.Pandoc markdown :: String ...
timtylin/scholdoc
tests/Tests/Readers/Markdown.hs
gpl-2.0
15,297
0
22
4,345
2,559
1,360
1,199
258
1
{-# LANGUAGE RankNTypes, QuasiQuotes, FlexibleContexts, DeriveDataTypeable, CPP, JavaScriptFFI #-} module Lib (genericSendJSON, sendJSON, onEnter, onKey, doOnce, dispatchCustom, clearInput, getListOfElementsByClass, getListOfElementsByTag, getCarnapDataMap, tryParse, treeToElement, genericTreeToUl...
gleachkr/Carnap
Carnap-GHCJS/src/Lib.hs
gpl-3.0
31,296
25
19
9,266
6,483
3,232
3,251
350
4
module Amoeba.Middleware.Config.Extra where import Amoeba.Middleware.Config.Config import Control.Monad (liftM) filePathLoader path file = liftM (++ file) $ strOption path
graninas/The-Amoeba-World
src/Amoeba/Middleware/Config/Extra.hs
gpl-3.0
173
0
7
19
49
29
20
4
1
{-# LANGUAGE OverloadedStrings #-} module Ampersand.Prototype.PHP ( evaluateExpSQL , createTempDatabase , tempDbName ) where import Ampersand.Basics import Ampersand.ADL1 import Ampersand.FSpec import Ampersand.FSpec.SQL import Am...
AmpersandTarski/ampersand
src/Ampersand/Prototype/PHP.hs
gpl-3.0
9,876
0
19
2,634
1,978
1,067
911
212
3
{-# LANGUAGE FlexibleInstances #-} module Database.Design.Ampersand.Input.ADL1.CtxError ( CtxError(PE) , showErr, makeError, addError , cannotDisamb, cannotDisambRel , mustBeOrdered, mustBeOrderedLst, mustBeOrderedConcLst , mustBeBound , GetOneGuarded(..), uniqueNames, mkDanglingPurposeError , mkUndeclare...
DanielSchiavini/ampersand
src/Database/Design/Ampersand/Input/ADL1/CtxError.hs
gpl-3.0
14,130
0
21
3,607
4,177
2,136
2,041
234
4
module P01HelloSpec (main,spec) where import Test.Hspec import Test.Hspec.QuickCheck import P01Hello hiding (main) main :: IO () main = hspec spec spec = do describe "chooseGreet" $ do it "insults David Cameron correctly" $ do chooseGreet "David Cameron" == "PIGFUCKER!" it "greets Charlie correctly...
ciderpunx/57-exercises-for-programmers
test/P01HelloSpec.hs
gpl-3.0
511
0
14
109
125
61
64
14
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.DeploymentManager -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mo...
brendanhay/gogol
gogol-deploymentmanager/gen/Network/Google/DeploymentManager.hs
mpl-2.0
11,837
0
21
2,516
1,294
930
364
298
0
<h3>Example 52 (simple heat map)</h3> <plot height=500 aspect=1> <heatmap x="[[test.x]]" y="[[test.y]]" fill-zero="none" fill="[[@P{blue;red}]]"></heatmap> </plot> <plot-data name="test" format="csv" cols="x,y"> -1.358218406,-1.680180041 1.019182305,0.372856303 -0.046088243,-1.437769350 -1.652131815,1.50...
openbrainsrc/hRadian
examples/Example/defunct/Eg52.hs
mpl-2.0
2,735
127
18
134
738
460
278
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-sheets/gen/Network/Google/Resource/Sheets/Spreadsheets/Values/BatchUpdate.hs
mpl-2.0
5,928
0
18
1,347
793
464
329
122
1
import System.IO import System.Random import Control.Concurrent import Control.Monad import Control.Concurrent.STM data Gate = MkGate Int (Tvar int) newGate :: Int -> Stm Gate newGate n = do tv <- newTVar 0 return (MkGate n tv) passGate :: Gate -> IO() passGate (MkGate n tv) = atomically (do ...
cwlmyjm/haskell
Learning/sdlr.hs
mpl-2.0
3,644
121
12
1,089
1,453
750
703
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DefaultSignatures #-} module Panda.Metadata ( getMeta , getEitherMeta , putMeta ) where import Control.Applicative import Control.Monad import qualified Data.ByteString.Char8 as B import Data.Map (Map, toList) import Data.Maybe impo...
gmp26/panda
src/Panda/Metadata.hs
lgpl-3.0
3,174
0
47
1,251
670
364
306
72
1
module Isomorphisms where data Weekday = Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday deriving (Enum, Eq, Ord, Show) data Seven = One | Two | Three | Four | Five | Six | Seven deriving (Enum, Eq, Ord, Show) transform :: (Enum a, Ord a, Enum b, O...
haroldcarr/learn-haskell-coq-ml-etc
haskell/book/2019-Program_Design_by_Calculation-Oliveira/2015-05-LambdaConf/Isomorphisms.hs
unlicense
627
0
6
175
242
138
104
19
1
module Debug.Trace.Disable where trace _ x = x traceShow = trace traceM _ = return ()
jtapolczai/FileSync
Debug/Trace/Disable.hs
apache-2.0
87
0
6
17
35
19
16
4
1
module Delahaye.A338013 (a338013_list, a338013) where import Delahaye.A338012 (a338012_list) import Helpers.Delahaye (missingFromTables) import Data.Set (Set) import qualified Data.Set as Set a338013 :: Int -> Integer a338013 n = a338013_list !! (n-1) a338013_list :: [Integer] a338013_list = missingFromTables [(+), (...
peterokagey/haskellOEIS
src/Delahaye/A338013.hs
apache-2.0
337
0
7
41
108
66
42
9
1
module Kernel.Scheduling where import Control.Monad import Data.Function ( on ) import Data.Ratio import Data.Int import Data.List ( findIndex, minimumBy ) import qualified Data.Map as Map import Data.Maybe ( fromMaybe ) import Kernel.Data import Flow import Flow.Domain import Flow.Kernel import Flow.Vector make...
SKA-ScienceDataProcessor/RC
MS6/programs/Kernel/Scheduling.hs
apache-2.0
4,027
0
21
979
1,103
570
533
64
1
{-# LANGUAGE QuasiQuotes #-} module Main where import System.Directory (createDirectoryIfMissing, doesFileExist, listDirectory) import System.FilePath (combine, takeBaseName) import Control.Monad (filterM) import Data.Char (toUpper) import System.Environment (getArgs) import qualified Data.Text.Lazy as Text import Da...
aochagavia/CompilerConstruction
mf/src/Main.hs
apache-2.0
6,034
0
22
1,328
2,007
1,056
951
107
3
{-# LANGUAGE OverloadedStrings, TypeFamilies, DeriveFunctor, GADTs, TemplateHaskell, FunctionalDependencies, FlexibleInstances, NoMonomorphismRestriction, DeriveGeneric,DeriveDataTypeable, DataKinds #-} module TF.Type.StackEffect where import TF.ForthTypes import TF.TH import Lens.Simple import Control.Lens (makeW...
sleepomeno/TForth
src/TF/Type/StackEffect.hs
apache-2.0
4,161
0
10
1,050
888
494
394
90
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} module Test.SCInstances where import Control.Monad import qualified Data.Text as T import qualified Data.Vector ...
boggle/neo4j-haskell-driver
test/Test/SCInstances.hs
apache-2.0
1,233
0
10
290
362
210
152
24
0
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QListView.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:23 Warning : this file is machine generated - do not...
keera-studios/hsQt
Qtc/Gui/QListView.hs
bsd-2-clause
93,114
0
15
14,993
30,241
15,340
14,901
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-| Module : Network.Spotify.Api.Types.ExternalId Description : External ID for some Spotify Content. Stability : experimental -} module Network.Spotify.Api.Types.ExternalId where import Data.Aeson (FromJSON (parseJSON), ToJSON, object, ...
chances/servant-spotify
src/Network/Spotify/Api/Types/ExternalId.hs
bsd-3-clause
2,927
0
17
883
588
318
270
58
4
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Hans.Message.Ip4 where import Hans.Address.IP4 (IP4) import Hans.Utils import Hans.Utils.Checksum import Control.Monad (unless) import Data.Serialize (Serialize(..)) import Data.Serialize.Get (Get,getWord8,getWord16be,getByteString,isolate,label) import Data.Seriali...
Tener/HaNS
src/Hans/Message/Ip4.hs
bsd-3-clause
9,100
0
19
2,572
2,436
1,290
1,146
222
3
{-# LANGUAGE OverloadedStrings, FlexibleContexts #-} module MNIST where import qualified Data.Binary.Get as Bin import Control.Lens import DeepBanana import DeepBanana.Prelude import Codec.Compression.GZip import qualified Data.Attoparsec.ByteString as AP import qualified Network.Wreq as Wreq import System.Directory i...
alexisVallet/deep-banana
examples/mnist/MNIST.hs
bsd-3-clause
3,254
0
19
804
938
464
474
70
3
{- The XML files are parsed as if they were X Protocol description files used by XCB. The internal data-structures created from the parsing are pretty-printed to a file per input file. Antoine Latter aslatter@gmail.com -} import Data.XCB import System.IO import System.Environment import System.Exit i...
aslatter/xhb
build-utils/Parse.hs
bsd-3-clause
744
0
10
160
171
85
86
17
1
module Main where import Test.DocTest main :: IO () main = doctest [ "src/Streaming/Eversion.hs", "src/Streaming/Eversion/Pipes.hs" ]
danidiaz/streaming-eversion
tests/doctests.hs
bsd-3-clause
161
0
6
43
33
19
14
7
1
module MinIR.Dictionary ( Dictionary , empty , lookupKey, lookupTerm , getKey ) where import qualified Data.HashMap.Strict as HM import Data.HashMap.Strict (HashMap) import qualified Data.IntMap.Strict as IM impor...
bgamari/minir
MinIR/Dictionary.hs
bsd-3-clause
1,819
0
17
632
680
358
322
44
1
{-#LANGUAGE NoImplicitPrelude#-} module LibMu.Execute where import Prelude (IO, String, length, fromIntegral, ($)) import LibMu.MuApi import LibMu.Refimpl import Foreign import Foreign.C.String runBundle :: String -> IO () runBundle file = do mvm <- mu_refimpl2_new ctx <- newContext mvm withCString file $ ...
andrew-m-h/libmu-HS
src/LibMu/Execute.hs
bsd-3-clause
669
0
14
129
211
104
107
20
1
module SandBox.Text.CSS ( module SandBox.Text.CSS.Parser, module SandBox.Text.CSS.Types ) where import SandBox.Text.CSS.Parser import SandBox.Text.CSS.Types
hnakamur/haskell-sandbox
sandbox-css/SandBox/Text/CSS.hs
bsd-3-clause
168
0
5
24
39
28
11
5
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module API where import Network.Wai import Network.Wai.Handler.Warp import Servant import Servant.API.ContentTypes import Servant.Server import Util import Control.DeepSeq import Control.Applicative import BackTracker.BackTracker im...
octopuscabbage/genetic-sudoku
src/API.hs
bsd-3-clause
1,074
0
16
193
329
178
151
30
1
{-# LANGUAGE OverloadedStrings #-} -- Label has an instance of IsString, so we can use String literals for labels -- | -- Module : IpTcpDns -- Description : Exported API for HBPF -- Copyright : (c) Matt Denton and Andrew Duffy, 2016 -- License : BSD3 -- Stability : experimental -- Portability : unknown -- ...
hBPF/hBPF
app/IpTcpDns.hs
bsd-3-clause
4,469
0
17
1,352
942
475
467
92
1