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 BangPatterns #-} module RGB565 (toRGB565, toRGB565Hex, to4Hex, toHex) where import Data.Bits (shiftL, shiftR, (.|.)) import Data.Word (Word8()) toRGB565Hex :: (Word8, Word8, Word8) -> String toRGB565Hex rgb = to4Hex (toRGB565 rgb) toRGB565 :: (Word8, Word8, Word8) -> Int toRGB565 (r, g, b) = r' .|. g' ....
cirquit/Personal-Repository
Haskell/Playground/UTFTConverter/src/RGB565.hs
mit
1,139
0
13
353
534
287
247
44
2
{-# LANGUAGE TemplateHaskell , DeriveDataTypeable #-} module Types where import Control.Applicative import Control.Lens import Data.Acid import Data.Aeson import Data.Aeson.TH import Data.SafeCopy import Data.Typeable import qualified Data.IntMap as I import qualified Data.Text.Lazy as T tupleMap :: (a -> b) -> (a,a...
edwardwas/rockPaperScissors
server/src/Types.hs
mit
1,874
0
10
322
649
344
305
55
1
-- | Like Throughput, but send every ping from a different process -- (i.e., require a lightweight connection per ping) {-# LANGUAGE BangPatterns #-} import Hypervisor.XenStore import Hypervisor.DomainInfo import Hypervisor.Debug import Data.List import Control.Monad import Control.Applicative import Control.Concurrent...
hackern/network-transport-ivc
benchmarks/Spawns/Main.hs
mit
1,681
0
14
372
554
269
285
48
2
printHello = print "hello world" reverseList [] = [] reverseList (x:xs) = reverseList xs ++ [x]
ddccffvv/fun-with-haskell
first_steps.hs
mit
97
0
7
17
46
23
23
3
1
{-# LANGUAGE FlexibleInstances #-} module Cache.InMemory where import qualified Data.Map as M import Control.Applicative import Control.Monad.State.Class import Cache import Types data InMemoryCache instance Cache (FactorizerM InMemoryCache ui) where cacheWrite k v = FM $ modify $ M.insert (show k) (show v) ca...
mg50avant/factorizer
src/Cache/InMemory.hs
mit
356
0
9
59
110
61
49
-1
-1
{-| Module: Flaw.Oil.ClientRepo Description: Oil client repo. License: MIT -} {-# LANGUAGE PatternSynonyms, ViewPatterns #-} {-# OPTIONS_GHC -fno-warn-missing-pattern-synonym-signatures #-} module Flaw.Oil.ClientRepo ( ClientRepo() , openClientRepo , clientRepoRevision , clientRepoGetRevisionValue , clientR...
quyse/flaw
flaw-oil/Flaw/Oil/ClientRepo.hs
mit
21,593
9
29
4,514
4,220
2,144
2,076
434
5
module Simulator where import Types import qualified Data.Heap as H import qualified Data.List.NonEmpty as NE import Data.Monoid ((<>)) -- remainingResources :: Time -> MachineSchedule -> Machine computeStats :: Time -> [MachineSchedule] -> ResourceBundle Double computeStats time schedules = fmap fromIntegral $ mcon...
mohsen3/haskell-tutorials
src/job-scheduling/src/Simulator.hs
mit
1,916
0
19
417
492
254
238
29
4
-- Count of positives / sum of negatives -- https://www.codewars.com/kata/576bb71bbbcf0951d5000044 module Kata where countPositivesSumNegatives :: Maybe [Int] -> [Int] countPositivesSumNegatives Nothing = [] countPositivesSumNegatives (Just []) = [] countPositivesSumNegatives (Just xs) = [pl, ns] where pl = length ...
gafiatulin/codewars
src/8 kyu/CountPosSumNeg.hs
mit
374
0
10
62
114
63
51
7
1
{-# LANGUAGE Arrows, NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards, NamedFieldPuns #-} module Main where -- XXX: fromArchive . toArchive /= id import Codec.Archive.Zip (toArchive, fromEntry, Archive(zEntries), Entry(eRelativePath)) import Control.Applicative ((<$>)) imp...
zalora/jenkins4nix
src/Main.hs
mit
5,578
1
21
1,323
1,702
904
798
125
3
{-# LANGUAGE CPP #-} module GHCJS.DOM.SVGAnimatedInteger ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.SVGAnimatedInteger #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.J...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/SVGAnimatedInteger.hs
mit
367
0
5
33
33
26
7
4
0
--listy.hs module Listy where newtype Listy a = Listy [a] deriving (Eq, Show) instance Monoid (Listy a) where mempty = Listy [] mappend (Listy l) (Listy l') = Listy $ mappend l l'
deciduously/Haskell-First-Principles-Exercises
5-Common Structures/15-Monoid, Semigroup/code/orphan-instance/Listy.hs
mit
190
0
8
43
83
45
38
7
0
module Light.Shape.Cylinder -- ADT ( Cylinder, cylinder, cylinderRadius, cylinderHeight -- Default Instances , unitCylinder ) where import Light.Math import Light.Geometry import Light.Shape data Cylinder = Cylinder { cylinderTransform :: Transform , cylinderRadius :: Double ...
jtdubs/Light
src/Light/Shape/Cylinder.hs
mit
1,371
0
14
460
487
260
227
31
1
module GLUI (openGLUI) where import Graphics.Rendering.OpenGL import Graphics.UI.GLUT import Data.Vector.V2 hiding (Vector2) import qualified Data.Vector.V2 as V import Data.IORef ( IORef, newIORef, writeIORef, readIORef, modifyIORef) import Control.Applicative import Data.Time.Clock import Data.Angle import Sy...
andreyLevushkin/LambdaWars
src/GLUI.hs
mit
9,013
0
14
2,302
2,462
1,223
1,239
179
3
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- ---------------------------------------------------------------------------- {- | Module : Holumbus.Index.Common.DocId Copyright : Copyright (C) 2011 Sebastian M. Schlatt, Ti...
ichistmeinname/holumbus
src/Holumbus/Index/Common/DocId.hs
mit
2,714
0
8
950
366
214
152
39
1
{-# LANGUAGE PatternSynonyms, ViewPatterns #-} {-# LANGUAGE TypeSynonymInstances #-} -- This module is a wrapper (shim) for the extracted version of -- Data.IntSet.Internal module ExtractedIntSet where import Unsafe.Coerce -- import other extracted modules import qualified Base import qualified Datatypes import qu...
antalsz/hs-to-coq
examples/containers/extraction/src/ExtractedIntSet.hs
mit
7,092
0
10
1,163
2,042
1,114
928
139
1
{- Copyright (c) 2010-2012, Benedict R. Gaster 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 ...
bgaster/hlinda
TupleServer.hs
mit
11,403
0
21
4,253
2,680
1,316
1,364
179
8
-- Least Common Multiple -- http://www.codewars.com/kata/5259acb16021e9d8a60010af/ module LeastCommonMultiple where import Prelude hiding (lcm) lcm :: Integral a => [a] -> a lcm = abs . foldl1 lcm' where lcm' a b | a == 0 || b == 0 = 0 | otherwise = (* b) . (a `div`) . gcd a $ b
gafiatulin/codewars
src/5 kyu/LeastCommonMultiple.hs
mit
305
0
12
79
110
60
50
6
1
{-| Module : PostgREST.RangeQuery Description : Logic regarding the `Range`/`Content-Range` headers and `limit`/`offset` querystring arguments. -} module PostgREST.RangeQuery ( rangeParse , rangeRequested , rangeLimit , rangeOffset , restrictRange , rangeGeq , allRange , NonnegRange , rangeStatusHeader , content...
steve-chavez/postgrest
src/PostgREST/RangeQuery.hs
mit
3,330
0
15
721
908
477
431
80
2
import System.Random randomRankN :: Int -> Int -> [Int] -> IO [Int] randomRankN n m l = do r' <- getStdRandom (randomR (0, m)) let r = fromIntegral r' if elem r l then randomRankN n m l else do let ll = r:l if length ll > n then return ll else ...
mingzhi0/misc
hs_code/randomRankN.hs
gpl-2.0
338
0
13
132
142
69
73
12
3
module Infernu.Lib where import Data.Maybe (fromMaybe) import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.Set (Set) import qualified Data.Set as Set import Infernu.Prelude m...
sinelaw/infernu
src/Infernu/Lib.hs
gpl-2.0
1,168
0
12
318
475
253
222
20
2
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} module Proxy ( handleRequest ) where import Control.Concurrent import Network.Socket hiding (send, recv) import Control.Monad (unless) import Network.Socket.ByteString import Data.ByteString.UTF8 (fromString) import qualified Data.By...
amir-sabbaghi/proxy
src/Proxy.hs
gpl-3.0
3,792
1
31
1,258
1,270
646
624
92
7
module ScadTreeView( createEmptyTreeStore, createTreeView, updateTreeStore, emptyForest ) where import Data.Tree import Data.IORef import Data.List import Graphics.UI.Gtk import Control.Monad.IO.Class (liftIO) import DSL.Scad import Gui data MenuAction = Add3Object | AddTransforma...
Norberg/gui_scad
src/ScadTreeView.hs
gpl-3.0
8,560
0
28
2,626
2,252
1,064
1,188
195
8
module System.Serverman.Actions.Env (OS(..), getOS, releaseToOS) where import System.Serverman.Utils import System.Serverman.Types import System.Serverman.Log import System.Process import Data.List import System.IO.Error import Data.Either import Data.Char import Control.Monad.State getOS = do ...
mdibaiee/serverman
src/System/Serverman/Actions/Env.hs
gpl-3.0
851
0
13
183
261
142
119
24
1
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} module Main(main) where import qualified Codec.Archive.CnCMix as F import Codec.Archive.CnCMix ( File(File) , CnCMix(CnCMix) , CnCID() --, CnCGame ) import Data.Map (Map()) import qualified Data.Map as Map import System.IO import System.FilePath impor...
cnc-patch/cncmix
Main.hs
gpl-3.0
9,510
0
40
3,748
1,821
963
858
161
4
{-# LANGUAGE TemplateHaskell #-} module Lamdu.Sugar.Types.Tag ( Tag(..), tagName, tagVal, tagInstance , TagOption(..), toInfo, toPick , TagChoice(..), tcOptions, tcNewTag , TagRef(..), tagRefTag, tagRefReplace, tagRefJumpTo , OptionalTag(..), oTag, oPickAnon ) where import qualified Control.Len...
lamdu/lamdu
src/Lamdu/Sugar/Types/Tag.hs
gpl-3.0
1,331
0
11
308
372
230
142
34
0
module PatternMatching where import Hip.Prelude -- Some different definitions of boolean or or1 True b = True or1 False b = b or2 True b = True or2 a b = b or3 False False = False or3 a b = True prop_or12eq x y = or1 x y =:= or2 x y prop_or23eq x y = or2 x y =:= or3 x y prop_or13eq x y = or1 x y =:...
danr/hipspec
examples/old-examples/hip/PatternMatching.hs
gpl-3.0
3,158
0
15
1,119
1,330
640
690
73
4
-- terminos_robison.hs -- Implementación del algorítmo de Robinson -- Sevilla, 14 de Junio de 2016 -- --------------------------------------------------------------------- import Data.Maybe import Terminos -- (resuelve2 ts) es la sustitución resultante para el problema de -- unificación ts. -- λ> resuelve2 [(V ("x...
migpornar/SRTenHaskell
Codigo_Haskell/Codigo de ejemplo/UnificacionRobison.hs
gpl-3.0
3,537
0
10
840
1,179
622
557
55
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Projects/Get.hs
mpl-2.0
4,798
0
19
1,202
821
474
347
115
1
module Qemu where import Control.Applicative import Control.Monad import Data.Maybe import Data.List import System.FilePath import System.Posix.User import System.Posix.Files import Types import MAC import Resource data Qemu = Qemu { qUserIfOpts :: [(String,String)], qStdioConsole :: Bool, qVm :: V...
DanielG/kvm-in-a-box
src/Qemu.hs
agpl-3.0
2,479
0
18
676
878
501
377
-1
-1
{-# language ExistentialQuantification, FunctionalDependencies, RecordWildCards, NamedFieldPuns, FlexibleInstances, MultiParamTypeClasses, DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable, ImpredicativeTypes #-} -- module for often used types (in one Base module, to avoid module import cyc...
changlinli/nikki
src/Base/Types.hs
lgpl-3.0
23,044
0
20
5,266
6,153
3,302
2,851
548
4
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, UnicodeSyntax, FlexibleContexts #-} -- | The Sweetroll prelude == ClassyPrelude + more stuff. module Sweetroll.Prelude ( module X , module Sweetroll.Prelude ) where import RIO as X (HasLogFunc, HasCallStack, logDebug, logInfo, logWarn, logError, display, ...
myfreeweb/sweetroll
sweetroll-be/library/Sweetroll/Prelude.hs
unlicense
3,670
0
11
783
1,197
642
555
-1
-1
{-#LANGUAGE DeriveDataTypeable#-} module Data.P440.Domain.ZSO where import Data.P440.Domain.SimpleTypes import Data.P440.Domain.ComplexTypes import Data.P440.Domain.ComplexTypesZS import Data.Typeable (Typeable) import Data.Text (Text) -- 2.4 Запрос НО об остатках data Файл = Файл { идЭС :: GUID ,вер...
Macil-dev/440P-old
src/Data/P440/Domain/ZSO.hs
unlicense
1,262
61
8
294
634
339
295
33
0
module Kata02.Chop2 (chop) where import Data.List chop :: Int -> [Int] -> Int chop _ [] = -1 chop x xs = let indexedXs = zip xs [0..] in chop' x indexedXs chop' :: Int -> [(Int, Int)] -> Int chop' x [(y, i)] | x == y = i | otherwise = -1 chop' x xs | x <= y = chop' x first | otherwise = chop' x sec...
safwank/HaskellKata
src/Kata02/Chop2.hs
apache-2.0
425
0
10
127
229
118
111
17
1
{-# LANGUAGE OverloadedStrings #-} module Main ( main, ) where import Test.Framework (defaultMain) import RuleInfo.ExecutionRoot (fixFilePathFlags, fakeExecutionRoot) import Test.Framework.Providers.HUnit (testCase) import Test.HUnit ((@?=)) main :: IO () main = defaultMain [ testCase "fixFilePathFlags" $ ...
google/hrepl
rule_info/RuleInfo/ExecutionRootTest.hs
apache-2.0
1,195
0
13
452
174
105
69
33
1
{-| Module : Core Description : Core namespace module. Copyright : (c) Nashwan Azhari, 2016 License : Apache 2.0 Maintainer : aznashwan@yahoo.com Stability : experimental Portability : POSIX, Win32 Core contains the core components of the project. -} module Cloud.Haskzure.Core ( -- ** The Az...
aznashwan/haskzure
Cloud/Haskzure/Core.hs
apache-2.0
745
0
5
177
81
58
23
10
0
import Data.List (isSuffixOf) import Control.Applicative import Test.Framework (defaultMain, testGroup, Test) import Test.Framework.Providers.HUnit import Test.HUnit (assertFailure) import System.Directory import System.Exit (ExitCode(..)) import System.Process main :: IO () main = makeTests "test" >>= defaultMain -...
fizbin/cabal-demo-backflip
test/BackflipShellTests.hs
apache-2.0
1,415
0
15
318
403
194
209
37
6
module Text.SRX ( parseSRX ) where import Control.Applicative ((<$>), (<*>)) import qualified Text.XML.PolySoup as Soup import Text.XML.PolySoup hiding (XmlParser, Parser) import qualified Data.SRX as S type Parser a = Soup.XmlParser String a type SRX = S.SRX String type Lang = S.Lang String type Rule = S.Ru...
kawu/tokenize
Text/SRX.hs
bsd-2-clause
1,130
0
12
219
434
236
198
34
1
module Database.SqlServer.Create.Database where import Database.SqlServer.Create.Identifier (RegularIdentifier) import Database.SqlServer.Create.Table (Table) import Database.SqlServer.Create.View (View) import Database.SqlServer.Create.Sequence (Sequence) import Database.SqlServer.Create.Procedure (Procedure) import ...
fffej/sql-server-gen
src/Database/SqlServer/Create/Database.hs
bsd-2-clause
4,702
0
25
757
1,293
705
588
118
1
module Database.VCache.Read ( readAddrIO , readRefctIO , withBytesIO ) where import Control.Monad import qualified Data.Map.Strict as Map import qualified Data.List as L import Control.Concurrent.MVar import Data.Word import Foreign.Ptr import Foreign.Storable import Foreign.Marshal.Alloc import Data...
bitemyapp/haskell-vcache
hsrc_lib/Database/VCache/Read.hs
bsd-2-clause
3,401
0
28
910
982
510
472
78
3
module Data.Parser.Grempa.Parser.Driver ( driver , resultDriver , ReductionTree ) where import Control.Applicative import Data.Dynamic import Data.List import Data.Maybe import Data.Parser.Grempa.Parser.Result import Data.Parser.Grempa.Parser.Table import qualified Data.Parser.Grempa.Grammar.Typed as ...
ollef/Grempa
Data/Parser/Grempa/Parser/Driver.hs
bsd-3-clause
2,000
0
16
591
733
387
346
42
5
-- -- 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-language
src/Feldspar/Core/Frontend/Binding.hs
bsd-3-clause
2,169
0
9
411
229
144
85
12
1
{- | The `ArrowKleisli' type class allows for embedding monadic operations in Kleisli arrows. -} {-# LANGUAGE FlexibleInstances , FunctionalDependencies , MultiParamTypeClasses , TypeOperators #-} module Control.Arrow.Kleisli.Class where import Control.Arrow import Control.Category import Control.Monad.Tra...
silkapp/arrow-list
src/Control/Arrow/Kleisli/Class.hs
bsd-3-clause
794
4
10
162
286
153
133
20
1
{- Stroke.hs (adapted from stroke.c which is (c) Silicon Graphics, Inc.) Copyright (c) Sven Panne 2002-2006 <sven.panne@aedion.de> This file is part of HOpenGL and distributed under a BSD-style license See the file libraries/GLUT/LICENSE This program demonstrates some characters of a stroke (vector) fon...
FranklinChen/hugs98-plus-Sep2006
packages/GLUT/examples/RedBook/Stroke.hs
bsd-3-clause
3,934
0
15
932
1,271
648
623
92
3
{-# LANGUAGE OverloadedStrings #-} module Rede.Research.Main(research) where import Control.Concurrent (forkIO) import Control.Concurrent.Chan import System.FilePath import qualified Data.ByteString as B import Data.ByteString.Char8 (pack) import...
loadimpact/http2-test
hs-src/Rede/Research/Main.hs
bsd-3-clause
2,309
0
11
800
369
195
174
48
1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- -- Pretty-printing assembly language -- -- (c) The University of Glasgow 1993-2005 -- ----------------------------------------------------------------------------- {-# OPTIONS_GHC -fno-warn-orphans #-} module SPARC....
mettekou/ghc
compiler/nativeGen/SPARC/Ppr.hs
bsd-3-clause
19,049
0
18
6,238
5,588
2,742
2,846
443
65
module Events.SparkTree ( SparkTree, SparkNode, sparkTreeMaxDepth, emptySparkTree, eventsToSparkDurations, mkSparkTree, sparkProfile, ) where import qualified Events.SparkStats as SparkStats import qualified GHC.RTS.Events as GHCEvents import GHC.RTS.Events (Timestamp) import Control.Exception (asser...
dchagniot/threadscopeRestServer
src/Events/SparkTree.hs
bsd-3-clause
10,351
0
17
2,679
2,251
1,192
1,059
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Main where import Text.HSmarty import qualified Data.HashMap.Strict as HM import qualified Data.Text as T main :: IO () main = renderTemplate "test.tpl" $ HM.fromList [ ( "title", mkParam ("SomeTitle" :: T.Text)) , ( "list", mkParam (["a", "b"] :: [T.Tex...
agrafix/HSmarty
Example.hs
bsd-3-clause
342
0
12
84
103
63
40
10
1
-- | Defines an internal representation of Haskell data\/newtype definitions -- that correspond to the XML DTD types, and provides pretty-printers to -- convert these types into the 'Doc' type of "Text.PrettyPrint.HughesPJ". module Text.XML.HaXml.DtdToHaskell.TypeDef ( -- * Internal representation of types T...
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs
bsd-3-clause
8,480
0
22
2,360
2,570
1,322
1,248
174
1
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} module Test.ZM.ADT.Tuple2.Ka5583bf3ad34 (Tuple2(..)) where import qualified Prelude(Eq,Ord,Show) import qualified GHC.Generics import qualified Flat import qualified Data.Model data Tuple2 a b = Tuple2 a b deriving (Prelude.Eq, Prelude.Ord, Prelude.Sh...
tittoassini/typed
test/Test/ZM/ADT/Tuple2/Ka5583bf3ad34.hs
bsd-3-clause
443
0
7
57
137
83
54
10
0
{-# LANGUAGE LambdaCase #-} module TopDown where import LambdaF import BruijnEnvironment import BruijnTerm as Lam hiding(Lambda,Appl,Let) import MTable(MTable) import Inprocess topDownTrans :: (context -> LamTermF () () Bound InProcess -> LamTermF () () Bound InProcess ) -> context -> MTable -> InProcess -> LamTerm (...
kwibus/myLang
src/TopDown.hs
bsd-3-clause
1,317
0
13
261
377
203
174
19
1
-- This implements a simple `!echo` command that repeats back whatever follows -- the command. module Network.Ribot.Irc.Part.Echo ( echoPart , echoCommand ) where import Network.IRC.Bot.BotMonad (BotMonad(..), maybeZero) import Network.IRC.Bot.Commands (PrivMsg(..), replyTo, sendComma...
erochest/ribot
src/Network/Ribot/Irc/Part/Echo.hs
bsd-3-clause
1,089
0
13
318
268
151
117
21
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DoAndIfThenElse #-} {-# LANGUAGE RecordWildCards #-} module Control.Concurrent.STM.Connection ( Connection, new, close, recv, send, cram, bye, -- * Connection backend Backend(..), -- * Configuration ...
joeyadams/hs-stm-connection
Control/Concurrent/STM/Connection.hs
bsd-3-clause
9,911
0
18
2,793
2,109
1,076
1,033
206
3
{------------------------------------------------------------------------------- DSem.VectorSpace.BowCached Bag-of-words distributional model (c) 2013 Jan Snajder <jan.snajder@fer.hr> TODO: split into: Bow.Sparse Bow.Dense Bow.*.Cached ----------------------------------------------------------------------------...
jsnajder/dsem
src/DSem/VectorSpace/BowCached.hs
bsd-3-clause
5,065
4
18
1,325
1,342
707
635
121
3
module Win32Window where import StdDIS import Win32Types import GDITypes import Win32WinMessage ---------------------------------------------------------------- -- Window Class ---------------------------------------------------------------- -- The classname must not be deallocated until the corresponding class -- ...
OS2World/DEV-UTIL-HUGS
libraries/win32/Win32Window.hs
bsd-3-clause
50,850
552
38
8,247
14,572
8,000
6,572
-1
-1
-- | -- Module : Network.SMTP.Types -- License : BSD-style -- -- Maintainer : Nicolas DI PRIMA <nicolas@di-prima.fr> -- Stability : experimental -- Portability : unknown -- module Network.SMTP.Types ( -- * Mail Storage User MailStorageUser(..) -- * ClientState , ClientConnectionState(..)...
NicolasDP/maild
Network/SMTP/Types.hs
bsd-3-clause
5,966
2
13
1,585
1,116
653
463
127
18
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE Tem...
mikeplus64/trifecta
src/Text/Trifecta/Parser.hs
bsd-3-clause
11,602
0
22
3,191
4,300
2,210
2,090
265
8
module Sharc.Instruments.Flute (flute) where import Sharc.Types flute :: Instr flute = Instr "flute_vibrato" "Flute" (Legend "McGill" "2" "1") (Range (InstrRange (HarmonicFreq 1 (Pitch 261.62 48 "c4")) (Pitch 261.62 48 "c4") (Amplitude 9079.92 (HarmonicFreq ...
anton-k/sharc-timbre
src/Sharc/Instruments/Flute.hs
bsd-3-clause
29,360
0
15
8,834
10,802
5,587
5,215
1,035
1
{-# LANGUAGE OverloadedStrings #-} -- | -- Module : Blaze.ByteString.Builder.Html.Utf8 -- Copyright : (c) 2010 Jasper Van der Jeugt & Simon Meier -- License : BSD3-style (see LICENSE) -- -- Maintainer : Simon Meier <iridcode@gmail.com> -- Stability : experimental -- Portability : tested on GHC only -- -- ...
meiersi/blaze-builder
Blaze/ByteString/Builder/Html/Utf8.hs
bsd-3-clause
2,954
0
8
517
346
211
135
36
6
{-# LANGUAGE ExistentialQuantification #-} module System.IO.Log where newtype Logger = forall o. Output o => Logger { loggerOutput :: MVar (BufferedOutput o) , loggerPrefix :: Bytes -> IO Builder , loggerNoDebug :: Bool , loggerAutoFlush :: Bool } newLogger :: Output o => o -> Int -> Bool...
winterland1989/stdio
System/IO/Log.hs
bsd-3-clause
752
37
6
167
239
127
112
-1
-1
{-# OPTIONS -fno-warn-tabs #-} -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and -- detab the module (please do the detabbing in a separate patch). See -- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces -- fo...
ekmett/ghc
compiler/nativeGen/SPARC/CodeGen/Base.hs
bsd-3-clause
3,249
48
11
631
514
294
220
59
2
{- Defines the most basic Type Class used by this library to define data that is either Graph or DiGraph. A lot of functionality is implemented for GraphDataSets and then reused by both Graph and DiGraph -} module PolyGraph.ReadOnly ( GraphDataSet(..) , defaultVertexCount , GMorphism (..) , fGMorphism ...
rpeszek/GraphPlay
src/PolyGraph/ReadOnly.hs
bsd-3-clause
2,774
0
14
825
631
357
274
-1
-1
{-# LANGUAGE FlexibleContexts #-} {- | Module : Data.Graph.Inductive.Query.Properties Description : Properties for Query modules Copyright : (c) Ivan Lazar Miljenovic License : BSD3 Maintainer : Ivan.Miljenovic@gmail.com Rather than having an individual module of properties for each `Data.Gr...
scolobb/fgl
test/Data/Graph/Inductive/Query/Properties.hs
bsd-3-clause
11,776
0
17
3,151
3,401
1,819
1,582
172
1
module Main ( main ) where import Test.Framework (defaultMain) import qualified Crawler.Tests main :: IO () main = defaultMain [ Crawler.Tests.uriHostTests , Crawler.Tests.addTrailingSlashTests , Crawler.Tests.removeWWWTests , Crawler.Tests.sameDomainTests , Crawler.Tests.addRootToRelativ...
mavenraven/digital-ocean-crawler
tests/TestSuite.hs
bsd-3-clause
440
0
7
83
91
57
34
14
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-unused-imports#-} module Data.KeyStore.Sections ( SECTIONS(..) , Code...
cdornan/keystore
src/Data/KeyStore/Sections.hs
bsd-3-clause
27,172
45
24
7,567
8,039
4,077
3,962
476
5
{-# LANGUAGE OverloadedStrings #-} module Main where import Fragnix.ModuleDeclarations ( parse,moduleDeclarationsWithEnvironment,moduleSymbols) import Fragnix.Declaration (writeDeclarations) import Fragnix.DeclarationLocalSlices (declarationLocalSlices) import Fragnix.HashLocalSlices (hashLocalSlices,replaceSliceI...
phischu/fragnix
tests-src/Main.hs
bsd-3-clause
4,102
0
19
681
1,115
588
527
80
1
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE Over...
rfranek/duckling
Duckling/Time/GA/Corpus.hs
bsd-3-clause
1,690
0
10
555
453
277
176
36
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="id-ID"> <title>Teknologi deteksi | Ekstensi ZAP</title> <maps> <homeID>top</homeID> <m...
veggiespam/zap-extensions
addOns/wappalyzer/src/main/javahelp/org/zaproxy/zap/extension/wappalyzer/resources/help_id_ID/helpset_id_ID.hs
apache-2.0
974
80
66
160
415
210
205
-1
-1
{-# LANGUAGE BangPatterns #-} ------------------------------------------------------------------------------ -- | -- Module : Blaze.ByteString.Builder.Enumerator -- Copyright : (c) 2010 Simon Meier -- License : BSD3 -- -- Maintainer : Simon Meier <iridcode@gmail.com> -- Stability : Experimental -- Po...
sol/blaze-builder-enumerator
Blaze/ByteString/Builder/Enumerator.hs
bsd-3-clause
6,351
0
23
1,829
878
463
415
76
8
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module Ros.Nav_msgs.OccupancyGrid where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.R...
acowley/roshask
msgs/Nav_msgs/Ros/Nav_msgs/OccupancyGrid.hs
bsd-3-clause
1,614
1
10
315
411
243
168
38
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-iam/gen/Network/AWS/IAM/GenerateCredentialReport.hs
mpl-2.0
3,769
0
11
711
409
248
161
52
1
module Unifier.Restricted ( Unifier.Restricted.unify , Unifier.Restricted.subsumes , runErrorT2 , WithEnv ) where import Unifier.Unifier import Control.Unification import Control.Unification.IntVar import Control.Unification.Types import Control.Monad.Except type Failure = UFailure T IntVar type Type = UTerm T ...
kayuri/HNC
Unifier/Restricted.hs
lgpl-3.0
680
4
10
103
209
116
93
20
1
module Stream where import Prelude hiding (map,(!!)) import Nat data Stream a = Cons a (Stream a) map :: (a -> b) -> Stream a -> Stream b map f (Cons a s) = Cons (f a) (map f s) (!!) :: Stream a -> Nat -> a (Cons a _) !! Zero = a (Cons _ s) !! (Succ n) = s !! n nats :: Stream Nat nats = Zero `Cons` map Succ na...
beni55/hermit
examples/fib-stream/Stream.hs
bsd-2-clause
323
0
8
85
192
102
90
11
1
import StackTest import Control.Monad import System.Directory import System.FilePath {-# ANN module "HLint: ignore Use unless" #-} main :: IO () main = if isWindows then logInfo "Disabled on Windows (see https://github.com/commercialhaskell/stack/issues/1337#issuecomment-166118678)" else do ...
anton-dessiatov/stack
test/integration/tests/1336-1337-new-package-names/Main.hs
bsd-3-clause
961
0
10
262
191
93
98
24
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="en-GB"> <title>All In One Notes Add-On</title> <maps> <homeID>top</homeID> ...
denniskniep/zap-extensions
addOns/allinonenotes/src/main/javahelp/org/zaproxy/zap/extension/allinonenotes/resources/help/helpset.hs
apache-2.0
981
81
68
172
427
218
209
-1
-1
{-# LANGUAGE NoImplicitPrelude, TypeInType, PolyKinds, DataKinds, ScopedTypeVariables, TypeFamilies, UndecidableInstances #-} module T15666 where import Data.Kind(Type) data PolyType k (t :: k) type Wrap (t :: k) = PolyType k t type Unwrap pt = (GetType pt :: GetKind pt) type family GetKind (pt :: Type) ...
sdiehl/ghc
testsuite/tests/dependent/should_compile/T15666.hs
bsd-3-clause
645
11
11
130
222
122
100
-1
-1
module MoveDef.Demote where toplevel :: Integer -> Integer toplevel x = c * x -- c,d :: Integer c = 7 d = 9
RefactoringTools/HaRe
test/testdata/MoveDef/Demote.hs
bsd-3-clause
112
0
5
28
38
22
16
5
1
{-# LANGUAGE FlexibleInstances #-} -- | Monadic front-end to Text.PrettyPrint module Language.Haskell.TH.PprLib ( -- * The document type Doc, -- Abstract, instance of Show PprM, -- * Primitive Documents empty, semi, comma, colon, dcolon, space, equals, arro...
olsner/ghc
libraries/template-haskell/Language/Haskell/TH/PprLib.hs
bsd-3-clause
6,652
0
20
2,067
1,790
1,038
752
142
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="ko-KR"> <title>Selenium add-on</title> <maps> <homeID>top</homeID> <mapref location="m...
kamiNaranjo/zap-extensions
src/org/zaproxy/zap/extension/selenium/resources/help_ko_KR/helpset_ko_KR.hs
apache-2.0
961
79
67
157
413
209
204
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE PatternGuards #-} -- | A type class 'ModSubst' for objects which can have 'ModuleSubst' -- applied to them. -- -- See also <https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst> module Distribution.Backpack.ModSubst ( ModSubst(..), ) whe...
themoritz/cabal
Cabal/Distribution/Backpack/ModSubst.hs
bsd-3-clause
1,831
0
11
350
420
226
194
31
0
-- buffer ends in 0xF0 ð
ml9951/ghc
testsuite/tests/parser/unicode/utf8_005.hs
bsd-3-clause
24
0
4
5
5
2
3
-1
-1
{-# LANGUAGE FlexibleContexts #-} module AI.Visualizations ( networkHistogram , weightList , biasList ) where import AI.Layer import AI.Network import AI.Network.FeedForwardNetwork import AI.Neuron import Numeric.LinearAlgebra import Data.Foldable ...
qzchenwl/LambdaNet
AI/Visualizations.hs
mit
882
0
12
220
237
127
110
23
1
module Tests.IRC.Commands where import IRC.Commands (respond') import IRC.Parser (Message(..), Sender(..)) import Config (Config(..), defaultConfig) import Test.HUnit (Test(..), (~=?)) respondTest :: Test respondTest = TestLabel "respond" $ TestList [ respond' testMsg "test reply" defaultConfig ~=? ("test lo...
jdiez17/HaskellHawk
Tests/IRC/Commands.hs
mit
506
0
10
123
144
89
55
11
1
module Handler.EditoSpec (spec) where import TestImport spec :: Spec spec = withApp $ do describe "getEditoR" $ do error "Spec not implemented: getEditoR"
swamp-agr/carbuyer-advisor
test/Handler/EditoSpec.hs
mit
171
0
11
39
44
23
21
6
1
{-# LANGUAGE OverloadedStrings , DeriveGeneric #-} module Tach.Transformable.Types.Transform where import GHC.Generics
smurphy8/tach
core-types/tach-transformable-types/src/Tach/Transformable/Types/Transform.hs
mit
122
0
4
14
14
10
4
3
0
{- | Module : Xcode.FileEncoding License : MIT Maintainer : shea@shealevy.com Stability : unstable Portability : portable A file encoding -} module Xcode.FileEncoding ( FileEncoding( .. ) ) where -- | An Xcode file encoding -- Encodings taken from NSString.h data FileEncoding = ASCII | ...
shlevy/xcode-types
src/Xcode/FileEncoding.hs
mit
674
0
5
168
94
63
31
26
0
myDrop n xs = if n <= 0 || null xs then xs else myDrop (n-1)(tail xs)
rglew/rwh
ch2/myDrop.hs
mit
99
0
8
46
48
24
24
3
2
import Data.List (sort) import Control.Applicative import qualified Data.Attoparsec.ByteString.Char8 as A import qualified Data.ByteString as B main = do input <- B.readFile "input.txt" let presents = case parsePresents input of Right (p) -> p Left (err) -> error ("P...
devonhollowood/adventofcode
2015/day2/day2.hs
mit
1,110
0
15
255
467
238
229
29
2
sumDigits acc 0 = acc sumDigits acc n = sumDigits (acc+d) n' where (n', d) = quotRem n 10 main = print $ maximum $ map (sumDigits 0) [a^b | a<-[1..99], b<-[1..99]]
dpieroux/euler
0/0056.hs
mit
166
0
10
34
109
56
53
3
1
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module with producer properties types and functions. ----------------------------------------------------------------------------- module Kafka.Producer.ProducerProperties ( ProducerProperties(..) ,...
haskell-works/kafka-client
src/Kafka/Producer/ProducerProperties.hs
mit
5,129
0
11
825
870
508
362
74
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} module Devel ( devel , DevelOpts(..) , DevelTermOpt(..) , defaultDevelOpts ) where import qualified Distribution.Compiler as D import qua...
andrewthad/yesod
yesod-bin/Devel.hs
mit
23,164
0
24
8,277
5,374
2,759
2,615
434
6
-- | -- Module : PhantomPhases.Typechecker -- Copyright : © 2019 Elias Castegren and Kiko Fernandez-Reyes -- License : MIT -- -- Stability : experimental -- Portability : portable -- -- This module includes everything you need to get started type checking -- a program. To build the Abstract Syntax Tre...
kikofernandez/kikofernandez.github.io
files/monadic-typechecker/typechecker/src/PhantomPhases/Typechecker.hs
mit
20,026
0
16
5,102
4,513
2,341
2,172
-1
-1
module Problem005 (answer) where answer :: Int answer = floor(2**4) * floor(3**2) * 5 * 7 * 11 * 13 * 17 * 19 -- just see the decomposition in prime factors of [1..20] -- and then pick the highest power for each factor
geekingfrog/project-euler
Problem005.hs
gpl-3.0
221
0
14
46
69
38
31
3
1
module FOOL.TPTP where import FOOL.AST data TPTP = TPTP [Sentence] data Sentence = TypeD Name FOOLTerm | Axiom Name FOOLTerm | Conj Name FOOLTerm deriving (Eq) type Name = String {- misc -} isOfType :: Name -> FOOLTerm -> Sentence isOfType = TypeD
emptylambda/BLT
src/FOOL/TPTP.hs
gpl-3.0
286
0
7
81
80
47
33
10
1
fac 0 = 1 fac n = n * fac (n-1) main = print ( fac 10 )
forflo/snippetbin
haskell/first.hs
gpl-3.0
56
0
8
18
45
22
23
3
1
import Control.Exception(Exception,catch,displayException,throwIO) import Control.Monad(foldM) import qualified Data.ByteString import Data.String(fromString) import System.Directory(removeFile,getCurrentDirectory,getTemporaryDirectory) import System.Environment(getArgs,getProgName) import System.Exit(exitFailure) impo...
qpliu/esolang
DGOL/hs/compiler/DGOLC.hs
gpl-3.0
7,584
0
18
1,468
2,816
1,411
1,405
152
16
module Editor.CodeEdit.DefinitionEdit(make, makeParts, addJumps) where import Control.Arrow (second) import Control.Monad (liftM) import Data.List.Utils (atPred, pairList) import Data.Monoid (Monoid(..)) import Data.Store.IRef (IRef) import Data.Store.Transaction (Transaction) import Data.Vector.Vector2 (Vector2(..)) ...
nimia/bottle
codeedit/Editor/CodeEdit/DefinitionEdit.hs
gpl-3.0
4,713
0
15
764
1,322
722
600
113
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-games/gen/Network/Google/Resource/Games/Achievements/UpdateMultiple.hs
mpl-2.0
3,784
0
14
805
413
245
168
66
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Compute.Types.Sum -- Copyright : (c) 2015-2016 Brendan...
rueshyna/gogol
gogol-compute/gen/Network/Google/Compute/Types/Sum.hs
mpl-2.0
131,997
0
11
26,138
17,038
8,952
8,086
2,219
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.ServiceControl.Types.Sum -- Copyright : (c) 2015-2016 ...
rueshyna/gogol
gogol-servicecontrol/gen/Network/Google/ServiceControl/Types/Sum.hs
mpl-2.0
9,132
0
11
2,272
1,148
629
519
149
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Goals/Get.hs
mpl-2.0
4,232
0
19
1,063
547
324
223
89
1