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
-- | -- Copyright : (c) Sam Truzjan 2013, 2014 -- License : BSD3 -- Maintainer : pxqr.sta@gmail.com -- Stability : experimental -- Portability : portable -- -- KRPC messages types used in communication. All messages are -- encoded as bencode dictionary. -- -- Normally, you don't need to im...
pxqr/krpc
src/Network/KRPC/Message.hs
bsd-3-clause
7,791
0
14
1,645
1,066
621
445
-1
-1
{-# LANGUAGE QuasiQuotes #-} module VirtualMethodsWithNoOverride (testVirtualMethodsWithNoOverride) where import Pygmalion.Test import Pygmalion.Test.TH testVirtualMethodsWithNoOverride = runPygmalionTest "virtual-no-override.cpp" $ [pygTest| #include "virtual.h" int main(int argc, char** argv) { ...
sethfowler/pygmalion
tests/VirtualMethodsWithNoOverride.hs
bsd-3-clause
3,512
0
6
730
37
24
13
5
1
{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving, ScopedTypeVariables, FlexibleInstances, DeriveDataTypeable, UndecidableInstances, BangPatterns, OverlappingInstances, DataKinds, GADTs, KindSignatures, NamedFieldPuns #-} -- | Haskell client for Cassandra's CQL protocol -- -- For examples, take...
the-real-blackh/cassandra-cql
Database/Cassandra/CQL.hs
bsd-3-clause
80,458
1
35
24,848
27,413
15,203
12,210
1,431
17
module Yesod.CoreBot.Bliki.Resources.Base ( module Yesod.CoreBot.Bliki.Resources.Base ) where import Yesod.CoreBot.Bliki.Prelude import Yesod.CoreBot.Bliki.Config import Yesod.CoreBot.Bliki.DB import Yesod.CoreBot.Bliki.Store import Control.Concurrent import Control.Monad.Re...
coreyoconnor/corebot-bliki
src/Yesod/CoreBot/Bliki/Resources/Base.hs
bsd-3-clause
867
0
6
230
132
85
47
-1
-1
-- umbralcalculus.hs module Math.UmbralCalculus where import Math.MathsPrimitives (FunctionRep (..), partialProducts, factorials, ($+), ($.) ) import Math.QQ import Math.CombinatoricsCounting import Math.PowerSeries import Math.UPoly -- Sources: -- Robert, A Course in p-adic Analysis -- http://en.wikip...
nfjinjing/bench-euler
src/Math/UmbralCalculus.hs
bsd-3-clause
8,750
17
20
1,919
1,914
1,015
899
86
3
module Reactive.Banana.GLFW.Utils where import Control.Monad import Control.Exception import Graphics.UI.GLFW as GLFW withGLFW :: IO () -> IO () withGLFW = bracket_ (assertIO =<< GLFW.init) GLFW.terminate where assertIO b = unless b $ ioError $ userError "withGLFW"
cdxr/reactive-banana-glfw
Reactive/Banana/GLFW/Utils.hs
bsd-3-clause
276
0
9
46
90
49
41
7
1
{-# LANGUAGE RecursiveDo #-} {-# LANGUAGE FlexibleContexts #-} import Prelude () import ClassyPrelude import Reflex import Reflex.Dom -- import Common -- -- import Bootstrap import PureCSS import SortableTable -- toComponent :: Component B a => a -> CompBackend B a -- toComponent comp = wrapComponent comp fontAwes...
limaner2002/ghcjs-test
app/Main.hs
bsd-3-clause
3,251
0
9
1,083
167
119
48
15
1
{-# LANGUAGE CPP, Rank2Types #-} module Control.Monad.IO.Logic ( LogicIO , runLogicIO , observeIO , observeAllIO , observeManyIO , liftST ) where #ifdef MODULE_Control_Monad_ST_Safe import Control.Monad.ST.Safe #else import Control.Monad.ST #endif import Control.Monad.S...
sonyandy/logicst
src/Control/Monad/IO/Logic.hs
bsd-3-clause
978
0
10
202
265
155
110
27
1
{-# LANGUAGE TupleSections #-} module Main (main) where import Criterion.Main import qualified Data.Map.Strict as M import ADEL mapUpTo :: Int -> M.Map Int () mapUpTo x = M.fromList $ map (,()) [0 .. x] findNofM :: Int -> Int -> Benchmark findNofM numToFind totalNum = if numToFind > totalNum then bench "numToFind...
enolan/reducecase
bench/Main.hs
bsd-3-clause
1,004
0
16
222
373
199
174
28
2
{-# LANGUAGE PatternGuards, MultiParamTypeClasses, FunctionalDependencies, UndecidableInstances, FlexibleInstances, TypeSynonymInstances, StandaloneDeriving #-} -- | Duck Types module Type ( module Gen.Type , IsType(..) , TypeEnv , substVoid , singleton , unsingleton , freeVars , generalType , deStat...
girving/duck
duck/Type.hs
bsd-3-clause
7,153
0
12
1,444
2,764
1,401
1,363
176
2
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-| Module : Numeric.AERN.RefinementOrderRounding Description : common arithmetical operations rounded in/out Copyright : (c) Michal Konecny License : BSD3 Maintainer : mikkonec...
michalkonecny/aern
aern-real/src/Numeric/AERN/RealArithmetic/RefinementOrderRounding.hs
bsd-3-clause
6,569
0
11
1,053
1,209
666
543
87
1
import qualified Cookbook.Project.Quill.Quill2.Meta as Qm import qualified Cookbook.Essential.Meta as Cm import qualified Cookbook.Ingredients.Lists.Modify as Md import System.IO import System.Environment import System.Exit import WagesConf main = do arguments <- getArgs if null arguments then wRepl else dispat...
natepisarski/Wages
Wages.hs
bsd-3-clause
935
0
16
187
410
211
199
31
2
----------------------------------------------------------------------------- -- | -- Module : Examples.Puzzles.Temperature -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Puzzle: -- What 2 digit fahrenheit/celcius values are reve...
Copilot-Language/sbv-for-copilot
SBVUnitTest/Examples/Puzzles/Temperature.hs
bsd-3-clause
1,429
0
13
344
357
196
161
18
1
{-# LANGUAGE MultiParamTypeClasses #-} module Haspec.Procedure where data Procedure dataType propertyType = Procedure { name :: String, docstring :: String, ...
MaximilianAlgehed/Haspec
src/Haspec/Procedure.hs
bsd-3-clause
568
0
10
330
75
48
27
8
0
-- | like Maybe, but Nothing is shown as question mark module String_Matching.Option where import Autolib.ToDoc import Autolib.Reader import Autolib.Set import Data.Typeable data Option a = Yes a | No deriving ( Eq, Ord ) instance ToDoc a => ToDoc ( Option a ) where toDoc ( Yes a ) = toDoc a toDoc No =...
florianpilz/autotool
src/String_Matching/Option.hs
gpl-2.0
1,159
0
10
365
551
277
274
-1
-1
{- Problem 48: Self powers The series, 1^1 + 2^2 + 3^3 + ... + 10^10 = 10405071317. Find the last ten digits of the series, 1^1 + 2^2 + 3^3 + ... + 1000^1000. -} module Problem48 where solve = (sum [x^x `mod` 10^10 | x<-[1..1000]]) `mod` 10^10
ajsmith/project-euler-solutions
src/Problem48.hs
gpl-2.0
249
0
12
54
56
33
23
2
1
{-| Module : PhaseLexer License : GPL Maintainer : helium@cs.uu.nl Stability : experimental Portability : portable -} module Helium.Main.PhaseLexer(phaseLexer) where import Helium.Main.CompileUtils import Helium.Parser.Lexer import Helium.Parser.LayoutRule(layout) phaseLexer :: ...
roberth/uu-helium
src/Helium/Main/PhaseLexer.hs
gpl-3.0
1,482
0
15
391
372
194
178
29
3
{-# LANGUAGE ForeignFunctionInterface, FlexibleInstances #-} ----------------------------------------------------------------------------------------- {-| Module : Types Copyright : (c) Daan Leijen 2003 License : wxWindows Maintainer : wxhaskell-devel@lists.sourceforge.net Stability : provisiona...
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/Types.hs
lgpl-2.1
19,349
0
14
4,843
5,012
2,685
2,327
334
1
module Semantics.Stm (evalStm) where import Control.Exception import Data.Maybe (maybeToList) import Semantics.Bexp import Semantics.Variable import Semantics.Helpers import State.App import State.Config hiding (modifyTape) import qualified State.Config as Config (modifyTape, putStructMems) import State.Error import S...
BakerSmithA/Turing
src/Semantics/Stm.hs
bsd-3-clause
6,290
0
13
1,358
1,910
978
932
96
1
module Foreign.HaPy.Internal ( sizeOfList, peekList, pokeList, copyList ) where import Foreign.C ( CInt ) import Foreign.Marshal.Array ( pokeArray, peekArray ) import Foreign.Marshal.Alloc ( mallocBytes ) import Foreign.Storable ( Storable(..) ) import Foreign.Ptr ( Ptr, plusPtr, castPtr, alignPtr ) cInt :: C...
SamuelMarks/haskell-python-talk
HaPy-haskell/Foreign/HaPy/Internal.hs
mit
1,171
0
10
240
508
262
246
34
1
module Language.Zahl where -- -- $Id$ import Random zahl :: Int -> IO String -- ein Integer dieser Länge zahl 0 = return "0" zahl l = do c <- randomRIO ( '1' , '9' ) cs <- sequence $ replicate l $ randomRIO ( '0', '9' ) return $ c : cs
Erdwolf/autotool-bonn
src/Language/Zahl.hs
gpl-2.0
256
0
10
72
96
49
47
8
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ViewPatterns #-} -- | -- Copyright : (c) 2010-2012 Benedikt Schmidt & Simon Meier -- License : GPL v3 (see LICENSE) -- -- Maintainer : Simon Meier <ir...
ekr/tamarin-prover
lib/theory/src/Theory/Constraint/Solver/Types.hs
gpl-3.0
1,425
0
3
403
47
44
3
6
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module DataFamilies.Instances () where import Prelude.Compat import Data.Aeson.TH import Data.Aeson.Types (FromJSON(..)) i...
dmjio/aeson
tests/DataFamilies/Instances.hs
bsd-3-clause
1,323
0
10
302
304
168
136
30
0
data Nat = S Nat | Z deriving (Eq, Show)
osa1/chsc
examples/toys/Generalisation.hs
bsd-3-clause
50
0
6
19
24
13
11
2
0
foo = maybe Bar{..} id
bitemyapp/apply-refact
tests/examples/Default113.hs
bsd-3-clause
22
0
6
4
16
8
8
-1
-1
{-# LANGUAGE CPP #-} module Main where import TestData import Control.Monad import Data.Char (isLetter) import qualified Data.IntMap as IMap import Data.Monoid ((<>)) import Data.Proxy import Data.Typeable import Options.Applicative import System.Directory import System.Exit import System.FilePath ((</>)) import Syst...
uuhan/Idris-dev
test/TestRun.hs
bsd-3-clause
4,250
0
20
946
1,041
554
487
84
4
{-# LANGUAGE RoleAnnotations, PolyKinds #-} module Roles1 where import Data.Kind (Type) data T1 a = K1 a data T2 a = K2 a data T3 (a :: k) = K3 data T4 (a :: Type -> Type) b = K4 (a b) data T5 a = K5 a data T6 a = K6 data T7 a b = K7 b type role T1 nominal type role T2 representational type role T3 phantom type ro...
sdiehl/ghc
testsuite/tests/roles/should_compile/Roles1.hs
bsd-3-clause
351
0
8
86
137
86
51
-1
-1
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE RankNTypes, LiberalTypeSynonyms #-} -- This test checks that deep skolemisation and deep -- instanatiation work right. A buggy prototype -- of GHC 7.0, where the type checker generated wrong -- code, sent applyTypeToArgs into a loop. module Twins where...
oldmanmike/ghc
testsuite/tests/typecheck/should_compile/twins.hs
bsd-3-clause
772
0
9
162
220
114
106
17
2
{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-missing-signatures #-} {-# LANGUAGE CPP #-} {-# LINE 13 "examples/ghc/ghc/compiler/cmm/CmmLex.x" #-} -- See Note [Warnings in code generated by Alex] in compiler/parser/Lexer.x {-# OPTIONS_GHC -fno-warn-unused-matches #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# O...
antalsz/hs-to-coq
examples/ghc/gen-files/CmmLex.hs
mit
284,339
0
25
152,799
136,484
87,044
49,440
37,273
9
module GitHub.Users.Emails where import GitHub.Internal emails = currentUser <> "/emails" --| GET /user/emails getCurrentUserEmails :: GitHub UserEmailsData getCurrentUserEmails = ghGet [] emails --| POST /user/emails addEmailAddresses :: [Text] -> GitHub UserEmailsData addEmailAddresses = ghPost emails --| DELE...
SaneApp/github-api
src/GitHub/Users/Emails.hs
mit
422
10
8
57
150
77
73
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ExtendedDefaultRules #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} import Test.Framework (defaultMain, testGroup, Test) import Test.Framework.Providers.HUnit import Test.HUnit hiding (Test, assert) import System.FilePath (searchPathSeparator) import System.Info (os) imp...
ian-ross/c2hs-macos-test
c2hs-0.26.1/tests/test-bugs.hs
mit
14,696
0
18
3,553
4,025
2,088
1,937
371
5
module Main where import System.IO import Parser import AvailableExpression import VeryBusy import ReachingDefinition import LiveVariables import ConstantPropagation import MonotoneFramework import qualified Data.Set as Set import qualified Data.Map as Map main :: IO () main = do withFile "test/while2.js" ReadMode ...
fiigii/dataflow
Main.hs
mit
2,823
0
21
1,688
578
265
313
59
2
-- Intermission: Exercises -- Given a function and its type, tell us what type results from applying some -- or all of the arguments. -- 1. If the type of f is a -> a -> a -> a, and the type of x is Char then the -- type of f x is -- a) Char -> Char -> Char *** -- b) x -> x -> x -> x -- c) a -> a -> a -- d) a -> a -...
diminishedprime/.org
reading-list/haskell_programming_from_first_principles/05_05.hs
mit
1,799
0
2
516
64
63
1
1
0
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE StandaloneDeriving #-} module FP15.Evaluator.FP ( module FP15.Evaluator.FP, module Control.Monad.RWS.Strict, module Control.Monad.Except ) where import Contro...
Ming-Tang/FP15
src/FP15/Evaluator/FP.hs
mit
1,923
0
10
351
564
318
246
48
1
{-# htermination span :: (a -> Bool) -> [a] -> ([a],[a]) #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_span_1.hs
mit
61
0
2
12
3
2
1
1
0
import Prelude hiding ((&&)) halve_a xs = (take n xs, drop n xs) where n = length xs `div` 2 remove n xs = take n xs ++ drop (n + 1) xs funct x xs = take (x + 1) xs ++ drop x xs a && b = if b then a else False
ricca509/haskellFP101x
src/lesson4.hs
mit
262
0
8
108
133
69
64
9
2
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ViewPattern...
mstksg/neural
src/Data/Neural/HMatrix/Recurrent/Dropout.hs
mit
6,362
0
22
2,161
2,234
1,152
1,082
179
3
{-# LANGUAGE Arrows, TemplateHaskell, BangPatterns #-} {-# OPTIONS -Wall #-} module Game.Input.Input ( userInput -- | TODO: move this somewhere else , untilV ) where --( ---- * Input -- UserInput --, inputNew, inputKeyDown, inputKeyUp --, inputMouseButtonDown, inputMouseButtonUp --, inputU...
mfpi/q-inqu
Game/Input/Input.hs
mit
8,953
217
15
1,664
3,049
1,699
1,350
-1
-1
{-# LANGUAGE DeriveFunctor #-} module Commands where import Control.Monad.Free import Configuration (RobotConfig) data Command = Forward Double -- move forward d centimeters | Backward Double -- move backward d centimeters | Clockwise Double -- turn d radians clockwise |...
research-team/robot-dream
src/Commands.hs
mit
1,860
0
9
544
538
276
262
43
1
{-# LANGUAGE ForeignFunctionInterface #-} module Display where import Foreign.C(CInt(..), CFloat(..)) newtype DisplayNumber = DisplayNumber CInt newtype Brightness = Brightness CFloat foreign import ccall getBrightness :: DisplayNumber -> IO Brightness foreign import ccall setBrightness :: DisplayNumber -> Brightnes...
nettsundere/ikiska
src/Display.hs
mit
330
0
9
42
82
49
33
7
0
{-# LANGUAGE OverloadedStrings, GADTs, StandaloneDeriving, DataKinds, FlexibleInstances, KindSignatures #-} module Nginx.Http.Gzip (GzipDirective, gzipDirective) where import Data.Text import Control.Applicative import Data.Attoparsec.Text import Nginx.Types (Context(..), Size, Switch) import Nginx.Utils data GzipDir...
polachok/hs-nginx
src/Nginx/Http/Gzip.hs
mit
1,392
0
10
174
293
158
135
25
1
{-# htermination readDec :: String -> [(Int,String)] #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_readDec_1.hs
mit
57
0
2
8
3
2
1
1
0
{-# LANGUAGE QuasiQuotes #-} module Text.Enhask.QQ.Select where import Text.Enhask.QQ.Quote main :: IO () main = putStrLn [select|*|]
astynax/enhask
src/Text/Enhask/QQ/Select.hs
mit
137
0
6
20
38
25
13
5
1
-- Approximate rational-degree rotations with irrational-degree -- rotations a that have rational sin a and cos a. -- This approximation can be made arbitrarily close. module Graphics.Perfract.RatRot (RatRot(..), ratRot, rrSin, rrCos) where import Data.Ratio data RatRot = RatRot { rrSin :: !Rational , rrCos :...
dancor/perfract
src/Graphics/Perfract/RatRot.hs
mit
915
0
11
215
269
145
124
25
1
{- | Module : ./GUI/GtkDisprove.hs Description : Gtk Module to enable disproving Theorems Copyright : (c) Simon Ulbricht, Uni Bremen 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : tekknix@informatik.uni-bremen.de Stability : provisional Portability : portable This module provides a ...
gnn/Hets
GUI/GtkDisprove.hs
gpl-2.0
11,313
0
33
2,849
2,759
1,316
1,443
-1
-1
module PPDiff ( ColorEnable(..) , ppDiff ) where import Data.Algorithm.Diff (Diff(..)) import System.Console.ANSI data ColorEnable = EnableColor | DisableColor wrap :: ColorEnable -> Color -> String -> String wrap DisableColor _ str = str wrap EnableColor color str = setSGRCode [SetColor Foreground Vivid color...
sinelaw/resolve-trivial-conflicts
PPDiff.hs
gpl-2.0
526
0
9
111
211
112
99
13
1
{-# LANGUAGE CPP #-} {- | Module : ./GUI/GenericATP.hs Description : Generic Prover GUI. Copyright : (c) Thiemo Wiedemeyer, Uni Bremen 2009 License : GPLv2 or higher, see LICENSE.txt Maintainer : raider@informatik.uni-bremen.de Stability : provisional Portability : needs POSIX Generic GUI for aut...
spechub/Hets
GUI/GenericATP.hs
gpl-2.0
1,570
0
15
381
142
84
58
14
1
{-# LANGUAGE OverloadedStrings #-} module CV.Projects where import Data.Text import CV.Shared data Project = Project { title :: Text, role :: ProjectRole, homepage :: URI, github :: Maybe Text, pypi :: Maybe Text, dateRange :: DateRange, desc :: Markdown, updates :: [ Update ] } deriving Show data...
JonathanReeve/JonathanReeve.github.io
src/CV/Projects.hs
gpl-2.0
15,480
0
15
4,698
2,260
1,227
1,033
223
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE LambdaCase #-} ----------------------------------------------------------------------------- -- -- Module : IDE.Metainfo.PackageCollector -- Copyright : 2007-2009 Juergen Nicklisch-Franken, Hamish Mackenzie -- License : G...
JPMoresmau/leksah-server
src/IDE/Metainfo/PackageCollector.hs
gpl-2.0
9,484
1
32
2,974
2,188
1,139
1,049
163
14
module Graphics.Implicit.Export.Symbolic.Rebound3 (rebound3) where import Graphics.Implicit.Definitions import Data.VectorSpace rebound3 :: BoxedObj3 -> BoxedObj3 rebound3 (obj, (a,b)) = let d :: ℝ3 d = (b ^-^ a) ^/ 10 in (obj, ((a ^-^ d), (b ^+^ d)))
silky/ImplicitCAD
Graphics/Implicit/Export/Symbolic/Rebound3.hs
gpl-2.0
291
0
11
73
107
64
43
9
1
module SpacialGameMsg.SGModelMsg where import System.Random import Data.Maybe import Data.List import qualified PureAgentsPar as PA import qualified Data.Map as Map data SGState = Defector | Cooperator deriving (Eq, Show) data SGMsg = NeighbourPayoff (SGState, Double) | NeighbourState SGState deriving (Eq, Show) d...
thalerjonathan/phd
coding/prototyping/haskell/declarativeABM/haskell/SpatialGameABS/src/SpacialGameMsg/SGModelMsg.hs
gpl-3.0
7,715
0
12
2,402
2,477
1,374
1,103
158
2
Profunctor p => (forall c. p c c) -> p a b
hmemcpy/milewski-ctfp-pdf
src/content/3.10/code/haskell/snippet07.hs
gpl-3.0
42
3
5
11
32
15
17
-1
-1
import System.Environment import qualified Data.Text as T ( pack ) import qualified Data.Text.Lazy as TL ( pack ) import Text.Regex import Text.Regex.Posix import Network.Mail.SMTP data SchoolClass = Inte | Info | Art from = Address Nothing $ T.pack "x20058@edu.ipc.hiroshima-cu.ac.jp" cc = [ ] bcc = [ ] subject = T.p...
minamiyama1994/SendMails
SendMails.hs
gpl-3.0
1,898
0
12
253
394
205
189
28
3
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE ExistentialQuantification #-} module Data.RTree.RTree where import Control.Concurrent.STM import qualified Data.Vector as V import qualified Data.RTree.Internal.RTree as I import Data.RTree.Internal.RTree (RInsert(..)) import Data.RTree.TStore ...
johnpmayer/concurrent-rtree
Data/RTree/RTree.hs
agpl-3.0
961
0
16
207
360
187
173
29
3
module Main where import Graphics.Gloss import Graphics.Gloss.Interface.IO.Game gameUpdatesPerSecond :: Int gameUpdatesPerSecond = 4 windowWidth :: Int windowWidth = 320 windowHeight :: Int windowHeight = 200 windowCaption :: String windowCaption = "Haskell hackathon retro-game by Cats & Dogs" data World = World ...
ToJans/retrohackathon
src/Main.hs
unlicense
1,046
12
5
294
209
119
90
35
1
module Utils where import qualified Turtle as Turtle -- import qualified Data.Optional as Optional import qualified Network.AWS.Prelude as AwsPrelude import qualified Text.PrettyPrint.Boxes as Boxes import Aws import qualified Data.List as List import qualified Data.Text as Text -- source: -- http://www.tedreed.info/p...
huseyinyilmaz/spotprices
src/Utils.hs
apache-2.0
1,758
0
12
421
538
298
240
32
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} module PopVox.Types.Orgs ( OrgContribIndex , OrgContribIndex' , OrgContrib(..) , OrgInfo(..) , orgInfoID , orgInfoName , orgInfoDisposition ) where import Control.Applicative import Control.Len...
erochest/popvox-scrape
src/PopVox/Types/Orgs.hs
apache-2.0
2,603
0
12
980
622
334
288
73
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QFileDialog_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:26 Warning : this file is machine generated - do...
uduki/hsQt
Qtc/Gui/QFileDialog_h.hs
bsd-2-clause
56,474
0
18
11,967
18,436
8,896
9,540
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANG...
HuwCampbell/grenade
src/Grenade/Core/Shape.hs
bsd-2-clause
6,544
0
15
1,794
2,007
1,052
955
142
4
{-# LANGUAGE OverloadedStrings #-} module Network.Sasl.ScramSha1.ScramSha1 ( clientFirstMessageBare, serverFirstMessage, clientFinalMessageWithoutProof, serverFinalMessage, readClientFirstMessage, readServerFirstMessage, readClientFinalMessage, readServerFinalMessage, xo, hash, saltedPassword, clientKey, s...
YoshikuniJujo/sasl
src/Network/Sasl/ScramSha1/ScramSha1.hs
bsd-3-clause
2,218
30
16
311
733
398
335
50
2
{-# OPTIONS_GHC -fno-warn-orphans #-} module AI.API.My ( alphabeta , negascout , minimax ) where import Types import Game import AI.Eval import AI.Types import qualified AI.Algorithms.My as Algo alphabeta :: Board b => Evaluation -> Position b -> Depth -> (PV, Score) alphabeta = runAlgo Algo.alphabeta nega...
sphynx/hamisado
AI/API/My.hs
bsd-3-clause
938
0
12
206
358
190
168
26
1
module Wyas.Repl where import Wyas.Error import Wyas.Parser import Wyas.Evaluator import Control.Monad (liftM) import System.IO flushStr :: String -> IO () flushStr str = putStr str >> hFlush stdout readPrompt :: String -> IO String readPrompt prompt = flushStr prompt >> getLine evalString :: Env -> String -> IO S...
grtlr/wyas
src/Wyas/Repl.hs
bsd-3-clause
901
0
12
186
358
178
180
24
2
module RSS (getRSSDoc, renderRSS) where import Control.Applicative import qualified Data.ByteString.Lazy.Char8 as LZ import Data.Time import Data.Time.Format (formatTime) import System.Locale (defaultTimeLocale) import Text.Hastache import Text.Hastache.Context import Config import Definition import Entry (formatDat...
mazelife/agilulf
src/Agiluf/RSS.hs
bsd-3-clause
1,099
0
10
225
329
175
154
28
1
module Options where import CodeGeneration.JavascriptCode -- | Program options data Options = Options { -- | Input HTML inputReader :: IO String, -- | Function that writes the output outputWriter :: String -> IO (), -- | Javascript writing logic javascript :: JavascriptCode }
sergioifg94/Hendoman
src/Options.hs
bsd-3-clause
295
0
11
62
52
32
20
6
0
import Test.Hspec import WordNumber import Cipher import StdFunctions main :: IO () main = hspec $ do describe "myWords" $ do it "single word without prepended space" $ do myWords prependEq prependNEq "all" `shouldBe` ["all"] it "single word with prepended space" $ do myWords prependEq prepen...
halarnold2000/learnhaskell
test/Spec.hs
bsd-3-clause
1,828
0
16
504
483
229
254
42
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TemplateHaskell #-} module Example where import Prelude (String, concat, error, otherwise) import Development.GitRev panic :: String -> a panic msg = error panicMsg where panicMsg = concat [ "[panic ", $(gitBranch), "@", $(gitHash) , " (", $(...
acfoltzer/gitrev
Example.hs
bsd-3-clause
559
0
11
164
145
83
62
15
1
{- (c) The University of Glasgow 2006-2008 (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 -} {-# LANGUAGE CPP, NondecreasingIndentation #-} -- | Module for constructing @ModIface@ values (interface files), -- writing them to disk and comparing two versions to see if -- recompilation is required. module MkI...
snoyberg/ghc
compiler/iface/MkIface.hs
bsd-3-clause
84,065
3
24
26,295
14,587
7,647
6,940
-1
-1
{-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -- -- Copyright (c) 2009-2011, ERICSSON AB -- All rights...
emwap/feldspar-language
src/Feldspar/Core/Constructs/MutableArray.hs
bsd-3-clause
4,719
0
14
939
895
473
422
51
1
module Rho.Bitfield where import Control.Monad import qualified Data.Bits as B import qualified Data.ByteString as B import qualified Data.Set as S import qualified Data.Vector.Storable as SV import qualified Data.Vector.Storable.Mutable as MV impor...
osa1/rho-torrent
src/Rho/Bitfield.hs
bsd-3-clause
4,787
0
15
1,246
1,366
717
649
85
2
{-# LANGUAGE GADTs, RecordWildCards, FlexibleContexts, TemplateHaskell #-} module YaLedger.Processor.Rules (runRules) where import Control.Monad.State import Control.Monad.Exception import Data.Maybe import Data.Decimal import Data.Hashable import qualified Data.Map as M import Data.Dates import Text.Printf import ...
portnov/yaledger
YaLedger/Processor/Rules.hs
bsd-3-clause
4,174
0
22
1,356
1,262
650
612
91
6
module Lib ( hagentoMain ) where import Args (Options(..)) import qualified Args import qualified Xml import qualified Magento hagentoMain :: IO () hagentoMain = Args.argsParser run run :: Options -> IO () run opts@Options { optRoot = root, subCommand = Args.XmlListFiles } = do putStrLn $ show opts files...
dxtr/hagento
src/Lib.hs
bsd-3-clause
392
0
10
78
128
70
58
13
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE UndecidableInstances #-} module Cabal.Config ( -- * Types Config (..), Repo (..), RepoName, -- * Parsing readConfig, findConfig, parseConfig, resolveConfig, ...
hvr/multi-ghc-travis
cabal-install-parsers/src/Cabal/Config.hs
bsd-3-clause
7,443
0
15
1,492
1,733
929
804
-1
-1
-- | -- -- Utils for using aeson's deriveJSON with lens's makeFields module Data.Aeson.APIFieldJsonTH ( -- * How to use this library -- $use deriveApiFieldJSON ) where import Prelude import Data.Aeson.TH import qualified Data.Char as C (toLower) import Language.Haskell.TH (Q, Dec, Name, nameBase) -- ...
nakaji-dayo/api-field-json-th
Data/Aeson/APIFieldJsonTH.hs
bsd-3-clause
1,108
0
9
207
203
122
81
14
1
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Web.RTBBidder.Protocol.Adx.BidRequest.PublisherType (PublisherType(..)) where import Prelude ((+), (/), (.)) import qualified Prelude as Prelude' import qualifi...
hiratara/hs-rtb-bidder
src/Web/RTBBidder/Protocol/Adx/BidRequest/PublisherType.hs
bsd-3-clause
3,641
0
11
536
751
414
337
68
1
import Test.DocTest main = doctest ["-isrc", "src/Data/BEncode/Reader.hs"]
matthewleon/bencode
tests/doctests.hs
bsd-3-clause
75
0
6
7
20
11
9
2
1
-- |Various types of hosts that Metasploit might interact -- with. Particularly, /attackable/ and /scannable/ hosts. {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} module MSF.Host where import MsgPack -- | A metasploit framework RPC server. data Server...
GaloisInc/msf-haskell
src/MSF/Host.hs
bsd-3-clause
3,197
0
10
618
852
436
416
-1
-1
-- ChalkBoard Options -- October 2009 -- Kevin Matlage, Andy Gill module Graphics.ChalkBoard.Options where import Graphics.ChalkBoard.CBIR( BufferId ) import Data.Binary import Control.Monad data Options = NoFBO | DebugFrames | DebugAll -- ^ not supported (yet!) | DebugBoa...
andygill/chalkboard2
Graphics/ChalkBoard/Options.hs
bsd-3-clause
1,192
22
15
387
373
201
172
30
0
; ; HSP help manager—p HELPƒ\[ƒXƒtƒ@ƒCƒ‹ ; (æ“ª‚ªu;v‚̍s‚̓Rƒƒ“ƒg‚Æ‚µ‚ďˆ—‚³‚ê‚Ü‚·) ; %type Šg’£–½—ß %ver 3.4 %note hspcv.as‚ðƒCƒ“ƒNƒ‹[ƒh‚·‚邱‚ƁB %date 2009/08/01 %author onitama %dll hspcv %url http://hsp.tv/ %port Win %index cvreset HSPCV‚̏‰Šú‰» %group Šg’£‰æ–ʐ§Œä–½—ß %inst...
zakki/openhsp
package/hsphelp/hspcv.hs
bsd-3-clause
19,075
8,088
28
2,145
18,836
10,053
8,783
-1
-1
{-# LANGUAGE TupleSections, RecordWildCards, CPP #-} module Network.HPACK.Table ( -- * dynamic table DynamicTable , newDynamicTableForEncoding , newDynamicTableForDecoding , renewDynamicTable , printDynamicTable , isDynamicTableEmpty -- * Insertion , insertEntry -- * Header to index , HeaderCac...
bergmark/http2
Network/HPACK/Table.hs
bsd-3-clause
2,832
0
16
621
636
343
293
51
10
module Data.Conduit.Network.Julius.Types ( ) where import Data.Text(Text) data JuliusMessage = StartProc | EndProc | StartRecog | EndRecog | IStatus {inputStatus :: InputStatus, time :: Int} | Inpu...
haru2036/julius-client-hs
Data/Conduit/Network/Julius/Types.hs
bsd-3-clause
1,096
0
9
491
249
157
92
26
1
module Main where import Day5 main :: IO () main = do putStrLn $ getPasswd' 8 0 "cxdnnyjw"
reidwilbur/aoc2016
app/Main.hs
bsd-3-clause
94
0
8
21
36
19
17
5
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE BangPatterns #-} -- Copyright : Erik de Castro Lopo <erikd@mega-nerd.com> -- License : BSD3 module Network.Wai.Handler.Warp.ReadInt ( readInt , readInt64 ) where import qualified Data.ByteString as S import Network.Wai.Handler.Warp.Imports hiding (re...
kazu-yamamoto/wai
warp/Network/Wai/Handler/Warp/ReadInt.hs
mit
1,029
0
12
210
177
103
74
16
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# L...
agocorona/ghcjs-hplay
src/GHCJS/HPlay/View.hs
mit
64,020
65
29
21,139
14,828
7,506
7,322
853
7
{-# LANGUAGE ScopedTypeVariables #-} module WeiXin.PublicPlatform.EndUser ( wxppQueryEndUserInfo , wxppBatchQueryEndUserInfo, wxppBatchQueryEndUserInfoMaxNum , wxppBatchQueryEndUserInfoConduit , GetUserResult(..) , wxppOpenIdListInGetUserResult , wxppGetEndUserSource , wxppGetEndUserSource' ...
yoo-e/weixin-mp-sdk
WeiXin/PublicPlatform/EndUser.hs
mit
18,373
0
27
6,009
3,910
1,987
1,923
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-cloudhsm/gen/Network/AWS/CloudHSM/DeleteHSM.hs
mpl-2.0
3,972
0
14
926
578
347
231
76
1
module GramLab.Morfette.Models2 ( train , trainFun , predict , predictPipeline , toModelFun , mkPreprune , sentToExamples ...
bitemyapp/morfette
src/GramLab/Morfette/Models2.hs
bsd-2-clause
6,189
0
18
2,730
1,990
1,056
934
129
2
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1999 Analysis functions over data types. Specficially, detecting recursive types. This stuff is only used for source-code decls; it's recorded in interface files for imported data types. -} {-# LANGUAGE CPP #-} module TcTyD...
mcschroeder/ghc
compiler/typecheck/TcTyDecls.hs
bsd-3-clause
45,148
3
19
12,828
6,105
3,201
2,904
422
10
{-# LANGUAGE Haskell2010, OverloadedStrings #-} {-# LINE 1 "Network/Wai/Middleware/Jsonp.hs" #-} {-# LANGUAGE RankNTypes, CPP #-} ---------------------------------------------------...
phischu/fragnix
tests/packages/scotty/Network.Wai.Middleware.Jsonp.hs
bsd-3-clause
3,450
0
16
1,174
710
380
330
65
8
-- | -- Module : $Header$ -- Copyright : (c) 2013-2014 Galois, Inc. -- License : BSD3 -- Maintainer : cryptol@galois.com -- Stability : provisional -- Portability : portable {-# LANGUAGE CPP #-} #define DEBUG #ifdef DEBUG {-# LANGUAGE Trustworthy #-} #else {-# LANGUAGE Safe #-} #endif module Cryp...
TomMD/cryptol
src/Cryptol/Utils/Debug.hs
bsd-3-clause
564
0
7
123
87
57
30
9
1
module UI.Command.App ( App, appArgs, appConfig, AppContext(..) ) where import Data.Default import Control.Monad.Reader import System.Console.GetOpt import Control.Monad (when) import System.Environment (getArgs) import System.Exit --------------------------------------------------...
kfish/ui-command
UI/Command/App.hs
bsd-3-clause
758
0
9
145
181
109
72
19
1
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Test.GHC.Gen where #ifdef DEBUG import Test.QuickCheck import SrcLoc import FastString instance Arbitrary SrcSpan where arbitrary = sized $ \s -> do let file = mkFastString "<testing>" l_from <- choose (1, s+1) c_from <- choose (0,...
CristhianMotoche/scion
lib/Test/GHC/Gen.hs
bsd-3-clause
1,149
0
15
405
176
94
82
3
0
{-| Implementation of the Ganeti confd utilities. This holds a few utility functions that could be useful in both clients and servers. -} {- Copyright (C) 2011, 2012 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the fol...
grnet/snf-ganeti
src/Ganeti/Confd/Utils.hs
bsd-2-clause
6,048
0
15
1,265
1,194
631
563
90
5
{-# language QuasiQuotes #-} module Planetary.Library.Management (resolvedDecls) where import NeatInterpolation import Planetary.Core -- import Planetary.Support.NameResolution import Planetary.Support.Parser decls = forceDeclarations [text| data LanguageDiff = | <Apply {<Syntax> -> <Syntax>} {<Semantics> -> <Sema...
joelburget/interplanetary-computation
src/Planetary/Library/Management.hs
bsd-3-clause
451
0
5
53
51
34
17
8
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE RankNTypes, TypeFamilies #-} module ETA.Core.TrieMap( CoreMap, emptyCoreMap, extendCoreMap, lookupCoreMap, foldCoreMap, TypeMap, emptyTypeMap, extendTypeMap, lookupTypeMap, foldTypeMap, CoercionMap,...
alexander-at-github/eta
compiler/ETA/Core/TrieMap.hs
bsd-3-clause
32,258
0
23
11,021
11,351
5,794
5,557
577
15
{-# LANGUAGE TypeFamilies, QuasiQuotes, TemplateHaskell, MultiParamTypeClasses, OverloadedStrings #-} module YesodCoreTest.StubSslOnly ( App ( App ) , Widget , resourcesApp ) where import Yesod.Core import qualified Web.ClientSession as CS data App = App mkYesod "App" [parseRoutes| /...
s9gf4ult/yesod
yesod-core/test/YesodCoreTest/StubSslOnly.hs
mit
674
0
8
157
123
71
52
19
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="sq-AL"> <title>Windows WebDrivers</title> <maps> <homeID>top</homeID> <mapref location=...
thc202/zap-extensions
addOns/webdrivers/webdriverwindows/src/main/javahelp/org/zaproxy/zap/extension/webdriverwindows/resources/help_sq_AL/helpset_sq_AL.hs
apache-2.0
963
77
66
156
407
206
201
-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>OAST Support Add-on</title> <maps> <homeID>oast</homeID> <mapref locatio...
thc202/zap-extensions
addOns/oast/src/main/javahelp/org/zaproxy/addon/oast/resources/help_ar_SA/helpset_ar_SA.hs
apache-2.0
965
77
67
157
413
209
204
-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="pt-BR"> <title>Directory List v2.3 LC</title> <maps> <homeID>directorylistv2_3_lc</homeID> ...
kingthorin/zap-extensions
addOns/directorylistv2_3_lc/src/main/javahelp/help_pt_BR/helpset_pt_BR.hs
apache-2.0
984
78
66
158
414
210
204
-1
-1
{-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving, MagicHash, UnboxedTuples #-} -- !!! stress tests of copying/cloning primitive arrays -- Note: You can run this test manually with an argument (i.e. -- ./CopySmallArrayStressTest 10000) if you want to run the stress -- test for longer. {- Test strate...
frantisekfarka/ghc-dsi
testsuite/tests/codeGen/should_run/CopySmallArrayStressTest.hs
bsd-3-clause
11,860
0
24
3,676
4,304
2,117
2,187
273
2
{-# OPTIONS_GHC -fwarn-safe #-} {-# OPTIONS_GHC -fwarn-unsafe #-} {-# LANGUAGE TemplateHaskell #-} -- | Unsafe as uses TH module UnsafeWarn02 where f :: Int f = 1
urbanslug/ghc
testsuite/tests/safeHaskell/safeInfered/UnsafeWarn02.hs
bsd-3-clause
166
0
4
30
18
13
5
6
1