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 DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Settings/SendAs/Get.hs
mpl-2.0
3,713
0
15
842
392
238
154
66
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-vault/gen/Network/Google/Resource/Vault/Matters/Exports/List.hs
mpl-2.0
5,456
0
19
1,339
885
511
374
126
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Disable.hs
mpl-2.0
5,340
0
17
1,297
788
461
327
112
1
module TranspilerTest where import Transpiler (transpile) import Test.Hspec s =>> c = transpile s `shouldBe` Left c gg s = transpile s `shouldBe` Right "Hugh?" main :: IO () main = hspec $ do describe "When there's no lambda" $ do it "Should work when expressions are very simple" $ do "call()" =>> "call(...
ice1000/OI-codes
codewars/authoring/haskell/TranspilerSpec.hs
agpl-3.0
3,451
0
14
937
646
273
373
82
1
module FixTheCode where import Control.Monad.Trans.Maybe import Control.Monad.Trans.Class import Control.Monad import Control.Monad.IO.Class isValid :: String -> Bool isValid v = '!' `elem` v maybeExcite :: MaybeT IO String maybeExcite = do v <- lift getLine guard $ isValid v return v doExcite :: IO () doExci...
thewoolleyman/haskellbook
26/14/maor/FixTheCode.hs
unlicense
508
0
12
98
160
82
78
19
2
module Ylang.Lexer where import Text.Parsec.String (Parser) import Text.Parsec.Language (emptyDef) import qualified Text.Parsec.Token as Token lexer :: Token.TokenParser () lexer = Token.makeTokenParser style where style = emptyDef { Token.commentLine = commentLine , Token.reservedOpNames = o...
VoQn/ylang
Ylang/Lexer.hs
apache-2.0
1,011
0
8
198
319
177
142
29
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QGraphicsItem.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:25 Warning : this file is machine generated - do...
uduki/hsQt
Qtc/Gui/QGraphicsItem.hs
bsd-2-clause
106,074
0
17
15,737
32,754
16,584
16,170
-1
-1
module Main where import Crypto.Classes import Crypto.Hash.Ed2k import Crypto.Types (BitLength) import qualified Data.ByteString.Char8 as B import qualified Data.ByteString.Lazy.Char8 as L import Data.Int (Int64) import Data.Tagged import Test.Framework (defaultMain, testGroup, Test) import Test.Framework.Providers.HU...
nullref/haskell-hash-ed2k
Test/Ed2k.hs
bsd-2-clause
1,991
0
17
431
520
281
239
38
1
{-# LANGUAGE OverloadedStrings #-} module Game.GameChase where import Control.Lens (use, (^.), (.=), zoom, ix, preuse, (%=), (&), (+~), (%~)) import Control.Monad (unless, liftM) import Data.Bits ((.&.), complement) import Linear (_x, _z, normalize) import {-# SOURCE #-} Game.GameImportT import Game.CVarT import Game...
ksaveljev/hake-2
src/Game/GameChase.hs
bsd-3-clause
4,042
0
21
1,111
1,150
570
580
-1
-1
----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.DynamicWorkspaces -- Copyright : (c) David Roundy <[email protected]> -- License : BSD3-style (see LICENSE) -- -- Maintainer : none -- Stability : unstable -- Portability : unportable -- -- ...
markus1189/xmonad-contrib-710
XMonad/Actions/DynamicWorkspaces.hs
bsd-3-clause
8,317
0
18
2,587
1,788
930
858
100
4
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} #if __GLASGOW_HASKELL__ >= 800 {-# OPTIONS_GHC -Wno-redundant-constraints #-} #endif -- | Execute commands within the properly configured Stack -- environment. module Stack.Exec where import ...
martin-kolinek/stack
src/Stack/Exec.hs
bsd-3-clause
2,839
0
13
604
488
277
211
48
2
{-# language CPP #-} -- | = Name -- -- VK_EXT_global_priority - device extension -- -- == VK_EXT_global_priority -- -- [__Name String__] -- @VK_EXT_global_priority@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 175 -- -- [__Revision__] -- 2 -- -- [__Extension ...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_EXT_global_priority.hs
bsd-3-clause
6,417
0
8
1,248
382
286
96
-1
-1
{-# LANGUAGE DeriveGeneric #-} module Crawl.Stats.Shield where import qualified Data.Csv as CSV import GHC.Generics (Generic) import qualified Data.Default as Default import qualified Crawl.Stats.Named as Named data Shield = Shield { name :: String, block :: Integer, evPenalty :: Integer, dexContrib :: Inte...
jfrikker/crawlstats
src/Crawl/Stats/Shield.hs
bsd-3-clause
529
0
8
92
143
87
56
18
0
-- Config.hs {-# OPTIONS_GHC -Wall #-} module Lab2.Config( cL , cN , hilbertDim , imageSize ) where hilbertDim :: Int hilbertDim = 16 -- for max value of 65535 cL, cN :: Int cL = 3 cN = 4 imageSize :: Num a => a imageSize = 500
ghorn/cs240h-class
Lab2/Config.hs
bsd-3-clause
305
0
6
125
67
42
25
12
1
module Data.Wavelets.ReconstructionSpec (main, spec) where import Test.Hspec import Data.Wavelets.Reconstruction import Data.Wavelets import System.IO import qualified Data.Vector.Storable as V {-| The test waveletData below was transformed into several of the result dataFiles |-} -- 3 sinusoids added together to m...
smurphy8/wavelets
test/Data/Wavelets/ReconstructionSpec.hs
bsd-3-clause
1,533
0
15
281
391
209
182
33
1
{-# LANGUAGE RankNTypes #-} module Parser (parseTerm) where import Syntax import Text.Parsec hiding(State) import Text.Parsec.String import qualified Text.Parsec.Token as P import Text.Parsec.Language import Data.Char import Control.Monad import Control.Appl...
yu-i9/SystemF
parser/Parser.hs
bsd-3-clause
5,199
0
15
1,352
1,958
979
979
132
2
module Tests.Regress ( testTree -- :: TestTree ) where import Test.Tasty import qualified Tests.Regress.Issue13 as Issue13 import qualified Tests.Regress.FlatTerm as FlatTerm -------------------------------------------------------------------------------- -- Tests and properties testTree :: TestTree ...
arianvp/binary-serialise-cbor
tests/Tests/Regress.hs
bsd-3-clause
407
0
7
64
62
41
21
9
1
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TemplateHaskell #-} module Web.Zwaluw ( -- * Types Router, (:-)(..), (<>), (.~) -- * Running routers , parse, unparse , parse1, unparse1 -- * Router combinators , pure, xmap, xma...
MedeaMelana/Zwaluw
Web/Zwaluw.hs
bsd-3-clause
5,875
0
16
1,402
2,283
1,239
1,044
100
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1998 \section[DataCon]{@DataCon@: Data Constructors} -} {-# LANGUAGE CPP, DeriveDataTypeable #-} module DataCon ( -- * Main data types DataCon, DataConRep(..), SrcStrictness(..), SrcUnpackedness(..), ...
vikraman/ghc
compiler/basicTypes/DataCon.hs
bsd-3-clause
50,860
0
22
14,673
5,794
3,302
2,492
497
5
{- (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1994-1998 Desugaring foreign calls -} {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module DsCCall ( dsCCall , mkFCall , unboxArg , boxResult , resultWrapper ) wher...
sdiehl/ghc
compiler/deSugar/DsCCall.hs
bsd-3-clause
14,632
0
19
4,478
2,714
1,428
1,286
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} #if __GLASGOW_HASKELL__ >= 707 {-# LANGUAGE RoleAnnotations #-} #endif ------------------------------------------------------------...
ddssff/lens
src/Control/Lens/Internal/Context.hs
bsd-3-clause
12,647
0
12
2,416
2,744
1,499
1,245
-1
-1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleContexts #-} module Analytics ( runAnalytics , analyzeBoard ) where import Data.Aeson (eitherDecode, FromJSON) import Data.Either (rights, lefts) ...
k4smiley/Chan
src/Analytics.hs
bsd-3-clause
4,721
0
15
986
1,691
869
822
110
3
import Control.Monad (unless) import qualified Data.ByteString as BS import qualified Data.HashMap.Strict as HM import qualified Data.Vector as V import Data.Yaml import System.Environment (getArgs) import System.IO (stdout) main :: IO () main = do vs <- getArgs >>= decodeFiles unless (null vs) $ do let bs = e...
djoyner/yamlmerge
Main.hs
bsd-3-clause
1,224
0
14
273
443
225
218
30
2
{- | Copyright : Galois, Inc. 2012-2014 License : BSD3 Maintainer : [email protected] Stability : experimental Portability : non-portable (language extensions) -} module Main where import System.Environment (getArgs) import Verifier.SAW processFile :: FilePath -> IO () processFile file = do sc <- mkSha...
iblumenfeld/saw-core
tools/extcore-info.hs
bsd-3-clause
547
0
10
101
131
64
67
11
1
import Data.Pipe import GHC.Event
YoshikuniJujo/xmpipe
test/testMergeChan.hs
bsd-3-clause
36
0
4
6
11
6
5
2
0
import Disorder.Core.Main import qualified Test.Zodiac.HttpClient.Request import qualified Test.Zodiac.HttpClient.TSRP main :: IO () main = disorderMain [ Test.Zodiac.HttpClient.Request.tests , Test.Zodiac.HttpClient.TSRP.tests ]
ambiata/zodiac
zodiac-http-client/test/test.hs
bsd-3-clause
252
0
7
42
57
37
20
8
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} -- | -- Module: $HEADER$ -- Description: TODO -...
FPBrno/dht-dks
src/Data/DHT/DKS/Type/Message/JoinDone.hs
bsd-3-clause
988
0
9
167
175
113
62
29
0
{-# LANGUAGE CPP #-} module TcInteract ( solveSimpleGivens, -- Solves [EvVar],GivenLoc solveSimpleWanteds -- Solves Cts ) where #include "HsVersions.h" import BasicTypes () import TcCanonical import TcFlatten import VarSet import Type import Unify import InstEnv( DFunInstType, lookupInstEnv, instan...
green-haskell/ghc
compiler/typecheck/TcInteract.hs
bsd-3-clause
73,245
38
23
21,971
10,656
5,547
5,109
-1
-1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.PixelRectangles.Rasterization -- Copyright : (c) Sven Panne 2002-2005 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : [email protected] -- ...
FranklinChen/hugs98-plus-Sep2006
packages/OpenGL/Graphics/Rendering/OpenGL/GL/PixelRectangles/Rasterization.hs
bsd-3-clause
1,872
7
10
242
356
219
137
-1
-1
---------------------------------------------------------------- -- Модуль приложения -- Скрипты графического интерфейса (HScript) -- Язык JavaScript ---------------------------------------------------------------- module WebUI.Scripts.JavaScript.HJavaScript ( module HJavaScriptBuilder , module HJavaScriptTyp...
iqsf/HFitUI
src/WebUI/Scripts/JavaScript/HJavaScript.hs
bsd-3-clause
2,483
0
11
801
397
244
153
50
1
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-} {- | Module : $Header$ Description : Coding of a CASL sublogic to Propositional Copyright : (c) Dominik Luecke and Uni Bremen 2007 License : GPLv2 or higher, see LICENSE.txt Maintainer : [email protected] Sta...
keithodulaigh/Hets
Comorphisms/CASL2Prop.hs
gpl-2.0
4,439
17
15
874
1,051
559
492
104
9
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.SWF.Types.Product -- Copy...
fmapfmapfmap/amazonka
amazonka-swf/gen/Network/AWS/SWF/Types/Product.hs
mpl-2.0
348,280
0
67
63,611
39,955
23,807
16,148
4,115
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="pt-BR"> <title>Eventos Enviados pelo Servidor | Exstensão do ZAP</title> <maps> <homeID>top...
veggiespam/zap-extensions
addOns/sse/src/main/javahelp/org/zaproxy/zap/extension/sse/resources/help_pt_BR/helpset_pt_BR.hs
apache-2.0
998
80
64
163
427
215
212
-1
-1
{-# LANGUAGE BangPatterns, DeriveDataTypeable #-} module Eta.Profiling.CostCentre ( CostCentre(..), CcName, IsCafCC(..), -- All abstract except to friend: ParseIface.y CostCentreStack, CollectedCCs, noCCS, currentCCS, dontCareCCS, noCCSAttached, isCurrentCCS, ...
rahulmutt/ghcvm
compiler/Eta/Profiling/CostCentre.hs
bsd-3-clause
11,032
0
15
3,346
2,148
1,172
976
183
3
{-# LANGUAGE OverloadedStrings #-} module System.Mesos.Raw.FrameworkInfo where import System.Mesos.Internal import System.Mesos.Raw.FrameworkId type FrameworkInfoPtr = Ptr FrameworkInfo foreign import ccall "ext/types.h toFrameworkInfo" c_toFrameworkInfo :: Ptr CChar -> CInt -> Ptr CChar -...
Atidot/hs-mesos
src/System/Mesos/Raw/FrameworkInfo.hs
mit
3,065
0
23
906
1,163
547
616
109
0
-- Copyright (c) Microsoft. All rights reserved. -- Licensed under the MIT license. See LICENSE file in the project root for full license information. {-# LANGUAGE OverloadedStrings, RecordWildCards #-} {-| Copyright : (c) Microsoft License : MIT Maintainer : [email protected] Stability : provisional Por...
jdubrule/bond
compiler/src/Language/Bond/Codegen/TypeMapping.hs
mit
23,861
0
13
3,973
5,920
2,981
2,939
433
3
{-# LANGUAGE TypeFamilies #-} module Data.Mutable.Deque ( Deque , UDeque , asUDeque , SDeque , asSDeque , BDeque , asBDeque , module Data.Mutable.Class ) where import Control.Exception (assert) import Control.Monad (liftM) import ...
bitemyapp/mutable-containers
Data/Mutable/Deque.hs
mit
4,740
0
21
1,806
1,419
715
704
117
1
{-# LANGUAGE OverloadedStrings #-} import Data.Monoid import Data.Prototype import Lens.Micro.Platform ((.=)) import Yi.Config import Yi.Config.Default (defaultConfig) import Yi.Config.Default.HaskellMode (configureHaskellMode) ...
siddhanathan/yi
example-configs/yi-vim-vty-dynamic/yi.hs
gpl-2.0
2,920
0
21
893
612
341
271
55
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="ru-RU"> <title>Revisit | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref loc...
0xkasun/security-tools
src/org/zaproxy/zap/extension/revisit/resources/help_ru_RU/helpset_ru_RU.hs
apache-2.0
969
80
66
159
413
209
204
-1
-1
{-# LANGUAGE ViewPatterns #-} module PrettyPrint (showExpr) where import Data.List (intersperse) import qualified Language.Java.Pretty (prettyPrint) import Text.PrettyPrint.ANSI.Leijen (Doc, (<+>), (<>), text, dot, colon) import qualified Text.PrettyPrint.ANSI.Leijen as PP import Unbound...
bixuanzju/fcore
lib/newlib/PrettyPrint.hs
bsd-2-clause
5,268
0
23
1,782
2,483
1,203
1,280
137
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Main (main) where import Prelude.Compat import Control.DeepSeq import Control.Exception import Control.Monad import Data.Aeson import Data.Aeson.Parser import Data.Attoparsec import Data.Time.Clock import Syste...
dmjio/aeson
benchmarks/bench/ReadFile.hs
bsd-3-clause
904
0
27
268
282
143
139
33
2
{-------------------------------------------------------------------------------- Test Grid. --------------------------------------------------------------------------------} module Main where import Graphics.UI.WX import Graphics.UI.WXCore hiding (Event) main = start gui gui :: IO () gui = do f <- frame ...
ekmett/wxHaskell
samples/wx/Grid.hs
lgpl-2.1
3,380
0
16
974
1,126
556
570
81
3
{-# LANGUAGE LambdaCase, RankNTypes, BangPatterns #-} module Stream.Combinators where import Stream.Types import Control.Applicative import Control.Monad hiding (foldM) import Control.Monad.Trans import Control.Monad.Morph import Data.Functor.Identity import qualified Control.Monad.Trans.Free as Free import Control...
haskell-streaming/streaming
benchmarks/old/Stream/Combinators.hs
bsd-3-clause
7,792
0
18
2,449
3,315
1,687
1,628
156
3
----------------------------------------------------------------------------- -- | -- Module : RefacFunDef -- Copyright : (c) Christopher Brown 2005 -- -- Maintainer : [email protected] -- Stability : provisional -- Portability : portable -- -- This module contains a transformation for HaRe. -- Function D...
kmate/HaRe
old/refactorer/RefacFunDef.hs
bsd-3-clause
39,473
0
26
13,060
12,761
6,555
6,206
-1
-1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples, AutoDeriveTypeable #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_HADDOCK not-home #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Conc.Windows -- C...
frantisekfarka/ghc-dsi
libraries/base/GHC/Conc/Windows.hs
bsd-3-clause
11,013
4
22
2,374
2,758
1,429
1,329
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE ExistentialQuantification #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.StaticPtr -- Copyright : (C) 2014 I/O Tw...
beni55/haste-compiler
libraries/ghc-7.10/base/GHC/StaticPtr.hs
bsd-3-clause
4,186
0
18
864
648
377
271
53
2
module Where4 where -- source functions f1 :: [a] -> [a] f1 l = ls where ls = take (rs - 1) l rs = length l f2 :: [a] -> Int f2 l = rs - 1 where rs = length l
mpickering/HaRe
old/testing/merging/Where4_TokOut.hs
bsd-3-clause
210
0
9
94
89
49
40
8
1
import Distribution.Simple import Ros.Internal.SetupUtil main = defaultMainWithHooks $ simpleUserHooks { confHook = rosConf }
bitemyapp/roshask
Examples/Turtle/Setup.hs
bsd-3-clause
134
0
7
22
29
17
12
4
1
-- | A collection of commonly-used combinators to build up larger -- codecs. module Data.Wheat.Combinators where import Control.Applicative ((<$>)) import Control.Monad ((>=>)) import Data.Foldable (foldMap) import Data.Functor.Contravariant.Divisible (divide) import Data.Monoid (Monoid, (<>)) -- Local imports import...
barrucadu/wheat
Data/Wheat/Combinators.hs
mit
3,946
0
15
859
1,255
654
601
51
2
{-# LANGUAGE OverloadedStrings #-} module Haskbot.Internal.Request ( Params , jsonContentType , textContentType , getPostParams , headOnly , getParamsMap , optParam , reqParam ) where import Control.Monad.Error (liftIO, throwError) import Data.ByteString.Lazy (fromStrict) import Data.Text (Text) import Data.Text.Enco...
Jonplussed/haskbot-core
src/Haskbot/Internal/Request.hs
mit
1,512
0
10
256
471
254
217
42
2
{-# LANGUAGE ScopedTypeVariables , ExistentialQuantification , LambdaCase , KindSignatures #-} module Document.VarScope where -- Modules import Document.Phase.Types import Document.Scope import Latex.Parser (uncurry3) import Logic.Expr import UnitB.Syntax -- Libraries impor...
literate-unitb/literate-unitb
src/Document/VarScope.hs
mit
10,411
0
30
2,660
3,284
1,734
1,550
-1
-1
module Main where import Engine import GLUI import SimpleBots main :: IO () main = runBattle openGLUI [ ("bot1", runInCircle), ("bot2", fireBot) ]
andreyLevushkin/LambdaWars
src/Main.hs
mit
173
0
7
49
51
31
20
8
1
module Handler.CustomError where import Assets (getAllExams) import Import import Widgets (titleWidget, iconWidget, publicExamWidget, privateExamWidget) -- | Custom 404 page getCustomErrorR :: Handler Html getCustomErrorR = do setUltDestCurrent memail <- lookupSession "_ID" (publicExams, privateExams) <- ...
cirquit/quizlearner
quizlearner/Handler/CustomError.hs
mit
454
0
10
69
107
58
49
-1
-1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE...
parsonsmatt/QuickLift
src/Models.hs
mit
3,145
0
10
947
664
375
289
79
1
-- Tiny lambda-Micro-Haskell program TPJ 2015 z = 10 ; neg b = if b then False else True ; mnsdbl m n = m - n - n ; once f x = f x ; twice f x = f (f x) ;
jaanos/TPJ-2015-16
lmh/tiny_lmh.hs
mit
157
0
7
46
78
42
36
5
2
import qualified Codec.Archive.Tar as Tar import qualified Codec.Compression.GZip as GZ import Control.Monad (forM_, when) import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy as BL import Data.Char (toLower) import qualified Data.Text.Lazy.IO as TL import Di...
pepijnkokke/homebrew-hackage
Main.hs
mit
3,728
11
25
965
857
461
396
75
4
module Main where import Popeye.CLI main :: IO () main = run
codeclimate/popeye
app/Main.hs
mit
63
0
6
14
24
14
10
4
1
#!/usr/bin/env stack -- stack --install-ghc runghc --package turtle -- #!/bin/bash {-# LANGUAGE OverloadedStrings #-} -- -- import Turtle say = echo main = say "Hello, world!"
capitanbatata/functional-systems-in-haskell
fsh-exercises/scripts/example1.hs
mit
260
0
5
110
23
15
8
4
1
-- The number, 197, is called a circular prime because -- all rotations of the digits: 197, 971, and 719, are themselves prime. -- There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, and 97. -- How many circular primes are there below one million? module Euler35 where import Data.Num...
kirhgoff/haskell-sandbox
euler35/euler35.hs
mit
1,333
0
11
250
422
221
201
26
1
main :: IO () main = putStrLn $ show $ solve solve :: Int solve = sum [sumMultiplesToN 3 1000, sumMultiplesToN 5 1000, -sumMultiplesToN 15 1000] sumMultiplesToN :: (Integral a) => a -> a -> a sumMultiplesToN m n = m * (sumToN $ (n-1) `div` m) sumToN :: (Integral a) => a -> a sumToN n = n * (n+1) `div` 2
pshendry/project-euler-solutions
0001/solution.hs
mit
308
1
10
66
158
86
72
8
1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE MultiParamTypeClasses #-} ------------------------------------------------------------------------------- -- Module : Domain.Concrete.Transformers.Expression -- Copyright : (c) 2017 Marcelo Sousa -- -- Transformers for the concrete semantics. -- Two main transformers f...
marcelosousa/poet
src/Domain/Concrete/Transformers/Expression.hs
gpl-2.0
3,274
0
20
595
787
423
364
65
8
{-# LANGUAGE DatatypeContexts #-} {-# LANGUAGE DatatypeContexts #-} {-# language DatatypeContexts #-} {-# language TemplateHaskell #-} {-# language DeriveDataTypeable #-} {-# language ScopedTypeVariables #-} {-# language DoAndIfThenElse #-} module Rewriting.Termination.Interpretation where import Rewriting.Terminatio...
marcellussiegburg/autotool
collection/src/Rewriting/Termination/Interpretation.hs
gpl-2.0
9,614
0
24
2,902
3,039
1,477
1,562
204
5
{-# OPTIONS -Wall #-} -- | Reexport module module HsTri( module Blender, module ClosedOrCensus6, module Codec.Rga.Parser, module Codec.Rga.Writer, module ConcreteNormal, module ConcreteNormal.PreRenderable, module Data.AscTuples, module Data.FormalOps, module Data.Vector, module...
DanielSchuessler/hstri
HsTri.hs
gpl-3.0
2,716
0
5
388
457
304
153
94
0
{-# LANGUAGE RecordWildCards #-} module DFA where import Control.Monad import qualified Data.PQueue.Min as PQ import qualified Data.Set as S import qualified Data.List as L import Data.List (sort) import NFA import Regex data DFA s a = DFA { states :: [s] , delta :: s -> a -> s ,...
TeofilC/regeq
src/DFA.hs
gpl-3.0
2,638
0
15
1,021
1,070
592
478
47
3
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TypeOperators #-} {- | Module : Tct.Method.Poly.N...
mzini/TcT
source/Tct/Method/Matrix/NaturalMI.hs
gpl-3.0
38,635
1
23
12,257
11,625
5,942
5,683
-1
-1
import System.Environment import Data.List (sort) -- using sort as the internal bucket sorting algorithm flatten :: [[a]] -> [a] flatten xs = (\z n -> foldr (\x y -> foldr z y x) n xs) (:) [] bucketSort :: (RealFrac a, Ord a) => [a] -> Integer -> [a] bucketSort [] _ = [] bucketSort array bucketSize = flatten $ map so...
Jecoms/cosmos
code/sorting/bucket_sort/bucket_sort.hs
gpl-3.0
1,013
0
13
330
395
212
183
16
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances #-} module Coala ( Filename(Filename) , coala , coalaIO , Result (..) , Severity (..) , Line (..) , Column (..) , Affect (..) , CodeRef (line, column) , codeRef , codeRefLine , codeRefInLine , FileRef ...
maweki/coalaHs
src/Coala.hs
gpl-3.0
4,471
0
13
1,372
1,653
879
774
121
3
-- UUAGC 0.9.52.1 (Helium/Syntax/UHA_Syntax.ag) module Helium.Syntax.UHA_Syntax where -- Alternative ------------------------------------------------- data Alternative = Alternative_Hole (Range) (Integer) | Alternative_Feedback (Range) (String) (Alternative) | Alternative_Alternative...
roberth/uu-helium
src/Helium/Syntax/UHA_Syntax.hs
gpl-3.0
12,231
0
7
2,260
2,272
1,410
862
148
0
module Surfaces where import Data.List (foldl') import Types mixColors :: (Float -> Float -> Float) -> Color -> Color -> Color mixColors f (Color r0 g0 b0) (Color r1 g1 b1) = Color (f r0 r1) (f g0 g1) (f b0 b1) {-# INLINE mixColors #-} scaleColor :: (Float -> Float) -> Color -> Color scaleColor f (Color r g b) = Co...
jrraymond/ray-tracer
src/Surfaces.hs
gpl-3.0
837
0
11
170
319
166
153
16
1
oddOrEven :: [Num] -> String oddOrEven xs = if odd $ sum xs then "odd" else "even"
yannxia-self/code-war-hasekell-training
odd_or_even.hs
gpl-3.0
82
0
7
16
36
19
17
2
2
elementAt :: [a] -> Int -> a elementAt [] n = error "Empty list or n greater than the size of the list" elementAt (x : xs) n = if n < 0 then error "The second argument must be positive or equal to zero" else if n == 0 then x else elementAt xs (n - 1)
dannywillems/99-problems
haskell/p03.hs
gpl-3.0
298
0
9
105
88
46
42
5
3
-- Module to manipulate uploaded files. module Upload ( MimeSortedFiles (..), uploadDir, mimeSort, cacheFile, uncacheFile, ) where import Control.Monad (foldM) import Control.Monad.IO.Class (MonadIO (..)) import Data.Aeson (ToJSON (..), genericToEncoding, genericToJSON) import Data.Default (Default...
phaazon/phaazon.net
backend/src/Upload.hs
gpl-3.0
3,214
0
11
557
902
477
425
62
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RecordWildCards #-} module Sara.Z3.Verifier ( verify ) where import Sara.Errors as E import Sara.Ast.AstUtils import Sara.Z3.AstWrapper import Sara.Z3.SymbolicExecutor import Control.Monad.Except import Control.Monad.Writer import qualified Sara.Z3.ProofPart as P import ...
Lykos/Sara
src/lib/Sara/Z3/Verifier.hs
gpl-3.0
2,280
0
15
423
709
350
359
57
5
module OutOfTheYards.Content.Normalize (normalizeUrls) where import Hakyll import qualified Network.URL as URL import Text.XML.Light import System.FilePath (dropFileName) -- Map an attribute transformation function over all nodes in a document. mapAttrs :: (QName -> Attr -> Attr) -> Content -> Content mapAttrs f c = ...
justinmanley/outoftheyards
src/OutOfTheYards/Content/Normalize.hs
gpl-3.0
2,034
0
20
716
498
258
240
43
5
module Hadolint.Lint ( lintIO, lint, analyze, LintOptions (..), ErrorRule, WarningRule, InfoRule, StyleRule, IgnoreRule, TrustedRegistry, ) where import qualified Control.Parallel.Strategies as Parallel import qualified Data.List.NonEmpty as NonEmpty import qualified Data.Sequen...
lukasmartinelli/hadolint
src/Hadolint/Lint.hs
gpl-3.0
3,701
0
12
736
1,018
568
450
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-monitoring/gen/Network/Google/Resource/Monitoring/Projects/AlertPolicies/Get.hs
mpl-2.0
4,894
0
15
1,061
702
411
291
103
1
{-# Language InstanceSigs, DoAndIfThenElse #-} module Observables where import Prelude hiding (map, takeWhile) import System.IO import Data.Char import System.Console.ANSI import Control.Monad import Control.Monad.Trans import qualified Data.List import Data.IORef import Coroutine (|>) :: a -> (a -> b) -> b x |> f ...
holoed/Rx.hs
Observables.hs
apache-2.0
4,421
0
23
1,753
1,652
824
828
83
3
module Inference ( inferRules ) where import Types infer :: Relation -> Expr -> [Relation] infer (premices `Imply` (lhs `And` rhs)) goal = infer (premices `Imply` rhs) goal ++ infer (premices `Imply` lhs) goal infer (premices `Imply` (lhs `Or` rhs)) goal = infer ((premices `And` Not lhs) `Imply` rhs) ...
tmielcza/demiurge
src/Inference.hs
apache-2.0
1,568
0
12
313
681
392
289
29
1
----------------------------------------------------------------------------- -- -- Module : Marshaller -- Description : -- Copyright : (c) Tobias Reinhardt, 2015 <[email protected] -- License : Apache License, Version 2.0 -- -- Maintainer : Tobias Reinhardt <[email protected]> -- Portability ...
tobiasreinhardt/show
CLIArguments/src/Marshaller.hs
apache-2.0
3,915
0
12
1,235
1,165
611
554
68
5
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} module Seraph.Model ( Directive(..) , Event(..) , OracleM , oracle , oracleModel , oracleDebug ) where ------------------------------------------------------------------------------- import Control.Lens ...
MichaelXavier/Seraph
src/Seraph/Model.hs
bsd-2-clause
4,483
0
13
931
1,169
591
578
-1
-1
-- 709 import Data.Function(on) import Data.List(sortBy) import Euler(splitOn) parseBaseExp ws = [(a,b,n+1) | n <- [0..length ws-1], let [a,b] = parseOne $ ws !! n] where parseOne w = map read $ splitOn ',' w findLargest ws = snd $ last $ sortBy (compare `on` fst) $ ...
higgsd/euler
hs/99.hs
bsd-2-clause
505
0
11
144
228
119
109
12
1
{-# LANGUAGE RankNTypes #-} module Insomnia.Interp.PMonad (ProbabilityMonad(..) , SupportMonad(..) , ExpMonad(..) , SamplingMonad(..) , ContinuousProbabilityMonad(..) , s...
lambdageek/insomnia
src/Insomnia/Interp/PMonad.hs
bsd-3-clause
5,536
0
17
1,872
1,876
973
903
119
2
module Settings.Flavours.Quickest (quickestFlavour) where import Expression import Flavour import {-# SOURCE #-} Settings.Default -- Please update doc/flavours.md when changing this file. quickestFlavour :: Flavour quickestFlavour = defaultFlavour { name = "quickest" , args = defaultBuilderArgs ...
ezyang/ghc
hadrian/src/Settings/Flavours/Quickest.hs
bsd-3-clause
701
0
9
150
156
93
63
18
1
{-# LANGUAGE ScopedTypeVariables #-} module Utils where import Kerchief.Prelude import Prelude hiding (foldl, getLine, putStr, putStrLn) import Control.Exception (SomeException, catch) import Control.Monad.Trans (MonadIO) import Data.ByteString (ByteString) import qualified Data.B...
mitchellwrosen/kerchief
src/Utils.hs
bsd-3-clause
2,909
0
13
714
1,299
679
620
62
7
module HQuestions where import Control.Arrow ((&&&)) import System.Random import Data.List import Data.Maybe import Data.Function (on) import Control.Monad (replicateM) h1 :: [a] -> a h1 = last h2 :: [a] -> a h2 = last . init h3 :: [a] -> Int -> a h3 xs n = xs !! (n-1) h4 :: [a] -> Int h4 = foldr (const (+1)) 0 ...
niexshao/Exercises
src/HQuestions.hs
bsd-3-clause
12,574
0
18
3,970
6,550
3,482
3,068
327
5
module Example.Lens () where
smurphy8/refactor-patternmatch-with-lens
src/Example/Lens.hs
bsd-3-clause
30
0
3
5
9
6
3
1
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE PostfixOperators #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} module Ion.Private.Types where import Data.Char import Data.List import...
ku-fpg/thrust-gen
src/Ion/Private/Types.hs
bsd-3-clause
18,582
0
33
9,157
5,242
2,633
2,609
355
8
{-# LANGUAGE FlexibleContexts #-} {-| Module : $Header$ CopyRight : (c) 8c6794b6, 2011-2013 License : BSD3 Maintainer : [email protected] Stability : experimental Portability : portable Synthesis methods -} module Spectrofy.Synth ( sinsyn , fftsyn ) where import Data.Complex (Complex(..), realPa...
8c6794b6/spectrofy
Spectrofy/Synth.hs
bsd-3-clause
4,204
0
16
957
1,662
880
782
-1
-1
module Paths_Demotivation ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception import Data.Version (Version(..)) import System.Environment (getEnv) import Prelude catchIO :: IO a -> (Exception.IOException -> IO...
Michaelt293/Demotivation
.stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/autogen/Paths_Demotivation.hs
bsd-3-clause
1,730
0
10
177
362
206
156
28
1
{-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE LambdaCase #-} module Main where import Hans import Hans.Device import Hans.IP4.Dhcp.Client (DhcpLease(..),defaultDhcpConfig,dhcpClient) import ...
GaloisInc/HaNS
examples/echo-server/Main.hs
bsd-3-clause
2,193
0
17
670
608
310
298
60
2
module Sound.Player.Widgets ( songWidget, playbackProgressBar ) where import Brick.Types (Widget) import Brick.Widgets.Core ((<+>), str, fill, vLimit, vBox) import qualified Brick.Widgets.List as L import qualified Brick.Widgets.ProgressBar as P import qualified Data.Vector as Vec import GHC.Float (double2Float) i...
potomak/haskell-player
src/Sound/Player/Widgets.hs
bsd-3-clause
2,622
0
14
569
733
392
341
51
3
{-# LANGUAGE NoImplicitPrelude #-} module Stack.Options.ScriptParser where import Options.Applicative import Options.Applicative.Builder.Extra import Stack.Options.Completion import Stack.Prelude data ScriptOpts = ScriptOpts { soPackages :: ![String] , soFile :: !FilePath ...
juhp/stack
src/Stack/Options/ScriptParser.hs
bsd-3-clause
1,773
0
17
489
361
187
174
58
1
module Statistics.Quantile.Bench.Accuracy where import qualified Data.Vector as V import Statistics.Quantile.Types import Statistics.Quantile.Util import Statistics.Sample import System.IO err :: Double -> Double -> Double err true estimate = let e = abs (true - estimate) in e * e selectorAccuracy ::...
olorin/slides
2015-08-26-fp-syd-approx-quantiles/approx-quantile/src/Statistics/Quantile/Bench/Accuracy.hs
mit
940
0
12
327
286
142
144
33
1
import Geometry import Drawing main = drawPicture myPicture myPicture points = red ( drawCircle'' (a,b) ) & blue ( drawCircle'' (c,d) ) & drawAutoLabels (list ++ intersects) & drawPoints intersects & message "Circle-Circle Intersection" where list = take 4 points [a,b,c,d] = list ...
alphalambda/hsmath
src/Learn/Geometry/demo05circlecircle.hs
gpl-2.0
367
0
12
95
137
73
64
12
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} -- | -- Copyright: © 2018 Herbert Valerio Riedel -- SPD...
Rizary/hackage-matrix-builder
src-lib/PlanJson.hs
gpl-3.0
6,178
0
18
2,139
1,477
788
689
144
7
-- | Unify support for type ASTs {-# LANGUAGE NoImplicitPrelude #-} module Lamdu.Infer.Internal.Unify ( unifyUnsafe ) where import Control.Lens.Operators import Control.Monad (when, unless) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.State (StateT,...
lamdu/Algorithm-W-Step-By-Step
src/Lamdu/Infer/Internal/Unify.hs
gpl-3.0
8,360
0
19
2,715
2,462
1,273
1,189
167
4
----------------------------------------------------------------------------- -- | -- Module : CK.Parsers.XML.XmlConfigurationParser -- License : LGPL -- -- Stability : under construction -- Portability : unknown -- -- An XML parser for the configuration knowledge. -- This module does not yet us...
alessandroleite/hephaestus-pl
src/configuration-knowledge/src/CK/Parsers/XML/XmlConfigurationParser.hs
lgpl-3.0
3,335
26
16
999
628
331
297
61
2
module Main where import Test.Tasty -- import Test.Tasty.QuickCheck as QC -- import Test.Tasty.HUnit as HU -- import Test.Tasty.Golden as TG import Test.Tasty.Hspec specs :: Spec specs = undefined tests :: TestTree tests = testGroup "main" [ testCase "something" specs ] main = defaultMain tests
erochest/life-cast
specs/Specs.hs
apache-2.0
313
0
7
61
59
35
24
9
1
{-# LANGUAGE CPP, DeriveDataTypeable, TupleSections #-} {-# OPTIONS -Wall #-} module Language.Paraiso.Optimization.DeadCodeElimination ( deadCodeElimination ) where import Control.Applicative import qualified Data.Graph.Inductive as FGL import Data.Maybe import qualified Data....
nushio3/Paraiso
Language/Paraiso/Optimization/DeadCodeElimination.hs
bsd-3-clause
2,354
0
16
669
673
365
308
54
4
{- (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1998 \section[TcForeign]{Typechecking \tr{foreign} declarations} A foreign declaration is used to either give an externally implemented function a Haskell type (and calling interface) or give a Haskell function an external calling interfa...
nushio3/ghc
compiler/typecheck/TcForeign.hs
bsd-3-clause
23,241
62
18
6,385
4,117
2,107
2,010
317
4