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 Transputer ( Op(..), Transputer(..), Registers(..), StatusRegisters(..) ) where import Data.ByteString import Data.Int ( Int32 ) import Control.Lens data Op = Prefix | NegativePrefix | Operate | LoadConstant | LoadLocal | StoreLocal | LoadLocalPointer | A...
rossng/transputer-simulator
src/Transputer.hs
apache-2.0
3,595
0
8
1,289
569
373
196
144
0
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="ru-RU"> <title>Code Dx | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref loca...
secdec/zap-extensions
addOns/codedx/src/main/javahelp/org/zaproxy/zap/extension/codedx/resources/help_ru_RU/helpset_ru_RU.hs
apache-2.0
968
78
66
159
413
209
204
-1
-1
module Distribution.Sandbox.Utils where import System.Directory (doesFileExist) import System.FilePath ((</>)) import Data.Maybe (mapMaybe, listToMaybe) import Codex.Internal findSandbox :: FilePath -> IO (Maybe FilePath) findSandbox prjDir = do fileExists <- doesFileExist configFile if fileExists then readSandb...
aloiscochard/codex
src/Distribution/Sandbox/Utils.hs
apache-2.0
1,245
0
13
248
367
190
177
28
2
{-# LANGUAGE RecordWildCards #-} module NLP.FeatureStructure.Reid ( -- * Pure operations reidGraph -- * Reid monad , ReidT , Reid , runReidT , runReid -- * Primitives , reid , reidGraphM , split ) where import Control.Applicative ((<$>), (<*>)) import qualified Control.Monad.State.Strict as S import ...
kawu/feature-structure
src/NLP/FeatureStructure/Reid.hs
bsd-2-clause
2,414
0
14
604
800
442
358
58
2
module FractalFlame.Flam3.Types.Xform where import FractalFlame.Types.Base import FractalFlame.Types.LinearParams import FractalFlame.Variation.Types.Variation import FractalFlame.Variation.Types.VParams -- | Basic unit sampled by Iterated Function System. Corresponds to an xform element in a flam3 file. data Xform ...
anthezium/fractal_flame_renderer_haskell
FractalFlame/Flam3/Types/Xform.hs
bsd-2-clause
817
0
9
168
97
64
33
12
0
{-# LANGUAGE TemplateHaskell #-} module Database.Relational.Schema.Oracle ( normalizeColumn, notNull, getType , columnsQuerySQL, primaryKeyQuerySQL ) where import Control.Applicative ((<|>), (<$>)) import Data.ByteString (ByteString) import Data.Char (toLower) import Data.Map (Map) import qualified Data.M...
amutake/haskell-relational-record-driver-oracle
src/Database/Relational/Schema/Oracle.hs
bsd-3-clause
4,619
0
13
848
1,192
696
496
85
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE PolyKinds #-} {-# OPTIONS_HADDOCK not-home #-} module Servant.API.Header ( Header(..), ) where import Data.ByteString (ByteString) import Data.Typeable (Typeable)...
zerobuzz/servant
servant/src/Servant/API/Header.hs
bsd-3-clause
913
0
6
256
108
73
35
14
0
import Criterion.Main import qualified Data.Conduit as C import qualified Data.Conduit.List as CL import qualified Data.Conduit.Binary as CB import Control.Pipe.Binary import Control.Pipe.Combinators import Control.Pipe testFile :: FilePath testFile = "bench/general.hs" main :: IO () main = defaultMain [ bench "...
pcapriotti/pipes-extra
bench/general.hs
bsd-3-clause
946
0
15
165
367
201
166
17
1
module MiniMarkdown where {-# LANGUAGE NoMonomorphismRestriction #-} import Text.ParserCombinators.Parsec (Parser) import Text.Parsec import Control.Applicative (pure, liftA2, (*>),(<*),(<*>),(<$>)) import Data.List (intersperse) import Debug.Trace data Token = Head (Int, String) | Par [Token] ...
greole/calendula
MiniMarkdown.hs
bsd-3-clause
6,218
0
13
1,835
2,151
1,091
1,060
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module RazorsLambda.Interactive where import Control.Monad import Control.Monad.Free import Control.Monad.Free.TH import qualified Data.Map as Map import Data...
acfoltzer/RazorsLambda
src/RazorsLambda/Interactive.hs
bsd-3-clause
2,642
0
26
738
825
423
402
89
14
module Bindings.GObject ( module Bindings.GObject.BaseObjectType, module Bindings.GObject.BoxedTypes, module Bindings.GObject.Closures, module Bindings.GObject.EnumerationAndFlagTypes, module Bindings.GObject.GenericValues, module Bindings.GObject.GParamSpec, module Bindings.GObject.GTypeModule, ...
Yuras/bindings-gobject
src/Bindings/GObject.hs
bsd-3-clause
1,054
0
5
97
177
122
55
27
0
module GHCApi where import Control.Monad import CoreMonad import DynFlags import ErrMsg import Exception import GHC import GHC.Paths (libdir) import Types ---------------------------------------------------------------- withGHC :: (MonadPlus m) => Ghc (m a) -> IO (m a) withGHC body = ghandle ignore $ runGhc (Just li...
himura/ghc-mod
GHCApi.hs
bsd-3-clause
1,760
0
13
320
526
272
254
41
1
{-# LANGUAGE TypeFamilies #-} ----------------------------------------------------------------------------- -- | -- Module : Geometry.ThreeD.Combinators -- Copyright : (c) 2013-2017 diagrams team (see LICENSE) -- License : BSD-style (see LICENSE) -- Maintainer : diagrams-discuss@googlegroups.com -- -- ...
cchalmers/geometry
src/Geometry/ThreeD/Combinators.hs
bsd-3-clause
4,587
0
7
945
1,160
644
516
55
1
{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Main (main) where import Control.Concurrent --import Codec.Text.Detect (detectEncodingName) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as L imp...
jystic/language-csharp
src/Main.hs
bsd-3-clause
4,467
0
13
1,211
337
198
139
39
2
-- | This module provides the type and the rules for building the computation graph. -- Refinement and evaluation steps depend on the (abstract) semantics. -- Strategies for finding instances are should be implemented here. module Jat.CompGraph ( MkJGraph , JGraph , mkJGraph , mkJGraph2Dot , mkJGraph2TRS...
ComputationWithBoundedResources/jat
src/Jat/CompGraph.hs
bsd-3-clause
13,058
0
17
3,368
4,575
2,341
2,234
236
6
{-# LANGUAGE FlexibleContexts, DeriveDataTypeable #-} module Aws.Xml where import Aws.Response import Control.Monad.IO.Class import Data.Attempt (Attempt(..)) import Data.Conduit (($$)) import Data.IORef import Data.Monoid impo...
jgm/aws
Aws/Xml.hs
bsd-3-clause
2,110
0
12
640
638
339
299
48
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} module VC.Tree where import Filesystem.Path (basename) import Shelly import Control.Monad.Extra import Prelude hiding (FilePath) #if __GLASGOW_HASKELL__ < 710 import Data.Traversable #endif ch...
bergey/vcatt
src/VC/Tree.hs
bsd-3-clause
1,941
0
14
518
603
316
287
57
4
module Muster.Internal.Charset ( Charset(..) , none , any , elem , notElem , insert , remove , intersect , oneOf ) where import Prelude hiding (any, elem, notElem) import qualified Data.List as L import Data.Maybe import Test.QuickCheck data Charset = AnyOf String | NoneOf String ...
DasIch/haskell-muster
src/Muster/Internal/Charset.hs
bsd-3-clause
2,025
0
11
496
954
494
460
60
1
module Container.Tree.PersistentCont where import Annotation.Persistent (P) import Control.Applicative import Data.Binary import Data.Maybe import Generics.Cont import Generics.Regular.Base () import Generics.Fixpoint import Heap.Heap hiding (size) import Prelude hiding (lookup, null) import qualified Container.Tree.A...
sebastiaanvisser/islay
src/Container/Tree/PersistentCont.hs
bsd-3-clause
1,988
0
14
446
1,102
567
535
41
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE RankNTypes #-} module LazyCrossCheck.Utils where import Data.Data import LazyCrossCheck.Primitives getConstructors :: forall a . Data a => Proxy a -> [Constr] getConstructors _ = dataTypeConstrs $ dataTypeOf (undefined :: a) ...
TristanAllwood/lazyCrossCheck
LazyCrossCheck/Utils.hs
bsd-3-clause
606
0
9
101
191
102
89
13
1
import CCO.ArithBool (eval) import CCO.Component (component, printer, ioWrap) import CCO.Tree (parser, Tree (fromTree, toTree)) import Control.Arrow (Arrow (arr), (>>>)) main = ioWrap $ parser >>> component toTree >>> component eval >>> arr fromTree >>> printer
UU-ComputerScience/uu-cco
uu-cco-examples/src/EvalArithBool.hs
bsd-3-clause
273
0
9
46
99
58
41
6
1
-- $Id$ module Scorer.Util ( module Scorer.Util , module Control.Types ) where import Control.Types import Time zeit :: IO String zeit = do clock <- getClockTime cal <- toCalendarTime clock return $ calendarTimeToString cal ----------------------------------------------------------------------...
Erdwolf/autotool-bonn
src/Scorer/Util.hs
gpl-2.0
1,000
0
12
196
353
187
166
24
1
{-# LANGUAGE RecordWildCards, RankNTypes #-} module Buildsome.Slave ( Slave, newWithUnmask , target , str , wait, waitCatch , cancel ) where import qualified Buildsome.Color as Color import Control.Concurrent.Async (Async) import qualified Control.Concurrent.Async as Async import qual...
buildsome/buildsome
src/Buildsome/Slave.hs
gpl-2.0
2,382
0
14
528
490
279
211
42
1
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} module SSH.Session where import Control.Concurrent.Chan import Control.Monad.IO.Class import Control.Monad.Trans.State import Data.Binary (decode, encode) import Data.Word import System.IO import qualified Codec.Crypto.SimpleAES as A import qualified Data.ByteSt...
teh/teh-ssh
src/SSH/Session.hs
bsd-3-clause
5,603
0
19
1,886
1,646
879
767
146
2
----------------------------------------------------------------------------- -- | -- Module : Data.Yaml.YamlLight -- Copyright : Michael Ilseman (c) 2010 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : michael <dot> ilseman <at> gmail <dot> com -- Stability : provisional -- Portabil...
ilseman2/yaml-light
Data/Yaml/YamlLight.hs
bsd-3-clause
9,759
0
11
2,669
1,626
903
723
98
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Snap.Internal.Http.Server.Socket.Tests (tests) where ------------------------------------------------------------------------------ import Control.Applicative ((<$>)) import qu...
sopvop/snap-server
test/Snap/Internal/Http/Server/Socket/Tests.hs
bsd-3-clause
6,866
0
20
1,901
1,417
736
681
60
1
import System.IO import TPM doExport :: String -> TPM_PUBKEY -> IO () doExport fileName pubKey = do handle <- openFile fileName WriteMode hPutStrLn handle $ show pubKey hClose handle
armoredsoftware/protocol
tpm/mainline/attestation/exportEK.hs
bsd-3-clause
189
0
8
35
68
31
37
7
1
module Compiler.Parser(parse) where import Compiler.Lp import Compiler.Util parse :: String -> Program parse = map parseRule . chunks . filter (not . dull) . lines where dull x = all isSpace x || "#" `isPrefixOf` x chunks = rep (\(x:xs) -> first (x:) $ break (not . isSpace . head) xs) parseRul...
silkapp/tagsoup
dead/parser/Compiler/Parser.hs
bsd-3-clause
2,105
0
14
527
1,058
546
512
48
3
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[RnNames]{Extracting imported and top-level names in scope} -} {-# LANGUAGE CPP, NondecreasingIndentation #-} module RnNames ( rnImports, getLocalNonValBinders, rnExports, extendGlobalRdrEnvRn, gresFromAvails, calcul...
forked-upstream-packages-for-ghcjs/ghc
compiler/rename/RnNames.hs
bsd-3-clause
77,667
3
26
24,043
14,142
7,280
6,862
-1
-1
{-# LANGUAGE ForeignFunctionInterface #-} module Layout.Foreign where import Foreign.C.Types import GHC.Exts foreign import ccall "wxStyledTextCtrl_ShowLines" wxStyledTextCtrl_ShowLines :: Ptr (Int) -> CInt -> CInt -> IO () foreign export ccall "wxStyledTextCtrl_ShowLines" wxStyledTextCtrl_ShowLines :: Ptr (Int) ->...
RefactoringTools/HaRe
test/testdata/Layout/Foreign.hs
bsd-3-clause
355
0
10
52
93
51
42
7
1
module Test13 where f = [(let x = 45 in [x])]
mpickering/HaRe
old/testing/refacSlicing/Test13.hs
bsd-3-clause
47
0
10
12
29
17
12
2
1
{-# LANGUAGE EmptyDataDecls, TypeFamilies, UndecidableInstances, ScopedTypeVariables, TypeOperators, FlexibleInstances, NoMonomorphismRestriction, MultiParamTypeClasses, FlexibleContexts #-} module IndTypesPerfMerge where data a :* b = a :* b infixr 6 :* data TRUE data FALSE dat...
urbanslug/ghc
testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs
bsd-3-clause
4,264
0
12
1,073
1,696
904
792
-1
-1
module Bug1 where -- | We should have different anchors for constructors and types\/classes. This -- hyperlink should point to the type constructor by default: 'T'. data T = T
DavidAlphaFox/ghc
utils/haddock/html-test/src/Bug1.hs
bsd-3-clause
179
0
5
33
13
9
4
2
0
{-# LANGUAGE DataKinds #-} -- This bug related to type trimming, and -- hence showed up only with -O0 module Bug() where data UnaryTypeC a = UnaryDataC a type Bug = 'UnaryDataC
ezyang/ghc
testsuite/tests/polykinds/T5912.hs
bsd-3-clause
183
0
6
38
28
19
9
4
0
data Vec3 = Vec3 !Double !Double !Double deriving (Show) infixl 6 ^+^, ^-^ infixr 7 *^, <.> negateV :: Vec3 -> Vec3 negateV (Vec3 x y z) = Vec3 (-x) (-y) (-z) (^+^), (^-^) :: Vec3 -> Vec3 -> Vec3 Vec3 x1 y1 z1 ^+^ Vec3 x2 y2 z2 = Vec3 (x1 + x2) (y1 + y2) (z1 + z2) v ^-^ v' = v ^+^ negateV v' (*^) :: Double -> V...
olsner/ghc
testsuite/tests/numeric/should_run/T9407.hs
bsd-3-clause
1,556
0
16
498
727
374
353
48
1
module FilenameDescr where import Data.Char import Data.Either import Data.List import BuildInfo import Utils import Tar -- We can't just compare plain filenames, because versions numbers of GHC -- and the libraries will vary. So we use FilenameDescr instead, which -- abstracts out the version numbers. type Filenam...
urbanslug/ghc
distrib/compare/FilenameDescr.hs
bsd-3-clause
2,287
0
14
749
554
286
268
48
8
{-# LANGUAGE ScopedTypeVariables #-} import Control.Exception import Control.Monad import GHC.Conc main = join $ atomically $ do catchSTM (throwSTM ThreadKilled `orElse` return (putStrLn "wtf")) (\(e::SomeException) -> return (putStrLn "ok"))
urbanslug/ghc
testsuite/tests/rts/T8035.hs
bsd-3-clause
255
0
13
41
83
44
39
8
1
module Foundation where import Prelude import Yesod import Yesod.Static import Yesod.Auth import Yesod.Auth.BrowserId import Yesod.Auth.GoogleEmail import Yesod.Default.Config import Yesod.Default.Util (addStaticContentExternal) import Network.HTTP.Conduit (Manager) import qualified Settings import Settings.Developmen...
dphilipson/word_guesser_web
Foundation.hs
mit
6,537
0
17
1,381
951
513
438
-1
-1
module Database.Posts ( createPost, getPostsSince, getPost, postChildren, ) where import BasePrelude import Control.Concurrent.Chan import Data.Text (Text) import Data.Time.Clock (getCurrentTime, UTCTime) import Database.Internal toPost :: [SqlValue] -> ResolvedPost toPost [idPost, idUser, content, idParent, ...
hlian/basilica
Database/Posts.hs
mit
2,620
0
12
714
716
378
338
-1
-1
module Antiqua.Graphics.Window( Window, WindowSettings(..), createWindow, useWindow, getKey, getScroll, resetScroll ) where import qualified Graphics.UI.GLFW as GLFW import Data.IORef import System.IO.Unsafe import Control.DeepSeq import Antiqua.Common import Graphics.Rendering.OpenGL.Raw ...
olive/antiqua-prime
src/Antiqua/Graphics/Window.hs
mit
3,037
0
12
677
978
473
505
-1
-1
-- source: http://stackoverflow.com/a/23124701/499478 {-# LANGUAGE MultiParamTypeClasses, TypeFamilies, FlexibleInstances, UndecidableInstances, IncoherentInstances #-} module Augment (augmentWith) where class Augment a b f h where augmentWith :: (a -> b) -> f -> h instance (a ~ c, h ~ b) => Augment a b c h wh...
Wizek/fuzzy-match
src/Augment.hs
mit
460
0
9
92
154
83
71
9
0
module Quipp.Vmp where import Debug.Trace import Control.Applicative ((<$>), (<*>)) import Control.Monad.Trans.Class (lift) -- import transformers-0.3.0.0:Control.Monad.Trans.Class (lift) import Data.Foldable (foldlM) import Data.List (elemIndex) import Data.Map (Map, (!)) import qualified Data.Map as Map import Data....
jessica-taylor/quipp2
src/Quipp/Vmp.hs
mit
2,688
0
19
463
897
445
452
49
4
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, TupleSections, GADTs #-} module DayX where import AdventPrelude import Data.List (iterate) input :: String input = "......^.^^.....^^^^^^^^^...^.^..^^.^^^..^.^..^.^^^.^^^^..^^.^.^.....^^^^^..^..^^^..^^.^.^..^^..^^^.." -- input = "..^^." -- input = ".^^.^.^^^^" show...
farrellm/advent-2016
src/Day18.hs
mit
985
0
16
260
383
202
181
25
2
main = putStrLn $ show solve solve :: Int solve = numSpiralDiagSum 1001 numSpiralDiagSum :: Int -> Int numSpiralDiagSum n = sum $ map (sum . (uncurry every)) $ take (div (n+1) 2) $ zip (1:[2,4..]) numSpiral where f n xs = every n xs -- Each layer of the infinite number spiral (e.g. [[1], [2,3,4,5,6,7,8,9], ..]...
pshendry/project-euler-solutions
0028/solution.hs
mit
549
0
13
158
280
144
136
12
2
{-# LANGUAGE OverloadedStrings #-} import Debug.Trace {- CODE CHALLENGE: Solve the Change Problem. The DPCHANGE pseudocode is reproduced below for your convenience. Input: An integer money and an array Coins = (coin1, ..., coind). Output: The minimum number of coins with denominations Coins that changes mon...
tinkerthaler/bioinformatics3
src/DPChange.hs
mit
1,937
0
12
600
439
223
216
30
2
{-# LANGUAGE DeriveGeneric #-} module Lattice where import GHC.Generics (Generic) class Ord a => Lattice a where top :: a bottom :: a (\/) :: a -> a -> a (/\) :: a -> a -> a flowsTo :: a -> a -> Bool -- | slightly more interesting lattice -- H -- / \ -- ...
kellino/TypeSystems
gradualSecurity/src/Lattice.hs
mit
2,151
0
8
921
951
466
485
88
0
{-# LANGUAGE PatternGuards #-} {-# LANGUAGE CPP #-} module Stackage.Select ( select , defaultSelectSettings ) where import Data.Either (partitionEithers) import qualified Data.Map as Map import Data.Maybe (mapMaybe) import Data.Set (e...
sinelaw/stackage
Stackage/Select.hs
mit
4,652
0
18
1,383
1,279
678
601
99
3
{-# LANGUAGE BangPatterns, RankNTypes #-} {-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_GHC -fspec-constr #-} {-# OPTIONS_GHC -fdicts-cheap #-} {- OPTIONS_GHC -optlo-globalopt #-} {- OPTIONS_GHC -optlo-loop-unswitch #-} {- OPTIONS_GHC -optlo-mem2reg #-} {- OPTIONS_GHC -optlo-prune-eh #-} {-# OPTIONS...
ku-fpg/hermit-streamfusion
Concat.hs
mit
4,909
0
17
1,226
911
488
423
64
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} module Math.REPL.Evaluator.Cmd (evalCmd) where -------------------------------------------------------------------------------- import Math.REPL.Evaluator.Expr (evalExpr) import Math.REPL.Evaluator.Func (execFunc) impor...
sumitsahrawat/calculator
src/Math/REPL/Evaluator/Cmd.hs
gpl-2.0
3,396
0
18
1,122
921
501
420
59
6
{-# LANGUAGE OverloadedStrings #-} module MirakelBot.Handlers.Users where import Control.Lens import Control.Monad hiding (forM_) import Data.Foldable import qualified Data.Map as M import Data.Maybe import Data.Monoid import qualified Data...
azapps/mirakelbot
src/MirakelBot/Handlers/Users.hs
gpl-3.0
977
0
17
286
270
143
127
23
2
module Main where import Parser import Control.Monad.Trans import System.Console.Haskeline import Text.Parsec.Prim process :: String -> IO () process line = do let res = parseToplevel line case res of Left err -> print err Right ex -> mapM_ print ex main :: IO () main = runInputT defaultSettings loop ...
Le-Chiffre/HsC
Code/Compiler/Main.hs
gpl-3.0
486
0
15
113
168
83
85
18
2
-- | -- Module: Math.NumberTheory.Canon.SpecialFunctions -- Copyright: (c) 2018-2019 Frederick Schneider -- Licence: MIT -- Maintainer: Frederick Schneider <fws.nyc@gmail.com> -- Stability: Provisional -- -- This module defines numerous functions associated with massive numbers. -- This is an excellent re...
grandpascorpion/canon
Math/NumberTheory/Canon/SpecialFunctions.hs
gpl-3.0
9,094
0
18
2,806
1,525
781
744
91
5
-- | This module is the processor for 'RedisMessage's. It bridges the Redis interface -- created by "RedisServer" and a 'Store'. module Ltc.Network.RedisAdapter ( redisProxyD ) where import Control.Applicative ( (<$>) ) import Control.Exception ( handle ) import Control.Monad ( forM, unless ) import Contr...
scvalex/ltc
src/Ltc/Network/RedisAdapter.hs
gpl-3.0
11,188
0
28
4,063
3,462
1,734
1,728
-1
-1
module Language.Prolog.IsString (module IsString) where import IsString
nishiuramakoto/logiku
prolog/Prolog/Language/Prolog/IsString.hs
gpl-3.0
72
0
4
7
16
11
5
2
0
----------------------------------------------------------------------------- -- | -- Module : Hoodle.Type.Undo -- Copyright : (c) 2011-2013 Ian-Woo Kim -- -- License : BSD3 -- Maintainer : Ian-Woo Kim <ianwookim@gmail.com> -- Stability : experimental -- Portability : GHC -- -----------------------------...
wavewave/hoodle-core
src/Hoodle/Type/Undo.hs
gpl-3.0
1,778
0
16
464
489
248
241
33
3
module While.Compiler where import While.AST compileAExpr :: AExpr -> String compileAExpr (Var s) = s compileAExpr (IntConst n) = show n compileAExpr (AUnary op a) = "(" ++ compileAUnaOp op ++ " " ++ compileAExpr a ++ ")" compileAExpr (ABinary op a b) = "(" ++ compileAExpr a ++ " " ++ compileABinOp op++ " " ++ compil...
fpoli/abstat
src/While/Compiler.hs
gpl-3.0
1,811
0
11
330
682
335
347
39
1
-- Copyright 2013 - 2017 John F. Miller {-# LANGUAGE ScopedTypeVariables, OverloadedStrings, RankNTypes, NamedFieldPuns #-} -- | Data structures for the Abstract Syntax Tree module AST where -- import Scope (Value, Scope) import Var import Name import Parameters import LineParser -- | Primary Abstract Syntax Tree da...
antarestrader/sapphire
AST.hs
gpl-3.0
3,368
0
9
785
441
284
157
45
0
{-# LANGUAGE DeriveFunctor,OverloadedStrings #-} module Lang.LintRich where import Lang.Rich import Lang.Type import Control.Applicative import Control.Monad import Control.Monad.Writer import Control.Monad.Reader import Data.Map (Map) import qualified Data.Map as M import Text.PrettyPrint import Lang.PrettyRich t...
danr/tfp1
Lang/LintRich.hs
gpl-3.0
5,584
0
20
1,592
2,442
1,195
1,247
125
11
{- | mtlstats Copyright (C) 1984, 1985, 2019, 2020, 2021 Rhéal Lamothe <rheal.lamothe@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) ...
mtlstats/mtlstats
src/Mtlstats/Control/EditStandings.hs
gpl-3.0
2,725
0
13
499
485
259
226
53
6
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-firebasehosting/gen/Network/Google/Resource/FirebaseHosting/Sites/Domains/List.hs
mpl-2.0
5,639
0
18
1,405
888
514
374
127
1
{-# LANGUAGE OverloadedLists, OverloadedStrings #-} module NicovideoTranslator.Translate (ApiKey, translate) where import GHC.Exts (IsList (toList)) import Prelude hiding (lookup) import Control.Concurrent.Async (concurrently) import Control.Lens ((&), (.~), (^.)) import Data.Aeson.Types (Value (Array, Bool, Object, ...
dahlia/nicovideo-translator
lib/NicovideoTranslator/Translate.hs
agpl-3.0
2,000
0
13
585
622
344
278
47
3
-- |Helper functions for retrying, for example a connection. module Retry where import Control.Concurrent (threadDelay) import Control.Exception import Control.Monad (when) import Data.Time.Clock.POSIX (getPOSIXTime) -- |This function runs given action infinitely until it succeeds. On -- every failure, reporter funct...
koodilehto/kryptoradio
data_sources/exchange/Retry.hs
agpl-3.0
1,237
0
16
239
250
128
122
20
2
-- -- Copyright 2017 Azad Bolour -- Licensed under GNU Affero General Public License v3.0 - -- https://github.com/azadbolour/boardgame/blob/master/LICENSE.md -- {-# LANGUAGE ScopedTypeVariables #-} module Main where import Data.IORef main :: IO () add1 :: IORef Int -> IO () add1 ref = modifyIORef' ref (+1) main...
azadbolour/boardgame
haskell-server/trial/IORefSample.hs
agpl-3.0
419
0
8
81
106
53
53
12
1
{-# LANGUAGE FlexibleContexts #-} {-| Module : Control.Concurrent.NQE.Publisher Copyright : No rights reserved License : UNLICENSE Maintainer : xenog@protonmail.com Stability : experimental Portability : POSIX A publisher is a process that forwards messages to subscribers. NQE publishers are si...
xenog/nqe
src/Control/Concurrent/NQE/Publisher.hs
unlicense
4,054
0
14
926
906
471
435
77
1
module LearnParsers where import Text.Trifecta import Text.ParserCombinators.ReadP ( ReadP ) import Control.Applicative stop :: Parser a stop = unexpected "stop" {- Exercises: Parsing Practice 1. Modifeied `one` and `oneTwo` to include `eof >> return ret` -} -- read a single character '1' one = char '1' >>= \ret -...
dmp1ce/Haskell-Programming-Exercises
Chapter 24/src/LearnParsers.hs
unlicense
2,022
0
9
404
523
246
277
46
1
{- - Copyright (c) 2017 The Agile Monkeys S.L. <hackers@theam.io> - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless requir...
J2RGEZ/haskell-do
src/common/HaskellDo/Toolbar/Types.hs
apache-2.0
1,339
0
10
323
152
97
55
27
0
{-# LANGUAGE DeriveDataTypeable, NamedFieldPuns, RecordWildCards, ScopedTypeVariables #-} -- | -- Module: Network.Riak.Connection.Pool -- Copyright: (c) 2011 MailRank, Inc. -- License: Apache -- Maintainer: Nathan Hunter <nhunter@janrain.com> -- Stability: experimental -- Portability: portable -- -- ...
janrain/riak-haskell-client
src/Network/Riak/Connection/Pool.hs
apache-2.0
4,640
0
19
1,071
548
323
225
46
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module Network.MoeSocks.Type ( module Network.MoeSocks.Type.Runtime , module Network.MoeSocks.Type.Common ) where import Network.MoeSocks.Type.Runtime import Network.MoeSocks.Type.Common
nfjinjing/moesocks
src/Network/MoeSocks/Type.hs
apache-2.0
255
0
5
26
41
30
11
8
0
{-# LANGUAGE TupleSections, TypeOperators, Rank2Types, BangPatterns, FunctionalDependencies, MultiParamTypeClasses, MagicHash, ScopedTypeVariables, GADTs, FlexibleContexts, TypeFamilies, TypeSynonymInstances, FlexibleInstances #-} module System.Mem.Concurrent.WeakMap ( WeakMap(..) , new,new',copy' , lookup , ins...
cornell-pl/HsAdapton
src/System/Mem/Concurrent/WeakMap.hs
bsd-3-clause
9,263
31
27
1,984
3,674
1,832
1,842
201
5
module Sync.Common where import Control.Monad.State import qualified Data.Map as M import System.INotify import System.Log.Logger as E type SyncState = StateT Sync IO () type FileStructureFactory = FilePath -> StateT Sync IO (FileStructure) data Sync = Sync { getMap :: M.Map FilePath FileStructure, getFile...
kevinm416/sync
Sync/Common.hs
bsd-3-clause
861
0
10
190
246
141
105
26
1
{-# LANGUAGE CPP, BangPatterns, ViewPatterns, FlexibleInstances, TypeOperators, FlexibleContexts, TypeSynonymInstances #-} {-# LANGUAGE MultiParamTypeClasses, PatternGuards #-} #if __GLASGOW_HASKELL__ >= 700 {-# OPTIONS -fllvm #-} #endif module Data.TrieMap.RadixTrie.Search (insertEdge) where import Control.Monad.Unpa...
lowasser/TrieMap
Data/TrieMap/RadixTrie/Search.hs
bsd-3-clause
4,571
44
17
1,136
1,724
871
853
-1
-1
module Persistent.CRUDSpec where import Database.Persist import Database.Persist.Sql import Persistent.CRUD import Test.Hspec spec :: Spec spec = describe "createUser" $ it "returns the created user id" $ do let email = "foo@bar.com" firstName = "Foo" ...
stackbuilders/persistent-crud
test/Persistent/CRUDSpec.hs
bsd-3-clause
648
0
12
206
161
80
81
24
1
-- | パターンマッチのコンパイル module Malgo.Desugar.Match (match, PatMatrix, patMatrix) where import Control.Lens (At (at), Prism', has, over, (?=), _1) import qualified Data.List as List import qualified Data.List.NonEmpty as NonEmpty import qualified Data.Map.Strict as Map import Data.Traversable (for) import Koriel.Core.Syntax...
takoeight0821/malgo
src/Malgo/Desugar/Match.hs
bsd-3-clause
9,274
0
19
1,923
3,130
1,608
1,522
-1
-1
module Main where import Control.Applicative import Control.Arrow import Control.Monad import Data.Attoparsec.Char8 hiding (take) import qualified Data.Attoparsec.Char8 as AC (take) import Data.Char (ord) import Data.List (foldl') import Data.ByteString.Char8 (pack, unpack) import Data.ByteString (ByteString) int :: ...
cutsea110/tsr-test
Devel.hs
bsd-3-clause
1,238
0
12
248
596
326
270
35
1
module Scheme.DataType.Error.Try where import DeepControl.Monad.Except -- for Chaitin's Omega function data TryError = OUTOFDATA | OUTOFTIME | PARSEErr String | OTHER String instance Error TryError where strMsg s = OTHER s instance Show TryError where show OUTOFDAT...
ocean0yohsuke/Scheme
src/Scheme/DataType/Error/Try.hs
bsd-3-clause
460
0
8
136
113
61
52
13
0
-- -- Module : Granulepos -- Copyright : (c) Conrad Parker 2006 -- License : BSD-style -- Maintainer : conradp@cse.unsw.edu.au -- Stability : experimental -- Portability : portable module Codec.Container.Ogg.Granulepos ( Granulepos (..), gpPack, gpUnpack ) where import Data.Word (Word64) --------...
kfish/hogg
Codec/Container/Ogg/Granulepos.hs
bsd-3-clause
865
0
10
139
196
112
84
16
1
module Graphics.UI.Gtk.WebKit.WebSettings where {- -- * Desciption -- | WebKitWebSettings can be applied to a WebKitWebView to control the to be used text encoding, color, -- font sizes, printing mode, script support, loading of images and various other things. -- * Types WebSettings, WebSettingsClass, EditingB...
mightybyte/reflex-dom-stubs
src/Graphics/UI/Gtk/WebKit/WebSettings.hs
bsd-3-clause
15,359
0
3
1,909
10
8
2
1
0
import Test.HUnit import Text.Parsec.Error (ParseError, errorMessages, messageString) import qualified SvgParser as SVG import SvgParser (SVG) import Attributes (Attribute(..)) parseFile :: String -> IO (Either ParseError SVG) parseFile filename = do file <- readFile filename return $ SVG.parse file cmpToFile :...
elaye/svg-parser
test/Spec.hs
bsd-3-clause
872
0
14
167
285
148
137
26
2
{-# LANGUAGE NoMonomorphismRestriction, OverloadedStrings #-} module Conifer.Types where import Data.Maybe import Data.Tree(Tree(..)) import Diagrams.Coordinates import Diagrams.Prelude -- hiding (rotationAbout, direction) import Diagrams.ThreeD.Types import Diagrams.ThreeD.Vector import Control.Monad (mzero) import ...
bobgru/conifer
src/Conifer/Types.hs
bsd-3-clause
9,328
0
27
2,825
1,644
950
694
141
1
module MoreDigits where import Data.Number.IReal import Data.Number.IReal.IReal import Data.Number.IReal.IntegerInterval import LinAlg import Newton import Integrals import Erf {- This file contains solutions to some of the problems from the MoreDigits friendly competition, held at LORIA, Nancy, France, in July 2006...
sydow/ireal
applications/MoreDigits.hs
bsd-3-clause
8,375
0
15
1,435
1,289
668
621
43
1
{-# LANGUAGE RecordWildCards #-} module TestPrelude ( module Control.Concurrent.STM , module Control.Monad , module Data.Vector , module Network.DHT.Kademlia.Bucket , module Network.DHT.Kademlia.Def , module Test.Hspec , module TestEq , addNodeSimple , newEnv , sendNoop , defaultNode , fullKBucket , leftKBucket , ri...
phylake/kademlia
test/TestPrelude.hs
bsd-3-clause
1,901
0
15
410
581
320
261
-1
-1
{-# LANGUAGE KindSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} module LambdaCms.Core.Handler.User ( getUserAdminIndexR , getUserAdminNewR , postUserAdminNewR , getUserAdminEditR , patchUs...
geraldus/lambdacms
lambdacms-core/LambdaCms/Core/Handler/User.hs
mit
17,686
0
24
5,809
4,109
2,014
2,095
344
4
{-# LANGUAGE OverloadedStrings #-} module Gpg.GenRevoke where import Control.Monad import Data.Text (Text) import qualified Data.Text as Text import Gpg.Run data RevocationReason = NoReason | Compromised | Superseeded | No...
Philonous/pontarius-gpg
src/Gpg/GenRevoke.hs
mit
983
0
15
296
215
111
104
23
1
module AppTooManyArguments1 where fac :: Int -> Int fac 0 = 1 fac n = n * (fac n 1)
roberth/uu-helium
test/typeerrors/Heuristics/AppTooManyArguments1.hs
gpl-3.0
85
0
7
21
41
22
19
4
1
module Pos.Chain.Delegation.Proof ( DlgProof , mkDlgProof ) where import Pos.Crypto (Hash, hash) import Pos.Chain.Delegation.Payload -- | Proof of delegation payload. type DlgProof = Hash DlgPayload -- | Creates 'DlgProof' out of delegation payload. mkDlgProof :: DlgPayload ...
input-output-hk/cardano-sl
chain/src/Pos/Chain/Delegation/Proof.hs
apache-2.0
350
0
5
86
61
39
22
8
1
module Sansa.Commands.AddTorrent ( addTorrentCmd ) where import Sansa.CommandsCommon import Sansa.Commands.CommonOpts import Aria2.Commands (addTorrent) import Aria2.Types import System.Directory import Data.Maybe import qualified Data.ByteString as B import qualified Data.ByteString.Base64 as Base64 im...
rootzlevel/sansa
src/Sansa/Commands/AddTorrent.hs
bsd-2-clause
1,434
0
12
320
371
195
176
32
2
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-| This module exports the 'Config' datatype, which you can use to configure the Snap HTTP server. -} module Snap.Http.Server.Config ( Config , ConfigBackend(..) , ConfigLog(..) , emptyConfig , defaultConfig ,...
beni55/snap-server
src/Snap/Http/Server/Config.hs
bsd-3-clause
20,343
0
18
6,732
4,472
2,402
2,070
385
2
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[Demand]{@Demand@: A decoupled implementation of a demand domain} -} {-# LANGUAGE CPP, FlexibleInstances, TypeSynonymInstances #-} module Demand ( StrDmd, UseDmd(..), Count(..), countOnce, countMan...
nushio3/ghc
compiler/basicTypes/Demand.hs
bsd-3-clause
75,989
5
19
21,278
13,795
7,210
6,585
909
9
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Fix -- Copyright : (c) Andy Gill 2001, -- (c) Oregon Graduate Institute of Science and Technology, 2002 -- License : ...
nushio3/ghc
libraries/base/Control/Monad/Fix.hs
bsd-3-clause
3,278
3
12
829
705
390
315
49
0
{-# LANGUAGE OverloadedStrings, FlexibleContexts #-} module Blockchain.BlockChain ( nextDifficulty, addBlock, addBlocks, addTransaction, addTransactions, getBestBlock, getBestBlockHash, getGenesisBlockHash, runCodeForTransaction ) where import Control.Monad import Control.Monad.IfElse import Contr...
jamshidh/ethereum-vm
src/Blockchain/BlockChain.hs
bsd-3-clause
17,599
8
24
3,542
4,824
2,376
2,448
311
5
{-# LANGUAGE KindSignatures, TupleSections, GADTs, GeneralizedNewtypeDeriving, InstanceSigs, OverloadedStrings, ExistentialQuantification, FlexibleInstances #-} module Graphics.Storyboard.Behavior where import Control.Applicative import Control.Concurrent.STM import qualified Graphics.B...
tonymorris/story-board
src/Graphics/Storyboard/Behavior.hs
bsd-3-clause
3,968
0
17
1,001
1,318
679
639
94
2
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Config.Kde -- Copyright : (c) Spencer Janssen <spencerjanssen@gmail.com> -- License : BSD -- -- Maintainer : Spencer Janssen <spencerjanssen@gmail.com> ...
f1u77y/xmonad-contrib
XMonad/Config/Kde.hs
bsd-3-clause
1,683
0
9
342
245
156
89
20
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Distribution.Solver.Types.Settings ( ReorderGoals(..) , IndependentGoals(..) , AvoidReinstalls(..) , ShadowPkgs(..) , StrongFlags(..) , EnableBackjumping(..) ) where import Distribution.Simple.Setup ( BooleanF...
bennofs/cabal
cabal-install/Distribution/Solver/Types/Settings.hs
bsd-3-clause
1,091
0
6
158
291
170
121
29
0
module PackageTests.BuildDeps.TargetSpecificDeps3.Check where import Test.HUnit import PackageTests.PackageTester import System.FilePath import Data.List import qualified Control.Exception as E import Text.Regex.Posix suite :: FilePath -> Test suite ghcPath = TestCase $ do let spec = PackageSpec ("PackageTests" ...
jwiegley/ghc-release
libraries/Cabal/cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps3/Check.hs
gpl-3.0
918
0
16
202
215
110
105
21
1
-- | module for programming little dust clouds around nikki module Sorts.Nikki.Dust where import Data.Map (lookup) import Graphics.Qt import Utils import Base import Sorts.Nikki.Types import Sorts.Nikki.Configuration -- | create nikki's dust addDustClouds :: Seconds -> Nikki -> IO Nikki addDustClouds _ n = re...
nikki-and-the-robots/nikki
src/Sorts/Nikki/Dust.hs
lgpl-3.0
1,652
1
20
412
256
138
118
20
2
module Main where double x = x + x
frankiesardo/seven-languages-in-seven-weeks
src/main/haskell/day1/double.hs
apache-2.0
40
0
5
14
16
9
7
2
1
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="fa-IR"> <title>Front-End Scanner | ZAP Extension</title> <maps> <homeID>top</homeID> <m...
thc202/zap-extensions
addOns/frontendscanner/src/main/javahelp/org/zaproxy/zap/extension/frontendscanner/resources/help_fa_IR/helpset_fa_IR.hs
apache-2.0
978
78
67
159
417
211
206
-1
-1
{-# LANGUAGE MagicHash, UnboxedTuples #-} -- | FFI and hmatrix helpers. -- -- Sample usage, to upload a perspective matrix to a shader. -- -- @ glUniformMatrix4fv 0 1 (fromIntegral gl_TRUE) \`appMatrix\` perspective 0.01 100 (pi\/2) (4\/3) -- @ -- module Data.Packed.Foreign ( app , appVector, appVectorLen ...
mightymoose/liquidhaskell
benchmarks/hmatrix-0.15.0.1/lib/Data/Packed/Foreign.hs
bsd-3-clause
3,201
0
15
619
814
447
367
50
1
module BadExprArg where {-@ type ListN a N = {v:[a] | len v = N} @-} {-@ foo :: ListN 0 0 @-} foo :: [a] foo = undefined
mightymoose/liquidhaskell
tests/crash/BadExprArg.hs
bsd-3-clause
123
0
5
31
19
13
6
3
1
{-# LANGUAGE ImplicitParams, RankNTypes #-} -- Trac #1445 module Bug where f :: () -> (?p :: ()) => () -> () f _ _ = () g :: (?p :: ()) => () g = f () ()
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/typecheck/should_compile/tc230.hs
bsd-3-clause
158
0
8
43
80
46
34
6
1