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 MultiParamTypeClasses #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} module FsMain where import System.Fuse (fuseMain, defaultExceptionHandler) import Adb (ifAdbPresent) import Fs import qualified System.Environment as Env import Control...
7ocb/fuse_adb_fs
lib/FsMain.hs
gpl-3.0
3,440
0
20
1,088
957
490
467
85
7
module GraphBuilder where {-# LANGUAGE NoMonomorphismRestriction #-} import Diagrams.Prelude import Diagrams.Backend.SVG.CmdLine import Domain {- generate a path diagram -} pathToGraph :: Domain.Path -> QDiagram SVG V2 Double Any pathToGraph p = let points = pathToPoints p nodes = atPoints points $ map...
benkio/VRP
src/GraphBuilder.hs
gpl-3.0
1,009
0
13
203
415
220
195
-1
-1
{-# LANGUAGE PackageImports #-} module HEP.Automation.MadGraph.Dataset.Set20110302v1 where import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.Cluster import HEP.Automation.MadGraph.SetupType my_ssetup :: ScriptSetup my_ss...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110302v1.hs
gpl-3.0
1,959
0
9
468
448
274
174
60
3
import S.Type import S.Size import S.Model import qualified S.ModelIO import S.ToDoc import S.Reduce (isnormal) import qualified S.Reduce import S.Table import qualified S.TableHead as TH import qualified S.Normal import qualified S.Head import S.Verify import S.Back import L.Type ( froms ) import qualified L.Reduce...
jwaldmann/s
Main.hs
gpl-3.0
7,967
0
28
2,750
2,753
1,361
1,392
189
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-securitycenter/gen/Network/Google/Resource/SecurityCenter/Organizations/Sources/Patch.hs
mpl-2.0
5,694
0
17
1,250
858
500
358
122
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-codedeploy/gen/Network/AWS/CodeDeploy/Types.hs
mpl-2.0
63,944
0
35
15,493
11,339
6,336
5,003
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-books/gen/Network/Google/Resource/Books/MyConfig/RequestAccess.hs
mpl-2.0
7,032
0
23
1,789
1,116
643
473
163
1
{-# LANGUAGE OverloadedStrings #-} module View.Template ( htmlHeader , htmlFooter , htmlTemplate , htmlSocialMedia ) where import Control.Monad (void, when, forM_) import qualified Data.ByteString.Builder as BSB import Data.Monoid ((<>)) import qualified Data.Text as T import Data.Version (showVersion) impor...
databrary/databrary
src/View/Template.hs
agpl-3.0
8,250
0
26
2,348
2,262
1,092
1,170
179
1
-- -- Copyright (c) 2012 Citrix Systems, Inc. -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 of the License, or (at your option) any later version. -- -- Th...
OpenXT/xclibs
xch-rpc/Rpc/Domain.hs
lgpl-2.1
2,565
0
13
527
513
274
239
36
3
{-# LANGUAGE PackageImports #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE NoImplicitPrelude #-} {- Copyright 2020 The CodeWorld Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a co...
google/codeworld
codeworld-base/src/Internal/Exports.hs
apache-2.0
2,352
0
5
643
344
231
113
100
0
{- Primitive.hs - Primitive shapes. - - Timothy A. Chagnon - CS 636 - Spring 2009 -} module Primitive where import Math import Ray import Material data Primitive = Sphere RealT Vec3f -- Sphere defined by radius, center | Plane Vec3f Vec3f Vec3f -- Plane defined by 3 points deriving ...
tchagnon/cs636-raytracer
a5/Primitive.hs
apache-2.0
2,060
0
29
790
832
424
408
48
5
{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} #include "settings.h" -- | Settings are centralized, as much as possible, into this file. This -- includes database connection settings, static file locations, etc. -- In addition, you can configure a number of different aspects of Yesod -- by overriding methods i...
sseefried/funky-foto
Settings.hs
bsd-2-clause
5,570
0
11
964
594
363
231
64
2
-- | Provides functionality of rendering the application model. module Renderer ( Descriptor , initialize , terminate , render ) where import Foreign.Marshal.Array import Foreign.Ptr import Foreign.Storable import Graphics.Rendering.OpenGL import System.IO import qualified LoadShaders as LS -- ...
fujiyan/toriaezuzakki
haskell/opengl/rectangle/Renderer.hs
bsd-2-clause
4,665
0
15
1,123
1,118
565
553
105
1
{-# LANGUAGE OverloadedStrings #-} -- | This module contains convertions from LDAP types to ASN.1. -- -- Various hacks are employed because "asn1-encoding" only encodes to DER, but -- LDAP demands BER-encoding. So, when a definition looks suspiciously different -- from the spec in the comment, that's why. I hope all ...
supki/ldap-client
src/Ldap/Asn1/ToAsn1.hs
bsd-2-clause
11,863
0
22
3,385
2,477
1,252
1,225
158
1
module HSNTP.Util.Daemon (daemonize, childLives) where import System.Posix daemonize :: IO () -> IO () -> IO ProcessID daemonize hup comp = forkProcess cont where cont = do createSession installHandler lostConnection (Catch hup) Nothing comp childLives :: ProcessID -> IO Bool childLives pid = do sle...
creswick/hsntp
HSNTP/Util/Daemon.hs
bsd-3-clause
413
8
10
91
149
73
76
11
1
-- -fno-warn-deprecations for use of Map.foldWithKey {-# OPTIONS_GHC -fno-warn-deprecations #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.PackageDescription.Configuration -- Copyright : Thomas Schilling, 2007 -- License : BSD3 -- -- Maintai...
edsko/cabal
Cabal/src/Distribution/PackageDescription/Configuration.hs
bsd-3-clause
25,834
0
20
6,936
6,219
3,320
2,899
363
19
{-# LANGUAGE BangPatterns, MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Permute.MPermute -- Copyright : Copyright (c) , Patrick Perry <patperry@stanford.edu> -- License : BSD3 -- M...
patperry/permutation
lib/Data/Permute/MPermute.hs
bsd-3-clause
17,466
0
19
4,604
4,181
2,189
1,992
350
5
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} -- | Interface for GraphQL API. -- -- __Note__: This module is highly subject to change. We're still figuring -- where to...
jml/graphql-api
src/GraphQL.hs
bsd-3-clause
6,404
0
13
1,153
1,196
659
537
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} module EFA.Utility.List where vhead :: String -> [a] -> a vhead _ (x:_) = x vhead caller _ = error $ "vhead, " ++ caller ++ ": empty list" vlast :: String -> [a] -> a vlast _ xs@(_:_) = last xs vlast caller _ = error $ "vlast, " ++ caller ++ "...
energyflowanalysis/efa-2.1
src/EFA/Utility/List.hs
bsd-3-clause
531
0
11
124
218
119
99
13
3
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAG...
dalaing/type-systems
src/Rules/Kind/Infer/Offline.hs
bsd-3-clause
3,672
0
15
967
1,361
709
652
-1
-1
{-# LANGUAGE ExistentialQuantification #-} module Data.IORef.ReadWrite ( ReadWriteIORef , toReadWriteIORef ) where import Data.Bifunctor (first) import Data.IORef (IORef) import Data.IORef.Class data ReadWriteIORef a = forall b. ReadWriteIORef (IORef b) (a -> b) (b -> a) toReadWriteIORef :: IORef a -> ReadWri...
osa1/privileged-concurrency
Data/IORef/ReadWrite.hs
bsd-3-clause
1,251
0
9
226
377
196
181
27
1
module Main where main :: IO () main = print $ length ('a', 'b')
stepcut/safe-length
example/BrokenTuple.hs
bsd-3-clause
66
0
7
15
32
18
14
3
1
module Main where import Control.Lens import Numeric.Lens (binary, negated, adding) import Test.Tasty (TestTree, defaultMain, testGroup) import Test.Tasty.ExpectedFailure (allowFail) import Test.DumbCheck -- (TestTree, defaultMain, testGroup) import qualified Test.Tasty.Lens.Iso as Iso import qualified Test.Tasty.Len...
jdnavarro/tasty-lens
tests/tasty.hs
bsd-3-clause
2,255
0
16
533
682
372
310
57
1
{-# LANGUAGE BangPatterns #-} -- need a fast way to represent a sudo puzzle -- use vector reference: https://wiki.haskell.org/Numeric_Haskell:_A_Vector_Tutorial -- * End users should use Data.Vector.Unboxed for most cases -- * If you need to store more complex structures, use Data.Vector -- * If you need to pass to ...
niexshao/Exercises
src/Euler96-Sudoku/sudoku1.hs
bsd-3-clause
3,446
0
15
985
1,313
690
623
72
8
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Xmobar.Plugins.Monitors -- Copyright : (c) 2010, 2011, 2012, 2013 Jose Antonio Ortega Ruiz -- (c) 2007-10 Andrea Rossato -- License : BSD-style (see LICENSE) -- -- Maintainer...
apoikos/pkg-xmobar
src/Plugins/Monitors.hs
bsd-3-clause
5,554
0
10
1,686
1,700
912
788
91
0
{-# LANGUAGE RecordWildCards #-} module Helper ( emptyEnv , newUserAct , midnight , stubRunner , stubCommand , addUser , createEnv , createUser , createPost , stubUsers , secAfterMidnight , usersEnv , newSysAct ) where import Types import qualified Data.Map.Lazy as Map (insert, empty, from...
lpalma/hamerkop
test/Helper.hs
bsd-3-clause
2,747
0
10
904
817
486
331
71
1
-- | Collection of types (@Proc_*@ types and others), and -- some functions on these types as well. module Graphics.Web.Processing.Core.Types ( -- * Processing Script ProcScript (..) , emptyScript -- ** Script rendering , renderScript , renderFile -- ** Processing Code , ProcCode -- * Contexts ...
Daniel-Diaz/processing
Graphics/Web/Processing/Core/Types.hs
bsd-3-clause
1,582
0
8
373
318
213
105
45
1
module MakeTerm where import BruijnTerm import Value import Name val :: Value -> LamTerm () () n val = Val () var :: String -> LamTerm () () Name var = Var () . fromString double :: Double -> LamTerm () () n double = Val () . Prim . MyDouble true :: LamTerm () () n true = Val () $ Prim $ MyBool True false :: LamT...
kwibus/myLang
tests/MakeTerm.hs
bsd-3-clause
779
0
13
186
451
226
225
24
1
module Main where import GHC.IO.Handle import System.Console.GetOpt import System.Environment import System.Exit import System.IO import Data.Aeson import Sampler import Control.Monad ( replicateM ) import qualified Da...
maciej-bendkowski/boltzmann-brain
scripts/sampler-template/app/Main.hs
bsd-3-clause
4,877
0
13
1,915
1,028
539
489
113
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ScopedTypeVariables #-} -- | Simple program to proxy a SFTP session. I.e. a SFTP client will spawn us -- through SSH instead of a real sftp executable. It won't see any difference -- as we are fully transparent, but we can se what the protoc...
noteed/sftp-streams
bin/sftp-mitm.hs
bsd-3-clause
4,471
0
21
823
1,376
737
639
94
2
{-# LANGUAGE MonadComprehensions #-} -- | A big-endian binary PATRICIA trie with fixed-size ints as keys. module BinaryTrie where import Prelude hiding (lookup) import Data.Bits import Data.Monoid import Text.Printf -- | A PATRICIA trie that inspects an @Int@ key bit by bit...
silky/different-tries
src/BinaryTrie.hs
bsd-3-clause
5,963
188
10
1,922
2,347
1,158
1,189
108
2
module B1.Data.Technicals.StockData ( StockData , StockDataStatus(..) , StockPriceData(..) , newStockData , createStockPriceData , getStockDataStatus , getStockPriceData , getErrorMessage , handleStockData ) where import Control.Concurrent import Control.Concurrent.MVar import Data.Either import Da...
btmura/b1
src/B1/Data/Technicals/StockData.hs
bsd-3-clause
4,249
0
15
858
1,043
563
480
117
2
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} -- | The commented code summarizes what will be auto-generated below module Main where import Control.Lens -- import Test.QuickCheck (quic...
np/lens
tests/templates.hs
bsd-3-clause
2,743
0
11
573
534
319
215
42
1
module Idris.DeepSeq(module Idris.DeepSeq, module Idris.Core.DeepSeq) where import Idris.Core.DeepSeq import Idris.Core.TT import Idris.AbsSyntaxTree import Control.DeepSeq -- All generated by 'derive' instance NFData Forceability where rnf Conditional = () rnf Unconditional = () instance NFData In...
ctford/Idris-Elba-dev
src/Idris/DeepSeq.hs
bsd-3-clause
10,810
0
15
3,971
5,664
2,993
2,671
247
0
{-| Implementation of the Ganeti Confd client functionality. -} {- Copyright (C) 2012 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 optio...
sarahn/ganeti
src/Ganeti/Confd/Client.hs
gpl-2.0
4,684
0
17
984
943
464
479
83
3
{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.CloudFormation -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintaine...
fmapfmapfmap/amazonka
amazonka-cloudformation/gen/Network/AWS/CloudFormation.hs
mpl-2.0
8,796
0
5
1,832
708
519
189
149
0
{-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -Wall #-} module Main where import Control.Concurrent import Control.Exception as Ex import Control.Monad import Data.IORef import System.Posix.CircularBuffer import System.Environment -- read Int's from the supplied buffer as fast as possible, and print the -- number re...
smunix/shared-buffer
benchmarks/Reader.hs
bsd-3-clause
989
0
22
308
249
128
121
24
3
{-| Implementation of the RAPI client interface. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. 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 re...
apyrgio/ganeti
src/Ganeti/HTools/Backend/Rapi.hs
bsd-2-clause
10,150
0
15
2,059
2,440
1,209
1,231
184
3
----------------------------------------------------------------------------- -- -- Machine-specific parts of the register allocator -- -- (c) The University of Glasgow 1996-2004 -- ----------------------------------------------------------------------------- {-# OPTIONS -fno-warn-tabs #-} -- The above warning supress...
lukexi/ghc-7.8-arm64
compiler/nativeGen/PPC/RegInfo.hs
bsd-3-clause
2,380
12
10
422
493
259
234
44
2
{-# Language PatternGuards #-} module Blub ( blub , foo , bar ) where import Ugah.Foo ( a , b ) import Control.Applicative import Ugah.Blub f :: Int -> Int f = (+ 3) g :: Int -> Int g = where
jystic/hsimport
tests/inputFiles/ModuleTest28.hs
bsd-3-clause
240
0
5
90
71
44
27
-1
-1
-- FrontEnd.Tc.Type should be imported instead of this. module FrontEnd.Representation( Type(..), Tyvar(..), tyvar, Tycon(..), fn, Pred(..), Qual(..), Class, tForAll, tExists, MetaVarType(..), prettyPrintType, fromTAp, fromTArrow, tassocToAp, MetaVar(..), ...
hvr/jhc
src/FrontEnd/Representation.hs
mit
10,748
0
26
3,080
4,645
2,367
2,278
-1
-1
{-# LANGUAGE BangPatterns, CPP #-} module RegAlloc.Graph.TrivColorable ( trivColorable, ) where #include "HsVersions.h" import RegClass import Reg import GraphBase import UniqFM import FastTypes import Platform import Panic -- trivColorable ---------------------------------------------------------------...
christiaanb/ghc
compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
bsd-3-clause
12,047
0
16
4,587
1,071
532
539
113
45
{-# LANGUAGE TypeFamilies, FlexibleInstances, FlexibleContexts, UndecidableInstances, MultiParamTypeClasses, FunctionalDependencies #-} {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module T10139 where import Data.Monoid import Data.Kind import Data.Coerce class Monoid v => Measured v a | a -> v w...
sdiehl/ghc
testsuite/tests/indexed-types/should_compile/T10139.hs
bsd-3-clause
1,165
0
14
245
346
189
157
-1
-1
{-# OPTIONS_GHC -fcontext-stack=1000 #-} {-# LANGUAGE FlexibleContexts, FlexibleInstances, FunctionalDependencies, MultiParamTypeClasses, OverlappingInstances, TypeSynonymInstances, TypeOperators, UndecidableInstances, TypeFamilies #-} module T5321Fun where -- As the below code demonstrates, the sa...
frantisekfarka/ghc-dsi
testsuite/tests/perf/compiler/T5321Fun.hs
bsd-3-clause
3,485
0
14
841
752
406
346
58
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.ForeignPtr.Safe -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Main...
ryantm/ghc
libraries/base/Foreign/ForeignPtr/Safe.hs
bsd-3-clause
1,340
0
4
331
86
65
21
20
0
{-# LANGUAGE TypeFamilies #-} module Hadrian.Oracles.ArgsHash ( TrackArgument, trackAllArguments, trackArgsHash, argsHashOracle ) where import Control.Monad import Development.Shake import Development.Shake.Classes import Hadrian.Expression hiding (inputs, outputs) import Hadrian.Target -- | 'TrackArgument' ...
snowleopard/shaking-up-ghc
src/Hadrian/Oracles/ArgsHash.hs
bsd-3-clause
2,494
0
14
448
414
225
189
25
1
module NegativeIn1 where f x y = x + y
kmate/HaRe
old/testing/introCase/NegativeIn1_TokOut.hs
bsd-3-clause
42
0
5
13
18
10
8
2
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Graphics.UI.Bottle.Widgets.Spacer ( make , makeWidget , makeHorizontal, makeVertical , makeHorizontalWidget , makeHorizLine , empty ) where import Control.Monad (void) import Data.Monoid (mempty) import Data.Vector.Vector2 (Vector2(..)) import Graphics.U...
sinelaw/lamdu
bottlelib/Graphics/UI/Bottle/Widgets/Spacer.hs
gpl-3.0
1,330
0
8
195
411
232
179
35
1
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleInstances, TypeSynonymInstances, UndecidableInstances #-} module Tc173a where class FormValue value where isFormValue :: value -> () isFormValue _ = () class FormTextField value instance FormTextField String instance {-# OVERLAPPABLE #...
christiaanb/ghc
testsuite/tests/typecheck/should_compile/Tc173a.hs
bsd-3-clause
533
0
8
75
107
52
55
-1
-1
module Shaker.GhcInterface ( -- * GHC Compile management initializeGhc ,ghcCompile ,getListNeededPackages ,installedPackageIdString ,fillModuleDataTest ,addLibraryToDynFlags ,searchInstalledPackageId ) where import Distribution.InstalledPackageInfo import Distribution.Simple.PackageIndex import Contr...
bonnefoa/Shaker
src/Shaker/GhcInterface.hs
isc
6,547
0
20
1,091
1,685
872
813
142
4
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} -- | This module defines a collection of simplification rules, as per -- "Futhark.Optimise.Simplifier.Rule". They are used in the -- simplifier. module Futhark.Optimise.Simplifier.Rules ( standa...
ihc/futhark
src/Futhark/Optimise/Simplifier/Rules.hs
isc
53,885
0
26
15,149
18,598
9,037
9,561
-1
-1
{-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE CPP #-} module Text.Regex.Applicative.Types where import Control.Applicative import Control.Monad ((<=<)) import Data.Filtrable (Filtrable (..)) import Data.Functor.Identity (Identity (..)) import Data.String #if !MIN_...
feuerbach/regex-applicative
Text/Regex/Applicative/Types.hs
mit
6,009
0
13
1,471
1,471
776
695
-1
-1
module Rocketfuel.Grid ( generateRandomGrid, afterMove, applySwap, getFallingTiles, hasMoves ) where import Data.Array import Data.List import Data.List.Split (chunksOf) import Data.Maybe import Data.Natural import Control.Monad.Writer import Control.Monad.Random import Rocketfuel.Types -- These...
Raveline/Rocketfuel
src/Rocketfuel/Grid.hs
mit
6,579
0
14
1,523
1,430
762
668
94
3
{-# LANGUAGE PatternGuards #-} module Tarefa3_2017li1g180 where import LI11718 import Tarefa2_2017li1g180 import Test.QuickCheck.Gen import Data.List import Data.Maybe import Safe testesT3 :: [(Tabuleiro,Tempo,Carro)] testesT3 = unitTests randomizeCarro :: Tabuleiro -> Double -> Carro -> Gen Carro randomizeCarro ta...
hpacheco/HAAP
examples/plab/svn/2017li1g180/src/Tarefa3_2017li1g180.hs
mit
19,467
0
22
5,159
8,208
4,494
3,714
269
6
newtype Stack a = Stk [a] deriving(Show) -- The follwing Functions are supposed declared in the exams' question (just to make it work) -- Start top/pop/push/empty top :: Stack a -> a top (Stk []) = error "Stack is empty, can't call top function on it!" top (Stk (x:_)) = x pop :: Stack a -> Stack a pop (Stk []) = err...
NMouad21/HaskellSamples
HaskellFinalExV.hs
mit
3,112
0
14
959
1,310
659
651
57
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DefaultSignatures #-} module Solar.Utility.NoCache where import Data.Typeable import Data.Generics as D import GHC.Generics as G import Data.Monoid -- | The "No Cache" data type, use 'kvNoCache' to provide a typed 'Nothing' data KVNoCach...
Cordite-Studios/solar
solar-shared/Solar/Utility/NoCache.hs
mit
589
0
8
105
138
81
57
15
1
module HistogramTest where import Control.Concurrent.Async import Data.Metrics.Histogram.Internal import Data.Metrics.Snapshot import Data.Metrics.Types import System.Random.MWC import System.Posix.Time import Test.QuickCheck histogramTests :: [Test] histogramTests = [ testUniformSampleMin , testUniformSampleMax ...
graydon/metrics
tests/HistogramTest.hs
mit
4,609
0
14
830
1,375
665
710
123
1
{-# LANGUAGE TypeOperators, OverloadedStrings, FlexibleContexts, ScopedTypeVariables #-} module Wf.Control.Eff.Run.Session ( runSession , getRequestSessionId , genSessionId ) where import Control.Eff (Eff, (:>), Member, freeMap, handleRelay) import Control.Eff.Reader.Strict (Reader, ask) import Wf.Control.Eff.Session ...
bigsleep/Wf
wf-session/src/Wf/Control/Eff/Run/Session.hs
mit
4,197
3
16
1,022
1,266
685
581
80
8
main :: IO () main = error "undefined"
mlitchard/cosmos
executable/old.hs
mit
40
0
6
9
19
9
10
2
1
{-# LANGUAGE OverloadedStrings #-} module Bce.BlockChainSerialization where import Bce.Hash import Bce.Crypto import qualified Bce.BlockChain as BlockChain import Bce.BlockChainHash import qualified Data.Binary as Bin import GHC.Generics (Generic) import qualified Data.Binary.Get as BinGet import qualified Data....
dehun/bce
src/Bce/BlockChainSerialization.hs
mit
2,013
0
10
383
473
243
230
46
0
{-# LANGUAGE PackageImports #-} {-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-unused-imports #-} -- | Reexports "Data.Word.Compat" -- from a globally unique namespace. module Data.Word.Compat.Repl.Batteries ( module Data.Word.Compat ) where import "this" Data.Word.Compat
haskell-compat/base-compat
base-compat-batteries/src/Data/Word/Compat/Repl/Batteries.hs
mit
278
0
5
31
29
22
7
5
0
module Streamer.HTTPClient where import Streamer.Util (maybeRead) import Network.URI (parseURI) import Network.Stream (Result) import Network.HTTP.Headers ( replaceHeader , HeaderName(HdrIfNoneMatch, HdrETag...
adizere/nifty-tree
src/Streamer/HTTPClient.hs
mit
3,306
0
18
1,019
864
446
418
70
4
{-**************************************************************************** * Hamster Balls * * Purpose: Rendering code for lasers * * Author: David, Harley, Alex, Matt * * ...
harley/hamball
src/Laser.hs
mit
1,589
0
18
499
302
155
147
29
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_HADDOCK show-extensions #-} --...
atsukotakahashi/wi
src/library/Yi/Keymap/Emacs/Utils.hs
gpl-2.0
15,159
0
21
4,022
3,280
1,701
1,579
271
5
module SrcTemplateTree where data ParamConfig valueType = SimpleParam | ParamWithDefaultValue valueType | ParamWithHistroy String deriving(Show) data Param = StrParam String String (ParamConfig String) deriving Show ...
thomkoehler/SrcGen
src/SrcTemplateTree.hs
gpl-2.0
1,069
0
9
418
198
116
82
26
0
-- Exercise 7.7Voting algorithms -- Graham Hutton. “Programming in Haskell” votes :: [String] votes = ["Red", "Blue", "Green", "Blue", "Blue", "Red"] count :: Eq a => a -> [a] -> Int count x = length . filter (== x) rmdups :: Eq a => [a] -> [a] rmdups []= [] rmdups (x:xs) = x : rmdups( filter(/=x) xs) result :: Or...
jack793/Haskell-examples
Flipped/votes.hs
gpl-3.0
920
7
9
196
520
289
231
-1
-1
module Curves(Point, Curve, Line(..), point, pointX, pointY, curve, connect, rotate, translate, reflect, bbox, height, width, toList, toSVG, toFile, hilbert) where import Text.Printf data Point = Point (Double, Double) deriving (Show) data Curve...
Rathcke/uni
ap/advanced programming/assignment0/Curves.hs
gpl-3.0
3,623
0
16
1,159
1,610
850
760
82
2
module MLLabs.Validation ( TrainAndTestSets , ValidationStrategy , kfold ) where import MLLabs.Types type TrainAndTestSets obj lbl = (Dataset obj lbl, Dataset obj lbl) type ValidationStrategy obj lbl = Dataset obj lbl -> [TrainAndTestSets obj lbl] -- kfold 3 [1..6] == [([3,4,5,6]...
zhenyavinogradov/ml-labs
src/MLLabs/Validation.hs
gpl-3.0
1,100
0
18
339
413
220
193
24
2
{- Author: Michal Parusinski Email: mparusinski@googlemail.com License: GPL 3.0 File: OutputProof.hs Description: outputs a latex file that can be inserted in a latex document -} module OutputProof where import System.IO import System.Cmd(system) import System.Exit import Control.Monad import Signat...
j5b/ps-pc
OutputProof.hs
gpl-3.0
7,299
0
12
1,610
2,355
1,176
1,179
124
3
{-# LANGUAGE CPP #-} module Constants where import Data.String import System.Environment.XDG.BaseDir import System.FilePath import System.Directory import System.IO import System.Process import Control.Concurrent import Control.Exception import Control.Monad #ifdef CABAL_PATH import Paths_apelsin hiding (getDataDir) #...
Cadynum/Apelsin
src/Constants.hs
gpl-3.0
1,823
12
11
280
456
246
210
-1
-1
import Prelude hiding (putStrLn) import Control.Monad import Control.Monad.Progress import Control.Monad.Writer import Data.List import Data.Text (Text) import qualified Data.Text as Text import Data.Text.IO import Data.Time import Data.Version import qualified Graphics.Forensics.Analysers as Analysers import qualif...
Purview/purview
src/Graphics/Forensics/Runner/Console.hs
gpl-3.0
5,272
0
16
1,130
1,509
760
749
158
3
module CatanProject where import System.Random import System.Random.Shuffle (shuffle') import Data.List import Data.Maybe import Text.Printf -- Settlers -- a turn has mulitple -- stages, some of which might -- include all players -- so that makes it a little more -- complex than just a simple set of -- moves -- ther...
tyh0/312-Catan-Project
Main.hs
gpl-3.0
21,167
0
18
4,558
6,455
3,690
2,765
337
8
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-jobs/gen/Network/Google/Resource/Jobs/Projects/Tenants/Patch.hs
mpl-2.0
5,731
0
17
1,304
864
505
359
123
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-replicapool/gen/Network/Google/Resource/ReplicaPool/InstanceGroupManagers/Insert.hs
mpl-2.0
4,611
0
17
1,056
571
337
234
87
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Create.hs
mpl-2.0
5,189
0
18
1,175
783
456
327
115
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.ContainerBu...
brendanhay/gogol
gogol-containerbuilder/gen/Network/Google/ContainerBuilder/Types/Product.hs
mpl-2.0
173,022
0
38
40,921
31,197
18,007
13,190
3,333
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Main where import Data.Maybe (fromJust) import qualified Data.Text as T (unpack) import Data.GI.Base.ManagedPtr (unsafeCastTo) import Data.GI.Base.GError (gerrorMessage, GError(..)) import Control.Exception (catch) import qualified GI.Gtk a...
haskell-gi/gi-gtk-examples
gtkbuilder/GtkBuilderTest.hs
lgpl-2.1
1,119
0
12
199
275
155
120
23
1
{-# LANGUAGE QuasiQuotes #-} module ParseAndPrintSpec where ------------------------------------------------------------------------------ import HC.ParseAndPrint ------------------------------------------------------------------------------ import Language.LBNF.Compiletime import Test.H...
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/parsing/bnfc-meta-examples/test/ParseAndPrintSpec.hs
unlicense
4,662
0
23
1,262
1,659
828
831
92
2
{-# OPTIONS_GHC -fno-warn-orphans #-} module Hecate.Orphans () where import Data.Text.Arbitrary () import Test.QuickCheck (Arbitrary (..)) import Hecate.Data (Description (..), Identity (..), Metadata (..), Plaintext (..)) instance Arbitrary Description where arbitrary ...
henrytill/hecate
tests/Hecate/Orphans.hs
apache-2.0
813
0
8
207
220
122
98
17
0
-- How many polynomials of degree k in Z_n[x] that are 0 under every evaluation map? -- coefficientList generates polynomials of degree k. coefficientList :: Int -> Int -> [[Int]] coefficientList n k = recurse k $ map (:[]) [1..n-1] where recurse 0 ls = ls recurse c ls = recurse (c - 1) [a : as | a <- [0..n-1], as...
peterokagey/haskellOEIS
src/Sandbox/NonzeroZeroPolynomials.hs
apache-2.0
2,579
0
12
494
435
245
190
14
2
{-# LANGUAGE PatternSynonyms #-} {- Copyright 2020 The CodeWorld Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-...
google/codeworld
codeworld-api/src/CodeWorld.hs
apache-2.0
2,225
0
5
635
331
224
107
98
0
{- Ray.hs - Ray type - - Timothy A. Chagnon - CS 636 - Spring 2009 -} module Ray where import Math import Material data Ray = Ray Vec3f Vec3f deriving Show -- t Normal Material data Intersection = Inx RealT Vec3f Material deriving (Show, Eq) instance Ord Intersection where ...
tchagnon/cs636-raytracer
a5/Ray.hs
apache-2.0
456
0
8
127
130
70
60
11
1
{-# LANGUAGE DeriveGeneric, DeriveFunctor, DeriveFoldable #-} {- © Utrecht University (Department of Information and Computing Sciences) -} module Domain.Scenarios.Globals where import GHC.Generics import Data.Binary import qualified Data.Map as M import Data.Maybe import qualified Domain.Scenarios.DomainData as DD...
UURAGE/ScenarioReasoner
src/Domain/Scenarios/Globals.hs
apache-2.0
3,785
0
13
785
921
502
419
73
2
module HelperSequences.A116416Spec (main, spec) where import Test.Hspec import HelperSequences.A116416 (a116416) main :: IO () main = hspec spec spec :: Spec spec = describe "A116416" $ it "correctly computes the first 20 elements" $ take 20 (map a116416 [0..]) `shouldBe` expectedValue where expectedValue...
peterokagey/haskellOEIS
test/HelperSequences/A116416Spec.hs
apache-2.0
370
0
10
59
160
95
65
10
1
{-# LANGUAGE TypeFamilies, FlexibleInstances, FlexibleContexts, DeriveDataTypeable, StandaloneDeriving #-} ----------------------------------------------------------------------------- -- | -- Module : HEP.Automation.MadGraph.Model.AxiGluon -- Copyright : (c) 2011, 2012 Ian-Woo Kim -- -- License ...
wavewave/madgraph-auto-model
src/HEP/Automation/MadGraph/Model/AxiGluon.hs
bsd-2-clause
3,581
0
17
1,090
908
477
431
68
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} -- | -- -- OAuth2 plugin for http://spotify.com -- module Yesod.Auth.OAuth2.Spotify ( oauth2Spotify , module Yesod.Auth.OAuth2 ) where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative ((<$>), (<*>), pure) #endif import Control.Monad (mzero) i...
jasonzoladz/yesod-auth-oauth2
Yesod/Auth/OAuth2/Spotify.hs
bsd-2-clause
3,386
0
21
912
799
450
349
79
1
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE Rank2Types #-} module Orbits.Units ( au , solarMass , simLength , simTime , simMass , simVelocity , simEnergy , gravitationalConstant , simGravitationalConstant , day , year , inUnit , fromUnit ) where import Prelude ()...
bjoeris/orbits-haskell-tensorflow
src/Orbits/Units.hs
bsd-3-clause
2,214
0
12
402
596
324
272
44
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module IOStreams where import Control.Exception import Data.ByteString (ByteString) import Data.Char (isSpace) import qualified Data.Text as Text import System.IO.Streams (InputStream, O...
fujimura/functional-stream-processing-meetup-sample
src/IOStreams.hs
bsd-3-clause
696
0
11
182
168
92
76
17
1
module PackageTests.BuildCompilerFlags.BuildTypeCustom.Suite ( test ) where import PackageTests.BuildCompilerFlags.Util import qualified PackageTests.PackageTester as PT import System.FilePath ((</>)) import Test.Framework (Test, testGroup) import Test.Framework.Providers.HUnit...
plumlife/cabal
cabal-install/tests/PackageTests/BuildCompilerFlags/BuildTypeCustom/Suite.hs
bsd-3-clause
3,269
0
17
785
717
334
383
73
1
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- -- RegTypes.hs --- ADC register types -- -- Copyright (C) 2015, Galois, Inc. -- All Rights Reserved. -- module Ivory.BSP.STM32.Peripheral.ADC.RegTypes where import Ivory.Language [ivor...
GaloisInc/ivory-tower-stm32
ivory-bsp-stm32/src/Ivory/BSP/STM32/Peripheral/ADC/RegTypes.hs
bsd-3-clause
444
0
4
86
32
26
6
7
0
module Fibon.Run.Config ( Fibon.ConfigMonad.append , Fibon.ConfigMonad.setTimeout , Fibon.ConfigMonad.done , Fibon.ConfigMonad.collectExtraStatsFrom , Fibon.ConfigMonad.noExtraStats , Fibon.ConfigMonad.useGhcDir , Fibon.ConfigMonad.useGhcInPlaceDir , Fibon.ConfigMonad.getEnv , Fibon.ConfigMonad.useR...
dmpots/fibon
tools/fibon-run/Fibon/Run/Config.hs
bsd-3-clause
2,420
0
11
525
579
349
230
74
1
{-# LANGUAGE Safe, TypeFamilies #-} module Data.Logic.Pair ( Pair, -- *Construction pair, pair', -- *Deconstruction left, right, -- *Utilities swap ) where import Control.Monad.Predicate import Data.Logic.Atom import Data.Logic.Term import Data.Logic.Var import Control.Applicative ((<$...
YellPika/tlogic
src/Data/Logic/Pair.hs
bsd-3-clause
1,601
0
12
437
713
371
342
36
1
{-# LANGUAGE GADTs, DisambiguateRecordFields #-} {-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} module CmmProcPoint ( ProcPointSet, Status(..) , callProcPoints, minimalProcPointSet , splitAtProcPoints, procPointAnalysis , attachContInfoTables ) where import Prelude hiding (last, unzip, succ, ...
nomeata/ghc
compiler/cmm/CmmProcPoint.hs
bsd-3-clause
18,571
0
20
5,709
2,935
1,506
1,429
191
12
{-# LANGUAGE ExistentialQuantification #-} -- |Defines the network API required for a Tor implementation to run. module Tor.NetworkStack( TorNetworkStack(..) , SomeNetworkStack(..) , toBackend , recvAll , recvLine ) where import qualified Data.ByteString as S import qu...
GaloisInc/haskell-tor
src/Tor/NetworkStack.hs
bsd-3-clause
2,487
0
16
758
613
330
283
45
3
-- |Standardizes the language specification of submitted tests. module CS173.NormalizeSubmissions ( standardizeLang ) where -- |Removes leading whitespace and PLT Scheme comments from the string. pltWs :: String -> String pltWs [] = [] pltWs (';':rest) = pltWs $ pltWsLine rest pltWs ('#':'|':rest) = pltWs $ pltWs...
jesboat/173tourney
server-src/CS173/NormalizeSubmissions.hs
bsd-3-clause
1,224
0
16
248
421
216
205
27
3
{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-| Module : Numeric.AERN.IVP.Examples.Hybrid.Simple Description : simple examples of hybrid system IVPs Copyright : (c) Michal Konecny License...
michalkonecny/aern
aern-ivp/src/Numeric/AERN/IVP/Examples/Hybrid/Simple.hs
bsd-3-clause
130,512
0
34
43,167
25,693
14,334
11,359
-1
-1
import Language.KansasLava.Trace import Language.KansasLava.VCD import Control.Applicative import System.Environment vcdDiff :: Trace -> Trace -> String vcdDiff (Trace c1 i1 o1 p1) (Trace _ i2 o2 p2) = toVCD t where t = Trace c1 (mergeMaps i1 i2) (mergeMaps o1 o2) (mergeMaps p1 p2) mergeMaps m1 m2 = [ (...
andygill/kansas-lava
tests/Diff.hs
bsd-3-clause
1,140
0
13
441
361
181
180
26
2
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : Hasmin.Types.BgSize -- Copyright : (c) 2017 Cristian Adrián Ontivero -- License : BSD3 -- Stability : experimental -- Portability : non-portable -- -----------------------------...
contivero/hasmin
src/Hasmin/Types/BgSize.hs
bsd-3-clause
2,662
0
12
617
703
364
339
51
1
module Prototype where
plow-technologies/template-service
src/Prototype.hs
bsd-3-clause
24
0
2
4
4
3
1
1
0
-- | module VK.App.AppSettings where import VK.API appId :: Integer appId = 5082615 appScope :: [AuthPermissions] appScope = [Audio, Status]
eryx67/vk-api-example
src/VK/App/AppSettings.hs
bsd-3-clause
155
0
5
34
42
27
15
6
1