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 S2E5 where increasing :: (Ord a, Num a) => [a] -> Bool increasing [] = True increasing [_] = True increasing (x:y:xs) | x <= y = increasing (y:xs) | otherwise = False weakIncr :: (Ord a, Fractional a) => [a] -> Bool weakIncr = weakIncr' . reverse weakIncr' :: (Ord a, Fractional a) => [a] ...
wouwouwou/module_8
src/main/haskell/series2/exercise5.hs
apache-2.0
442
0
9
105
226
118
108
12
1
insertAt :: a -> [a] -> Int -> [a] insertAt x ys 1 = x:ys insertAt x (y:ys) n = y : (insertAt x ys (n - 1))
alephnil/h99
21.hs
apache-2.0
108
0
9
28
80
42
38
3
1
-- Copyright 2016 TensorFlow authors. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agree...
tensorflow/haskell
tensorflow/src/TensorFlow/Internal/VarInt.hs
apache-2.0
1,490
0
15
334
250
140
110
21
2
{-# LANGUAGE OverloadedStrings #-} module Main ( main ) where import Marconi.V1.Http.Queue main :: IO () main = do x <- getQueue "http://166.78.254.33:8888/v1/" "queue" "project" putStr $ show x
FlaPer87/haskell-marconiclient
src/Main.hs
apache-2.0
209
0
8
43
56
30
26
9
1
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="fa-IR"> <title>TLS Debug | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref lo...
secdec/zap-extensions
addOns/tlsdebug/src/main/javahelp/org/zaproxy/zap/extension/tlsdebug/resources/help_fa_IR/helpset_fa_IR.hs
apache-2.0
970
78
66
159
413
209
204
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-} -- | -- Module : Statistics.Distribution.CauchyLorentz -- Copyright : (c) 2011 Aleksey Khudyakov -- License : BSD3 -- -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : portable -- -- The Cauchy-Lo...
bos/statistics
Statistics/Distribution/CauchyLorentz.hs
bsd-2-clause
4,036
0
12
987
1,009
531
478
79
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QTextList.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:14 Warning : this file is machine generated - do not...
keera-studios/hsQt
Qtc/Gui/QTextList.hs
bsd-2-clause
12,687
0
14
2,146
4,140
2,095
2,045
-1
-1
{-# LANGUAGE TypeSynonymInstances #-} module Interleaved where import qualified Data.Set as Set import Data.Set ((\\)) import Data.List (nub) import qualified Data.Map as Map import Data.Map ((!)) type Edge = (Int, Int) type Clique = Set.Set Int clique :: [Int] -> Clique clique = Set.fromList dim :: Clique -> Int d...
michiexile/hplex
Math/Plex/Interleaved.hs
bsd-3-clause
6,378
0
18
1,803
2,872
1,554
1,318
147
3
----------------------------------------------------------------------------- -- Infer: Basic definitions for type inference -- -- Part of `Typing Haskell in Haskell', version of November 23, 2000 -- Copyright (c) Mark P Jones and the Oregon Graduate Institute -- of Science and Technology, 1999-2000 -- -- This...
elben/typing-haskell-in-haskell
Infer.hs
bsd-3-clause
846
0
10
140
62
44
18
5
0
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} -- | Create new a new project directory populated with a basic working -- project. module Stack.New ( new ...
martin-kolinek/stack
src/Stack/New.hs
bsd-3-clause
17,998
0
23
5,539
4,101
2,074
2,027
410
5
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RecordWildCards, FlexibleInstances, DefaultSignatures #-} ------------------------------------------------------------------------------ -- | -- Module: Database.PostgreSQL.Simple.FromRow -- Copyright: (c) 2012 Leon P Smith -- License: BSD3 -- Maintainer: Leo...
tolysz/postgresql-simple
src/Database/PostgreSQL/Simple/FromRow.hs
bsd-3-clause
10,594
0
22
2,630
3,476
1,891
1,585
-1
-1
----------------------------------------------------------------------------- -- | -- Module : System.Taffybar.Pager -- Copyright : (c) José A. Romero L. -- License : BSD3-style (see LICENSE) -- -- Maintainer : José A. Romero L. <escherdragon@gmail.com> -- Stability : unstable -- Portability : unportable ...
Undeterminant/taffybar
src/System/Taffybar/Pager.hs
bsd-3-clause
5,670
0
11
1,177
1,003
561
442
91
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} module Mistral.TypeCheck.Monad ( -- * Type Checking Monad TC() , runTC -- ** Unification Interface , applySubst, getSubst , unify -- ** Variables , freshTVar , freshTVarTemplate , freshName , withSkolems ...
GaloisInc/mistral
src/Mistral/TypeCheck/Monad.hs
bsd-3-clause
13,520
0
16
3,696
3,985
2,081
1,904
294
3
{-# LANGUAGE PackageImports #-} module GHC.IO.Handle.Text (module M) where import "base" GHC.IO.Handle.Text as M
silkapp/base-noprelude
src/GHC/IO/Handle/Text.hs
bsd-3-clause
118
0
4
18
25
19
6
3
0
-- | 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 in the Yesod typeclass. That instance is -- declared in the Foundation.hs file....
SimSaladin/rnfssp
Settings.hs
bsd-3-clause
3,067
0
16
582
376
231
145
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-| Redis DB snaplet. -} module Snap.Snaplet.RedisDB (RedisDB , runRedisDB , redisDBInit) where import Prelude hiding ((.)) import Control.Category ((.)) import Control.Monad.State import Data.Lens.Common import Data.Lens.Template i...
lostbean/snaplet-neo4j
src/Snap/Snaplet/RedisDB.hs
bsd-3-clause
1,755
0
12
366
265
151
114
27
1
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 709 {-# LANGUAGE AutoDeriveTypeable #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Trans.Writer.Lazy -- Copyright : (c) Andy Gill 2001, -- (c) Oregon Graduate Institute of Sci...
DavidAlphaFox/ghc
libraries/transformers/Control/Monad/Trans/Writer/Lazy.hs
bsd-3-clause
8,182
0
14
1,770
2,329
1,263
1,066
113
1
{-# LANGUAGE DeriveFunctor #-} module Language.CFG(parse, CFG(CFG), Parse(Lit, Prod)) where import Data.Function import Data.Map as M (Map, findWithDefault, fromList, alter, lookup, empty, insert) import Data.Maybe import Debug.Trace import Data.Foldable import Prelude hiding (foldl,foldr, concatMap) -- | A conte...
andreyLevushkin/CFG
Language/CFG.hs
bsd-3-clause
2,846
0
13
847
1,307
717
590
51
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RecordWildCards #-} module Heisenberg ( -- * Setup newExperiment , runExperiment -- * Reporters , nullReporter , sequenceReporters , parallelReporters -- * Types , ExperimentName(..) ...
MichaelXavier/heisenberg
src/Heisenberg.hs
bsd-3-clause
4,385
0
17
1,049
964
494
470
101
3
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} module Types where import Graphics.GL.Pal import Graphics.GL.Freetype import Control.Lens import Data.Map.Strict (Map) roomHeight :: GLfloat roomHeight = 10 roomWidth :: GLfloat r...
vrtree/pedestal
app/Types.hs
bsd-3-clause
3,319
0
13
860
647
359
288
92
1
{-# LANGUAGE DeriveDataTypeable #-} module Main where import Browse import CabalDev (modifyOptions) import Check import Control.Applicative import Control.Exception import Data.Typeable import Data.Version import Info import Lang import Flag import Lint import List import Paths_ghc_mod import Prelude import System.Co...
himura/ghc-mod
GHCMod.hs
bsd-3-clause
4,779
0
28
1,235
1,307
681
626
119
14
module DB where import Database.PostgreSQL.Simple cardDBInfo :: ConnectInfo cardDBInfo = defaultConnectInfo { connectUser = "flashbuild" , connectPassword = "justtouchitalready" , connectDatabase = "flashbuild" }
ppseafield/backend-flashcard
src/DB.hs
bsd-3-clause
280
0
6
91
40
26
14
7
1
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} {- | Module : Data.Random.Show.Unsafe Copyright : 2010 Aristid Breitkreuz License : BSD3 Stability : experimental Portability : portable Unsafely 'show' a 'RVar' by taking a random sample. Uses 'unsafePerformIO'. Contains an instance of 'Show...
aristidb/random-extras
Data/Random/Show/Unsafe.hs
bsd-3-clause
565
0
7
98
76
45
31
8
0
{-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} module Main where import Data.Default.Class import UULayout import Data.Char import Data.List import System.Environment import Text.Read import Data.Maybe import Data.List.Split import Test.Hspec import Langu...
aavogt/qqParse
QQParse.hs
bsd-3-clause
32,455
0
24
10,979
10,917
5,613
5,304
692
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TypeApplications #-} module Test.Spec.Wallets ( spec , genNewWalletRq ) where import Universum import Test.Hspec (Spec, describe, shouldBe, shouldSatisfy) import Test.Hspec.QuickCheck (prop) im...
input-output-hk/pos-haskell-prototype
wallet/test/unit/Test/Spec/Wallets.hs
mit
28,124
0
36
12,820
5,767
2,748
3,019
-1
-1
-- ALGOSPOT - 콘서트 -- http://algospot.com/judge/problem/read/CONCERT module Main where import Control.Monad concert :: Int -> Int -> Int -> [Int] -> Int concert n vs vm vl = mf n vs vm vl (n,vm) mf :: Int -> Int -> Int -> [Int] -> (Int,Int) -> Int mf = undefined --mf n vs vm vl (x,y) = (map f [(a,b)|a<-[0..n], b<-[0....
everyevery/programming_study
algospot/concert/concert.hs
mit
765
0
14
220
300
154
146
20
1
class X where foo :: Int <ESC>a-- ----------- -- The Y class class Y where bar :: Int
itchyny/vim-haskell-indent
test/comment/splitter.in.hs
mit
87
2
5
19
33
18
15
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.DataPipeline.Types.Sum --...
fmapfmapfmap/amazonka
amazonka-datapipeline/gen/Network/AWS/DataPipeline/Types/Sum.hs
mpl-2.0
2,364
0
12
571
437
229
208
59
0
{-# LANGUAGE CPP#-} module Paths (getStaticDir, samplesURL) where import Control.Monad import System.FilePath #if CABAL -- using cabal import qualified Paths_threepenny_gui (getDataDir) getStaticDir :: IO FilePath getStaticDir = (</> "wwwroot") `liftM` Paths_threepenny_gui.getDataDir #else -- using GHCi getStaticD...
yuvallanger/threepenny-gui
samples/Paths.hs
bsd-3-clause
534
0
6
66
72
47
25
8
1
-- | -- Module : Basement.Compat.Typeable -- License : BSD-style -- Maintainer : Nicolas Di Prima <nicolas@primetype.co.uk> -- Stability : statble -- Portability : portable -- -- conveniently provide support for legacy and modern base -- {-# LANGUAGE CPP #-} module Basement.Compat.Typeable ( #if MIN_V...
vincenthz/hs-foundation
basement/Basement/Compat/Typeable.hs
bsd-3-clause
820
0
10
166
126
77
49
13
1
{-# LANGUAGE CPP #-} module Main where import qualified Codec.Archive.Tar as Tar import qualified Codec.Archive.Tar.Entry as Tar import qualified Codec.Compression.GZip as GZip (compress, decompress) import qualified Codec.Compression.BZip as BZip (compress, decompress) import Control.Exception (throwIO) i...
hvr/tar
htar/htar.hs
bsd-3-clause
7,382
0
15
2,187
2,125
1,157
968
178
16
{-# LANGUAGE OverloadedStrings #-} -- Module : Test.AWS.Types -- Copyright : (c) 2013-2015 Brendan Hay <brendan.g.hay@gmail.com> -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- A copy of the MPL can be found in the LICENSE f...
kim/amazonka
core/test/Test/AWS/Types.hs
mpl-2.0
1,051
0
8
228
212
118
94
14
1
module Verify.Graphics.Vty.Prelude ( module Verify.Graphics.Vty.Prelude , MockWindow(..) ) where import Graphics.Vty.Debug import Verify data EmptyWindow = EmptyWindow MockWindow instance Arbitrary EmptyWindow where arbitrary = return $ EmptyWindow (MockWindow (0 :: Int) (0 :: Int)) instance Show EmptyWi...
jtdaugherty/vty
test/Verify/Graphics/Vty/Prelude.hs
bsd-3-clause
519
0
10
112
162
90
72
15
0
{-# Language BangPatterns #-} {- | Here are the serialization and deserialization functions. This module cooperates with the generated code to implement the Wire instances. The encoding is mostly documented at <http://code.google.com/apis/protocolbuffers/docs/encoding.html>. The user API functions are grouped into ...
timjb/protocol-buffers
Text/ProtocolBuffers/WireMessage.hs
apache-2.0
39,093
0
22
9,714
7,956
4,114
3,842
582
7
{-# LANGUAGE RankNTypes, TypeFamilies, PolyKinds, FunctionalDependencies #-} module T16946 where import Data.Kind class CatMonad (c :: k -> k -> Type) (m :: forall (x :: k) (y :: k). c x y -> Type -> Type) | c -> m where type Id c :: c x x xpure :: a -> m (Id c) a boom :: forall k (c :: k -> k -> Type) (m :: fo...
sdiehl/ghc
testsuite/tests/typecheck/should_fail/T16946.hs
bsd-3-clause
415
0
10
106
203
116
87
-1
-1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Bag: an unordered collection with duplicates -} {-# LANGUAGE DeriveDataTypeable, ScopedTypeVariables #-} module Bag ( Bag, -- abstract type emptyBag, unitBag, unionBags, unionManyBags, mapBag, ...
forked-upstream-packages-for-ghcjs/ghc
compiler/utils/Bag.hs
bsd-3-clause
9,822
0
11
3,067
3,876
1,972
1,904
204
2
module Tests.Writers.Native (tests) where import Test.Framework import Text.Pandoc.Builder import Text.Pandoc import Tests.Helpers import Tests.Arbitrary() p_write_rt :: Pandoc -> Bool p_write_rt d = read (writeNative defaultWriterOptions{ writerStandalone = True } d) == d p_write_blocks_rt :: [Block] -> Bool p_wr...
beni55/pandoc
src/Tests/Writers/Native.hs
gpl-2.0
562
0
14
96
180
98
82
16
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Network.HTTP.ReverseProxy.Rewrite ( ReverseProxyConfig (..) , RewriteRule (..) , RPEntry (..) , simpleReverseProxy ) where import Control.Applicative import Control.Exception (bracket) import Data.Function (fix) import Data.Monoid (...
telser/keter
Network/HTTP/ReverseProxy/Rewrite.hs
mit
7,061
0
23
1,740
1,938
1,057
881
173
4
module Simple2 where f3 :: Num t => t -> t -> (t, t) f3 x y = (x + y, y - x) -- f1 :: Int -> Int -> Int f1 x y = x + y f2 x y = y - x
kmate/HaRe
old/testing/merging/Simple2_TokOut.hs
bsd-3-clause
143
0
8
55
83
45
38
5
1
-- -- The Computer Language Shootout -- http://shootout.alioth.debian.org/ -- -- compile with : ghc fastest.hs -o fastest -- -- contributed by Greg Buchholz -- Modified by Mirko Rahn, Don Stewart, Chris Kuklewicz and Lemmih -- import Data.Char main = print . new 0 =<< getContents new i [] = i new i ('-':xs) = n...
hvr/jhc
regress/tests/8_shootout/SumFile.hs
mit
585
0
11
160
251
131
120
10
3
{-# Language PartialTypeSignatures, RankNTypes #-} module Foo where f xs = let ys = reverse xs in ys `seq` let w = length xs in w + length (reverse (case ys of { a:as -> as; [] -> [] }))
sdiehl/ghc
testsuite/tests/simplCore/should_compile/T15631.hs
bsd-3-clause
219
0
18
72
90
47
43
6
2
module Typed.Manual (benchmarks) where import Control.Applicative import Criterion import Data.Aeson hiding (Result) import Data.ByteString.Builder as B import Data.ByteString.Lazy as L import Twitter.Manual import Typed.Common encodeDirect :: Result -> L.ByteString encodeDirect = encode encodeViaValue :: Result -> ...
23Skidoo/aeson
benchmarks/Typed/Manual.hs
bsd-3-clause
813
0
12
161
222
121
101
22
1
import StackTest import System.Directory main :: IO () main = do isAlpine <- getIsAlpine if isAlpine || isARM then logInfo "Disabled on Alpine Linux and ARM since it cannot yet install its own GHC." else do run "cabal" ["sandbox", "init"] stack ["unpack", "acme-dont-1.1"] run "cabal" ["in...
AndreasPK/stack
test/integration/tests/cabal-solver/Main.hs
bsd-3-clause
466
0
11
104
119
59
60
14
2
foreign import ccall "foo" c_foo :: IO Int main = c_foo >>= print
ezyang/ghc
testsuite/tests/ghci/linking/dyn/big-obj.hs
bsd-3-clause
67
0
6
14
25
13
12
2
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP , NoImplicitPrelude , ExistentialQuantification #-} {-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Handle.Types -- Co...
urbanslug/ghc
libraries/base/GHC/IO/Handle/Types.hs
bsd-3-clause
16,247
0
13
3,664
1,344
807
537
132
1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Documentation.Haddock.Doc (docParagraph, docAppend, docConcat, metaDocConcat, metaDocAppend, emptyMetaDoc, metaAppend, metaConcat) where import Control.Applicative ((<|>), ...
DavidAlphaFox/ghc
utils/haddock/haddock-library/src/Documentation/Haddock/Doc.hs
bsd-3-clause
3,607
0
11
708
1,120
586
534
59
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE BangPatterns, NoImplicitPrelude #-} -- Copyright (c) 2008, Ralf Hinze -- 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 ...
beni55/haste-compiler
libraries/ghc-7.8/base/GHC/Event/PSQ.hs
bsd-3-clause
18,091
0
14
5,065
6,453
3,235
3,218
305
6
{-# LANGUAGE Arrows #-} import Control.Arrow import Control.Applicative import Debug.Trace -- i tried to build an identity arrow which traces an argument arrow -- it doen't work, i guess the left side of (*>) isn't evaluated to the -- needed depth to run the traceIO (guess²: only to the needed Applicative) traceArr ...
MaxDaten/netwire-examples
TracingArrow.hs
mit
1,056
1
11
223
351
174
177
25
1
{-| Module : Faker.Lorem Description : Module for generating fake words, sentences and paragraphs Copyright : (c) Alexey Gaziev, 2014-2018 License : MIT Maintainer : alex.gaziev@gmail.com Stability : experimental Portability : POSIX Fake data -} module Faker.Lorem ( -- * Functions for g...
gazay/faker
src/Faker/Lorem.hs
mit
2,492
0
14
504
445
235
210
44
2
module Y2016.M08.D05.Solution where import Control.Arrow ((&&&)) import Control.Monad import Data.Map (Map) import qualified Data.Map as Map import Y2016.M08.D04.Solution type Idx = Int type Pos = Int type Total = Int type Row = (Total, Schema) type CrossingPoint = ((Idx, Pos), (Idx, Pos)) {-- CrossingPoint says, e...
geophf/1HaskellADay
exercises/HAD/Y2016/M08/D05/Solution.hs
mit
2,634
0
14
837
915
556
359
38
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module Hpack.UtilSpec (main, spec) where import Data.Aeson import Data.Aeson.QQ import Data.Aeson.Types import Helper import System.Directory import Hpack.Config import Hpack.Util mai...
mitchellwrosen/hpack
test/Hpack/UtilSpec.hs
mit
6,003
0
21
1,616
1,731
860
871
128
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.HTMLButtonElement (js_checkValidity, checkValidity, js_setCustomValidity, setCustomValidity, js_setAutofocus, setAutofocus, js_getAutofocus, getAutofocus, js_setDisabled, setDisabled, js_get...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/HTMLButtonElement.hs
mit
14,148
184
11
2,275
2,835
1,511
1,324
217
1
{-# LANGUAGE OverloadedStrings #-} module Player.Style where import Player.Building.Style import Player.Resources.Style import Common.CssClass import Common.CommonClasses import Clay import Clay.Flexbox as F import Data.Monoid playerClass :: CssClass playerClass = CssClass "player" selectedPlayerClass :: CssClass s...
martin-kolinek/some-board-game
src/Player/Style.hs
mit
3,207
0
12
647
1,143
517
626
102
1
{-# LANGUAGE OverloadedStrings #-} module System.Directory.Watchman.FileType ( FileType(..) , fileTypeChar , fileTypeFromChar ) where import Data.ByteString (ByteString) data FileType = TBlockSpecialFile | TCharacterSpecialFile | TDirectory | TRegularFile | TNamedPipe | TSymbo...
bitc/hs-watchman
src/System/Directory/Watchman/FileType.hs
mit
1,075
0
6
180
234
129
105
36
1
{-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE BangPatterns #-} {-| Module : Statistics.FastBayes.Linear Description : Bayesian linear regression via maximum marginal likelihood. Copyright : (c) Melinae, 2014 Chad Scherrer, 2014 License : MIT Maintainer : chad.scherrer@gmail.com Stability ...
cscherrer/fastbayes
src/Statistics/FastBayes/Linear.hs
mit
6,584
0
20
2,008
1,624
875
749
123
1
{-# LANGUAGE Arrows #-} {-# LANGUAGE TupleSections #-} module Yage.Wire.Input where import Yage.Lens import Yage.Math import Yage.Prelude import Yage.UI import Control.Wire import Yage.Wire.Event import Yage.Wire.Types import FRP....
MaxDaten/yage
src/Yage/Wire/Input.hs
mit
2,631
1
14
583
843
436
407
43
2
module Main where import Graphics.Gloss import Graphics.Gloss.Data.Point import Graphics.Gloss.Interface.Pure.Game import System.Random -- Main main :: IO () main = do sg <- getStdGen let world = World (Player (0,0) 0 50 D D) (redApple (15,15)) [] sg play (InWindow "Mine Runner" (width,height) (10,10)) whit...
andreasfrom/minerunner
main.hs
mit
5,095
0
15
1,582
2,351
1,295
1,056
119
5
import Data.Digits import Data.List import Data.Maybe -- When we search numbers of i digits, if the maximum sum that you can -- generate (i*9^5) doesn't even have i digits [>10^(i-1)], that is out of bounds upperBound = (fromMaybe 7 $ find (\i -> 9^5 * i < 10^(i-1)) [1..]) -1 isTarget n = ((sum $ map (^5) $ digits 10...
gumgl/project-euler
30/30.hs
mit
445
0
14
84
154
83
71
9
1
{-# LANGUAGE OverloadedStrings #-} module Web.Slack.PagerSpec (spec) where -- base import Control.Exception (throwIO) import Data.Maybe (fromJust) -- fakepull import Test.Pull.Fake.IO (FakeStream, pull, newFakeStream) -- hspec import Test.Hspec -- slack-web import Web.Slack.Pager import Web.Slack.Common ( mkSlac...
jpvillaisaza/slack-web
tests/Web/Slack/PagerSpec.hs
mit
4,251
0
30
1,174
1,043
559
484
83
2
module Batch.Transformer ( from , to ) where import Batch.Definitions import qualified Common as C import Control.Exception (assert) import Debug.Trace (trace) data Subroutine = Subroutine { unLabel :: String, unBody :: [Command] } from :: Command -> ...
danstiner/transpiler
src/Batch/Transformer.hs
mit
3,626
0
13
623
1,379
708
671
73
5
{-| Module : Test.Make.Config.Class Description : Tests the Make Class file Copyright : (c) Andrew Burnett 2014-2015 Maintainer : andyburnett88@gmail.com Stability : experimental Portability : Unknown Contains the test hierarchy for the Class modules -} module Test.Make.Config.Class ( tests -- TestTree ...
aburnett88/HSat
tests-src/Test/Make/Config/Class.hs
mit
936
0
10
197
177
102
75
24
1
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-} module Fun.Quiz.Type2 where import Fun.Type import Autolib.Reader import Autolib.ToDoc import Data.Typeable data Param = Param { expression_size :: Int , table_size :: Int , properties :: [ Property ] } deriving ( Typeable ) example :: Para...
Erdwolf/autotool-bonn
src/Fun/Quiz/Type2.hs
gpl-2.0
510
6
9
108
135
82
53
16
1
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Yesod.Auth.Autotool.Widget (authAutotoolWidget, createAccountWidget, errorWidget, invalidEmailWidget, mailSentWidget, resetPasswordWidget) where i...
marcellussiegburg/autotool
yesod/Yesod/Auth/Autotool/Widget.hs
gpl-2.0
5,457
0
14
1,209
728
386
342
82
2
-- group same element of a list p9 :: Eq a => [a] -> [[a]] p9 [] = [] p9 (x:xs) = (x : takeWhile (==x) xs) : p9 (dropWhile (== x) xs)
yalpul/CENG242
H99/1-10/p9.hs
gpl-3.0
136
0
9
35
89
48
41
3
1
{-# LANGUAGE MultiParamTypeClasses #-} module Language.Verse.Transform.Chess where import Text.Blaze.Html5 ((!)) import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A import Data.Monoid import Data.String import Language.Verse.Renderer import Language.Verse.Renderer.Html import S...
sykora/verse
src/Language/Verse/Transform/Chess.hs
gpl-3.0
1,745
0
15
431
434
243
191
34
1
module Selectable where import Prelude hiding(id) import Data.IxSet as IS import Data.Unique import Data.Typeable import Foreign.C.Types import Graphics.UI.SDL(Rect(..), Renderer) import EasierSdl type Selected = IxSet SelectableId class Selectable a where id :: a -> Unique boundingBox :: a -> Rect newtyp...
Tomsik/SpaceHegemony
src/Selectable.hs
gpl-3.0
1,292
0
12
277
564
303
261
30
2
module HackerRank.Utilities.Manager.Read where import Control.Applicative import Control.Monad import System.Process import HackerRank.Utilities.Manager.Haskell ( pushInMain ) copyStringToPasteboard :: String -> IO () copyStringToPasteboard = void . readCreateProcessWithExitCode (shell "pbcopy") copySource :: File...
oopsno/hrank
src/HackerRank/Utilities/Manager/Read.hs
unlicense
530
0
8
65
130
72
58
13
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module KMean where import Data.List import Data.Default import qualified Data.Map as M class (Default v, Ord v) => Vector v where distance :: v -> v -> Double centroid :: [v] -> v instance Vector (Double, Double) where distance (a, b) (c,d)...
wangyixiang/beginninghaskell
chapter6/src/Chapter6/KMean.hs
unlicense
2,758
9
16
733
1,033
564
469
53
2
{-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving, TemplateHaskell, OverloadedStrings, GADTs, FlexibleContexts, ScopedTypeVariables, MultiParamTypeClasses #-} import Database.Persist import Database.Persist.Sqlite import Database.Persist.TH import Control.Monad.IO.Class (liftIO) import Da...
rbtcollins/edtrades
src/Main.hs
apache-2.0
9,971
0
17
2,598
2,143
1,148
995
108
6
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE PolyKinds #-} module Data.Memorable.Theme.Metric where import Data.Memorable type UnitsPlural = ToTree '[ "meters" , "seconds" , "grams" , "liters" , "volts" , "ohms" , "amps" , "henries" ] type Units =...
luke-clifton/memorable-bits
src/Data/Memorable/Theme/Metric.hs
bsd-2-clause
968
0
15
359
221
132
89
54
1
module Circular where data Circular a = Circular [a] [a] toList (Circular xs ys) = xs ++ ys fromList = Circular [] instance Functor Circular where fmap f (Circular xs ys) = Circular (map f xs) (map f ys)
cullina/Extractor
src/Circular.hs
bsd-3-clause
209
0
8
44
99
52
47
6
1
primitive primAddInt "bluejelly.Int.add", primSubInt "bluejelly.Int.sub" :: Int -> Int -> Int
ppedemon/Bluejelly
bluejelly-bjc/src/test/resources/parser.tests/Prims.hs
bsd-3-clause
101
6
3
18
23
12
11
-1
-1
module Domains.Multiplicative where infixl 7 * class Multiplicative a where (*) :: a -> a -> a one :: a instance Multiplicative Int where (*) = (Prelude.*) one = 1 instance Multiplicative Integer where (*) = (Prelude.*) one = 1 instance Multiplicative Double where (*) = (Prelude.*) one = 1
pmilne/algebra
src/Domains/Multiplicative.hs
bsd-3-clause
312
0
8
71
112
68
44
14
0
module Matterhorn.Draw.Autocomplete ( autocompleteLayer ) where import Prelude () import Matterhorn.Prelude import Brick import Brick.Widgets.Border import Brick.Widgets.List ( renderList, listElementsL, listSelectedFocusedAttr ...
matterhorn-chat/matterhorn
src/Matterhorn/Draw/Autocomplete.hs
bsd-3-clause
8,303
0
18
2,683
1,944
986
958
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} module Protocol.ROC.PointTypes.PointType2 where import Data.Binary.Get (getByteString, getWord8, getWord16le, getWord32le, Get) import Data.ByteString (ByteString) impo...
plow-technologies/roc-translator
src/Protocol/ROC/PointTypes/PointType2.hs
bsd-3-clause
3,439
0
9
1,128
568
320
248
114
1
{-# LANGUAGE OverloadedStrings, GADTs #-} -- | A renderer that produces a lazy 'L.Text' value, using the Text Builder. -- module Text.Blaze.Renderer.Text ( renderMarkupBuilder , renderMarkupBuilderWith , renderMarkup , renderMarkupWith , renderHtmlBuilder , renderHtmlBuilderWith , renderHtml...
dylex/blaze-markup
src/Text/Blaze/Renderer/Text.hs
bsd-3-clause
6,791
0
15
1,830
1,474
810
664
130
11
{-# LANGUAGE CPP, MagicHash #-} -- -- (c) The University of Glasgow 2002-2006 -- -- | ByteCodeGen: Generate bytecode from Core module ETA.Interactive.ByteCodeGen ( UnlinkedBCO, byteCodeGen, coreExprToBCOs ) where #include "HsVersions.h" import ETA.Interactive.ByteCodeInstr import ETA.Interactive.ByteCodeItbls impor...
alexander-at-github/eta
compiler/ETA/Interactive/ByteCodeGen.hs
bsd-3-clause
70,081
0
5
22,512
1,710
1,605
105
51
1
{-# language CPP #-} -- No documentation found for Chapter "AccessFlags2" module Vulkan.Core13.Enums.AccessFlags2 ( pattern ACCESS_2_NONE_KHR , pattern ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR , pattern ACCESS_2_INDEX_READ_BIT_KHR ...
expipiplus1/vulkan
src/Vulkan/Core13/Enums/AccessFlags2.hs
bsd-3-clause
29,511
1
10
5,699
1,553
1,006
547
-1
-1
module Main.Opts where import System.Console.GetOpt import ACO (Config(..)) import SA (Config(..)) import BB (Config(..)) import Problems.TSP as TSP (Config(..), DistConf(..)) data Flag = FTwoOpt | FVersion | FHelp | FGen Int | FAnts Int | FCoords | FVerb | FPlot FilePath | FFin Double | FOpts | FEst Double | FREuc ...
tomasmcz/discrete-opt
src-main/Main/Opts.hs
bsd-3-clause
2,347
0
13
425
954
523
431
48
2
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} module Opaleye.Internal.Unpackspec where import qualified Opaleye.Internal.PackMap as PM import qualified Opaleye.Column as C import Control.Applicative (Applicative, pure, (<*>)) import Data.Profunctor (Profunctor, dimap) import ...
k0001/haskell-opaleye
Opaleye/Internal/Unpackspec.hs
bsd-3-clause
1,596
0
12
314
464
258
206
32
1
{-# LANGUAGE DataKinds #-} module LDrive.LED where import Ivory.Language import Ivory.Tower import Ivory.HW.Module import Ivory.BSP.STM32.Peripheral.GPIOF4 import LDrive.Utils data LEDPolarity = ActiveHigh | ActiveLow data LED = LED GPIOPin LEDPolarity ledSetup :: LED -> Ivory eff () ledSetup led@(LED pin _polari...
sorki/odrive
src/LDrive/LED.hs
bsd-3-clause
2,177
0
22
493
593
292
301
47
1
-- ----------------------------------------------------------------------------- -- Copyright 2002, Simon Marlow. -- Copyright 2009, Henning Thielemann. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions ...
xpika/mohws
src/Network/MoHWS/Configuration/Parser.hs
bsd-3-clause
7,996
0
30
1,730
1,910
1,005
905
152
2
module Main where import Haste import Haste.HPlay.View hiding (head) import Binary.Application import Control.Monad.IO.Class import Prelude hiding (div, id) import Binary.Util main :: IO (Maybe ()) main = do addCss "./bootstrap.min.css" addCss "./bootstrap-theme.min.css" embedCss myCss addJs "./jquery-1.11....
Teaspot-Studio/bmstu-binary-genetics-haste
Main.hs
bsd-3-clause
1,355
0
13
323
340
170
170
43
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS_HADDOCK hide #-} -- | -- Module : Data.Array.Accelerate.Pretty -- Copyright...
kumasento/accelerate
Data/Array/Accelerate/Pretty.hs
bsd-3-clause
1,987
0
7
384
324
185
139
25
1
{-| Instance status data collector. -} {- Copyright (C) 2013 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Th...
vladimir-ipatov/ganeti
src/Ganeti/DataCollectors/InstStatus.hs
gpl-2.0
6,637
0
20
1,408
1,226
640
586
135
4
{- | Module : ./CspCASLProver/IsabelleUtils.hs Description : Utilities for CspCASLProver related to Isabelle Copyright : (c) Liam O'Reilly and Markus Roggenbach, Swansea University 2009 License : GPLv2 or higher, see LICENSE.txt Maintainer : csliam@swansea.ac.uk Stability : provision...
spechub/Hets
CspCASLProver/IsabelleUtils.hs
gpl-2.0
6,948
0
14
1,731
1,359
740
619
107
2
{-| Module : CompileUtils License : GPL Maintainer : helium@cs.uu.nl Stability : experimental Portability : portable -} module Helium.Main.CompileUtils ( module Helium.Main.CompileUtils , Option(..) , splitFilePath, combinePathAndFile , when, unless , exitWith, Exi...
roberth/uu-helium
src/Helium/Main/CompileUtils.hs
gpl-3.0
4,118
0
21
1,277
1,184
614
570
-1
-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-elasticache/gen/Network/AWS/ElastiCache/PurchaseReservedCacheNodesOffering.hs
mpl-2.0
6,288
0
13
1,103
712
427
285
93
1
module Control.Monad.M where import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans.Either import Control.Monad.Trans.Reader import Data.String.Util import Pipes import System.Exit type M r = ReaderT Env (EitherT String IO) r data Env = Env { indention :: Int, verbosity :: Bool } newEnv :: Boo...
jfeltz/dash-haskell
src/Control/Monad/M.hs
lgpl-3.0
1,413
0
14
351
621
320
301
45
2
main = do let value = True if value then putStrLn "Got true" else putStrLn "Got else" let value = False if value then putStrLn "Got true" else putStrLn "Got else" let result = 3 if result == 1 then putStrLn "Got true" else if result == 2 ...
Bigsby/HelloLanguages
src/hs/ifelse.hs
apache-2.0
392
0
9
158
103
49
54
15
5
module Propellor.Property.HostingProvider.DigitalOcean ( distroKernel ) where import Propellor import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.File as File import qualified Propellor.Property.Reboot as Reboot import Data.List -- | Digital Ocean does not provide any way to boot -- ...
sjfloat/propellor
src/Propellor/Property/HostingProvider/DigitalOcean.hs
bsd-2-clause
1,969
18
10
309
359
203
156
30
1
{-| Contains all the data structures and functions for composing and rendering graphics. -} module FRP.Helm.Graphics ( -- * Types Element(..), FontWeight(..), FontStyle(..), Text(..), Form(..), FormStyle(..), FillStyle(..), LineCap(..), LineJoin(..), LineStyle(..), Path, Shape(..), -- * ...
didmar/helm
src/FRP/Helm/Graphics.hs
mit
10,649
0
14
2,356
2,293
1,312
981
169
1
module Yst.Sqlite3 (readSqlite3) where import Database.HDBC import Database.HDBC.Sqlite3 import Data.Maybe import Yst.Types readSqlite3 :: FilePath -> String -> IO Node readSqlite3 filename query = do conn <- connectSqlite3 filename stmt <- prepare conn query execute stmt [] records <- sFetchAllRows' stmt f...
2ion/yst
Yst/Sqlite3.hs
gpl-2.0
646
0
15
174
210
101
109
21
2
module Main where import CV.Image import CV.Thresholding main = do Just x <- loadImage "smallLena.jpg" saveImage "thresholding.png" $ montage (3,2) 5 $ [x ,unsafeImageTo32F $ nibbly 1.2 0.01 x ,unsafeImageTo32F $ otsu 64 x ,unsafeImageTo32F $ kittler 0.1 x ,unsafeImageTo...
aleator/CV
examples/thresholding.hs
bsd-3-clause
357
0
11
104
118
61
57
11
1
module T5441a where import Unsafe.Coerce (unsafeCoerce) import GHC.Base (Any) listmap :: (a -> b) -> [a] -> [b] listmap f [] = [] listmap f (x : xs) = f x : listmap f xs data Nat = Z | S Nat {-# NOINLINE inject #-} inject :: Nat -> Nat -> Nat inject m i = i {-# NOINLINE look #-} look :: Nat -> String -> Char...
ezyang/ghc
testsuite/tests/simplCore/should_run/T5441a.hs
bsd-3-clause
771
0
11
204
342
184
158
28
1
module Main where import Base import Extends -- Previously GHC was giving this false positive: -- -- T10890_1.hs:4:1: Warning: -- The import of ‘Extends’ is redundant -- except perhaps to import instances from ‘Extends’ -- To import instances alone, use: import Extends() data Bar = Bar instanc...
ezyang/ghc
testsuite/tests/warnings/should_compile/T10890/T10890_1.hs
bsd-3-clause
430
0
6
100
69
41
28
10
1
{-# LANGUAGE OverloadedStrings #-} module Language where import Data.Aeson.Types newtype Language = Language String defaultLanguage :: Language defaultLanguage = Language "en" ppLang :: Language -> String ppLang (Language l) = l instance ToJSON Language where toJSON = toJSON . ppLang instance FromJSON Langua...
entropia/tip-toi-reveng
src/Language.hs
mit
373
0
7
67
95
52
43
12
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} module ConcurrentWatched ( forkIO , allThreads , module Control.Concurrent ) where import Control.Concurrent hiding (forkIO) import qualified Control.Concurrent as Concurrent (forkIO) import ...
haskellbr/meetups
01-2016/concorrencia-em-haskell/ghci-threads-mvars/ConcurrentWatched.hs
mit
1,661
0
18
471
454
242
212
45
2
---------------------------------------------------------------- -- -- | aartifact -- http://www.aartifact.org/ -- -- @src\/Set.hs@ -- -- Set representation and common operations. -- ---------------------------------------------------------------- -- module Set where import Data.List ---------------------------...
aartifact/aartifact-verifier
src/Set.hs
mit
1,324
0
9
296
590
323
267
23
2
fibo :: Integer-> Integer fibo n |n==0 =0 |n==1 =1 |n>0 =fibo (n-1)+fibo (n-2) |otherwise =error " undefined negative error " main=print(fibo 10)
manuchandel/Academics
Principles-Of-Programming-Languages/fibo.hs
mit
151
0
9
28
104
49
55
7
1