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 : Network.HTTP.Stream -- Copyright : See LICENSE file -- License : BSD -- -- Maintainer : Ganesh Sittampalam <http@projects.haskell.org> -- Stability : experimental -- Portability : non-portable (not tested...
beni55/HTTP
Network/HTTP/Stream.hs
bsd-3-clause
10,623
22
29
3,480
1,797
921
876
134
10
{-# LANGUAGE RebindableSyntax #-} -- NOTE: Required for 'zipWith3M' {-# LANGUAGE ScopedTypeVariables #-} {- ****************************************************************************** * H M T C * * ...
jbracker/supermonad-plugin
examples/monad/hmtc/monad-param/TypeChecker.hs
bsd-3-clause
40,435
0
21
12,781
8,597
4,553
4,044
510
10
----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Unpack -- Copyright : (c) Andrea Vezzosi 2008 -- Duncan Coutts 2011 -- License : BSD-like -- -- Maintainer : cabal-devel@haskell.org -- Stability : provisional -- Port...
IreneKnapp/Faction
faction/Distribution/Client/Unpack.hs
bsd-3-clause
4,022
0
14
954
820
426
394
84
4
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "System/Directory.hs" #-} {-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : System.Directory -- Copyright : (c) The University of Glasgow 2001 -- Li...
phischu/fragnix
tests/packages/scotty/System.Directory.hs
bsd-3-clause
65,984
0
24
13,947
7,135
4,001
3,134
597
7
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "Data/Aeson/Types/FromJSON.hs" #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances ...
phischu/fragnix
tests/packages/scotty/Data.Aeson.Types.FromJSON.hs
bsd-3-clause
87,711
0
26
21,079
20,672
10,934
9,738
-1
-1
{-# LANGUAGE CPP, TypeFamilies, DeriveDataTypeable #-} module PGIP.Output.Translations ( formatTranslations ) where import PGIP.Output.Formatting import PGIP.Output.Mime import Logic.Comorphism (AnyComorphism) import Proofs.AbstractState (G_prover) import Common.Json (ppJson, asJson) import Common.ToXml (asXml)...
keithodulaigh/Hets
PGIP/Output/Translations.hs
gpl-2.0
1,096
0
12
158
282
165
117
27
2
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} module Foo where import Data.Typeable (Proxy(..), typeRep) data family T a data instance T Int = MkT main :: IO () main = print $ typeRep (Proxy :: Proxy MkT)
ezyang/ghc
testsuite/tests/typecheck/should_compile/T13915b.hs
bsd-3-clause
220
0
8
41
71
42
29
8
1
import Graphics.UI.Gtk hello :: (ButtonClass o) => o -> IO () hello b = do set b [buttonLabel := "Hello World" ] putStrLn "Hello World" main :: IO () main = do initGUI window <- windowNew button <- buttonNew set window [windowDefaultWidth := 200 ,windowD...
gimbo/cabal-macosx
examples/gtkHello/src/Main.hs
bsd-3-clause
564
0
9
211
158
75
83
16
1
module E.TypeCheck( canBeBox, eAp, inferType, infertype, typecheck, match, sortSortLike, sortKindLike, sortTermLike, sortTypeLike, typeInfer, typeInfer' ) where import Control.Monad.Reader import Control.Monad.Writer import qualified Data.Map as Map import Doc.DocLi...
m-alvarez/jhc
src/E/TypeCheck.hs
mit
23,771
2
23
6,767
7,046
3,487
3,559
-1
-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="ar-SA"> <title>GraalVM JavaScript</title> <maps> <homeID>graaljs</homeID> <mapref locat...
thc202/zap-extensions
addOns/graaljs/src/main/javahelp/help_ar_SA/helpset_ar_SA.hs
apache-2.0
967
77
66
156
407
206
201
-1
-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 Maybes import Panic import Control.Monad import Prelude h...
green-haskell/ghc
compiler/cmm/CmmContFlowOpt.hs
bsd-3-clause
15,662
0
18
4,436
2,495
1,341
1,154
160
8
module MoveDef.Md2 where toplevel :: Integer -> Integer toplevel x = c * x * b where b = 3 c,d :: Integer c = 7 d = 9 -- Pattern bind tup :: (Int, Int) h :: Int t :: Int tup@(h,t) = head $ zip [1..10] [3..ff] where ff :: Int ff = 15 data D = A | B String | C ff :: Int -> Int ff y = y + zz where ...
RefactoringTools/HaRe
test/testdata/MoveDef/Md2.hs
bsd-3-clause
540
0
9
177
258
142
116
27
1
{-# LANGUAGE DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Hooks.ToggleHook -- Copyright : Ben Boeckel <mathstuf@gmail.com> -- License : BSD-style (see LICENSE) -- -- Maintainer : Ben Boeckel <mathstuf@gmail.com> -- Stability...
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Hooks/ToggleHook.hs
bsd-2-clause
6,014
0
12
1,605
1,122
629
493
63
2
-- Copyright (c) 2014-present, Facebook, Inc. -- All rights reserved. -- -- This source code is distributed under the terms of a BSD license, -- found in the LICENSE file. An additional grant of patent rights can -- be found in the PATENTS file. {-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE Existe...
hiteshsuthar/Haxl
Haxl/Core/Types.hs
bsd-3-clause
13,158
0
17
2,680
2,504
1,389
1,115
204
1
module Char( isAscii, isLatin1, isControl, isPrint, isSpace, isUpper, isLower, isAlpha, isDigit, isOctDigit, isHexDigit, isAlphaNum, digitToInt, intToDigit, toUpper, toLower, ord, chr, readLitChar, showLitChar, lexLitChar, Char,String ) where import Prelude import PreludeBuiltin import Nu...
forste/haReFork
tools/base/tests/HaskellLibraries/Char.hs
bsd-3-clause
5,379
6
18
2,090
2,174
1,156
1,018
114
18
{-# LANGUAGE RankNTypes, PartialTypeSignatures, NamedWildCards #-} module NestedNamedExtraConstraintsWildcard where foo :: Bool -> (Eq a, _a) => a foo = undefined
urbanslug/ghc
testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.hs
bsd-3-clause
164
0
7
22
32
19
13
4
1
{-# LANGUAGE ForeignFunctionInterface #-} module Main where import Foreign import GHC.ForeignPtr {-# INCLUDE "fptrfail01.h" #-} foreign import ccall "&f" fptr :: FunPtr (Ptr Int -> IO ()) main :: IO () main = do with (33 :: Int) test where test p = do f <- newForeignPtr_ p a...
urbanslug/ghc
testsuite/tests/ffi/should_run/fptrfail01.hs
bsd-3-clause
421
0
11
113
115
58
57
12
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ScopedTypeVariables #-} module Data.Neural.Recurrent.Dropout where -- import Control.Monad -- import Data.Bifunctor -- import GHC.TypeLits import Control.Lens import Data.Neural.Recurrent import Data.Neural.Types import Linear com...
mstksg/neural
src/Data/Neural/Recurrent/Dropout.hs
mit
1,189
0
13
385
400
218
182
36
3
{-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE EmptyDataDecls #-} module SumTypeTest (specs) where impor...
gbwey/persistentold
persistent-test/SumTypeTest.hs
mit
1,516
0
14
339
323
165
158
34
1
{-# LANGUAGE OverloadedStrings #-} import Control.Monad (mapM_) import qualified Crypto.Hash import Data.ByteString (ByteString) import qualified Data.List as List import qualified Data.Maybe as Maybe import qualified Data.Text as Text import Data.Text.Encoding (decodeUtf8, encodeUtf8) import qualified Data.Text.IO as...
SamirTalwar/advent-of-code
2016/AOC_05_2.hs
mit
1,056
0
18
185
401
224
177
27
1
{-# LANGUAGE ScopedTypeVariables #-} module PureScript.Ide.Command where import Control.Monad import Data.Aeson import Data.Text (Text) import Data.Maybe import PureScript.Ide.Filter import PureScript.Ide.Matcher import PureScript.Ide.Types import ...
kRITZCREEK/psc-ide
src/PureScript/Ide/Command.hs
mit
3,267
0
19
1,112
842
435
407
89
0
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.MediaStreamEvent (js_getStream, getStream, MediaStreamEvent, castToMediaStreamEvent, gTypeMediaStreamEvent) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), M...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/MediaStreamEvent.hs
mit
1,399
6
11
166
377
238
139
24
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-| Module : Network.WebexTeams.Pipes Copyright : (c) Naoto Shimazaki 2018 License : MIT (see the file LICENSE) Maintainer : https://github.com/nshimaza Stability : experimental This module provides Pipes wrapper for Cisco Webex Teams ...
nshimaza/cisco-spark-api
webex-teams-pipes/src/Network/WebexTeams/Pipes.hs
mit
2,751
0
12
640
394
207
187
32
1
{-# LANGUAGE GeneralizedNewtypeDeriving, OverloadedStrings #-} module Web.Haskbot.Types where import Data.Aeson (ToJSON, Value (..), (.=), object, toJSON) import Data.Monoid ((<>)) import Network.URI (URI) import Web.Scotty.Trans (Parsable) import qualified Data.Text as ST class Formatted a where formatted :: a -...
bendyworks/haskbot
src/Web/Haskbot/Types.hs
mit
4,604
0
16
1,169
1,113
623
490
121
0
-- by Yue Wang 12.12.2014 coded for ch04 DMA -- proj01 find the number of r-permutations and of r-combinations rPermutations :: (Num a, Enum a) => a -> a -> a rPermutations n r = product (reverse [n-r+1..n]) rCombinations :: (Fractional a, Eq a) => a -> a -> a -- this output float number, need to fix later on rCom...
Mooophy/DMA
ch04/proj01.hs
mit
415
0
11
91
168
88
80
5
2
module ImageHandler where import Codec.Picture import Codec.Picture.Types import Data.Either import Data.Matrix import qualified Data.Vector as V getImageMatrix :: FilePath -> IO ( Matrix Int ) getImageMatrix path = do img <- readImage path case img f (Left err) -> error err (Right x) -> ima...
omarabdeldayem/Katze
ImageHandler.hs
mit
710
18
8
163
266
139
127
-1
-1
-- Currying and Partial Application multThree :: (Num a) => a -> a -> a -> a multThree x y z = x * y * z -- By applying less arguments than defined -- you are creating a partially applied function. multTwoWithNine = multThree 9 multWithEighteen = multTwoWithNine 2 -- Infix function can be partially applied by creat...
afronski/playground-fp
books/learn-you-a-haskell-for-great-good/higher-order-functions/higher-order-functions.hs
mit
2,649
1
12
681
1,321
733
588
58
2
module LMO.Common.Error (warn, Error, ErrorT) where import Debug.Trace import Control.Monad.Error warn = trace
firefrorefiddle/liedermappe-online
src/LMO/Common/Error.hs
gpl-2.0
114
0
4
16
34
22
12
4
1
import System.Environment import System.Directory import System.IO import Data.List dispatch :: [(String, [String] -> IO())] dispatch = [ ("add", add) , ("view", view) , ("remove", remove) ] main :: IO () main = do (command:args) <- getArgs let (Just action) = lookup command dispa...
friedbrice/Haskell
ch09/todo.hs
gpl-2.0
1,110
0
15
243
424
211
213
34
1
module P36StatsSpec (main,spec) where import Test.Hspec import Test.Hspec.QuickCheck import P36Stats hiding (main) import Data.Vector (fromList) import qualified Statistics.Sample as S stdDevSample = S.stdDev . fromList stdDevPop = sqrt . S.variance . fromList statMean = S.mean . fromList main :: IO () main ...
ciderpunx/57-exercises-for-programmers
test/P36StatsSpec.hs
gpl-3.0
1,014
0
17
209
277
142
135
24
1
{- ----------------------------------------------------------------------------- ZDCPU16 is a DCPU-16 emulator. Copyright (C) 2012 Luis Cabellos 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, eithe...
zhensydow/zdcpu16
src/zddcpu16_con_main.hs
gpl-3.0
2,458
0
14
383
416
215
201
38
4
-- Hsort, a haskell implementation of GNU sort. module Main where import System.Environment import System.Console.Terminfo.Base import Data.List main :: IO () main = do term <- setupTermFromEnv args <- getArgs let options = processArgs args defaultSort runTermOutput term (termText ("Options: "++(show options)+...
PuZZleDucK/Hls
Hsort.hs
gpl-3.0
8,067
0
14
2,127
988
557
431
118
3
module Main where import Control.Monad import Control.Monad.IO.Class import qualified Data.Text as T import qualified Data.Text.IO as TIO import Data.Time.Clock (UTCTime(..), getCurrentTime) import Data.Time.Calendar (addDays) import Options.Applicative import System.Environment.XDG.BaseDir (getUserDataDir, getUserDa...
divarvel/hammertime
src/Hammertime/Main.hs
gpl-3.0
1,752
0
11
271
643
339
304
37
1
{- Facultad de Ciencias UNAM Lenguajes de programación 2016-2 Profesor: Noé Salomón Hernández Sánchez Ayudante: Albert M. Orozco Camacho Ayudante lab: C. Moisés Vázquez Reyes -} {- Números Naturales -} data N = Zero | Suc N deriving Show --Suma de naturales. suma::N->N->N suma Zero n = n suma (S...
ArlequinWild/Lenguajes-de-programaci-n
Practica0.hs
gpl-3.0
5,334
0
13
1,325
1,936
1,039
897
82
8
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-partners/gen/Network/Google/Resource/Partners/Users/CreateCompanyRelation.hs
mpl-2.0
10,553
0
25
2,503
1,360
782
578
212
1
module Main (main) where import qualified BoTox as B main = B.runBoTox
gordon-quad/botox
app/Main.hs
agpl-3.0
73
0
5
14
22
15
7
3
1
{-# LANGUAGE FlexibleInstances, DeriveGeneric, DeriveAnyClass #-} module Sprockell.HardwareTypes where import GHC.Generics import Control.DeepSeq import qualified Data.Sequence as Sequence import qualified Data.Array as Array import qualified Data.Foldable as Foldable -- ===========================================...
wouwouwou/2017_module_8
src/haskell/PP-project-2017/lib/sprockell-2017/src/Sprockell/HardwareTypes.hs
apache-2.0
14,342
0
11
5,906
1,582
961
621
177
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE ParallelListComp #-} {-# LANGUAGE RebindableSyntax #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE NoImplicitPrelude #-} -- | Convenience functions for specifying colors by name, hexadecimal value, -- integer value between 0 and 255, and...
google/codeworld
codeworld-base/src/Extras/Colors.hs
apache-2.0
11,853
0
11
1,582
3,256
1,770
1,486
200
16
module S3E6 where import FPPrac.Trees data BinTree = BinLeaf | BinNode Int BinTree BinTree ppbin :: BinTree -> RoseTree ppbin BinLeaf = RoseNode "" [] ppbin (BinNode n t1 t2) = RoseNode (show n) [ppbin t1, ppbin t2] insertTree :: Int -> BinTree -> BinTree insertTree i BinLeaf = BinNode i BinLeaf BinLeaf...
wouwouwou/module_8
src/main/haskell/series3/exercise6.hs
apache-2.0
826
0
12
188
401
208
193
20
1
import Data.List import Numeric main = do print $ (sort (permutations "0123456789")) !! 999999
ulikoehler/ProjectEuler
Euler24.hs
apache-2.0
99
0
12
18
37
19
18
4
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} module Web.Endpoints.Tasks (routeTasks) where import Control.Monad ...
flatrapp/core
app/Web/Endpoints/Tasks.hs
apache-2.0
8,487
0
17
2,384
2,129
1,095
1,034
158
4
module Twiddle where main = let foo@(~(x,y)) = (1,2) in print foo
metaborg/jsglr
org.spoofax.jsglr/tests-offside/terms/doaitse/twiddle.hs
apache-2.0
74
0
12
20
43
24
19
3
1
module NLP.Adict.Brute ( bruteSearch ) where import Data.Maybe (mapMaybe) import NLP.Adict.Core import NLP.Adict.Dist -- | Find all words within a list with restricted generalized edit distance -- from x lower or equall to k. bruteSearch :: Cost a -> Double -> Word a -> [(Word a, b)] -> [(Word a, b, Doub...
kawu/adict
src/NLP/Adict/Brute.hs
bsd-2-clause
507
0
11
138
166
91
75
13
1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Arbitrary.Suite where import Data.Suite --import Data.Test hiding (fromBuf) import Arbitrary.TestModule import Test.QuickCheck import Prelude hiding (FilePath) import qualified Data.Map as M import qualified Data.Set as S import Control.Lens import Data.Integrated.TestModul...
jfeltz/tasty-integrate
tests/Arbitrary/Suite.hs
bsd-2-clause
674
0
12
119
194
109
85
17
1
#!/usr/bin/env stack {- stack --resolver lts-7.1 --install-ghc runghc -} import Data.List (sort) data Var = Var Int Int Int data Lit = PLit Var | NLit Var type Clause = [Lit] showVar :: Var -> String showVar (Var a b c) = show a ++ show b ++ show c showLit :: Lit -> String showLit (PLit v) = sh...
tomasmcz/discrete-opt
misc/sudoku.hs
bsd-3-clause
4,817
6
13
1,191
2,188
1,160
1,028
99
5
{-# LANGUAGE DataKinds, TemplateHaskell #-} module HLearn.Optimization.NewtonRaphson where import Control.DeepSeq import Control.Monad import Control.Monad.Random import Control.Monad.ST import Data.List import Data.List.Extras import Data.Typeable import Debug.Trace import qualified Data.Vector as V import quali...
ehlemur/HLearn
src/HLearn/Optimization/NewtonRaphson.hs
bsd-3-clause
5,678
5
19
1,491
1,744
928
816
-1
-1
{-# LANGUAGE OverloadedStrings #-} module HipBot.Naggy.Resources ( remindersResource , reminderResource ) where import Control.Applicative import Control.Lens import Control.Monad.IO.Class import Control.Monad.Trans import qualified Data.Aeson as A import qualified Data.Aeson.Encode as A import qualified Data.A...
purefn/naggy
src/HipBot/Naggy/Resources.hs
bsd-3-clause
3,136
0
24
612
961
526
435
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Aws.DynamoDB.Json.TypeHelper where import Debug.Trace import Prelude hiding (lookup, keys) import Data.Maybe import Control.Monad import Control.Applicative import Data.String --import Test.QuickCheck.Arbit...
ywata/dynamodb
Aws/DynamoDB/Json/TypeHelper.hs
bsd-3-clause
4,270
0
11
1,183
1,338
709
629
85
2
module Hive.Tile ( Tile(..) , Cell , cellOwner ) where import Mitchell.Prelude import Hive.Bug import Hive.Player import Data.Aeson -- | A tile is a Bug that belongs to a Player. data Tile = Tile { tilePlayer :: Player , tileBug :: Bug } deriving (Eq, Ord, Show) instance ToJSON Tile where ...
mitchellwrosen/hive
hive/src/Hive/Tile.hs
bsd-3-clause
969
0
11
236
249
141
108
-1
-1
module PrintAudio where import System.FilePath import Data.Audio import Codec.Wav import Data.Int import Types.Common import Data.Array.IArray printAudio fPath = do file <- importFile fPath :: IO (Either String (AudioFormat)) case file of Right f -> printAsMatlab $ wavList f Left e -> error e printAsMa...
aedanlombardo/HaskellPS
DSP-PBE/Tests/PrintAudio.hs
bsd-3-clause
597
0
14
109
276
145
131
19
2
{-# OPTIONS_GHC -Wall #-} module CycleRecentWS where import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck import XMonad.Actions.CycleRecentWS (unView) import XMonad.StackSet (view, greedyView, mapLayout) import Instances import Utils (tags) spec :: Spec spec = do prop "prop_unView" prop_unView ...
xmonad/xmonad-contrib
tests/CycleRecentWS.hs
bsd-3-clause
585
0
14
110
201
111
90
18
1
-- | -- Module : Data.SExpr -- Copyright : Robert Atkey 2010 -- License : BSD3 -- -- Maintainer : bob.atkey@gmail.com -- Stability : experimental -- Portability : unknown -- -- Simple representation of S-expressions, and pretty printing -- thereof. Mainly used for generation of Emacs Lisp code. module Da...
bobatkey/Forvie
src/Data/SExpr.hs
bsd-3-clause
1,434
0
12
383
542
282
260
32
1
-- -- Copyright (c) 2009-2011, ERICSSON AB -- 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...
emwap/feldspar-compiler
lib/Feldspar/Compiler/Compiler.hs
bsd-3-clause
6,012
0
11
1,325
1,064
620
444
91
4
{- | SPDY is a protocol intended to speed up the transport of web content. It allows multiplexing several streams on a single connection between endpoints, with stream priorities and a notion of flow control. See <http://dev.chromium.org/spdy> for all the details. This library supports SPDY version 3, described in th...
kcharter/spdy-base
src/Network/SPDY.hs
bsd-3-clause
1,246
0
5
182
117
80
37
17
1
-- | -- Module: Language.KURE.RewriteMonad -- Copyright: (c) 2006-2008 Andy Gill -- License: BSD3 -- -- Maintainer: Andy Gill <andygill@ku.edu> -- Stability: unstable -- Portability: ghc -- -- This is the definition of the monad inside KURE. module Language.KURE.RewriteMonad ( RewriteM -- abstract ...
andygill/kure
Language/KURE/RewriteMonad.hs
bsd-3-clause
6,363
10
21
1,991
1,695
868
827
105
4
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.C.Error -- Copyright : (c) The FFI task force 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : ...
alexander-at-github/eta
libraries/base/Foreign/C/Error.hs
bsd-3-clause
22,828
0
14
6,190
4,845
2,666
2,179
384
4
module P10 where import P9 (pack) encode :: (Eq a) => [a] -> [(Int, a)] encode xs = let grouped = pack xs in map (\x -> ((length x), head x)) grouped
bradb/99problems
src/p10.hs
bsd-3-clause
156
0
12
38
92
51
41
6
1
module Stack.Types.CompilerBuild (CompilerBuild(..) ,compilerBuildName ,compilerBuildSuffix ,parseCompilerBuild ) where import Control.Monad.IO.Unlift import Data.Aeson.Extended (FromJSON, parseJSON, withText) import Data.Text as T data CompilerBuild = CompilerBuildStandard...
martin-kolinek/stack
src/Stack/Types/CompilerBuild.hs
bsd-3-clause
1,326
0
12
233
248
138
110
27
1
{-# OPTIONS_GHC -F -pgmF htfpp #-} {-# LANGUAGE OverloadedStrings, RankNTypes, TemplateHaskell #-} import Control.Exception (throw) import System.Environment (getArgs) import System.FilePath import Control.Monad (liftM2) import Data.Maybe (isJust, fromJust) import qualified Data.ByteString as BS import Data.Text (Te...
skogsbaer/roundtrip-xml
tests/Tests.hs
bsd-3-clause
6,882
4
20
1,861
2,215
1,108
1,107
163
4
import Data.List divisors' n = (1:) $ nub $ concat [ [x, div n x] | x <- [2..limit], rem n x == 0 ] where limit = (floor.sqrt.fromIntegral) n
trxeste/wrk
haskell/divisors.hs
bsd-3-clause
146
0
10
34
87
45
42
3
1
module MOO.Network.TCP ( HostName , PortNumber , createTCPListener ) where import Control.Applicative ((<$>)) import Control.Concurrent (forkIO, killThread) import Control.Concurrent.STM (STM, TMVar, newEmptyTMVarIO, atomically, putTMVar, readTMVar) import Control.Exception (S...
verement/etamoo
src/MOO/Network/TCP.hs
bsd-3-clause
4,361
0
18
1,224
1,183
637
546
94
1
{-# LANGUAGE NoImplicitPrelude #-} module Protocol.ROC.PointTypes.PointType56 where import Data.Binary.Get (getByteString, getWord8, getWord16le, Get) import Data.ByteString (ByteString) import Data.Int (Int16) import Dat...
plow-technologies/roc-translator
src/Protocol/ROC/PointTypes/PointType56.hs
bsd-3-clause
5,018
0
9
2,351
531
299
232
108
1
-------------------------------------------------------------------------------- -- | -- Module : Data.BitVector.UtilLE -- Copyright : (c) 2010 Philip Weaver -- License : BSD3 -- -- Maintainer : philip.weaver@gmail.com -- Stability : -- Portability : -- -- (Description) -------------------------------...
pheaver/BitVector
Data/BitVector/UtilLE.hs
bsd-3-clause
1,382
0
15
323
316
178
138
22
4
-- | A helper module to lay out elements in columns or rows module Graphics.Diagrams.Positioned.Layout ( pboxColumnLayout , pboxRowLayout ) where -- External imports import Data.List (mapAccumL) -- Internal imports import Graphics.Diagrams.Types import Graphics.Diagrams.Positioned.PositionedDiagram -...
ivanperez-keera/SoOSiM-ui
src/Graphics/Diagrams/Positioned/Layout.hs
bsd-3-clause
2,088
0
12
620
495
279
216
37
3
module Hans.Address.Mac ( Mac(..) , showsMac , macMask ) where import Hans.Address import Hans.Utils (showPaddedHex) import Data.Serialize (Serialize(..)) import Data.Serialize.Get (getWord16be,getWord32be) import Data.Serialize.Put (putByteString) import Data.Bits (Bits(shiftR,testBit,complement)) import ...
Tener/HaNS
src/Hans/Address/Mac.hs
bsd-3-clause
1,947
0
13
558
827
452
375
57
1
main = do {putStrLn "Child Process"; putStrLn "Hello2";}
ankeshs/numerikell
interp/tmp/proc.hs
bsd-3-clause
56
0
7
7
22
11
11
1
1
module Main (main) where import qualified Types.BotTypes as BT import Control.Monad (forever) import qualified Data.MarkovChain as MC import Paths_Dikunt import System.Environment (getArgs) import System.IO (stdout, stdin, hSetBuffering, BufferMode(..)) import System.Random (newStdGen, StdGen) import Text.Regex.PCRE (...
bus000/Dikunt
plugins/Trump/Main.hs
bsd-3-clause
1,780
0
14
365
588
320
268
43
1
-- Propositional Logic. Atomic propositions are simply -- propositional variables. -- Signature module Prop ( eval , atoms , apply , distrib , simplify , simplify1 , onallvaluations , dual , truthtable , unsatisfiable , satisfiable , trivial , tautology , occurrences , subsume , nnf...
etu-fkti5301-bgu/alt-exam_automated_theorem_proving
src/Prop.hs
bsd-3-clause
9,142
0
19
2,849
3,468
1,990
1,478
-1
-1
{-- snippet whichFruit --} data Fruit = Apple | Orange apple = "apple" orange = "orange" whichFruit :: String -> Fruit whichFruit f = case f of apple -> Apple orange -> Orange {-- /snippet whichFruit --} {-- snippet equational --} equational apple = Apple equational orang...
binesiyu/ifl
examples/ch03/BogusPattern.hs
mit
547
0
7
190
100
55
45
12
2
{-# LANGUAGE TypeSynonymInstances, OverloadedStrings #-} {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Yesod.Core.Json ( -- * Convert from a JSON value defaultLayoutJson , jsonToRepJson , returnJson , returnJsonEncoding , provideJson -- * Convert to a JSON value ...
s9gf4ult/yesod
yesod-core/Yesod/Core/Json.hs
mit
6,644
0
13
1,482
1,352
761
591
114
2
{-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -Wall #-} {- | Module : Core Description : Abstract syntax and pretty printer for Core. Copyright : (c) 2014—2015 The F2J Project Developers (given in AUTHORS.txt) License : BSD3 Maintainer : Zhiyuan Shi <zhiyuan.shi@gmail.com>, Haoyuan Zhang <zhangha...
zhiyuanshi/fcore
backend/Core.hs
bsd-2-clause
14,693
1
21
4,134
6,737
3,447
3,290
285
6
{-| Module : Data.STM.PriorityQueue.Internal.HeapPQ Description : STM-based Concurrent Priority Queue data structure class implementation Copyright : (c) Alex Semin, 2015 License : BSD3 Maintainer : alllex.semin@gmail.com Stability : experimental Portability : portable An implementation of 'Data.STM.Prio...
Alllex/stm-data-collection
src/Data/STM/PriorityQueue/Internal/HeapPQ.hs
bsd-3-clause
2,318
0
12
755
903
454
449
60
4
{-# LANGUAGE DeriveDataTypeable, RecordWildCards #-} {-# LANGUAGE RecursiveDo #-} module Graphics.UI.Threepenny.Core ( -- * Synopsis -- | Core functionality of the Threepenny GUI library. -- * Server -- $server Config(..), defaultConfig, startGUI, loadFile, loadDirectory, -- * UI m...
yuvallanger/threepenny-gui
src/Graphics/UI/Threepenny/Core.hs
bsd-3-clause
18,363
0
16
3,865
3,654
1,991
1,663
-1
-1
module Main where import System.IO import Perceptron import ReadData main = do { num_vecs <- hGetLine stdin ; if debug then do { putStr "num_vecs = "; putStrLn (show num_vecs) } else return () ; num_feats <- hGetLine stdin ; if debug then do { putStr "num_feats = "; putStrLn (show num_feats) } els...
tm507211/CoqPerceptron
Benchmarks/hsopt/RunValidator.hs
bsd-3-clause
1,041
1
15
395
286
139
147
22
4
{-#LANGUAGE MultiParamTypeClasses #-} {-#LANGUAGE FlexibleInstances #-} {-#LANGUAGE RankNTypes #-} module Data.Expandable ( ExpandableM (..) , expand ) where import qualified Data.Aeson as JSON import Data.Text (Text) import qualified Data.Text as Text import Data.Vector (Vector) import qualified Data.Vector as Vecto...
tdammers/templar
src/Data/Expandable.hs
bsd-3-clause
1,458
0
12
281
579
305
274
35
1
{- | Module : $Header$ Description : Common Logic specific OMDoc constants Copyright : (c) Iulia Ignatov, DFKI Bremen 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : i.ignatov@jacobs-university.de Stability : experimental Portability : portable Library of Common Logic specific OMDoc ...
keithodulaigh/Hets
CommonLogic/OMDoc.hs
gpl-2.0
1,380
0
7
189
223
131
92
27
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-rds/gen/Network/AWS/RDS/DescribeDBInstances.hs
mpl-2.0
6,281
0
12
1,340
803
480
323
83
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="it-IT"> <title>Server-Sent Events | ZAP Extension</title> <maps> <homeID>top</homeID> ...
0xkasun/security-tools
src/org/zaproxy/zap/extension/sse/resources/help_it_IT/helpset_it_IT.hs
apache-2.0
981
85
53
160
402
212
190
-1
-1
{- thread scheduling - - Copyright 2012, 2013 Joey Hess <joey@kitenet.net> - Copyright 2011 Bas van Dijk & Roel van Dijk - - License: BSD-2-clause -} {-# LANGUAGE CPP #-} module Utility.ThreadScheduler where import Control.Monad import Control.Concurrent #ifndef mingw32_HOST_OS import Control.Monad.IfElse impo...
avengerpenguin/propellor
src/Utility/ThreadScheduler.hs
bsd-2-clause
1,891
2
12
320
305
165
140
33
1
{-# LANGUAGE RecordWildCards, NamedFieldPuns #-} -- | Utilities to help format error messages for the various CLI commands. -- module Distribution.Client.CmdErrorMessages ( module Distribution.Client.CmdErrorMessages, module Distribution.Client.TargetSelector, ) where import Distribution.Client.ProjectOrche...
themoritz/cabal
cabal-install/Distribution/Client/CmdErrorMessages.hs
bsd-3-clause
15,419
0
22
3,365
2,492
1,297
1,195
224
9
-------------------------------------------------------------------- -- | -- Module : MediaWiki.API.Action.ExpandTemplates.Import -- Description : Serializing ExpandTemplates requests. -- Copyright : (c) Sigbjorn Finne, 2008 -- License : BSD3 -- -- Maintainer: Sigbjorn Finne <sof@forkIO.com> -- Stability : p...
neobrain/neobot
mediawiki/MediaWiki/API/Action/ExpandTemplates/Import.hs
bsd-3-clause
1,157
0
11
171
205
116
89
17
1
module ListCompIn3 where --A definition can be removed if it is not used by other declarations. --Where a definition is removed, it's type signature should also be removed. --In this Example: remove the defintion 'xs'. The bar will also be removed. main = sum [ 4 | let xs=[1,3]]
kmate/HaRe
old/testing/removeDef/ListCompIn3.hs
bsd-3-clause
307
0
11
76
34
21
13
2
1
import Test.Cabal.Prelude import Data.List -- Test that setup computes different IPIDs when dependencies change main = setupAndCabalTest $ do withPackageDb $ do withDirectory "P1" $ setup "configure" ["--disable-deterministic"] withDirectory "P2" $ setup "configure" ["--disable-deterministic"] ...
mydaum/cabal
cabal-testsuite/PackageTests/UniqueIPID/setup.test.hs
bsd-3-clause
913
0
21
231
254
119
135
15
1
-- | Parser takes input file and returns AST. module Orchid.Parser ( parseInputFile , parseInput ) where import Control.Exception (throwIO) import Data.Function ((&)) import Data.Maybe (catMaybes, fromMaybe, isJust) import Data.Text (Text...
gromakovsky/Orchid
src/Orchid/Parser.hs
mit
7,869
0
16
2,084
2,342
1,243
1,099
193
2
module OidTable where import Data.Word import qualified Data.ByteString.Lazy as LB import Graphics.PDF import Control.Monad hiding (forM_) import Data.Foldable (forM_) import Data.List.Split import Text.Printf import Control.Arrow ((***)) import Codec.Compression.Zlib import OidCode import KnownCodes import Utils imp...
colinba/tip-toi-reveng
src/OidTable.hs
mit
5,048
0
33
1,590
1,386
730
656
111
2
{-# LANGUAGE CPP #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE RecordWildCards #-} module Hpack ( -- | /__NOTE:__/ This module is exposed to allow integration of Hpack into -- other tools. It is not meant for general use by end users. The following -- caveats apply: -- -- * The API is undocumented, consult the sourc...
sol/hpack
src/Hpack.hs
mit
8,349
0
18
1,674
2,126
1,115
1,011
179
7
{-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} module Control.Effect.Trans where import Control.Effect import Control.Effect.Trans.TF class Trans t where lift :: (Effect (t m), Effect m) => m p a -> t m '(Fst (Unit (t m)),p) a
josefs/effect-monad-trans
Control/Effect/Trans.hs
mit
238
0
16
42
95
52
43
7
0
{-# LANGUAGE LambdaCase #-} module Oden.Infer.Environment ( TypeBinding(..), TypingEnvironment, fromPackage, fromPackages ) where import Oden.Core.Definition import Oden.Core.Expr import Oden.Core.Package import Oden.Core.ProtocolImplementation import Oden.Core...
oden-lang/oden
src/Oden/Infer/Environment.hs
mit
2,098
0
13
649
516
277
239
49
5
-- IOMonad.hs module IO where -- import Data.Map as M -- import System.IO as S -- flatMap = [1,7,11] (\x -> [x,x+1]) addM000 mx my = mx >>= (\x -> my >>= (\y -> return (x + y))) addM001 mx my = do x <- mx y <- my return (x+y) people = ["Alice","Bob","Evie"] items = ["car","puppy"] missing = do perso...
HaskellForCats/HaskellForCats
iOMonad.hs
mit
390
4
13
101
154
83
71
13
1
import XMonad import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Util.Run(spawnPipe) import XMonad.Util.EZConfig(additionalKeys) import XMonad.Hooks.SetWMName import System.IO main = xmonad =<< xmobar wmConfig wmConfig = def { modMask = mod4Mask ,focusFollowsMouse = False }
epickrram/dotfiles
xmonad.hs
mit
320
0
6
50
80
49
31
10
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.BatteryManager (js_getCharging, getCharging, js_getChargingTime, getChargingTime, js_getDischargingTime, getDischargingTime, js_getLevel, getLevel, chargingChange, chargingTimeChange, discha...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/BatteryManager.hs
mit
3,776
24
9
406
695
405
290
49
1
import Test.HUnit (Assertion, (@=?), runTestTT, Test(..)) import Control.Monad (void) import SpaceAge (Planet(..), ageOn) testCase :: String -> Assertion -> Test testCase label assertion = TestLabel label (TestCase assertion) main :: IO () main = void $ runTestTT $ TestList [ TestList ageOnTests ] roundsTo ::...
tfausak/exercism-solutions
haskell/space-age/space-age_test.hs
mit
1,600
2
11
366
543
277
266
44
1
-- | -- Module : System.Wlog.Terminal -- Copyright : (c) Serokell, 2016 -- License : GPL-3 (see the file LICENSE) -- Maintainer : Serokell <hi@serokell.io> -- Stability : experimental -- Portability : POSIX, GHC -- -- Logging functionality. This module is wrapper over -- <http://hackage.haskell.org/packag...
serokell/log-warper
src/System/Wlog/Terminal.hs
mit
3,020
0
15
695
468
269
199
42
4
-- C->Haskell Compiler: Marshalling library -- -- Copyright (c) [1999...2005] Manuel M T Chakravarty -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- 1. Redistributions of source code must retain the above ...
yav/alsa-haskell
Sound/Alsa/C2HS.hs
mit
6,941
10
10
1,436
1,155
663
492
61
2
module Robots3.Config ( Config -- abstract , c_hull, cluster_of , showing_hull, show_hull , breit , make, make_with_hull, geschichte , with_targets , move, remove, addZug , look, robots, inhalt , positions, goals , valid , bounds, area ) where import Robots3.Data import Robots3.Exact import Autolib.FiniteMap impor...
marcellussiegburg/autotool
collection/src/Robots3/Config.hs
gpl-2.0
4,352
25
17
1,225
1,667
873
794
-1
-1
{-# LANGUAGE DoAndIfThenElse #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TupleSections #-} module FineHeapUnsafe (TheHeap, FineHeapUnsafe, testIt, heapPopWithGap, heapUngap) where import Control.Applicative import Control.Concurrent.STM import Control.Mo...
stupaq/stm-heaps
src/FineHeapUnsafe.hs
gpl-3.0
5,068
0
25
1,334
1,613
833
780
112
8
module Lamdu.GUI.Expr.HoleEdit ( make ) where import qualified Control.Lens as Lens import Hyper import qualified GUI.Momentu as M import qualified GUI.Momentu.EventMap as E import qualified GUI.Momentu.I18N as MomentuTexts import GUI.Momentu.ModKey (noMods) import qualified GUI.Momentu.Mod...
Peaker/lamdu
src/Lamdu/GUI/Expr/HoleEdit.hs
gpl-3.0
3,716
0
18
991
931
515
416
-1
-1
import XMonad import XMonad.Config.Azerty import Graphics.X11.ExtraTypes.XF86 import qualified Data.Map as M import XMonad.Hooks.DynamicLog -- import Data.Ratio import XMonad.Layout.PerWorkspace import XMonad.Layout.Spacing import XMonad.Layout.Grid import XMonad.Layout.IM main :: IO () main = xmonad =<< ...
neliel/config
xmonad/xmonad_bak.hs
gpl-3.0
2,495
0
9
805
542
311
231
43
1
{-# LANGUAGE DeriveGeneric #-} module Estuary.Types.ResourceType where import GHC.Generics import Data.Aeson data ResourceType = Audio | Image | Video deriving (Show, Eq, Generic) instance ToJSON ResourceType where toEncoding = genericToEncoding defaultOptions instance FromJSON ResourceType
d0kt0r0/estuary
common/src/Estuary/Types/ResourceType.hs
gpl-3.0
298
0
6
40
69
39
30
8
0
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} module Language.LCC.Simplifier.Inline where import Control.Lens import Control.Monad (liftM, liftM3) import Control.Monad.Reader (MonadReader, runReaderT, asks, local) import Data.List (find) import Data.Maybe import Langu...
xcv-/LCC
lib/Language/LCC/Simplifier/Inline.hs
gpl-3.0
3,729
0
16
1,051
1,342
687
655
-1
-1