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) 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/NL_XX.hs
bsd-3-clause
110,957
0
15
53,565
19,751
12,303
7,448
1,770
1
module Text.Html.Entity.Data where import Data.Map (Map) import qualified Data.Map as M import Data.Set (Set) import qualified Data.Set as S import Data.Text (Text, pack) entityMap :: Map Text [Int] entitySet :: Set Text entityMap = M.fromList [(pack "⨗", [10775]), (pack "♂", [9794]), (...
zudov/html5-entity
src/Text/Html/Entity/Data.hs
bsd-3-clause
113,739
0
8
23,814
47,228
27,017
20,211
1,801
1
{-# LANGUAGE UndecidableInstances , TypeSynonymInstances , MultiParamTypeClasses , DeriveDataTypeable , FlexibleInstances #-} {- | Instantiation of the "MFlow" server for the Hack interface see <http://hackage.haskell.org/package/hack> -} module MFlow.Hack( m...
agocorona/MFlow
src/MFlow/Hack.hs
bsd-3-clause
6,964
0
22
2,033
1,219
669
550
88
6
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[PrelNames]{Definitions of prelude modules and names} Nota Bene: all Names defined in here should come from the base package - ModuleNames for prelude modules, e.g. pREL_BASE_Name :: ModuleName - Modules for prelude modules e...
ezyang/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
108,661
0
10
24,152
16,526
9,425
7,101
1,685
2
module Data.ByteString.Char8.AsBs ( module Data.ByteString.Char8.AsBs ) where -- generated by https://github.com/rvion/ride/tree/master/jetpack-gen import qualified Data.ByteString.Char8 as I -- bs_findSubstring :: ByteString -> ByteString -> Maybe Int bs_findSubstring = I.findSubstring -- bs_findSubstrings :: ...
rvion/ride
jetpack/src/Data/ByteString/Char8/AsBs.hs
bsd-3-clause
966
0
5
135
108
71
37
13
1
{-| Default lenses for simple total getters and total possibly polymorphic, updates. Useful for creating accessor labels for single constructor datatypes. Also useful field labels that are shared between all the constructors of a multi constructor datatypes. -} {-# LANGUAGE TypeOperators #-} module Data.Label.Total (...
bergmark/fclabels
src/Data/Label/Total.hs
bsd-3-clause
1,968
0
11
472
584
332
252
37
1
{-# LANGUAGE RankNTypes, BangPatterns, ScopedTypeVariables, FlexibleInstances #-} module Math.Probably.MALA where import Math.Probably.MCMC import qualified Math.Probably.PDF as PDF import Math.Probably.RandIO import Math.Probably.FoldingStats import Math.Probably.Sampler import qualified Math.Probably.PDF as PDF imp...
glutamate/probably
Math/Probably/MALA.hs
bsd-3-clause
17,132
0
23
5,861
5,064
2,559
2,505
298
5
module Compile.Types.Job where data Job = Job { jobOut :: FilePath , jobSource :: FilePath , jobOutFormat :: OF } data OF = C0 | Asm | Obj | ELF deriving Eq defaultJob :: Job defaultJob = Job {jobOut = "", jobSource = "", jobOutFor...
maurer/15-411-Haskell-Base-Code
src/Compile/Types/Job.hs
bsd-3-clause
331
0
8
136
83
53
30
13
1
{-# LANGUAGE CPP #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ScopedTypeVariables #-} module Properties.Stack where import Test.QuickCheck import Instances import XMonad.StackSet hiding (filter) import qualified XMonad.StackSet as S (filter) import Data.Maybe #ifdef VERSION_quickcheck_classes import...
xmonad/xmonad
tests/Properties/Stack.hs
bsd-3-clause
2,851
0
13
637
781
412
369
31
2
module Mistral.CodeGen.ResolveTags where import Mistral.Driver import Mistral.ModuleSystem.Name ( mangleName ) import Mistral.TypeCheck.AST import Mistral.Utils.SCC ( Group ) import Mistral.Utils.PP import Control.Applicative ( (<$>), (<*>), pure ) import Data.Foldable ( foldMap, foldl' ) import q...
GaloisInc/mistral
src/Mistral/CodeGen/ResolveTags.hs
bsd-3-clause
6,936
0
22
1,972
2,406
1,191
1,215
144
14
module T414 where import Data.Kind import Data.Singletons.TH $(singletons [d| class C1 (a :: Bool) where type T1 a b class C2 a where type T2 a b type C3 :: Bool -> Constraint class C3 a where type T3 a b |])
goldfirere/singletons
singletons-base/tests/compile-and-dump/Singletons/T414.hs
bsd-3-clause
235
0
7
68
29
18
11
-1
-1
module Print1 where main::IO() main = putStrLn "Jai Bhairavi"
dhaneshkk/haskell-programming
print1.hs
bsd-3-clause
73
0
6
20
22
12
10
4
1
-- | This module exports State related modules. module Jat.PState (module M) where import Jat.PState.Data as M import Jat.PState.Fun as M import Jat.PState.Step as M import Jat.PState.Semantics as M import Jat.PState.BoolDomain as M import Jat.PState.IntDomain as M import Jat.PState.MemoryModel as M
ComputationWithBoundedResources/jat
src/Jat/PState.hs
bsd-3-clause
304
0
4
44
69
51
18
8
0
{-# LANGUAGE BangPatterns #-} module Main where import Control.Concurrent.STM import Gauge.Main import Data.List (foldl') import System.Random.MWC import qualified RingOfQueuesSTM as A import qualified RingOfQueues as AIO import qualified BinaryHeapSTM as B import qualified BinaryHeap as BIO import qualified Heap as...
kazu-yamamoto/http2
bench-priority/Main.hs
bsd-3-clause
6,758
0
15
1,920
2,854
1,408
1,446
179
3
{-# LANGUAGE CPP #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} #if __GLASGOW_HASKELL__ >= 707 {-# LANGUAGE DeriveDataTypeable #-} #endif ---------------------------------------------------...
dalaing/free
src/Control/Comonad/Cofree.hs
bsd-3-clause
11,481
0
14
2,679
3,534
1,892
1,642
-1
-1
{-# LANGUAGE ScopedTypeVariables, ScopedTypeVariables, TupleSections #-} module Happstack.Server.Internal.Handler ( request , parseResponse , putRequest ) where import qualified Paths_happstack_server as Paths import qualified Data.Version as DV import Control.Applicative (pure) import Control.Concurr...
Happstack/happstack-server
src/Happstack/Server/Internal/Handler.hs
bsd-3-clause
18,735
1
30
5,705
5,279
2,719
2,560
334
5
{-# LANGUAGE MagicHash #-} -- | Evaluate an array by breaking it up into linear chunks and filling -- each chunk in parallel. module Data.Array.Repa.Eval.Chunked ( fillLinearS , fillBlock2S , fillChunkedP , fillChunkedIOP) where import Data.Array.Repa.Index import Data.Array.Repa.Eval.Gang import G...
kairne/repa-lts
Data/Array/Repa/Eval/Chunked.hs
bsd-3-clause
5,873
67
19
1,899
1,240
638
602
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Agon.FBAuth(login) where import Agon.Types import Agon.Instances import Agon.Agon import Agon.APIConstructors import Agon.Data import Agon.HTTP import Control.Monad.Reader import Control.Monad.Trans import Control.Monad.Trans.Either import Data.Aeson import Data.Time.Clock.P...
Feeniks/Agon
app/Agon/FBAuth.hs
bsd-3-clause
1,440
0
14
339
487
247
240
45
3
-- | all internal Functions for manipulating ExprTrees also backstage fun module Functions ( -- * Functions insert, forkWith, relabel, relabelAt, commutate, substitute, _substitute, isSubstitute, varToSymbol, simplify, isNumber, isVariable, ($$), diag, scal...
epsilonhalbe/Algebra-Alchemy
Functions.hs
bsd-3-clause
5,085
0
13
1,461
1,592
828
764
89
1
module StompParserSpec where import Funque.Stomp.Parser import Data.ByteString(pack) import Data.ByteString.Internal(c2w, w2c) import Data.Word(Word8) import Control.Monad import Test.HUnit import Test.QuickCheck import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 tests = [ testWhitespa...
vokhotnikov/funque
test/StompParserSpec.hs
bsd-3-clause
2,547
0
16
491
738
414
324
47
1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GADTs #-} -- | -- Module : Pact.Coverage -- Copyright : (C) 2021 Stuart Popejoy -- License : BSD-style (see the file LICENSE) -- Maintainer : Stuart Popejoy <[email protected]> -- -- Implement advice to provide LCOV coverag...
kadena-io/pact
src-ghc/Pact/Coverage.hs
bsd-3-clause
4,761
0
22
1,161
1,700
869
831
104
13
-- -- Chapter 8. -- module C'8 where import Test.QuickCheck hiding ( Result ) -- Notes: Chapter 4> cabal install -- Chapter 7> cabal install import C'4 import C'7 import B'C'8 import E'8'23 import E'8'22 import E'8'21 import E'8'20 import E'8'19 import E'8'18 import E'8'17 import E'8'16 import E'8'15 i...
pascal-knodel/haskell-craft
_/links/C'8.hs
mit
514
0
5
93
98
67
31
28
0
module Partition where import Prelude (Bool(..)) (x:xs) ++ ys = x:(xs ++ ys) [] ++ ys = ys data Pair a b = Pair a b partition :: (a -> Bool) -> [a] -> Pair [a] [a] partition p [] = Pair [] [] partition p (x:xs) | p x = Pair (x:ys) zs | True = Pair ys (x:zs) where Pair ys zs = partition p xs qso...
danr/hipspec
tfp1/tests/Partition.hs
gpl-3.0
472
0
8
135
315
167
148
15
1
main = ''
roberth/uu-helium
test/parser/EmptyChar.hs
gpl-3.0
9
0
5
2
8
4
4
-1
-1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE StandaloneDeriving #-} -- - Immediate operand module Haskus.Arch.Common.Imm...
hsyl20/ViperVM
haskus-system/src/lib/Haskus/Arch/Common/Immediate.hs
bsd-3-clause
3,268
0
13
1,049
1,033
558
475
83
2
-- Memcached interface. -- Copyright (C) 2005 Evan Martin <[email protected]> module Main where import qualified Network.Memcache import Network.Memcache.Key(hash) import qualified Network.Memcache.Protocol as S import Control.Exception import System.Process import System.IO -- used for emulating sleep() import Te...
alsonkemp/haskell-memcached
Test.hs
mit
1,622
0
13
327
451
234
217
37
2
module Hasql.Postgres.Statement.TemplateConverter.Parser where import Hasql.Postgres.Prelude import Data.Attoparsec.ByteString.Char8 import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Lazy.Builder as BB data Part = Chunk BB.Builder | Placeholder run :: ByteString -> Parser a -> Either ...
AndrewRademacher/hasql-postgres
library/Hasql/Postgres/Statement/TemplateConverter/Parser.hs
mit
1,019
0
15
233
329
172
157
31
1
-- | Utility functions. module Brick.Util ( clamp , on , fg , bg , clOffset ) where import Control.Lens ((&), (%~)) import Data.Monoid ((<>)) import Graphics.Vty import Brick.Types.Internal (Location(..), CursorLocation(..), cursorLocationL) -- | Given a minimum value and a maximum value, clamp a value t...
sisirkoppaka/brick
src/Brick/Util.hs
bsd-3-clause
1,465
0
8
346
266
169
97
27
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="si-LK"> <title>Script Console</title> <maps> <homeID>top</homeID> <mapref location="map...
kingthorin/zap-extensions
addOns/scripts/src/main/javahelp/org/zaproxy/zap/extension/scripts/resources/help_si_LK/helpset_si_LK.hs
apache-2.0
959
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="ms-MY"> <title>Report Generation</title> <maps> <homeID>reports</homeID> <mapref locati...
kingthorin/zap-extensions
addOns/reports/src/main/javahelp/org/zaproxy/addon/reports/resources/help_ms_MY/helpset_ms_MY.hs
apache-2.0
966
77
66
156
407
206
201
-1
-1
-- BANNERSTART -- - Copyright 2006-2008, Galois, Inc. -- - This software is distributed under a standard, three-clause BSD license. -- - Please see the file LICENSE, distributed with this software, for specific -- - terms and conditions. -- Author: Adam Wick <[email protected]> -- BANNEREND -- import Control.Concurrent ...
ggkitsas/HaLVM
examples/Core/GetIdTest/GetId.hs
bsd-3-clause
589
0
10
106
109
55
54
11
1
-- parser produced by Happy Version 1.11 module HsParser (parse) where import Syntax import SyntaxUtil import ParseMonad import Lexer import LexUtil(readInteger, readRational) import ParseUtil --import Rewrite import IOExts import Char(showLitChar) data HappyAbsSyn = HappyTerminal Token | HappyErrorToken Int | ...
forste/haReFork
tools/base/parse/extras/HsParser.hs
bsd-3-clause
251,162
9,397
22
34,931
76,473
41,048
35,425
7,277
63
{-# LANGUAGE CPP #-} import Data.Char import Data.List import Data.Function (on) import System.Environment import System.FilePath import Test.Haddock import Test.Haddock.Xhtml checkConfig :: CheckConfig Xml checkConfig = CheckConfig { ccfgRead = parseXml , ccfgClean = \_ -> strip , ccfgDump = dumpXml ...
Helkafen/haddock
hypsrc-test/Main.hs
bsd-2-clause
1,234
0
11
291
333
190
143
34
1
import Foreign import Data.Word import Control.Monad import System.Mem main = do let finalize p = do putStrLn ("finalize: " ++ show p) free p allocToForeignPtr finalize (mallocBytes 4096) forever performGC allocToForeignPtr :: (Ptr a -> IO ()) -- finalizer -> IO (Ptr a) ...
urbanslug/ghc
testsuite/tests/ffi/should_run/ffi020.hs
bsd-3-clause
651
0
15
185
234
112
122
21
1
module Run where import Prelude hiding (id, putStrLn) import Control.Lens hiding (children, mapping) import qualified Data.List as List import Data.Map (Map) import qualified Data.Map as Map import qualified Data.Set as Set import Data.Text (Text) import qualified Builtins import CodeDb import CodeDbIdGen --import q...
imccoy/utopia
src/Run.hs
mit
5,569
0
17
904
1,703
881
822
-1
-1
{-# LANGUAGE TemplateHaskell #-} module TH_Helper where import Language.Haskell.TH ( stringE ) import Language.Haskell.TH.Syntax ( Q, Exp ) bs1 :: IO (Bool, String) bs1 = return (True, "bob") bs2 :: IO (Bool, String) bs2 = return (False, "bob") bs3 :: IO (Bool, String) bs3 = return (True, "") bs4 ::...
sixears/fluffy
t/TH_Helper.hs
mit
575
0
6
142
207
123
84
20
1
module Main ( main ) where import Test.Framework import Test.Framework.Providers.QuickCheck2 import Test.Framework.Providers.HUnit import UITest main :: IO () main = defaultMain tests tests :: [Test] tests = [ testGroup "UI" [ testGroup "Migrated from HUnit" $ hUnitTestToTests testRenderBu...
andreyLevushkin/LambdaWars
tests/MainTestSuite.hs
mit
407
0
9
92
91
52
39
15
1
--scans.hs module Scans where fibs = 1 : scanl (+) 1 fibs fibsN = (!!) fibs fibsToN n = take n $ fibs smallFibs = takeWhile (< 100) fibs factorialScan n = scanl (*) 1 [1..n]
deciduously/Haskell-First-Principles-Exercises
2-Defining and combining/10-Folding Lists/code/scans.hs
mit
176
0
6
38
84
47
37
6
1
-- file: ch01/WC.hs -- From chapter 1, http://book.realworldhaskell.org/read/getting-started.html main = interact wordCount where wordCount input = show (length (lines input)) ++ "\n"
Sgoettschkes/learning
haskell/RealWorldHaskell/ch01/WC.hs
mit
189
0
12
27
40
20
20
2
1
module Main where valid :: Char -> Bool valid x = (x >= '0' && x <= '9') indexof ([], x, n) = -1 indexof (s:t, x, n) | (x == s) = n | otherwise = indexof(t, x, n + 1) index (list, x) = indexof(list, x, 0) char2nr :: Char -> Integer char2nr x = index("0123456...
skywind3000/language
haskell/str2int.hs
mit
1,802
0
11
586
839
432
407
47
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Views.Components.FeaturedComics (featuredComicsView) where import BasicPrelude import Text.Blaze.Html5 (Html, toHtml, toValue, (!)) import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A import Models.Feat...
nicolashery/example-marvel-haskell
Views/Components/FeaturedComics.hs
mit
1,285
0
20
243
368
195
173
31
2
module NinetyNine.Parser.Token where import Control.Applicative ((<|>), some) import NinetyNine.Parser.Char import NinetyNine.Parser.Combinator import NinetyNine.Parser.Prim natural :: Parser Integer natural = read <$> some digit integer :: Parser Integer integer = sign <*> natural float :: Parser Double float = si...
airt/Haskell-99
src/NinetyNine/Parser/Token.hs
mit
719
0
10
131
278
147
131
20
1
module Network.Minecraft.Actions ( chat , look , move ) where import Control.Monad.State import Network.Minecraft.Core (send) import Network.Minecraft.State import Network.Minecraft.Types chat :: String -> Bot () chat = send . ChatMessage look :: Float -> Float -> Bot () look y p = modifyPlayer $ \s...
kylc/botM
src/Network/Minecraft/Actions.hs
mit
802
0
12
233
275
146
129
19
1
-- Intermission: Exercises -- We’re going to practice using case expressions by rewriting functions. Some -- of these functions you’ve already seen in previous chapters (and some you’ll -- see later using different syntax yet again!), but you’ll be writing new -- versions now. Please note these are all written as they...
diminishedprime/.org
reading-list/haskell_programming_from_first_principles/07_05.hs
mit
1,294
0
9
324
121
68
53
11
3
-- | NOTE: This exception should only be used to indicate an Hquery bug. {-# LANGUAGE DeriveDataTypeable #-} module Text.Hquery.Internal.Error where import Control.Exception import Data.Typeable data HqueryInternalException = HqueryInternalException String deriving (Show, Typeable) instance Exception HqueryInternal...
tych0/hquery
src/Text/Hquery/Internal/Error.hs
mit
556
0
6
76
68
41
27
9
1
module Zepto.Primitives.IOPrimitives where import Control.Monad (liftM) import Control.Monad.Except (liftIO, throwError) import Crypto.Number.Generate (generateBetween) import System.Directory (doesFileExist, getHomeDirectory, getCurrentDirectory, setCurrentDirectory) import System.Environment ...
zepto-lang/zepto
src/Zepto/Primitives/IOPrimitives.hs
gpl-2.0
13,418
614
21
3,078
4,982
2,570
2,412
-1
-1
module Main where -- import Control.Applicative ( (<$>) ) -- import Control.Monad ( forM ) import Control.Monad.Reader import qualified Graphics.UI.SDL.Mixer as SDLm import App.Hash import App.Stuff import App.Image import App.Font import App.Screen import App.Handle data App = App { appScreen :: Screen ...
triplepointfive/hegine
src/Main.hs
gpl-2.0
7,056
0
14
2,033
574
296
278
59
5
----------------------------------------------------------------------------- -- -- Module : App.Image -- Copyright : -- License : AllRightsReserved -- -- Maintainer : -- Stability : -- Portability : -- -- | -- ----------------------------------------------------------------------------- module App.Ima...
triplepointfive/hegine
src/App/Image.hs
gpl-2.0
982
0
10
149
230
134
96
14
1
module Main (main) where import Prelude hiding (log) import Adam.FeedTorrent.Imports import Adam.FeedTorrent.Data import Adam.FeedTorrent.Parser import Adam.FeedTorrent.Download import Adam.FeedTorrent.Config import Adam.FeedTorrent.Args import Adam.FeedTorrent.Test (runTest) -- | Prints error messages. For now it i...
bergmark/feedtorrent
Main.hs
gpl-3.0
2,796
0
21
763
756
375
381
57
4
module Rako (make_deck,make_deck_basic,basic_param) where import Data.Random import Data.Random.List (shuffleN) data Param = Param { max_card :: Int, min_card :: Int, slot_values :: [Int] } ct_cards param = max_card param - min_card param basic_param = Param 60 1 [5, 10, 15, 20, 25, 30, 35, 40, 45, 50] make_deck_...
jmesmon/trifles
rako/Rako.hs
gpl-3.0
565
8
10
98
226
125
101
15
1
module HobTest.Context.Stubbed ( loadStubbedContext, stubbedFileLoader, failingFileWriter ) where import Control.Monad.Error (throwError) import Data.Text (pack) import Data.Tree import qualified Hob.Context as HC import qualified Hob.Context.FileContext as HFC ...
svalaskevicius/hob
test/HobTest/Context/Stubbed.hs
gpl-3.0
1,602
0
11
275
389
204
185
33
1
{- PP Copyright (C) 2015-2021 Christophe Delord http://cdelord.fr/pp This file is part of PP. PP 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) any later v...
CDSoft/pp
src/CSV.hs
gpl-3.0
5,046
0
13
1,318
1,201
637
564
76
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-youtube/gen/Network/Google/Resource/YouTube/Watermarks/Set.hs
mpl-2.0
5,565
0
26
1,469
716
406
310
102
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-directconnect/gen/Network/AWS/DirectConnect/DeleteConnection.hs
mpl-2.0
6,341
0
25
1,385
1,024
602
422
105
1
{-| Arbitrary types for Network.Haskoin.Transaction. -} module Network.Haskoin.Test.Transaction where import Control.Monad import qualified Data.ByteString as BS import Data.Either (fromRight) import Data.List (nub, nubBy, permutations) impor...
plaprade/haskoin
haskoin-core/src/Network/Haskoin/Test/Transaction.hs
unlicense
7,018
0
16
1,842
2,015
1,036
979
157
1
import XMonad import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Util.Run(spawnPipe) import XMonad.Util.EZConfig(additionalKeys) import XMonad.Layout import XMonad.Layout.Grid import XMonad.Layout.NoBorders import XMonad.Layout.ResizableTile import XMonad.Layout.Spacing import XMonad.Layout.Sp...
jwustrack/conf
.xmonad/xmonad.hs
unlicense
2,067
2
20
517
482
281
201
48
1
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-| Module : Haskoin.Transaction.Common Copyright : No rights reserved License : MIT Maintainer : [email protected] Stability : experimental Portability : POSIX Code related to transactions parsing...
haskoin/haskoin
src/Haskoin/Transaction/Common.hs
unlicense
12,027
0
16
3,622
3,170
1,643
1,527
-1
-1
{-# LANGUAGE BangPatterns #-} {- Copyright 2020 The CodeWorld Authors. All rights reserved. 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...
google/codeworld
codeworld-api/src/CodeWorld/DrawState.hs
apache-2.0
3,039
0
14
675
918
469
449
74
3
{-# LANGUAGE OverloadedStrings #-} {- Created : 2015 Aug 26 (Wed) 11:56:37 by Harold Carr. Last Modified : 2015 Sep 18 (Fri) 08:08:21 by Harold Carr. -} module Service.Interact ( GetUser , PutUser , getUserPutUser , input , mkInvalidMethodOrRoute , mkInvalidMsgResponse , showInput...
haroldcarr/utah-haskell
2015-09-17-REST-client-wreq-aeson-foldr/solution/src/Service/Interact.hs
apache-2.0
4,815
0
12
1,583
1,402
724
678
104
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Kubernetes.V1.Capability where import GHC.Generics import qualified Data.Aeson -- | data Capability = Capability { } deriving (Show,...
minhdoboi/deprecated-openshift-haskell-api
kubernetes/lib/Kubernetes/V1/Capability.hs
apache-2.0
413
1
6
60
69
42
27
12
0
import Data.List.Split (splitOn) import Data.List (transpose) ngrams n (x:xs) = if length xs >= (n - 1) then [take n (x:xs)] ++ ngrams n xs else [] splitGridLine line = map (\x -> read x :: Integer) $ splitOn " " line splitGrid gridLines = map splitGridLine gridLines horizontals...
ulikoehler/ProjectEuler
Euler11.hs
apache-2.0
2,934
0
13
1,133
584
307
277
42
2
module NLP.Nerf.Server ( -- * Server runNerfServer -- * Client , ner ) where import Prelude hiding (Word) import Control.Applicative ((<$>)) import Control.Monad (forever, void) import Control.Concurrent (forkIO) import System.IO (Handle, hFlush) import qualified D...
kawu/nerf
src/NLP/Nerf/Server.hs
bsd-2-clause
2,306
0
14
549
599
316
283
47
1
-- | -- Module : Crypto.Hash.SHAKE -- License : BSD-style -- Maintainer : Vincent Hanquez <[email protected]> -- Stability : experimental -- Portability : unknown -- -- Module containing the binding functions to work with the -- SHA3 extendable output functions (SHAKE). -- {-# LANGUAGE ForeignFunctionInterf...
tekul/cryptonite
Crypto/Hash/SHAKE.hs
bsd-3-clause
3,715
0
11
872
722
396
326
58
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverlappingInstances #-} module Database.Concelo.VMap ( VMap() , empty , singleton , member , Database.Concelo.VMap.lookup , first , firstValue , Database.Concelo.VMap.last , lastValue , insert , modify , delete , fold...
Concelo/concelo
src/Database/Concelo/VMap.hs
bsd-3-clause
3,483
0
14
758
1,470
787
683
98
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} import Test.Hspec import Test.QuickCheck import Arith import FullUntyped import Lib import SimpleBool import TyArith import Untyped import FullSimple import ...
hy-zhang/parser
Haskell/test/Spec.hs
bsd-3-clause
15,807
0
12
4,281
2,710
1,672
1,038
439
1
module Matter (Matter) where type Matter = String
dariush-alipour/kanoon-hs
src/Matter.hs
bsd-3-clause
51
0
4
9
15
10
5
2
0
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module BCalib.MV2 where import Control.Applicative (ZipList (..)) import Data.Map.Strict as M import GHC.Float import GHC.Generics hiding (to) import ...
cspollard/bcalib
src/BCalib/MV2.hs
bsd-3-clause
2,361
0
13
565
693
360
333
69
1
{-# LANGUAGE CPP #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE BangPatterns #-} -- | This module converts 'GHC.ApiAnns' into 'Anns' by traversing a -- structure created by the "Annotate" modue. -- -- == Structure of an Annotation -- -- As a rule of thumb, every located element in the GHC AST will have -- a correspo...
mpickering/ghc-exactprint
src/Language/Haskell/GHC/ExactPrint/Delta.hs
bsd-3-clause
24,620
45
30
5,794
5,537
2,893
2,644
407
16
{-# LANGUAGE PackageImports #-} {-# LANGUAGE Strict #-} module Foreign.Erlang.Digest ( genChallenge , genDigest ) where import "cryptonite" Crypto.Hash (MD5 (MD5), hashFinalize, hashInitWith, hashUpdate) import Data...
LTI2000/hinterface
src/Foreign/Erlang/Digest.hs
bsd-3-clause
843
0
13
272
182
105
77
21
1
----------------------------------------------------------------------------- -- | -- Module : XMonad.Prompt.Pass -- Copyright : (c) 2014 Igor Babuschkin, Antoine R. Dumont -- License : BSD3-style (see LICENSE) -- -- Maintainer : Antoine R. Dumont <[email protected]> -- Stability : unstable -- Port...
yzhou61/xmonad-contrib
XMonad/Prompt/Pass.hs
bsd-3-clause
6,166
0
11
1,332
830
467
363
65
2
module HSync.Common.Util where import ClassyPrelude.Yesod import qualified Data.Text as T import Text.Read(reads) -------------------------------------------------------------------------------- toPathPieceShow :: Show a => a -> Text toPathPieceShow = T.pack . show fromPathPieceRead :: Read a => Text -> Maybe a ...
noinia/hsync-common
src/HSync/Common/Util.hs
bsd-3-clause
462
0
10
116
127
70
57
10
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-} {-| Use this module to either: * match `Text` with light-weight backtracking patterns, or: * parse structured values from `Text`. Example usage: >>> :set -XOverloadedStrin...
maoe/Haskell-Turtle-Library
src/Turtle/Pattern.hs
bsd-3-clause
12,745
0
15
3,041
2,447
1,269
1,178
220
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE Rank2Types #-} module Ghost ( Ghost(Ghost), position, validExits, progress , mkGhost, nextPos, prevPos) where import Data.Maybe (fromMaybe) import Lens.Family2 import Lens.Family2.TH (makeLenses) import IPoint (IPoint) data Ghost = Ghost { _posi...
kqr/pacmANN
src/Ghost.hs
bsd-3-clause
777
0
10
172
242
134
108
30
1
{-# Language OverloadedStrings #-} module Main where import Network.Openflow.Ethernet.Types import Network.Openflow.Ethernet.TCP import Network.Openflow.Ethernet.Generator import Network.Openflow.Misc import HCProbe.TCP import HCProbe.FakeSwitch (mcPrefix) import Nettle.OpenFlow.StrictPut import Data.Word import Cont...
ARCCN/hcprobe
src/bench/TestPkgGen.hs
bsd-3-clause
1,030
0
13
175
250
138
112
36
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MonadComprehensions #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RebindableSyntax #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANG...
ulricha/dsh-example-queries
Queries/TPCH/Standard/Q16.hs
bsd-3-clause
1,546
0
15
458
450
251
199
33
1
-- | -- UTF-8 character parser and simple XML token parsers -- -- Version : $Id: XmlCharParser.hs,v 1.2 2005/05/31 16:01:12 hxml Exp $ module Yuuko.Text.XML.HXT.Parser.XmlCharParser ( xmlChar -- xml char parsers , xmlNameChar , xmlNameStartChar , xmlNCNameChar , xmlNCNameStartChar , xmlLetter...
nfjinjing/yuuko
src/Yuuko/Text/XML/HXT/Parser/XmlCharParser.hs
bsd-3-clause
1,875
28
6
323
274
162
112
24
1
module Ttlv.Validator.MessagesSpec where import Test.Hspec import Control.Applicative ((<|>)) import Ttlv.Data import qualified Ttlv.Enum as TEnum import qualified Ttlv.Tag as T import Ttlv.Validator.Message import Ttlv.Validator...
nymacro/hs-kmip
tests/Ttlv/Validator/MessagesSpec.hs
bsd-3-clause
1,364
0
25
458
371
190
181
27
1
module Gradient (numericalDiff ) where import Numeric.LinearAlgebra numericalDiff :: Fractional a => (a -> a) -> a -> a numericalDiff f x = (f (x+h) - f (x-h)) / (2*h) where h = 1e-4
ku00/deep-learning-practice
src/Gradient.hs
bsd-3-clause
197
0
10
48
96
52
44
6
1
-- Dada a função abaixo fun :: (Int) -> Int fun x | x < 10 = 1 | x < 5 = 2 | otherwise = 3 -- Qual o resultado das seguintes avaliações? -- a) Q: fun 1 -- R: 1 -- b) Q: fun 7 -- R: 1
Mazuh/Algs
src/haskell_uesb/c1/q10_evaluation_ii.hs
mit
211
0
8
75
59
31
28
4
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} module Yes...
MaxGabriel/yesod
yesod-core/Yesod/Core/Types.hs
mit
22,188
0
16
5,976
5,759
3,193
2,566
-1
-1
{- Copyright 2012 Google Inc. All Rights Reserved. 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 required by applicable law or agreed to in ...
mzero/plush
src/Plush/Types/CommandSummary.hs
apache-2.0
3,692
0
13
890
899
471
428
48
8
module Foundation ( Jabaraster (..) , JabarasterRoute (..) , JabarasterMessage (..) , resourcesJabaraster , Handler , Widget , Form , maybeAuth , requireAuth , module Yesod , module Settings , module Model , StaticRoute (..) , AuthRoute (..) ) where import Pr...
jabaraster/yefib
Foundation.hs
bsd-2-clause
6,049
0
17
1,220
917
525
392
-1
-1
module Math.Probably.ChunkedArray where import Data.Array.Vector import Data.List (foldl') class ReifyInt a where reifyInt :: a -> Int data D4 = D4 instance ReifyInt D4 where reifyInt _ = 4 data D512 = D512 instance ReifyInt D512 where reifyInt _ = 512 data D10000 = D10000 instance ReifyInt D10000 where reifyIn...
glutamate/probably
Math/Probably/ChunkedArray.hs
bsd-3-clause
1,559
0
14
391
665
333
332
31
2
-- | Common code for parsing command line options based on getopt. module Futhark.Util.Options ( FunOptDescr , mainWithOptions , commonOptions ) where import Data.Version import System.Environment import Control.Monad.IO.Class import System.IO import System.Exit import System.Console.GetOpt...
CulpaBS/wbBach
src/Futhark/Util/Options.hs
bsd-3-clause
2,884
0
17
812
754
379
375
61
3
{-# LANGUAGE DeriveGeneric #-} -- | Basic operations on 2D vectors represented in an efficient, -- but not unique, way. module Game.LambdaHack.Common.Vector ( Vector(..), isUnit, isDiagonal, neg, chessDistVector, euclidDistSqVector , moves, movesCardinal, movesDiagonal, compassText, vicinity, vicinityCardinal , s...
Concomitant/LambdaHack
Game/LambdaHack/Common/Vector.hs
bsd-3-clause
8,719
0
16
1,987
2,368
1,322
1,046
-1
-1
module MissingClass where import java "java.lang.Math1"
rahulmutt/ghcvm
tests/suite/java-imports/fail/MissingClass.hs
bsd-3-clause
57
1
5
7
12
6
6
-1
-1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Data/Set.hs" #-} {-# LANGUAGE CPP #-} {-# LANGUAGE Safe #-} ...
phischu/fragnix
tests/packages/scotty/Data.Set.hs
bsd-3-clause
4,597
0
5
2,002
301
224
77
70
0
{-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses #-} -- module Exp.Guess where import Autolib.Exp import Autolib.Exp.Some import Autolib.Exp.Inter import Autolib.NFA.Subseteq import Autolib.NFA.Minus import Autolib.NFA.Shortest ( some_shortest ) import Autolib.Util.Zufall import Autolib.Util.Sort import Auto...
florianpilz/autotool
src/Exp/Guess.hs
gpl-2.0
2,502
13
21
834
840
437
403
76
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/DescribeCacheSecurityGroups.hs
mpl-2.0
6,206
0
12
1,250
725
431
294
80
1
----------------------------------------------------------------------------- -- | -- Module : XMonad.Util.Loggers -- Copyright : (c) Brent Yorgey, Wirt Wolff -- License : BSD-style (see LICENSE) -- -- Maintainer : <[email protected]> -- Stability : unstable -- Portability : unportable -- -- A colle...
kmels/xmonad-launcher
XMonad/Util/Loggers.hs
bsd-3-clause
11,386
0
16
2,327
1,291
769
522
95
3
{-# LANGUAGE CPP #-} -- #hide module Distribution.Compat.FilePerms ( setFileOrdinary, setFileExecutable, ) where #ifndef mingw32_HOST_OS import System.Posix.Types ( FileMode ) import System.Posix.Internals ( c_chmod ) import Foreign.C ( withCString ) #if MIN_VERSION_base(4,0,0) import ...
IreneKnapp/Faction
faction/Distribution/Compat/FilePerms.hs
bsd-3-clause
1,028
0
11
212
173
101
72
19
1
{-# LANGUAGE OverloadedStrings #-} module NN.Examples.Demo where import Control.Lens import Control.Monad import Gen.Caffe.LayerParameter as LP import Gen.Caffe.NetParameter as NP import GHC.IO.Handle import System.IO.Temp import System.Process im...
sjfloat/dnngraph
NN/Examples/Demo.hs
bsd-3-clause
2,210
0
18
675
762
375
387
-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="ru-RU"> <title>Все включено в одно примечание</title> <maps> <homeID>top</homeID> <mapr...
thc202/zap-extensions
addOns/allinonenotes/src/main/javahelp/org/zaproxy/zap/extension/allinonenotes/resources/help_ru_RU/helpset_ru_RU.hs
apache-2.0
1,034
77
66
160
511
256
255
-1
-1
{-# Language PolyKinds #-} {-# Language TypeFamilies #-} {-# Language KindSignatures #-} {-# Language DataKinds #-} {-# Language MultiParamTypeClasses #-} module T15764a where import Data.Kind import Data.Proxy import GHC.TypeLits class C6 (k :: Type) (a :: k) (b :: Proxy (a :: k)) where type T6 (proxy :: Proxy '(k...
sdiehl/ghc
testsuite/tests/indexed-types/should_compile/T15764a.hs
bsd-3-clause
339
0
13
58
94
58
36
-1
-1
{-# LANGUAGE DeriveGeneric #-} module T9630 where import T9630a import GHC.Generics import Control.Applicative data T = T () () () () ()()()()()()() ()()()()()()()()()()()()()()()() ()()()()()()()()()()()()()()()() ()()()()()()()()()()()()()()()() ()()()()()()()()()()(...
sdiehl/ghc
testsuite/tests/perf/compiler/T9630.hs
bsd-3-clause
591
0
7
144
610
310
300
19
0
{-# LANGUAGE BangPatterns, MagicHash, UnboxedTuples #-} {-# OPTIONS_GHC -O #-} -- We always optimise this, otherwise performance of a non-optimised -- compiler is severely affected -- ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow, 1997-2006 -- -- Char...
siddhanathan/ghc
compiler/utils/Encoding.hs
bsd-3-clause
15,226
0
29
4,471
3,993
2,052
1,941
258
7
module T7869 where f = (\x -> f x) :: [a] -> b
wxwxwwxxx/ghc
testsuite/tests/typecheck/should_fail/T7869.hs
bsd-3-clause
48
0
7
14
30
18
12
2
1
module Shaker.HsHelper where import Control.Arrow import Data.List import Data.Maybe import Language.Haskell.Parser import Language.Haskell.Syntax import Shaker.Io import Shaker.Type parseHsFiles :: [FileListenInfo] -> IO [HsModule] parseHsFiles fliListenInfos = do files <- recurseMultipleListFiles fliListenInfos ...
bonnefoa/Shaker
src/Shaker/HsHelper.hs
isc
2,288
0
12
417
721
378
343
52
2
module Handler.RecentContentFeed where import Import getRecentContentFeedR :: Handler TypedContent getRecentContentFeedR = do recents <- getRecents 10 0 updated <- case recents of [] -> notFound (_, x):_ -> return $ hcWhen x newsFeed Feed { feedTitle = "Published Co...
fpco/schoolofhaskell.com
src/Handler/RecentContentFeed.hs
mit
666
0
12
199
137
76
61
18
2
module Demi.StdLib where import qualified Data.Map.Strict as Map import qualified Data.Char as Char import Demi.Parser capitalized :: String -> String capitalized (head:tail) = Char.toUpper head : map Char.toLower tail capitalized [] = [] joinByCommas :: [String] -> String joinByCommas [] = "" joinByCommas [x] = x ...
oakfang/DemiLang
src/Demi/StdLib.hs
mit
1,705
0
11
390
703
351
352
48
1