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 RecursiveDo, RankNTypes, NamedFieldPuns, RecordWildCards #-} module Distribution.Server.Features.Upload ( UploadFeature(..), UploadResource(..), initUploadFeature, UploadResult(..), ) where import Distribution.Server.Framework import Distribution.Server.Framework.BackupDump import Distr...
edsko/hackage-server
Distribution/Server/Features/Upload.hs
bsd-3-clause
24,180
0
30
6,909
3,925
2,115
1,810
348
10
module Rachel.TH ( -- * Primitive list genEntList -- * prim functions , genPrim ) where import Language.Haskell.Exts (ParseResult (..), Module (..), Decl (..), prettyPrint) import Language.Haskell.Exts.Parser (parseModuleWithMode,defaultParseMode,ParseMode(..)) import Language.Haskell.Exts.Extension i...
Daniel-Diaz/rachel
Rachel/TH.hs
bsd-3-clause
4,115
0
21
1,285
1,788
919
869
82
2
{-# LANGUAGE TemplateHaskell #-} module Purescript.Interop.Test where import Purescript.Interop newtype Session = Session { unSession :: String } mkExports Nothing [ (''Session, True) ]
pkamenarsky/purescript-interop
src/Purescript/Interop/Test.hs
bsd-3-clause
190
0
8
28
45
28
17
5
0
{-# LANGUAGE BangPatterns #-} module Media.MpegTs.AdaptationField ( -- * Get @Adaptation Field@ AdaptationField(..) , adaptationField -- * Extension , adaptationFieldExtension -- * Types , AdaptationFlags(..) , ProgramClockReference(..) , AdaptationFieldExtension(..) , Lega...
kevinkirkup/mpegts-hs
src/Media/MpegTs/AdaptationField.hs
bsd-3-clause
6,550
0
15
1,590
1,723
856
867
216
9
{-# LANGUAGE FlexibleContexts, TypeSynonymInstances, FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} module ConfigParser2 (readConfig, getPoorConfig) where import AST import Prelude import Text.Parsec import Text.Parsec.Combinator import Text.Parsec.Char import ...
abakst/symmetry
checker/src/simple-parser/ConfigParser2.hs
mit
7,266
0
20
2,421
1,854
969
885
132
4
----------------------------------------------------------------------------- -- | -- Module : Data.Algorithm.Diff -- Copyright : (c) Sterling Clover 2008 -- License : BSD 3 Clause -- Maintainer : s.clover@gmail.com -- Stability : experimental -- Portability : portable -- -- This is an implementatio...
pierzchalski/cs3161a2
tests/driver/Diff.hs
mit
3,238
0
17
828
1,190
655
535
40
4
-- © 2001, 2002 Peter Thiemann -- with modifications by Johannes Waldmann joe@informatik.uni-leipzig.de -- $Id$ module Wash.Cookie (T, init, initExpiring, get, set, delete) where import Wash.Locale import Maybe import Prelude hiding (init, div, span, head, map) import Time import Wash.CGIInternals import Wash.CGI...
florianpilz/autotool
src/Wash/Cookie.hs
gpl-2.0
4,501
97
25
1,289
1,621
864
757
110
4
{- | Module : ./GMP/GMP-CoLoSS/GMP/Logics/K.hs - Description : Implementation of logic instance K - Copyright : (c) Daniel Hausmann & Georgel Calin & Lutz Schroeder, DFKI Lab Bremen, - Rob Myers & Dirk Pattinson, Department of Computing, ICL - License : GPLv2 or higher, see LICENSE.txt ...
spechub/Hets
GMP/GMP-CoLoSS/GMP/Logics/K.hs
gpl-2.0
2,267
0
18
508
410
219
191
23
0
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | -- Copyright: © 2018 Herbert Valerio Riedel -- SPDX-License-Identifier: GPL-3.0-or-later -- module Controller.Util ( serveFileMem , serveFolderMem , ServeObjSrc(..) , ServeObj(..) , withBr...
Rizary/hackage-matrix-builder
src-exe/Controller/Util.hs
gpl-3.0
12,933
0
28
3,525
3,242
1,655
1,587
241
6
{-| Module : Main License : GPL Maintainer : helium@cs.uu.nl Stability : experimental Portability : portable The textual Helium interpreter -} module Main where import Data.Char import Data.List(isInfixOf, isPrefixOf, isSuffixOf) import Control.Monad import System.IO...
Helium4Haskell/helium
src/commands/texthint/TextHint/Main.hs
gpl-3.0
16,092
0
22
4,433
3,820
1,920
1,900
342
10
module Model.Comment.Internal where import Prelude import Database.Persist.TH import Data.Text (Text) import Model.Language import Yesod.Markdown (Markdown) -- VisPublic = visible to all | VisPrivate = visible to topic-poster and -- those with provenance over the discussion (e.g. project team for pr...
chreekat/snowdrift
Model/Comment/Internal.hs
agpl-3.0
1,584
0
6
317
267
153
114
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} -- | -- Module : Network.DBus.Actions -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- module Network.DBus.Actions ( DBusContext , DBusTransport(..) , authent...
OpenXT/xclibs
udbus/Network/DBus/Actions.hs
lgpl-2.1
6,349
213
12
1,136
1,542
910
632
148
2
-- Benchmarking my 'kmeans-vector' package import Control.Monad import Math.KMeans import qualified Data.Vector.Unboxed as V import System.Environment import System.Random main = do [dim, nb, k] <- getArgs go dim nb k 10 where go dim nb k 0 = return () go dim nb k i = do vectors <- generateVecs...
alpmestan/kmeans-vector
tests/kmeans-vector.hs
bsd-3-clause
633
0
14
162
261
134
127
18
2
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE PatternGuards #-} {-# OPTIONS_HADDOCK hide #-} -- | -- Module : Data.Array.Accelerate.FullList -- Copyright : [2008..2014] Manuel M T Chakravarty, Gabriele Keller -- [2009..2014] Trevor L. McDonell -- License : BSD3 -- -- Maintainer : Trevor L. McDon...
rrnewton/accelerate
Data/Array/Accelerate/FullList.hs
bsd-3-clause
3,302
0
11
1,014
1,292
656
636
78
2
{-# LANGUAGE OverloadedStrings #-} module Examples.Base64(base64) where import Development.NSIS import Development.NSIS.Plugins.Base64 base64 = do name "base64" allowRootDirInstall True outFile "base64.exe" caption "Base64 test" showInstDetails Show installDir "$EXEDIR" requestExecutionL...
ndmitchell/nsis
test/Examples/Base64.hs
bsd-3-clause
642
0
15
166
173
76
97
21
1
{-# LANGUAGE RankNTypes, QuasiQuotes #-} module SpecHelper where import Data.Aeson (FromJSON, decode) import Api.Server (apiApp, initDb) import Control.Applicative ((<$>)) import Control.Monad.IO.Class (liftIO) import Data.Maybe (fromJust) import Hasql (IsolationLevel (..), Tx, tx, q, unit) import Hasql.Postgres (Pos...
cawinkelmann/api-server
test/SpecHelper.hs
mit
3,759
0
13
764
1,178
656
522
93
3
------------------------------------------------------------------------------- -- | -- Module : System.Hardware.Haskino.SamplePrograms.Rewrite.TransLetTestE -- Copyright : (c) University of Kansas -- License : BSD3 -- Stability : experimental -- -- Let test example used for rewrite written directly in...
ku-fpg/kansas-amber
tests/TransTests/TransLetTestE.hs
bsd-3-clause
1,884
0
15
542
550
249
301
-1
-1
-- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 {-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- Modify and collect code generation for final STG program {- This is now a sort-of-normal STG-to-STG pass (WDP 94/06), run by stg2stg. - Traverses the S...
GaloisInc/halvm-ghc
compiler/profiling/SCCfinal.hs
bsd-3-clause
9,316
0
21
2,881
2,300
1,197
1,103
171
20
module Aws.S3.Commands.GetBucketLocation where import Aws.Core import Aws.S3.Core import qualified Data.ByteString.Char8 as B8 import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Network.HTTP.Types as HTTP import Text.XML.Cursor (($.//)) dat...
Soostone/aws
Aws/S3/Commands/GetBucketLocation.hs
bsd-3-clause
2,242
0
13
717
394
230
164
-1
-1
{-# LANGUAGE CPP #-} #ifndef NO_ST_MONAD {-# LANGUAGE Rank2Types #-} #endif -- | Test case generation. module Test.QuickCheck.Gen where -------------------------------------------------------------------------- -- imports import System.Random ( Random , StdGen , randomR , split , newStdGen ) import Contr...
srhb/quickcheck
Test/QuickCheck/Gen.hs
bsd-3-clause
6,035
0
15
1,384
1,864
976
888
112
3
{-# LANGUAGE TypeFamilies #-} module ClosedFam1 where import {-# SOURCE #-} ClosedFam1 type family Foo a where Foo Int = Bool Foo [a] = Maybe a
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/indexed-types/should_compile/ClosedFam1.hs
bsd-3-clause
150
0
7
32
38
23
15
6
0
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} -- !!! Test polymorphic recursion -- With polymorphic recursion this one becomes legal -- SLPJ June 97. {- To: Lennart Augustsson <augustss@cs.chalmers.se> Cc: partain@dcs.gla.ac.uk, John Peterson (Yale) <peterson-john@cs.yale.edu>, simonpj@dcs.gla.ac.uk Subj...
urbanslug/ghc
testsuite/tests/typecheck/should_compile/tc091.hs
bsd-3-clause
1,977
0
12
400
236
133
103
12
2
import System.FilePath import Text.Parsec import Data.Char import System.Environment import Control.Applicative hiding (many) import Data.List main :: IO () main = (head <$> getArgs) >>= parseUnicodeMapping parseUnicodeMapping :: FilePath -> IO () parseUnicodeMapping fname = do fin <- readFile fname let mapname ...
michaelbeaumont/pandoc
lib/fonts/parseUnicodeMapping.hs
gpl-2.0
1,091
0
15
222
410
210
200
30
1
{-# LANGUAGE TypeOperators, GADTs, EmptyCase #-} module T2431 where data a :~: b where Refl :: a :~: a absurd :: Int :~: Bool -> a absurd x = case x of {}
urbanslug/ghc
testsuite/tests/deSugar/should_compile/T2431.hs
bsd-3-clause
159
0
6
37
48
29
19
6
0
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} module Jt.History.Listing ( fetchJobs ) where import Data.Aeson (FromJSON, ToJSON, decode) import GHC.Generics (Generic) import qualified Jt.Net as Net import qualified Jt.Job as Job import qualified Data.ByteString.Lazy.Char8 as BL import qual...
ianoc/jt
src/Jt/History/Listing.hs
mit
2,860
0
13
590
940
495
445
69
2
{-# LANGUAGE DoAndIfThenElse #-} module Asm.Assembler ( assemble, makeProgVar, makeFile, assembleText, assembleFile, VarType(..)) where import Asm.Expr import Asm.Parser import Asm.Preprocess import Asm.InstrSize import Data.Bits import Control.Monad import Data.Monoid import Data.ByteString.La...
unknownloner/calccomp
Asm/Assembler.hs
mit
8,827
0
16
2,525
3,188
1,601
1,587
195
15
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeSynonymInstances #-} {-| Tests that verify that the shape of the JSON used is matching the spec. It's not sufficient to just ensure that `fromJSON . ...
juretta/haskell-jwt
tests/src/Web/JWTInteropTests.hs
mit
3,734
0
16
1,114
673
368
305
70
3
module Network.Telegram.Bot.Requests.Yesod ( TelegramRequest , TelegramException (..) , getMeRequest , sendChatActionRequest , sendMessageRequest , forwardMessageRequest , answerCallbackQueryRequest , sendPhotoRequest , sendAudioRequest , sendDocumentRequest , sendStickerRequest , sendVideoRequ...
Vlix/telegram-bot-http
Network/Telegram/Bot/Requests/Yesod.hs
mit
17,495
0
17
3,109
4,563
2,367
2,196
237
7
{-# LANGUAGE ScopedTypeVariables #-} import Common import Control.Exception import System.Exit import Test.Tasty import Text.Printf import Paths_adder main :: IO () main = do sc <- initScore testsFile <- getDataFileName "tests/tests.json" yourTest...
ucsd-cse131/01-adder
tests/Test.hs
mit
893
0
17
274
245
119
126
22
1
{-# LANGUAGE OverloadedStrings #-} module Web.Naver.Fortune ( tellFortune , Sex (..) , CalendarType (..) , FortuneDateType (..) , FortuneType (..) ) where import Data.Maybe import Data.List ( ma...
kuc2477/naver-unse
src/Web/Naver/Fortune.hs
mit
5,099
0
13
1,462
918
511
407
-1
-1
{-# LANGUAGE LambdaCase, TemplateHaskell #-} module StructuralIsomorphism.TH.Util ( -- * Manipulating 'Type's outerNormalizeType, headType, isTypeSynonym, expandTypeSynonyms, subst, tyVarBndrName, -- * Pretty-printing quoted, -- * Debugging thPutStrLn, thPrint, thPpr ) where import Data.Bifunc...
antalsz/hs-to-coq
structural-isomorphism-plugin/src/StructuralIsomorphism/TH/Util.hs
mit
7,581
1
18
3,020
2,464
1,215
1,249
-1
-1
module Data.Conf.Types where import Data.Text (Text) type Conf = [ConfStatement] data ConfStatement = ConfStatementComment Comment | ConfStatementBlock Block | ConfStatementEmptyLine -- ^ We store empty lines while parsing so we can ...
beijaflor-io/haskell-language-conf
src/Data/Conf/Types.hs
mit
627
0
7
186
134
79
55
14
0
{-# LANGUAGE DoAndIfThenElse #-} module Cook.Sync where import Cook.Util import Cook.State.Manager import qualified Cook.Docker.API as Docker import System.Directory import qualified Data.Text as T runSync :: FilePath -> Docker.DockerClient -> IO () runSync stateDir cli = do createDirectoryIfMissing True stateDi...
factisresearch/dockercook
src/lib/Cook/Sync.hs
mit
868
0
17
230
217
110
107
20
2
{- | Module : Language.Egison.PrettyMath.Maxima Licence : MIT -} module Language.Egison.PrettyMath.Maxima ( showMathExpr ) where import Language.Egison.PrettyMath.AST showMathExpr :: MathExpr -> String showMathExpr (Atom a []) = a showMathExpr (Partial _ _) = "undefined" showMathExpr (Negative...
egison/egison
hs-src/Language/Egison/PrettyMath/Maxima.hs
mit
2,494
0
15
528
957
475
482
40
6
module Main where squareAll list = map square list where square x = x * x main = do print (squareAll [1,2,3,4])
skywind3000/language
haskell/map.hs
mit
145
0
10
55
60
32
28
5
1
{-# LANGUAGE ForeignFunctionInterface #-} module XtermArgs where import qualified Data.Text as T import qualified Data.Text.Lazy as LT (Text) import Data.Typeable (Typeable) import Control.Monad import Control.Monad.IO.Class (MonadIO(..)) import Data.Int (Int64) import Data.Word (Word, Word64) import Data.Maybe (fr...
hpacheco/HAAP
packages/Xterm/XtermArgs.hs
mit
1,095
0
8
184
260
157
103
31
1
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module Data.Romefile ( parseRomefile , romefile , RomefileEntry (..) , FrameworkName (..) , GitRepoName (..) , RomeFileParseResult (..) , RomeCacheInfo (.....
r-peck/Rome
src/Data/Romefile.hs
mit
4,610
0
16
1,234
944
510
434
91
2
{-# htermination (emEm :: (List a) -> MyInt -> a) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data MyInt = Pos Nat | Neg Nat ; data Nat = Succ Nat | Zero ; data Ordering = LT | EQ | GT ; stop :: MyBool -> a; stop MyFalse = stop MyFalse; error :: a; e...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/BANGBANG_1.hs
mit
3,344
0
11
726
1,659
869
790
86
1
module Planners.PRM ( Roadmap , buildRRG --, buildRRGDefaultSeed --, buildKRRGDefaultSeed --, buildPRMStarDefaultSeed -- , buildKRRG , solve , printEdges , printStates ) where -- Motion Planning imports import Data.MotionPlanningProblem import Data....
giogadi/hs-motion-planning
lib-src/Planners/PRM.hs
mit
8,549
0
21
2,358
2,310
1,181
1,129
115
3
{-# LANGUAGE CPP, OverloadedStrings #-} module ChangePasswordLogged (changePasswordLoggedSpecs) where import Yesod.Auth import Yesod.Test import Foundation import qualified Data.Text as T redirectCode :: Int #if MIN_VERSION_yesod_test(1,4,0) redirectCode = 303 #else redirectCode = 302 #endif -- In 9f379bc219bd1fdf00...
meteficha/yesod-auth-account-fork
tests/ChangePasswordLogged.hs
mit
4,192
0
14
1,475
648
273
375
87
1
module Dotfiles where import Control.Exception (catch) import Data.Set (Set) import qualified Data.Set as Set import Data.String.Utils (replace) import Dotfiles.Utils import GHC.IO.Exception import System.Directory (doesFileExist) import System.IO....
ilya-yurtaev/hdotfiles
src/Dotfiles.hs
mit
4,541
0
12
1,125
1,095
575
520
96
12
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-managedpolicy.html module Stratosphere.Resources.IAMManagedPolicy where import Stratosphere.ResourceImport...
frontrowed/stratosphere
library-gen/Stratosphere/Resources/IAMManagedPolicy.hs
mit
4,164
0
15
506
722
410
312
55
1
-- | -- Module : Network.Pusher.Data -- Description : Data structures representing Channels concepts and settings -- Copyright : (c) Will Sewell, 2016 -- Licence : MIT -- Maintainer : me@willsewell.com -- Stability : stable module Network.Pusher.Data ( Settings (..), defaultSettings, Token (..),...
pusher-community/pusher-http-haskell
src/Network/Pusher/Data.hs
mit
5,331
0
17
1,380
1,160
663
497
109
3
module Math.REPL.Prim.Result ( Result (..) ) where -------------------------------------------------------------------------------- import Math.REPL.Prim.Bindings (Bindings) -------------------------------------------------------------------------------- data Result = NewBindings Bindings ...
sumitsahrawat/calculator
src/Math/REPL/Prim/Result.hs
gpl-2.0
503
0
9
102
69
44
25
8
0
module Cryptography.ComputationalProblems.Reductions where import Notes hiding (cyclic, inverse) import Function...
NorfairKing/the-notes
src/Cryptography/ComputationalProblems/Reductions.hs
gpl-2.0
6,908
0
20
2,284
2,636
1,360
1,276
132
1
{-# OPTIONS -w -O0 #-} {- | Module : HolLight/ATC_HolLight.der.hs Description : generated Typeable, ShATermConvertible instances Copyright : (c) DFKI Bremen 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-portable(over...
nevrenato/Hets_Fork
HolLight/ATC_HolLight.hs
gpl-2.0
8,750
0
19
1,994
2,651
1,374
1,277
194
1
{- ----------------------------------------------------------------------------- PTrader is a Personal Stock Trader Toolbox. Copyright (C) 2012 Luis Cabellos This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foun...
zhensydow/ptrader
src/PTrader/Portfolio.hs
gpl-3.0
21,762
2
24
5,031
5,483
2,787
2,696
400
4
-- Exercise 3.2 -- A version of the insert function for leftist heaps implemented not in terms -- of the merge function. module Ex3_2 (insert) where import LeftistHeap hiding (insert) insert x E = T 1 x E E insert x (T _ y a b) = if x <= y then makeT x a (insert y b) else makeT y (insert x a) b
fishbee/pfds-haskell
chapter3/Ex3_2.hs
gpl-3.0
303
0
8
72
104
56
48
6
2
module Mudblood ( module Mudblood.Core , module Mudblood.Trigger , module Mudblood.Text , module Mudblood.Keys , module Mudblood.UI , module Mudblood.Mapper , module Mudblood.Paths , module Mudblood.UserData , module Mudblood.Error ) where import Mudblood.Core import Mudblood.Tr...
talanis85/mudblood
src/Mudblood.hs
gpl-3.0
479
0
5
90
105
67
38
19
0
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid 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 Lice...
karamellpelle/grid
source/Game/Font/FontShade.hs
gpl-3.0
6,467
0
15
1,674
1,283
668
615
139
1
{-# LANGUAGE FlexibleContexts #-} module Sound.Analysis.Segmentation.Statistics ( lift , mean , variance , skewness , kurtosis ) where import qualified Sound.Analysis.Vector as V import qualified Data.Vector.Generic as V import Sound.Analysis.Segmentation import qualified Statistics.Sample as S ...
kaoskorobase/mescaline
lib/mescaline-database/Sound/Analysis/Segmentation/Statistics.hs
gpl-3.0
981
0
10
185
319
171
148
26
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-debugger/gen/Network/Google/Resource/CloudDebugger/Debugger/Debuggees/Breakpoints/Set.hs
mpl-2.0
6,985
0
23
1,740
1,030
596
434
153
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-vision/gen/Network/Google/Resource/Vision/Projects/Images/AsyncBatchAnnotate.hs
mpl-2.0
6,999
0
17
1,408
799
473
326
120
1
-- GSoC 2015 - Haskell bindings for OpenCog. {-# LANGUAGE TypeOperators #-} -- | This library defines Haskell Bindings for the AtomSpace. module OpenCog.AtomSpace ( -- * AtomSpace Environment AtomSpace , AtomSpaceObj , getParent , newAtomSpace , onAtomSpace , (<:) , runOnNewAtomSp...
rodsol/atomspace
opencog/haskell/OpenCog/AtomSpace.hs
agpl-3.0
1,584
0
6
436
276
192
84
-1
-1
-- Exercises: Lookups -- 4. xs = [1,2,3] ys = [4,5,6] x :: Maybe Integer x = lookup 3 $ zip xs ys y :: Maybe Integer y = lookup 2 $ zip xs ys summed :: Maybe Integer summed = sum <$> ((,) <$> x <*> y)
dmp1ce/Haskell-Programming-Exercises
Chapter 17/Exercises4.hs
unlicense
207
0
9
54
112
61
51
8
1
module Main (main) where import Criterion.Main (bgroup, defaultMain) import qualified GitsonBench main :: IO () main = sequence_ [ GitsonBench.setup ] >> defaultMain [ bgroup "Gitson" GitsonBench.benchmarks ] >> sequence_ [ GitsonBench.cleanup ]
myfreeweb/gitson
benchmark/Bench.hs
unlicense
282
0
10
69
78
43
35
10
1
{-# LANGUAGE OverloadedStrings #-} module Dice.Common ( Dices , Dice(..) , Modifiers(..) , DicePool(..) ) where -- | Number of dices in a dice pool type Dices = Integer -- | The dice itself data Dice = StandardDice Integer -- ^ Dice with [1..N] sides | ListDice [Integer] -- ^ Used for no...
pharaun/alldice
src/Dice/Common.hs
apache-2.0
1,083
0
7
329
140
93
47
21
0
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE GADTs #-} module Laborantin.Query.Interpret (toTExpr) where import Laborantin.Types import Control.Applicative ((<$>),(<*>)) import Laborantin.Query import Data.Text (Text) import Data.Maybe (fromMaybe) import Data.Time (UTCTime) type Param = Maybe ParameterVal...
lucasdicioccio/laborantin-hs
Laborantin/Query/Interpret.hs
apache-2.0
5,718
0
20
1,709
2,478
1,246
1,232
123
26
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QMovie_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 not ...
uduki/hsQt
Qtc/Gui/QMovie_h.hs
bsd-2-clause
16,180
0
18
3,804
5,484
2,612
2,872
-1
-1
module NLP.Adict.Nearest ( findNearest ) where import Control.Applicative ((<$>)) import Control.Monad (guard) import Data.Maybe (isJust, catMaybes, maybeToList) import Data.List (sortBy) import Data.Ord (comparing) import Data.Function (on) import qualified Data.Vector as V import Data.Vector.Unboxed (Unbox...
kawu/adict
src/NLP/Adict/Nearest.hs
bsd-2-clause
2,973
0
16
909
1,171
621
550
78
3
{- | Module : Data.Graph.Simple.Query.Bfs Description : Breadth first search and related algorithms Copyright : Stefan Höck Maintainer : Stefan Höck Stability : experimental -} module Data.Graph.Simple.Query.Bfs ( bfs , bfPaths ) where import Control.Monad (filterM) import Data.Queue import Data....
stefan-hoeck/labeled-graph
Data/Graph/Simple/Query/Bfs.hs
bsd-3-clause
1,787
0
16
618
598
311
287
-1
-1
-- | module Network.API.Builder.Queryable where import Network.API.Builder.Routes (URLParam) class Queryable a where toURLParams :: a -> [URLParam]
eryx67/vk-api
src/Network/API/Builder/Queryable.hs
bsd-3-clause
163
0
8
32
42
26
16
4
0
import Control.Concurrent import Control.Concurrent.STM import Control.Monad transactionA :: (TVar Int, TVar Int) -> STM (Int,Int) transactionA (aref,bref) = do a <- readTVar aref b <- readTVar bref writeTVar aref (a+1) writeTV...
wavewave/chatter
test/stm.hs
bsd-3-clause
1,375
0
13
521
555
276
279
33
1
module Lipase.FattyAcidSpec (spec) where import Isotope import FattyAcid import Test.Hspec spec :: Spec spec = do describe "Elemental composition for FattyAcyl" $ do it "Stearic acid acyl group elemental composition should be C18H35O2" $ toElementalComposition (FattyAcyl 18 0) `shouldBe` mkElemental...
Michaelt293/lipase
test/Lipase/FattyAcidSpec.hs
bsd-3-clause
2,919
0
16
655
887
455
432
66
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeOperators #-...
ekmett/hask
old/src/Hask/Span.hs
bsd-3-clause
3,843
3
13
946
1,719
948
771
-1
-1
{-# LANGUAGE ForeignFunctionInterface #-} module Language.ObjectiveC.Luka.API where import Foreign hiding (void) import Foreign.C.Types import Foreign.C.String import Prelude () import Air.Env import Control.Monad ((>=>)) import Language.ObjectiveC.Luka.RunTime import Foreign.LibFFI import Data.ByteString (ByteSt...
nfjinjing/luka
src/Language/ObjectiveC/Luka/API.hs
bsd-3-clause
3,955
1
11
1,007
1,100
545
555
97
1
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} -- | -- Module : XMonad.Layout.Cross -- Description : A Cross Layout with the main window in the center. -- Copyright : (c) Luis Cabellos <zhen.sydow@gmail.com> -- License : BSD3-style (see LICENSE) -- -- Maintainer : Luis Cabellos <zhen.sydow@...
xmonad/xmonad-contrib
XMonad/Layout/Cross.hs
bsd-3-clause
4,739
0
16
1,583
1,192
659
533
60
1
module Testworld.Plugin where import Dawn import Mire.Plugin -- plugin :: Plugin -- plugin = Plugin "X" [testCommand] [] [] [] -- testCommand = Command "Test command" "meep" (\_ -> return ())
ellej/mire
example/worlds/Testworld/Plugin.hs
bsd-3-clause
196
0
4
35
17
12
5
3
0
{-# LANGUAGE CPP, ScopedTypeVariables #-} {-# OPTIONS -Wall -fno-warn-missing-signatures #-} -- | Ghc compatibility layer. module Haskell.Docs.Ghc where import Haskell.Docs.Types import Control.Exception (SomeException) import GHC hiding (verbosity) import GHC.Paths ...
chrisdone/haskell-docs
src/Haskell/Docs/Ghc.hs
bsd-3-clause
3,394
0
18
736
597
328
269
43
2
module TreeGen where import TreeSimple --data TreeS = Node TreeS TreeS | Leaf Int genFull -> Int -> Int -> TreeS genfull 0 x = Leaf x genfull d x = Node (genFull (d-1) x) (genFull (d-1) x)
Benzi-Junior/TreeExample
src/TreeGen.hs
bsd-3-clause
198
3
9
47
80
42
38
-1
-1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE TypeOperators #-} -- | -- ...
vincenthz/hs-foundation
basement/Basement/From.hs
bsd-3-clause
10,675
0
12
2,360
3,639
1,883
1,756
171
1
{-# LANGUAGE CPP #-} module Data.Layout.ForeignPtr ( mallocPlainForeignPtrBytes ) where #if __GLASGOW_HASKELL__ >= 605 import GHC.ForeignPtr (mallocPlainForeignPtrBytes) #else import Foreign.ForeignPtr (ForeignPtr, mallocForeignPtrBytes) mallocPlainForeignPtrBytes :: Int -> IO (ForeignPtr a) mallocPlainFo...
jystic/data-layout
src/Data/Layout/ForeignPtr.hs
bsd-3-clause
366
0
5
48
26
18
8
6
1
{-# OPTIONS_HADDOCK not-home #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveAnyClass #-} module Pinchot.Types where import qualified Control.Lens as Lens import Data.Data (Data) import Data.List.NonEmpty (NonEmpty) import GHC.Generics (Generic) import qualified Language.Haske...
massysett/pinchot
pinchot/lib/Pinchot/Types.hs
bsd-3-clause
5,492
0
13
1,125
1,727
939
788
103
2
{-| Module : Main (file BallOps.hs) Description : criterion benchmarks for MPBall operations Copyright : (c) Michal Konecny License : BSD3 Maintainer : mikkonecny@gmail.com Stability : experimental Portability : portable -} import MixedTypesNumPrelude -- import Prelude ...
michalkonecny/aern2
aern2-mp/bench/old/BallOps.hs
bsd-3-clause
1,865
0
16
455
582
314
268
41
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Game ( -- Game type Game , gameBoard , gameScore , gameGoal -- Game API , newGame , makeMove , addNewNumber , isWon , isLost , showBoard , printBoard -- Misc types , Direction(..) ...
mitchellwrosen/hs2048-free
Game.hs
bsd-3-clause
5,491
0
15
1,412
1,652
890
762
122
4
-- | -- Module : Control.Isomorphism.Partial.Ext.Prim -- Copyright : Kei Hibino 2012 -- License : BSD3 -- -- Maintainer : ex8k.hibino@gmail.com -- Stability : experimental -- Portability : unknown -- -- This module contains utility combinators for @Control.Isomorphism.Partial@. module Control.Isomorphism...
khibino/haskell-invertible-syntax-poly
src/Control/Isomorphism/Partial/Ext/Prim.hs
bsd-3-clause
2,298
0
13
571
854
477
377
47
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE MultiWayIf #-} module Render.Fast.Mesh where import Control.Lens ((^.), use, (+=), (.=)) import Control.Monad (when, liftM, unless) import Data.Bits ((.&.), (.|.), complement, shiftL, shiftR) import Data.Int (Int32) import Data.IORef (IORef, readIORef, modifyIORef') impo...
ksaveljev/hake-2
src/Render/Fast/Mesh.hs
bsd-3-clause
29,159
53
24
9,218
8,741
4,533
4,208
-1
-1
import Data.Char digit_sum :: Int digit_sum = sum $ map digitToInt $ show (2^1000) main :: IO () main = do putStrLn . show $ digit_sum
bgwines/project-euler
src/solved/problem16.hs
bsd-3-clause
138
0
8
29
63
32
31
6
1
#define IncludedshiftIndicesRight {-@ shiftIndicesRight :: lo:INat -> hi:Integer -> x:RString -> input:RString -> target:RString -> { map (shiftStringRight target x input) (makeIndices input target lo hi) == makeIndices (x <+> input) target (stringLen x + lo) (stringLen x + hi) } / [if hi < lo then ...
nikivazou/verified_string_matching
src/Proofs/shiftIndicesRight.hs
bsd-3-clause
3,917
0
22
867
1,551
780
771
61
1
{-# LANGUAGE ScopedTypeVariables, NoMonomorphismRestriction, FlexibleInstances, FlexibleContexts, RankNTypes #-} module Parser ( parseLisp ) where import Text.ParserCombinators.UU.Derived import Text.ParserCombinators.UU.Core import Text.ParserCombinators.UU.BasicInstances ...
crooney/mooninite
src/Parser.hs
bsd-3-clause
3,233
0
15
722
1,141
599
542
68
1
module CVSU.List ( allocList , createList , listFirst , listNext , listLast ) where import CVSU.Bindings.List import Foreign.Ptr import Foreign.ForeignPtr hiding (newForeignPtr) import Foreign.Storable import Foreign.Concurrent import Debug.Trace data ItemList a = ItemList { listPtr :: !(ForeignPtr C'list), ...
amnipar/hs-cvsu
CVSU/List.hs
bsd-3-clause
1,407
0
13
356
492
242
250
50
2
-- 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. ------------------...
facebookincubator/duckling
Duckling/Ranking/Classifiers/AF_XX.hs
bsd-3-clause
828
0
6
105
66
47
19
8
1
{-# language CPP #-} -- No documentation found for Chapter "Enums" module Vulkan.Core10.Enums ( module Vulkan.Core10.Enums.AccessFlagBits , module Vulkan.Core10.Enums.AttachmentDescriptionFlagBits , module Vulkan.Core10.Enums.AttachmentLoadOp ...
expipiplus1/vulkan
src/Vulkan/Core10/Enums.hs
bsd-3-clause
12,008
0
5
3,152
1,436
1,053
383
191
0
{-# LANGUAGE RankNTypes #-} -- This program must be called with GHC's libdir as the single command line -- argument. module Main where -- import Data.Generics import Data.Data import Data.List import System.IO import GHC import BasicTypes import DynFlags import MonadUtils import Outputable import ApiAnnotation import...
fmthoma/ghc
testsuite/tests/ghc-api/annotations/t10354.hs
bsd-3-clause
3,635
1
20
1,145
1,026
550
476
72
2
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE ViewPatterns #-} module Ling.Session (module Ling.Session ,module Ling.Session.Core) where import Ling.Session.Core import Ling.Defs import Ling.Norm import Ling.Prelude hiding (subst1) import Ling.Scoped import Prelude ...
np/ling
Ling/Session.hs
bsd-3-clause
2,555
0
12
648
849
444
405
-1
-1
{-# LANGUAGE RankNTypes, GADTs, KindSignatures, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, FunctionalDependencies #-} import Data.IORef class Remote r where (#) :: r f -> f a -> IO a data ObjectOf :: (* -> *) -> * where ObjectOf :: (forall a . f a -> IO a) -> ObjectOf f instance Remote Ob...
ku-fpg/wakarusa
ideas/OO.hs
bsd-3-clause
1,346
0
12
410
532
273
259
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-directconnect/gen/Network/AWS/DirectConnect/DescribeLocations.hs
mpl-2.0
3,469
0
10
678
425
256
169
53
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="az-AZ"> <title>SOAP Scanner | ZAP Extension</title> <maps> <homeID>top</homeID> <mapre...
veggiespam/zap-extensions
addOns/soap/src/main/javahelp/org/zaproxy/zap/extension/soap/resources/help_az_AZ/helpset_az_AZ.hs
apache-2.0
974
80
66
160
415
210
205
-1
-1
module Network.Docker.Options where import Data.Aeson.TH import Network.Docker.Utils dopts :: Options dopts = defaultOptions { fieldLabelModifier = strip_underscore }
wayofthepie/docker-hs
Network/Docker/Options.hs
bsd-3-clause
202
0
6
53
37
24
13
6
1
module FP.Core -- Exports {{{ ( module Prelude , module FP.Core , module GHC.Exts , module Data.Char , module Language.Haskell.TH , module Data.Coerce ) where -- }}} -- Imports {{{ import qualified Prelude import Prelude ( Eq(..), Ord(..), Ordering(..) , id, (.), ($), const, flip, curry, uncurry...
FranklinChen/maam
src/FP/Core.hs
bsd-3-clause
59,537
34
16
17,438
27,995
14,955
13,040
-1
-1
{-| Module : Qux.Command.Print Description : Options and handler for the print subcommand. Copyright : (c) Henry J. Wylde, 2015 License : BSD3 Maintainer : hjwylde@gmail.com Options and handler for the print subcommand. -} module Qux.Command.Print ( -- * Options Options(..), -- * Handle ...
hjwylde/qux
src/Qux/Command/Print.hs
bsd-3-clause
1,587
0
10
410
306
175
131
29
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE U...
rimmington/redolent-except
src/Control/Monad/Except/Union.hs
bsd-3-clause
3,654
4
12
1,063
1,225
685
540
77
2
module Control.Distributed.Process.Tests.CH (tests) where #if ! MIN_VERSION_base(4,6,0) import Prelude hiding (catch) #endif import Network.Transport.Test (TestTransport(..)) import Data.Binary (Binary(..)) import Data.Typeable (Typeable) import Data.Foldable (forM_) import Control.Concurrent (forkIO, threadDelay, m...
qnikst/distributed-process-tests
src/Control/Distributed/Process/Tests/CH.hs
bsd-3-clause
44,910
17
27
11,396
12,190
5,736
6,454
-1
-1
{-# LANGUAGE DeriveFunctor #-} import Data.Word import Data.Bits import Control.Applicative import Control.Monad import Control.Monad.State import Text.Parsec hiding ((<|>)) import Text.Parsec.String (Parser) import Text.Printf data Tree a = Leaf a | Branch (Tree a) a (Tree a) deriving (Functor, Show) ...
EdisonAlgorithms/HackerRank
practice/fp/recursion/the-tree-of-life/the-tree-of-life.hs
mit
3,093
0
18
1,111
1,264
664
600
75
2
{-# LANGUAGE CPP #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE RankNTypes #-} -- | Some helpers for parsing data out of a raw WAI 'Request'. module Network.Wai.Parse ( parseHttpAccept , parseRequestBody , RequestBodyType (..) , ...
kazu-yamamoto/wai
wai-extra/Network/Wai/Parse.hs
mit
26,491
359
17
8,480
6,287
3,418
2,869
519
9
{-# LANGUAGE CPP #-} -- | Compatibility layer for "Data.Semigroup" module Distribution.Compat.Semigroup ( Semigroup((<>)) , Mon.Monoid(..) , All(..) , Any(..) ) where #if __GLASGOW_HASKELL__ >= 711 -- Data.Semigroup is available since GHC 8.0/base-4.9 import Data.Semigroup import qualified Data.Mo...
edsko/cabal
Cabal/src/Distribution/Compat/Semigroup.hs
bsd-3-clause
1,840
0
5
457
60
44
16
46
0
module TestImport ( module TestImport , module X ) where import Application (makeFoundation) import ClassyPrelude as X import Database.Persist as X hiding (get) import Database.Persist.Sql (SqlPersistM, SqlBackend, runSqlPersistMPool, rawExecute, rawSql, unSingle, connEscapeName) im...
Drezil/neat
test/TestImport.hs
gpl-3.0
1,683
0
16
412
409
216
193
39
1
module Recursive99 where g :: (Eq a, Num a) => a -> [Char] -> ([Char], [Char]) g _ "" = ("", "") g 0 xs = ("", xs) g n ((x : xs)) = ((x : ls), rs) where ls = fst $ g (n - 1) xs rs = snd $ g (n - 1) xs f1 :: Int -> String -> [Char] f1 _ "" = "" f1 0 xs = "" f1 n (x:xs) = (x:ls) ...
kmate/HaRe
old/testing/merging/Recursive99_TokOut.hs
bsd-3-clause
490
0
10
206
304
166
138
18
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} module GHC.Conc.Signal ( Signal , HandlerFun , setHandler , runHandlers , runHandlersPtr ) where import Control.Concurrent.MVar (MVar, newMVar, withMVar) import Data.Dynamic (Dynamic) import Foreign.C.Types...
tolysz/prepare-ghcjs
spec-lts8/base/GHC/Conc/Signal.hs
bsd-3-clause
3,422
0
20
764
823
431
392
71
3
{-# OPTIONS_GHC -w #-} {-# LANGUAGE UndecidableInstances, EmptyDataDecls #-} {-# LANGUAGE RankNTypes, KindSignatures, MultiParamTypeClasses, FlexibleInstances #-} -- Works with new constraint solver module T3018 where import Control.Monad -- minimal Data/Rep classes data Rep (ctx :: * -> *) a class Data (ctx :: * ...
urbanslug/ghc
testsuite/tests/typecheck/should_compile/T3018.hs
bsd-3-clause
3,518
0
14
814
386
214
172
-1
-1