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
module GaussianElimination where import Uniform(gcdPlus) rowEchelon :: [[Int]] -> [[Int]] rowEchelon rs = search rs [] where search :: [[Int]] -> [[Int]] -> [[Int]] search [] zs = zs search ([]:ys) zs = search ys ([] : zs) search ((0:xs):ys) zs = search ys (xs : zs) search ((x:xs):ys) z...
cullina/Extractor
src/GaussianElimination.hs
bsd-3-clause
726
0
14
219
436
235
201
17
6
import Data.List (genericLength, genericIndex) import Test.Hspec (hspec, describe, it, shouldBe, SpecWith, pending) import Problems (problems, ioProblems) safeIndex :: (Integral a) => [b] -> a -> Maybe b safeIndex xs i | i >= 0 && i < genericLength xs = Just $ xs `genericIndex` i | otherwise = Nothing expect ::...
ilikebits/euler
test/Spec.hs
bsd-3-clause
1,650
1
15
546
576
255
321
57
1
{-# language CPP #-} -- No documentation found for Chapter "StructureType" module OpenXR.Core10.Enums.StructureType (StructureType( TYPE_UNKNOWN , TYPE_API_LAYER_PROPERTIES , TYPE_EXTENSION_PROPERTIES ...
expipiplus1/vulkan
openxr/src/OpenXR/Core10/Enums/StructureType.hs
bsd-3-clause
58,692
1
10
13,956
3,219
2,012
1,207
-1
-1
-- | The Metropolis transition. module Strategy.Metropolis (metropolis) where import Control.Monad.State.Strict import Data.Maybe import Numeric.LinearAlgebra import Math.Probably.Sampler import Math.Probably.Types import Math.Probably.Utils -- | The Metropolis transition for a symmetric proposal. Uses a simple --...
glutamate/probably-baysig
src/Strategy/Metropolis.hs
bsd-3-clause
1,439
0
11
299
458
233
225
35
1
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module UnitTests.Distribution.Client.ProjectConfig (tests) where #if !MIN_VERSION_base(4,8,0) import Data.Monoid import Control.Applicative #endif import Data.Map (Map) import qualified Data.Map as Map import Data.List import Distribution.Package import Dist...
themoritz/cabal
cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs
bsd-3-clause
34,234
0
56
12,188
6,099
3,482
2,617
679
2
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE RankNTypes #-} -- | Infrastructure for working with indexed sets module Cardano.Wallet.Kernel.DB.Util.IxSet ( -- * Primary keys HasPrimKey(..) , OrdByPrimKey -- opaque -- * Wrapper around ...
input-output-hk/pos-haskell-prototype
wallet/src/Cardano/Wallet/Kernel/DB/Util/IxSet.hs
mit
15,926
0
13
3,297
4,438
2,402
2,036
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module OpaleyeDef where import Data.List.NonEmpty import Data.Maybe import Data.Profunctor.Product import qualified Data.Profunctor....
meditans/haskell-webapps
SpockOpaleye/src/OpaleyeDef.hs
mit
7,372
0
12
1,600
2,065
1,057
1,008
189
1
module Main where import Fuml.Supervised import Fuml.Unsupervised import Fuml.Core import Fuml.Base import Fuml.Base.Logistic import Fuml.Optimisation import Fuml.Optimisation.SGD import Numeric.Datasets.Iris import qualified Data.Vector.Storable as VS import Control.Monad import Control.Monad.Identity import Data.Ran...
diffusionkinetics/open
fuml/TestFuml.hs
mit
2,678
0
15
544
727
367
360
56
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.PackageDescription.Check -- Copyright : Lennart Kolmodin 2008 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This has code for checking for various problems in packages. Th...
jwiegley/ghc-release
libraries/Cabal/cabal/Distribution/PackageDescription/Check.hs
gpl-3.0
66,325
0
22
17,385
12,223
6,372
5,851
1,075
33
module Simulation ( SimStepOut , SimContext (..) , simulationStep , spawnAgents , mkSimContex , checkTime ) where import Data.Maybe import System.Random import Control.Concurrent import Control.Concurrent.STM import Control.Concurrent.STM.Stats im...
thalerjonathan/phd
thesis/code/concurrent/sugarscape/SugarScapeSTMTArray/src/Simulation.hs
gpl-3.0
6,118
0
17
2,013
1,715
900
815
153
4
{-# LANGUAGE TemplateHaskell #-} module Model.ResponseTypes where import Data.Aeson.TH import qualified Data.Text as T dropLbl :: Int -> Options dropLbl i = defaultOptions { fieldLabelModifier = drop i } data CommonResponse = CommonError T.Text | CommonSuccess T.Text deriving (Show, Eq) $(deriveJSON d...
agrafix/funblog
src/Model/ResponseTypes.hs
apache-2.0
352
0
8
61
92
52
40
12
1
{-# LANGUAGE FlexibleContexts #-} module HERMIT.Plugin.Display ( showDisplay , printDisplay , ps_putStr , ps_putStrLn ) where import Control.Monad.Reader import Control.Monad.State import Data.Maybe (fromMaybe) import HERMIT.Kernel (queryK, CommitMsg(..)) import HERMIT.Kure import HERMIT.Plugin....
conal/hermit
src/HERMIT/Plugin/Display.hs
bsd-2-clause
1,358
0
16
306
442
226
216
36
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module Data.Space.State where import Prelude import Data.Aeson import Control.Monad (mzero) import Text.RawString.QQ import qualified Data.ByteString.Lazy as L data Ship = Ship { id :: String , x :: Float , y ::...
eightyeight/space-sim
src/Data/Space/State.hs
bsd-3-clause
1,654
0
23
556
376
216
160
50
1
{-# OPTIONS -XOverloadedStrings #-} module ExchangeDeleteSpec (main, spec) where import Test.Hspec import Network.AMQP main :: IO () main = hspec spec spec :: Spec spec = do describe "deleteExchange" $ do context "when exchange exists" $ do it "deletes the exchange" $ do ...
bitemyapp/amqp
test/ExchangeDeleteSpec.hs
bsd-3-clause
1,651
0
20
595
324
162
162
29
1
{-# LANGUAGE TemplateHaskell #-} module Main where -- This file contains some examples of closures, which are the -- way to express a function invocation in Cloud Haskell. You -- need to use closures to run code on a remote system, which is, -- after all, the whole point. See the documentation on the function -- 'rem...
jepst/CloudHaskell
examples/tests/Test-Closure.hs
bsd-3-clause
4,434
0
14
1,313
674
353
321
43
2
{-# LANGUAGE Rank2Types #-} {-| Implementation of the Ganeti Query2 filterning. The filtering of results should be done in two phases. In the first phase, before contacting any remote nodes for runtime data, the filtering should be executed with 'Nothing' for the runtime context. This will make all non-runtime filte...
kawamuray/ganeti
src/Ganeti/Query/Filter.hs
gpl-2.0
10,083
0
13
2,121
2,161
1,110
1,051
145
5
{- | Module : $Header$ Description : analysis of subtype declarations Copyright : (c) Christian Maeder and Uni Bremen 2005 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable analyse subtype decls -} module HasCASL.Subty...
keithodulaigh/Hets
HasCASL/SubtypeDecl.hs
gpl-2.0
4,817
0
26
1,530
1,587
788
799
102
10
----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Trans.Writer.Strict -- Copyright : (c) Andy Gill 2001, -- (c) Oregon Graduate Institute of Science and Technology, 2001 -- License : BSD-style (see the file LICENSE) -- -- Maintainer...
jwiegley/ghc-release
libraries/transformers/Control/Monad/Trans/Writer/Strict.hs
gpl-3.0
7,417
0
14
1,623
2,040
1,118
922
100
1
#!/usr/bin/env runghc {-# language PackageImports #-} import Prelude hiding (any) import Data.Char import Data.Maybe import Data.Set import Data.List (isInfixOf, isPrefixOf) import Data.Foldable as Foldable (any, mapM_, forM_) import Text.Parsec import Text.Printf import Control.Monad (when) import Control.Applic...
changlinli/nikki
src/linuxDeploy.hs
lgpl-3.0
6,146
0
14
1,493
1,467
733
734
159
3
-- | -- Module : $Header$ -- Copyright : (c) 2013-2015 Galois, Inc. -- License : BSD3 -- Maintainer : cryptol@galois.com -- Stability : provisional -- Portability : portable {-# LANGUAGE PatternGuards #-} {-# LANGUAGE DeriveGeneric #-} module Cryptol.ModuleSystem.Interface ( Iface(..) , Iface...
beni55/cryptol
src/Cryptol/ModuleSystem/Interface.hs
bsd-3-clause
6,050
0
15
1,595
1,801
982
819
131
1
-- | The repo commits API as described on -- <http://developer.github.com/v3/repos/commits/>. module Github.Repos.Commits ( commitsFor ,commit ,commentsFor ,commitCommentsFor ,commitCommentFor ,diff ,module Github.Data ) where import Github.Data import Github.Private -- | The commit history for a repo. -- -- > commi...
fernandocastor/github
Github/Repos/Commits.hs
bsd-3-clause
1,883
0
11
284
419
239
180
25
1
module Guards1 where g3 n [] = ([], []) g3 n ((x : xs)) | n == 0 = ("", xs) | otherwise = (x : ls, rs) where ls = fst $ (g3 (n - 1) xs) rs = snd $ (g3 (n - 1) xs) g1 :: Int -> String -> String g1 n [] = [] g1 n ((x : xs)) | n == 0 = "" | otherwise = x : ls where ls = g1 (n - 1) xs ...
kmate/HaRe
old/testing/merging/Guards1AST.hs
bsd-3-clause
448
0
11
170
305
159
146
19
1
module Sum where --highlight "fold (+) 0", select IntroNewDef "sum" import Prelude hiding (sum) fold c n [] = n fold c n (h:t) = c h (fold c n t) main = fold (+) 0 [1..4]
kmate/HaRe
old/testing/introNewDef/Sum.hs
bsd-3-clause
179
0
7
45
81
45
36
5
1
module Demote.PatBindIn4 where --A definition can be demoted to the local 'where' binding of a friend declaration, --if it is only used by this friend declaration. --Demoting a definition narrows down the scope of the definition. --In this example, demote the top level 'tup' will fail. main :: Int main = foo 3 foo ...
SAdams601/HaRe
test/testdata/Demote/PatBindIn4.hs
bsd-3-clause
445
0
7
93
114
66
48
10
1
{-# LANGUAGE GADTs #-} {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} module CmmContFlowOpt ( cmmCfgOpts , cmmCfgOptsProc , removeUnreachableBlocksProc , replaceLabels ) where import Hoopl import BlockId import Cmm import CmmUtils import CmmSwitch (mapSwitchTargets) import Maybes import Panic i...
christiaanb/ghc
compiler/cmm/CmmContFlowOpt.hs
bsd-3-clause
15,702
0
18
4,439
2,497
1,343
1,154
161
8
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE BangPatterns, CPP, NoImplicitPrelude #-} module GHC.Event.Array ( Array , capacity , clear , concat , copy , duplicate , empty , ensureCapacity , findIndex , forM_ , length , loop , new , removeAt , snoc , u...
urbanslug/ghc
libraries/base/GHC/Event/Array.hs
bsd-3-clause
9,993
0
23
2,912
3,886
1,905
1,981
-1
-1
module T8506 where class Shapable Int where
urbanslug/ghc
testsuite/tests/parser/should_fail/T8506.hs
bsd-3-clause
46
0
5
9
13
7
6
-1
-1
module Main where c = putStrLn "C!" combine before after = do before putStrLn "In the middle" after main = do combine c c let b = combine (putStrLn "Hello!") (putStrLn "Bye!") let d = combine (b) (combine c c) putStrLn "So long!"
fredmorcos/attic
snippets/haskell/test-bind.hs
isc
275
0
12
88
104
48
56
10
1
-- | -- Module : PostgresWebsockets.Server -- Description : Functions to start a full stand-alone PostgresWebsockets server. module PostgresWebsockets.Server ( serve, ) where import Network.HTTP.Types (status200) import Network.Wai (Application, responseLBS) import Network.Wai.Application.Static (defaultFileS...
diogob/postgrest-ws
src/PostgresWebsockets/Server.hs
mit
1,777
0
14
274
429
233
196
-1
-1
{-# LANGUAGE LambdaCase, OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Chapter4.SyntaxSpec where import Control.Applicative import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck import Data.Display import Chapter4.Syntax instance Arbitrary Term where arbitrary = oneof [gNum, gB...
VoQn/tapl-hs
test/Chapter4/SyntaxSpec.hs
mit
4,215
0
16
1,080
1,312
645
667
-1
-1
module Sprockell.BasicFunctions where -- ========================================================================================================== -- Some elementary constants and Functions -- ========================================================================================================== reg0 = 0 ...
leonschoorl/sprockell
src/Sprockell/BasicFunctions.hs
mit
1,747
0
8
677
334
197
137
25
1
{- Copyright (C) 2014 Calvin Beck Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
Chobbes/FeatureSquish
FeatureSquish/InputLine.hs
mit
2,506
0
15
613
381
207
174
21
2
{-# LANGUAGE OverloadedStrings #-} module ProjectEuler.CommandLine.CmdSync ( cmdSync , updateEditZone ) where import Control.Applicative import Control.Monad import Data.Aeson import Data.Functor import Data.List import Data.Maybe import Filesystem.Path.CurrentOS ((</>)) import Text.Microstache import Turt...
Javran/Project-Euler
src/ProjectEuler/CommandLine/CmdSync.hs
mit
5,910
0
17
1,469
1,178
627
551
109
4
module Hpack.OptionsSpec (spec) where import Helper import Prelude () import Prelude.Compat import Hpack.Options spec :: Spec spec = do describe "parseOptions" $ do context "with --help" $ do it "returns Help" $ do parseOptions ["--help"] `shouldBe` Help ...
mitchellwrosen/hpack
test/Hpack/OptionsSpec.hs
mit
1,242
0
21
362
373
179
194
30
1
module Main where main :: IO () main = putStrLn "This is just a test suite"
brianshourd/adventOfCode2015
currentTests/Main.hs
mit
77
0
6
17
22
12
10
3
1
{- M++ Parser ================ James Sullivan <sullivan.james.f@gmail.com> Usage ===== ./mpp file output Emits the IR for the given M++ source to 'output'. Displays an error message if the source code is invalid. -} module Main where import Control.Exception import Data.List...
JamesSullivan1/Mpp
src/Main.hs
mit
1,490
2
27
550
379
187
192
39
5
module Main where import Control.Monad import System.IO import System.Environment import System.Console.GetOpt import Text.Parsec.String import Numeric import Data.Maybe (fromMaybe) import Inst import InstParser import GenM32 import AST import ChageComp import ChageParser import Typing import IR -- 参考: http://d....
ryna4c2e/chage
Main.hs
mit
2,800
0
13
755
652
345
307
56
4
{-# LANGUAGE ScopedTypeVariables #-} module Glance.Web.Schema where import Common (loggerName) import Control.Monad.Except (MonadError(throwError)) import Control.Monad.IO.Class (MonadIO(..)) import Data.Aeson (Value, decode) import Data.Maybe (fromJust) import Glance.Config (confFileName, GlanceConfig(..)) import Ne...
VictorDenisov/keystone
src/Glance/Web/Schema.hs
gpl-2.0
3,233
0
14
671
893
463
430
73
2
module Lambdit where
ejconlon/lambdit
src/Lambdit.hs
gpl-2.0
22
0
2
4
4
3
1
1
0
{-# LANGUAGE TupleSections, OverloadedStrings #-} module Handler.Home where import Import getHomeR :: Handler Value getHomeR = do addHeader "Access-Control-Allow-Origin" "*" return $ object ["msg" .= ("Prestapi" :: Text)]
sgillis/prestapi
src/Handler/Home.hs
gpl-3.0
232
0
11
38
54
29
25
7
1
{- Copyright (C) 2013 Ellis Whitehead 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 3 of the License, or (at your option) any later version. This program is distributed in the hope...
ellis/OnTopOfThings
old-20150308/src/DatabaseTables.hs
gpl-3.0
2,186
0
9
411
161
95
66
18
1
module HEP.Automation.MadGraph.Dataset.Set20110330set2 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 import HEP.Automation.MadGraph.Dataset.Common import HEP.Aut...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110330set2.hs
gpl-3.0
1,353
0
8
348
298
184
114
35
1
module Data.Chemistry.XYZ ( XYZ(..) , xyzParser , xyzTrajParser , getNAtoms , getElements , getCoords , coord2Mat , mat2Coord , interpolate , align , findNeighboursOfType_Distance , distance , angle ) where import Data.Chemistry.Parser import Data.Chemistry.Types import Lens.Micro.Platform...
sheepforce/Haskell_Data.Chemistry
src/modules/Data/Chemistry/XYZ.hs
gpl-3.0
7,116
0
17
1,879
1,819
1,011
808
101
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} -- | This module contains a few functions to use unix-y shell...
ducis/reactive-make
pipes-shell-0.1.0/src/Pipes/Shell.hs
gpl-3.0
9,767
0
16
2,571
2,354
1,218
1,136
182
2
-- This Source Code Form is subject to the terms of the Mozilla Public -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module Etcd...
kim/etcdpp
src/Etcd/V2/Types.hs
mpl-2.0
11,082
0
25
2,989
2,399
1,362
1,037
401
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Locations/Agents/Flows/Train.hs
mpl-2.0
6,259
0
16
1,310
789
464
325
120
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Ads/Insert.hs
mpl-2.0
2,975
0
14
717
406
242
164
62
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Instances/Delete.hs
mpl-2.0
3,610
0
16
878
465
278
187
73
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-logging/gen/Network/Google/Resource/Logging/Locations/Buckets/Views/List.hs
mpl-2.0
6,265
0
18
1,416
894
520
374
129
1
{- Habit of Fate, a game to incentivize habit formation. Copyright (C) 2017 Gregory Crosswhite This program is free software: you can redistribute it and/or modify it under version 3 of the terms of the GNU Affero General Public License. This program is distributed in the hope that it will be usef...
gcross/habit-of-fate
sources/library/HabitOfFate/Data/ItemsSequence.hs
agpl-3.0
7,399
0
19
1,592
1,967
1,007
960
154
2
module CoinsInARow.A276166Spec (main, spec) where import Test.Hspec import CoinsInARow.A276166 (a276166) main :: IO () main = hspec spec spec :: Spec spec = describe "A276166" $ it "correctly computes the first 26 elements" $ map a276166 [0..25] `shouldBe` expectedValue where expectedValue = [0,1,2,1,...
peterokagey/haskellOEIS
test/CoinsInARow/A276166Spec.hs
apache-2.0
365
0
8
61
172
104
68
10
1
{-# LANGUAGE FlexibleInstances, RecordWildCards, OverloadedStrings, BangPatterns #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module ProfilingReport ( -- * Parsers for profiling reports profilingReport , profilingReportI -- * Parsers for sub-parts of the report , timestamp , title , commandLine ...
maoe/tkyprof
ProfilingReport.hs
bsd-2-clause
9,103
0
24
2,613
2,461
1,340
1,121
228
13
module Types where import qualified Data.HashMap as HM import qualified Data.Vector as V import Data.Aeson as Aes import Data.Aeson.Types import Data.Scientific (Scientific) import ...
ian-andrich/HaskellPengines
src/Types.hs
bsd-3-clause
2,489
0
9
720
377
230
147
32
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE Typ...
Garygunn94/DFS
ClientProxy/.stack-work/intero/intero2407Nca.hs
bsd-3-clause
7,774
27
15
2,277
1,967
991
976
211
4
{-# LANGUAGE OverloadedStrings #-} module Insomnia.Main ( -- * Nice entry points interpreterMain, compilerMain -- * Lower level entry point , Command(..) , commandMain -- * Plumbing , InsomniaMain , runInsomniaMain , parseAndCheck , InsomniaMainConfig(..) , defaultConfig ) where import qualifie...
lambdageek/insomnia
src/Insomnia/Main.hs
bsd-3-clause
1,439
0
19
331
363
199
164
38
3
{-# LANGUAGE PolyKinds, TypeOperators, MultiParamTypeClasses, FunctionalDependencies, ConstraintKinds #-} module Control.Wakarusa.Join1 where import Control.Applicative import Control.Natural import Control.Category ((>>>)) import Control.Monad.Normal import Control.Wakarusa.Functor1 import Control.Wakarusa.Pointed1 ...
ku-fpg/wakarusa
wakarusa/Control/Wakarusa/Join1.hs
bsd-3-clause
945
0
9
166
267
145
122
-1
-1
----------------------------------------------------------------------------- -- Standard Library: Numeric operations -- -- Suitable for use with Hugs 98 ----------------------------------------------------------------------------- module Hugs.Numeric ( fromRat -- :: (RealFloat a) => Rational -> a , showEFloat -- ...
OS2World/DEV-UTIL-HUGS
libraries/Hugs/Numeric.hs
bsd-3-clause
9,651
26
36
3,864
3,052
1,631
1,421
171
15
----------------------------------------------------------------------------- -- | -- Module : Data.Functor.Cx.Rebound -- Copyright : (C) 2017 Aaron Friel -- License : BSD-style (see the file LICENSE) -- -- Maintainer : Aaron Friel <mayreply@aaronfriel.com> -- Stability : experimental -- Portability ...
AaronFriel/eff-experiments
dep/cxmonad/src/Data/Functor/Cx/Rebound.hs
bsd-3-clause
1,045
0
9
210
283
167
116
23
1
{-# LANGUAGE TemplateHaskell #-} module Physics.FunPart.StatTest ( runTests ) where import Test.QuickCheck import Data.Foldable (foldl') import Data.Maybe (isNothing, fromJust) import Physics.FunPart.Approx import Physics.FunPart.Stat naiveMean :: [Double] -> Double naiveMean l = sum l / fromIntegral (length l) pr...
arekfu/funpart
test/Physics/FunPart/StatTest.hs
bsd-3-clause
2,642
0
16
602
788
413
375
48
2
module Main where import Input import Task3 e :: Double e = 2.7 main :: IO () main = do a <- prompt "Enter left point" b <- prompt "Enter center point" c <- prompt "Enter right point" putStrLn $ show $ parabolicMethod f (a, b, c) where -- f = \x -> (x - 2) * (x - 4) -- Параболоид a*...
vsulabs/OptimizationMethodsHs
app/Main3.hs
bsd-3-clause
405
0
12
130
128
68
60
12
1
module B where b :: Int b = 2
dan-t/cabal-bounds
tests/inputFiles/setup-config-build-env/libs/B/B.hs
bsd-3-clause
32
0
4
11
14
9
5
3
1
module Sexy.Instances.Monoid.Function () where import Sexy.Classes (Monoid(..)) import Sexy.Instances.Nil.Function () import Sexy.Instances.Plus.Function () instance (Monoid b) => Monoid (a -> b) where
DanBurton/sexy
src/Sexy/Instances/Monoid/Function.hs
bsd-3-clause
204
0
7
24
69
44
25
5
0
{- Copyright 2012, 2014, 2015, 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: * Redistributions of source code must retain the above copyright notice, this list of conditions and the f...
iustin/prefix-units
Data/Prefix/Units.hs
bsd-3-clause
19,608
0
16
4,729
3,509
1,894
1,615
345
4
module Main (main) where import Control.Category ((>>>)) import Control.Monad import Control.Monad.IO.Class import Data.Maybe import System.FilePath import System.Directory import System.Console.GetOpt import Futhark.Pipeline import Futhark.Passes import Futhark.Compiler import Futhark.Representation.SOACS (SOACS) im...
mrakgr/futhark
src/futhark-py.hs
bsd-3-clause
3,836
0
15
914
855
464
391
88
2
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.AMD.StencilOperationExtended -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : ...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/AMD/StencilOperationExtended.hs
bsd-3-clause
859
0
4
97
58
46
12
8
0
module Language.MIXAL.AST where newtype MIXChar = MIXChar Char deriving (Eq, Show) data MIXALStmt = Orig (Maybe DefinedSymbol) WValue | Equ (Maybe DefinedSymbol) WValue | Con (Maybe DefinedSymbol) WValue | Alf (Maybe DefinedSymbol) (MIXChar, MIXChar, MIXChar, MIXChar, MIXChar) | Inst (Maybe De...
jtdaugherty/language-mixal
src/Language/MIXAL/AST.hs
bsd-3-clause
2,639
0
9
937
911
558
353
70
0
{-# LANGUAGE MagicHash #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ExistentialQuantification #-} {-| Module : System.IO.TTY Description : TCP or IPC servers and clients Copyright : (c) Winterland, 2018 License : BSD Maintainer : drkos...
winterland1989/stdio
System/IO/TTY.hs
bsd-3-clause
1,190
0
11
259
177
101
76
28
1
{-# LANGUAGE TemplateHaskell #-} module Main where import Development.GitRev gitInfo :: IO () gitInfo = putStrLn (concat [ "[", $(gitBranch), "@", $(gitHash) , dirty , " (", $(gitCommitDate), ")", "] "]) where dirty | $(gitDirty) = " __unclean__" | ...
maximilianhuber/innovation
src/Main.hs
bsd-3-clause
367
0
11
123
114
63
51
11
1
module BP.Env where import BP.Ast import BP.Type import State import System.IO.Unsafe(unsafePerformIO) import qualified Data.Map as M type Env = M.Map EName Type assumptions :: Infer Env assumptions = do tvarA <- makeVariable tvarB <- makeVariable let pairT = TypeOperator "*" [tvarA, tvarB] return $ M.fromLi...
zjhmale/HMF
src/BP/Env.hs
bsd-3-clause
861
0
13
256
296
157
139
21
1
{-# language CPP #-} -- No documentation found for Chapter "Promoted_From_VK_KHR_shader_terminate_invocation" module Vulkan.Core13.Promoted_From_VK_KHR_shader_terminate_invocation ( PhysicalDeviceShaderTerminateInvocationFeatures(..) , StructureTyp...
expipiplus1/vulkan
src/Vulkan/Core13/Promoted_From_VK_KHR_shader_terminate_invocation.hs
bsd-3-clause
4,580
0
14
633
791
463
328
-1
-1
module Main where import ReadPNG main :: IO () main = exec
vmchale/EMD
app/Test.hs
bsd-3-clause
61
0
6
14
22
13
9
4
1
module Data.Geo.GPX.Lens.YearL where import Data.Lens.Common class YearL a where yearL :: Lens a (Maybe String)
tonymorris/geo-gpx
src/Data/Geo/GPX/Lens/YearL.hs
bsd-3-clause
117
0
9
20
40
23
17
4
0
{-# LANGUAGE DataKinds, DeriveDataTypeable, FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses, QuasiQuotes, TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module AppDelegate (objc_initialise) where import Messaging import Control.Applicative import Data.Typeable ...
konn/reactive-objc
AppDelegate.hs
bsd-3-clause
11,235
0
19
2,877
2,521
1,372
1,149
192
2
module Int where fac :: Int -> Int fac 0 = 0 fac n = n * fac (n - 1)
danr/hipspec
tfp1/tests/should_fail/Int.hs
gpl-3.0
75
0
8
27
43
23
20
4
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-rds/gen/Network/AWS/RDS/DeleteDBSecurityGroup.hs
mpl-2.0
3,707
0
9
691
378
237
141
52
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE RecordWildCards #-} module Pontarius.E2E where import qualified Crypto.Cipher.AES as AES import qualified Crypto.Hash.SHA256 as SHA256 (hash) import qualified Crypto.MAC.HMAC as HMAC import qualified Data.ByteString as BS import ...
Philonous/pontarius-xmpp-e2e
source/Pontarius/E2E.hs
apache-2.0
1,972
0
9
583
277
167
110
30
1
module Koan.Maybe where import Prelude hiding (Maybe (..)) enrolled :: Bool enrolled = False data Maybe a = Nothing | Just a deriving (Eq, Show) orElse :: Maybe a -> a -> a orElse Nothing x = x orElse (Just a) _ = a orMaybe :: Maybe a -> Maybe a -> Maybe a orMaybe (Just x) _ = Just x orMaybe _ m...
Kheldar/hw-koans
solution/Koan/Maybe.hs
bsd-3-clause
2,172
0
9
500
917
467
450
63
2
-- | Resguaring rules that restore a source comprehension form from -- the desugared 'concatMap' form. module Database.DSH.CL.Opt.Resugar ( resugarR ) where import Database.DSH.Common.Lang import Database.DSH.CL.Lang import Database.DSH.CL.Kure import Database.DSH.CL.Opt...
ulricha/dsh
src/Database/DSH/CL/Opt/Resugar.hs
bsd-3-clause
2,289
0
15
603
554
285
269
38
4
-- {-# LANGUAGE #-} {-# OPTIONS_GHC -Wall #-} -- {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP -- {-# OPTIONS_GHC -fno-warn-unused-binds #-} -- TEMP ---------------------------------------------------------------------- -- | -- Module : Circat.Show -- Copyright : (c) 2013 Tabula, Inc. -- License ...
capn-freako/circat
src/Circat/Show.hs
bsd-3-clause
2,215
0
12
526
590
320
270
34
3
-- | -- Module: Math.NumberTheory.Primes.Sieve -- Copyright: (c) 2011 Daniel Fischer -- Licence: MIT -- Maintainer: Daniel Fischer <daniel.is.fischer@googlemail.com> -- Stability: Provisional -- Portability: Non-portable (GHC extensions) -- -- Prime generation using a sieve. -- Currently, an enhanced siev...
shlevy/arithmoi
Math/NumberTheory/Primes/Sieve.hs
mit
2,552
0
4
476
88
76
12
10
0
{-| Implementation of the Ganeti Query2 basic types. These are types internal to the library, and for example clients that use the library should not need to import it. -} {- Copyright (C) 2012, 2013 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gen...
kawamuray/ganeti
src/Ganeti/Query/Types.hs
gpl-2.0
2,987
0
10
680
342
208
134
29
1
{-# LANGUAGE NoImplicitPrelude #-} module Debug.Trace where import Prelude import FFI trace :: String -> Ptr a -> Ptr a trace = ffi "console.log(%1),%2" traceShow :: Automatic a -> Ptr b -> Ptr b traceShow = ffi "console.log(%1),%2"
fpco/fay-base
src/Debug/Trace.hs
bsd-3-clause
237
0
7
42
70
36
34
8
1
------------------------------------------------------------------------ -- | -- Module : Main -- Copyright : (c) Amy de Buitléir 2013-2018 -- License : BSD-style -- Maintainer : amy@nualeargais.ie -- Stability : experimental -- Portability : portable -- -- The daemon that runs the Créatúr experimen...
mhwombat/prediction-wains
app/Main.hs
bsd-3-clause
2,200
0
14
354
495
278
217
41
1
module Ircbrowse.Data (module Data.List ,module Data.Time ,module Data.Maybe ,module Data.String.Extra ,module Data.Char ,module Data.Default ,module Data.Pagination ,module Data.String ,module Data.Ord ,fi ) where import Data.List hiding (head,span) import Data.Time import Data.Maybe import Da...
plow-technologies/ircbrowse
src/Ircbrowse/Data.hs
bsd-3-clause
498
0
6
83
155
97
58
22
1
module RecordUseBeforeDefine where import Hierarchical.RecordDefined f :: R -> Double f (R i) = i main = do print $ f (R 1) print $ g (Callback 1) data R = R Double
beni55/fay
tests/recordUseBeforeDefine.hs
bsd-3-clause
183
0
10
51
78
40
38
8
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} module Bead.Shared.Command where import Data.Data import Fay.Text #ifdef FAY import Prelude import FFI #endif -- * Commands data Ping = Ping { pingmessage :: Text } deriving (Data, Read, Show, Typeable) -- * Results ...
andorp/bead
snaplets/fay/src/Bead/Shared/Command.hs
bsd-3-clause
753
0
8
187
184
104
80
24
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE ViewPatterns #-} {-# OPTIONS -fno-cse #-} -- -fno-cse is needed for GLOBAL_VAR's to behave properly ------------------------------------------------...
chrisdone/intero
src/InteractiveUI.hs
bsd-3-clause
154,788
788
114
45,520
34,753
17,883
16,870
-1
-1
module Data.Graph.Inductive.Query.ArtPoint (ap) where { import Data.Graph.Inductive.Graph; data DFSTree a = B (a, a, [(a, a)]) [DFSTree a] deriving Eq; data LOWTree a = Brc (a, a, a) [LOWTree a] deriving Eq; getBackEdges :: Node -> [[(Node, Int)]] -> [(Node, Int)]; ...
ckaestne/CIDE
other/CaseStudies/fgl/CIDEfgl/Data/Graph/Inductive/Query/ArtPoint.hs
gpl-3.0
2,517
0
14
896
1,372
762
610
59
2
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} -- | Constants used throughout the project. module Stack.Constants (buildPlanDir ,distDirFromDir ,workDirFromDir ,distRelativeDir ,haskellModuleExts ,imageStagingDir ,projectDockerSandboxDir ,stackDotYaml ,stackRoo...
AndrewRademacher/stack
src/Stack/Constants.hs
bsd-3-clause
10,889
0
13
2,512
2,011
1,104
907
240
2
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="de-DE"> <title>Server-Sent Events Add-on</title> <maps> <homeID>sse.introduction</homeID> ...
thc202/zap-extensions
addOns/sse/src/main/javahelp/org/zaproxy/zap/extension/sse/resources/help_de_DE/helpset_de_DE.hs
apache-2.0
982
77
68
157
419
212
207
-1
-1
module CaseIn2 where --A new definition can be introduced to denote an identified sub-expression. --The newly introduced definition may be a function binding --or a simple constant binding. The new binding will be put at the end of the --local 'where' or 'let' clause depending on the scope of high lighted source. --...
kmate/HaRe
old/testing/introNewDef/CaseIn2_TokOut.hs
bsd-3-clause
748
0
13
223
142
77
65
8
2
{-# LANGUAGE DuplicateRecordFields #-} {-# OPTIONS_GHC -fwarn-unused-binds -Werror #-} module Main (main, T(MkT)) where data S = MkS { foo :: Int } data T = MkT { foo :: Int } -- This should count as a use of S(foo) but not T(foo) main = print ((\ MkS{foo=foo} -> foo) (MkS 3))
ezyang/ghc
testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail05.hs
bsd-3-clause
281
0
12
56
86
52
34
9
1
{-# LANGUAGE BangPatterns #-} main = print (f 20 30) {-# NOINLINE f #-} f x = let !x' = fib x in \y -> x' + fib y fib :: Int -> Int fib n = if n < 2 then 1 else fib (n-1) + fib (n-2)
siddhanathan/ghc
testsuite/tests/profiling/should_run/scc003.hs
bsd-3-clause
185
0
9
51
108
54
54
6
2
{-# LANGUAGE CPP #-} {-# LANGUAGE QuasiQuotes #-} module Main where import Control.Monad (unless, when) import Data.Aeson (encode) import qualified Data.ByteString.Lazy as BSL import Data.List (find) import Data.Maybe (isJus...
rubik/stack-hpc-coveralls
app/Main.hs
isc
3,882
0
22
1,277
932
496
436
84
4
module Files ( getDataFileName ) where import ClassyPrelude hiding (getLine, putStrLn, on) import Filesystem (isFile) import qualified Paths_Jane -- | Returns path to a data file. First it looks in the current folder, and -- then calls @getDataFileName@ from autogenerated @Paths_Jane@ module i...
aelve/Jane
Files.hs
mit
532
0
11
111
98
55
43
11
2
module Golf where import Data.List (nub) -- Exercise 1: Hopscotch skips :: [a] -> [[a]] skips xs = -- For each index `n` in our list, map (\n -> -- we reduce `xs` by selecting every `n`th element and -- prepending it onto an accumulator. foldr (\(i,x) acc -> if i`mod`n==0 then x:acc else acc) ...
slogsdon/haskell-exercises
cis194/Golf.hs
mit
1,543
0
13
428
358
203
155
21
2
module MiniKanren ( LogicVar, Term(..), ProgramState(..), Substitution, LogicOp, QueryProgram, runAll, run, runStep, fresh, freshs, (===), (=/=), conj, conde, condeDepthFirst, (/\), (\/) ) where import Control.Monad (foldM) import System.IO (hFlush, stdout) -- | Logic variables are repesented as strin...
orion-42/minikanren-haskell
MiniKanren.hs
mit
6,515
0
18
1,737
1,994
1,026
968
104
6
module Algs.Algs where factorial :: (Integral a) => a -> a factorial 0 = 1 factorial x = x * factorial (x - 1) factorialproduct :: (Integral a) => a -> a factorialproduct x = product [1..x] multThree :: (Num a) => a -> a -> a -> a multThree x y z = x * y * z nth :: (Num a, Ord a) => a -> [b] -> b nth x xs = if x - ...
korczis/skull-haskell
src/Lib/Algs/Algs.hs
mit
651
6
12
168
377
198
179
20
2
module Oden.CLI.Lint where import Oden.QualifiedName import Oden.SourceFile import Oden.CLI import Oden.CLI.Build lint :: FilePath -> CLI () lint path = do _ <- compileFile (OdenSourceFile path (NativePackageName ["main"])) return ()
oden-lang/oden
cli/Oden/CLI/Lint.hs
mit
281
0
13
77
85
45
40
9
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} module Cases ( encodeTests , decodeTests ) where import GenCase import Vlq encodeTests :: [Case 'Enc] encodeTests = [ Case { uuid = "35c9db2e-f781-4c52-b73b-8e76427defd0" , description = "zero" , ...
Javran/misc
vlq/src/Cases.hs
mit
5,313
0
10
1,357
1,243
809
434
120
1