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 DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/CreateVpc.hs
mpl-2.0
4,795
0
9
1,058
558
342
216
66
1
{-# LANGUAGE DeriveGeneric, StandaloneDeriving #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Main (main) where import Control.Applicative ((<|>)) import Control.Exception (IOException, catch) import Control.Monad (when) import Data.Foldable (traverse_) import Data.List (foldl') import Data.Traversable (for) import ...
Fuuzetsu/haddock
haddock-library/fixtures/Fixtures.hs
bsd-2-clause
4,472
0
19
1,083
1,462
736
726
125
2
module Print3 where myGreeting :: String myGreeting = "hell" ++ "o world" main :: IO() main = do putStrLn myGreeting putStrLn secondGreeting where secondGreeting = concat["hellO"," ", "wOrld"] area d = pi * (r * r) where r = d / 2
punitrathore/haskell-first-principles
src/Print3.hs
bsd-3-clause
246
0
8
57
94
50
44
10
1
module FlagSpec where import Control.Applicative import Language.Haskell.GhcMod import Test.Hspec import TestUtils spec :: Spec spec = do describe "flags" $ do it "contains at least `-fno-warn-orphans'" $ do f <- runD $ lines <$> flags f `shouldContain` ["-fno-warn-orphans"]
cabrera/ghc-mod
test/FlagSpec.hs
bsd-3-clause
314
0
15
76
80
43
37
11
1
module Plugin where -- user doesn't import the API -- and provides a polymorphic value -- import API -- resource :: Interface -- -- should pass type check, and dump core -- -- resource :: Num a => a -- import API resource :: Num a => a resource = 7
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/testsuite/pdynload/spj1/Plugin.hs
bsd-3-clause
254
0
6
56
30
21
9
3
1
module MatrixMarket ( MatrixList , mmReadFile , mmWriteFile ) where -- reads/writes MatrixMarket files to a generic matrix data type import Data.Char (toLower) import Data.Complex import Data.List (intersperse, nub) import qualified Data.Map as Map (fromList, lookup, Map) import Data.Maybe (fromJust, isNothing) impor...
FreeON/spammpack
src-Haskell/MatrixMarket.hs
bsd-3-clause
8,262
0
14
2,792
2,666
1,417
1,249
154
3
{- | Module : $Header$ Description : Handling of extended parameters Copyright : (c) Ewaryst Schulz, DFKI Bremen 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : ewaryst.schulz@dfki.de Stability : experimental Portability : portable This module defines an ordering on extended paramete...
mariefarrell/Hets
CSL/GeneralExtendedParameter.hs
gpl-2.0
5,377
0
14
1,352
1,186
612
574
74
9
{- % (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[TcExpr]{Typecheck an expression} -} {-# LANGUAGE CPP, TupleSections, ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} module TcExpr ( tcPolyExpr, tcMonoExpr, tcMonoExprNC, tcInferSigma,...
olsner/ghc
compiler/typecheck/TcExpr.hs
bsd-3-clause
111,515
293
24
35,912
20,040
10,486
9,554
-1
-1
module A where a = "a"
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/testsuite/make/makeall001/A.hs
bsd-3-clause
24
0
4
7
9
6
3
2
1
------------------------------------------------------------------------------- -- | -- Module : CCO.Feedback.Message -- Copyright : (c) 2008 Utrecht University -- License : All rights reserved -- -- Maintainer : stefan@cs.uu.nl -- Stability : provisional -- Portability : portable -- -- Log, warning...
UU-ComputerScience/uu-cco
uu-cco/src/CCO/Feedback/Message.hs
bsd-3-clause
2,775
0
14
734
504
283
221
40
4
import Eval (eval) import Parser (parseExpr) import System.Environment process :: String -> IO () process input = do let ast = parseExpr input case ast of Right ast -> eval ast Left err -> do putStrLn "Parser Error:" print err main :: IO () main = do args <- getArgs case args of [] ...
FranklinChen/write-you-a-haskell
chapter9/assign/Main.hs
mit
437
0
13
124
161
75
86
19
2
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="fil-PH"> <title>SOAP Support Add-on</title> <maps> <homeID>soap</homeID> <mapref locati...
kingthorin/zap-extensions
addOns/soap/src/main/javahelp/org/zaproxy/zap/extension/soap/resources/help_fil_PH/helpset_fil_PH.hs
apache-2.0
979
82
53
159
402
211
191
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable #-} {- Copyright (C) 2014 John MacFarlane <jgm@berkeley.edu> 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 2 of the Licens...
janschulz/pandoc
src/Text/Pandoc/MediaBag.hs
gpl-2.0
4,353
0
16
1,000
703
391
312
56
2
{-# LANGUAGE PolyKinds, DataKinds, ExplicitForAll #-} module T15743 where import Data.Kind import Data.Proxy data SimilarKind :: forall (c :: k) (d :: k). Proxy c -> Proxy d -> Type data T k (c :: k) (a :: Proxy c) b (x :: SimilarKind a b) data T2 k (c :: k) (a :: Proxy c) (b :: Proxy d) (x :: SimilarKind a b)
sdiehl/ghc
testsuite/tests/dependent/should_fail/T15743c.hs
bsd-3-clause
316
0
8
69
130
81
49
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} module Network.Wai.Handler.Warp.IO where import Data.ByteString (ByteString) import Data.ByteString.Builder (Builder) import Data.ByteString.Builder.Extra (runBuilder, Next(Done, More, Chunk)) import Network.Wai.Handler.Warp.Buffer import Network.Wai.Handler.Warp.Typ...
AndrewRademacher/wai
warp/Network/Wai/Handler/Warp/IO.hs
mit
964
0
15
306
268
139
129
25
3
import Control.Monad import Data.List.Extra import Data.Maybe import qualified Data.Char as C import qualified Data.Map as Map import qualified Data.Set as Set ------ iread :: String -> Int iread = read answer :: (Show a) => (String -> a) -> IO () answer f = interact $ (++"\n") . show . f ord0 c = C.ord c - C.ord 'a...
msullivan/advent-of-code
2016/Template.hs
mit
842
0
10
187
353
189
164
24
3
-- Weight for weight -- http://www.codewars.com/kata/55c6126177c9441a570000cc/ module Codewars.G964.WeightSort where import Data.Char (digitToInt) import Data.List(sortBy) orderWeight :: String -> String orderWeight = unwords . sortBy cmp . words where weight = sum . map digitToInt cmp s1 s2 = case co...
gafiatulin/codewars
src/5 kyu/WeightSort.hs
mit
443
0
10
134
116
62
54
8
2
{-| Copyright (c) 2014 Maciej Bendkowski Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, me...
maciej-bendkowski/LCCLUtils
src/LCParser.hs
mit
3,028
0
11
996
472
241
231
41
3
-- ------------------------------------------------------------------------------------- -- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved. -- For email, run on linux (perl v5.8.5): -- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0...
cbrghostrider/Hacking
HackerRank/FunctionalProgramming/AdHoc/bigGCD.hs
mit
765
0
15
147
187
97
90
12
1
{-# LANGUAGE NoImplicitPrelude #-} module Prelude.Source.GHC.IO ( FilePath, ) where import Prelude ( FilePath, )
scott-fleischman/cafeteria-prelude
src/Prelude/Source/GHC/IO.hs
mit
127
0
5
29
24
17
7
5
0
{-# LANGUAGE OverloadedStrings #-} module WordProblem (answer) where import Data.Text (pack) import Data.List (foldl') import Control.Applicative (pure, (<|>), (<$>), (<*>), (<*), (*>)) import Data.Attoparsec.Text ( Parser, signed, decimal, space, maybeResult, parse, many' ) answerParser :: Parser Int answerParser =...
pminten/xhaskell
wordy/example.hs
mit
817
0
12
187
302
170
132
21
1
{-# OPTIONS_GHC -F -pgmF htfpp #-} -- | This module tests the standard value iteration algorithm for -- discounted problems by comparing its iterations to known iterations -- from "Dynamic Programming and Optimal Control", Dimitri -- P. Bertsekas, p. 23. module Algorithms.MDP.Ex_3_1_Test where import Test.Framework ...
prsteele/mdp
testsuite/tests/Algorithms/MDP/Ex_3_1_Test.hs
mit
1,341
0
9
307
358
203
155
51
1
{-# htermination inRange :: Ix a => (a,a) -> a -> Bool #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_inRange_1.hs
mit
59
0
2
13
3
2
1
1
0
{-# LANGUAGE RankNTypes #-} --{-# LANGUAGE KindSignatures #-} --{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE ScopedTypeVariables #-} module Rec where import Data.Function (fix) import Control.Monad.Fix import Control.Monad.State import Mem -- This sends ghc into an infinite loop. -- See https://ghc.haske...
vladfi1/hs-misc
PFP/Rec.hs
mit
1,117
0
9
257
278
156
122
21
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} {- | MinMax (or minimax) algorithm for 'Game'. The module provides both an unpruned version 'minMax' and a AB-pruned version 'minMaxAB'. There is not reason to use the unpruned version over the pruned one. The unpruned version is only there for ...
berewt/J2S
src/J2S/AI/MinMax.hs
mit
3,331
0
16
875
1,101
562
539
82
6
{-# LANGUAGE QuasiQuotes #-} module Hpack.Syntax.DefaultsSpec (spec) where import Helper import Data.Aeson.Config.FromValueSpec hiding (spec) import Data.Aeson.Config.FromValue import Hpack.Syntax.Defaults defaultsGithub :: String -> String -> String -> [FilePath] -> Defaults...
haskell-tinc/hpack
test/Hpack/Syntax/DefaultsSpec.hs
mit
5,091
0
21
1,591
869
441
428
89
1
---------------- -- prerequisites import System.Environment import Data.List.Split -- Durchschnittliche Ortskraft in Mitteleuropa. g = -9.81 -- Data structure for Pendulum: data Pendulum = Pendulum { getL :: Double, -- Laenge der Pendel getMass :: Double, -- Masse pro Pendel getPhi1 :: Do...
tychon/chaospendel
wikihaskell/main.hs
mit
1,750
0
19
421
736
402
334
32
1
module GHCJS.DOM.DatabaseCallback ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/DatabaseCallback.hs
mit
46
0
3
7
10
7
3
1
0
{-# LANGUAGE TypeFamilies, FlexibleContexts, FlexibleInstances, GADTs, MultiParamTypeClasses, ScopedTypeVariables, AllowAmbiguousTypes, EmptyDataDecls #-} module Graphics.GPipe.Internal.Texture where import Graphics.GPipe.Internal.Format import Graphics.GPipe.Internal.Expr import Graphics.GPipe.Internal.Context import...
Teaspot-Studio/GPipe-Core
src/Graphics/GPipe/Internal/Texture.hs
mit
86,727
0
21
28,840
28,122
13,809
14,313
-1
-1
-- Problems/Problem013.hs module Problems.Problem013 (p13) where import Helpers.Numbers main = print p13 p13 :: Integer p13 = read . concatMap show $ take 10 $ intToDigits $ sum digitNumbers digitNumbers :: [Integer] digitNumbers = [37107287533902102798797998220837590246510135740250, 463769376774900097126481248...
Sgoettschkes/learning
haskell/ProjectEuler/src/Problems/Problem013.hs
mit
5,833
0
9
534
373
240
133
106
1
{-# LANGUAGE CPP, NoImplicitPrelude #-} module Data.Ratio.Compat ( module Base #if MIN_VERSION_base(4,4,0) && !(MIN_VERSION_base(4,9,0)) , denominator , numerator #endif ) where #if !(MIN_VERSION_base(4,4,0)) || MIN_VERSION_base(4,9,0) import Data.Ratio as Base #else import Data.Ratio as Base hiding ( denominato...
haskell-compat/base-compat
base-compat/src/Data/Ratio/Compat.hs
mit
843
0
7
139
94
60
34
4
0
module MuevalSlack.Arguments ( getArguments ) where import Control.Applicative ((<*>)) import Data.Monoid ((<>)) import Options.Applicative (Parser, execParser, strOption, long, short, metavar, info, helper, fullDesc) parseArguments :: Parser FilePath parseArguments = strOption $ long "config" <> short 'c' <> metav...
zalora/slack-mueval
src/MuevalSlack/Arguments.hs
mit
446
0
8
58
132
76
56
9
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedLabels #-} module GUI.Build ( -- *Types GUIControl -- *Functions , makeGUI ) where import Control.Concurrent.Chan(Chan) import Data.Maybe(fromJust) import Data.Text(Text) import qualified Data.Text as T import G...
jvilar/hrows
lib/GUI/Build.hs
gpl-2.0
1,864
0
12
330
465
238
227
48
1
-- | Definición de los errores de matching. module Equ.Matching.Error where import Equ.PreExpr -- | Errores de matching. data MatchError = DoubleMatch Variable FlatExpr FlatExpr | BindingVar Variable | InequPreExpr FlatExpr FlatExpr | InequOperator Operator Operator ...
miguelpagano/equ
Equ/Matching/Error.hs
gpl-3.0
1,398
0
12
629
293
151
142
25
0
module LambdaLine.Util ( ProcessResponse , cycle3 , cycle4 , deleteNulls , getPromptType , getTerminalWidth , isResponseNull , parseProcessResponse , splitOnNewLine , stdOutListAny , trimString ) where import Control.Monad import Data.Functor((<$>)) import System.Environment(getArgs) import Data.List as L import Data.L...
josiah14/lambdaline
LambdaLine/Util.hs
gpl-3.0
1,436
0
11
277
548
300
248
43
2
{-# OPTIONS_GHC -fno-warn-orphans #-} module Handler.SearchTrans where import Import import Data.Char (toLower) $(deriveJSON defaultOptions ''Transaction) getSearchTransR :: String -> Handler Value getSearchTransR query = do trans <- runDB $ selectList [] [] :: Handler [Entity Transaction] returnJson $ filter (\...
weshack/thelist
TheList/Handler/SearchTrans.hs
gpl-3.0
484
0
23
71
182
92
90
-1
-1
module Logic.Config where import Prelude hiding (FilePath) import Types.Base import Types.CliArguments import Types.LocalConfig import Types.AppConfig build :: FilePath -> Maybe LocalConfig -> CliArgs -> Config build defaultSaveFile Nothing (CliArgs [] verbose) = Config defaultS...
diegospd/pol
app/Logic/Config.hs
gpl-3.0
702
0
11
201
174
90
84
11
1
{-| Module : Ranking.Glicko License : GPL-3 Maintainer : rasmus@precenth.eu Stability : experimental -} module Ranking.Glicko ( module Ranking.Glicko.Core , module Ranking.Glicko.Inference , module Ranking.Glicko.Types ) where import Ranking.Glicko.Core import Ranking.Glicko.Inference import Ranking....
Prillan/haskell-glicko
src/Ranking/Glicko.hs
gpl-3.0
333
0
5
52
48
33
15
7
0
{-# LANGUAGE DeriveGeneric, DeriveDataTypeable #-} module Hive.Master.Messaging where ------------------------------------------------------------------------------- import Control.Distributed.Process import Control.Applicative ((<$>)) import Hive.Types (Master (..), Ticket, Problem, Solution, History) import Hi...
chrisbloecker/Hive
src/Hive/Master/Messaging.hs
gpl-3.0
3,882
0
15
705
1,088
551
537
79
1
module Model.Transaction where import Import import qualified Data.Map as M import Model.User renderOtherAccount :: Bool -> Transaction -> M.Map AccountId (Entity User) -> M.Map AccountId (Entity Project) -> Widget renderOtherAccount is_credit transaction user_accounts project_accounts = do let maybe_account_...
Happy0/snowdrift
Model/Transaction.hs
agpl-3.0
1,395
0
14
501
266
151
115
-1
-1
-- | Parsing of documentation nodes. module Data.GI.GIR.Documentation ( Documentation(..) , queryDocumentation ) where import Data.Text (Text) import Text.XML (Element) import Data.GI.GIR.XMLUtils (firstChildWithLocalName, getElementContent) -- | Documentation for a given element. data Documentation = Do...
hamishmack/haskell-gi
lib/Data/GI/GIR/Documentation.hs
lgpl-2.1
623
0
8
103
121
72
49
12
1
{-#LANGUAGE DeriveDataTypeable#-} module Data.P440.Domain.PNO where import Data.P440.Domain.SimpleTypes import Data.P440.Domain.ComplexTypes import Data.Typeable (Typeable) import Data.Text (Text) -- 2.3 Инкассовое поручение data Файл = Файл { идЭС :: GUID ,версПрог :: Text ,телОтпр :: Text ...
Macil-dev/440P-old
src/Data/P440/Domain/PNO.hs
unlicense
2,131
134
8
589
1,041
546
495
60
0
module TrivialModule where data Trivial = Trivial1 | Trivial2 instance Eq Trivial where (==) Trivial1 Trivial1 = True (==) Trivial2 Trivial2 = True (==) _ _ = False
ocozalp/Haskellbook
chapter6/trivial.hs
unlicense
179
0
6
42
58
34
24
6
0
-- vim: ts=2 sw=2 et : {-# LANGUAGE CPP #-} {- | Parse the output of ghci's @:history@ command. -} module GHCi.History.Parse where import GHCi.History import qualified Parsing import qualified GHCi.History.Parse.Common as C #ifdef USE_PARSEC import qualified Parsing.Parsec as P #else import qualified Parsing...
phlummox/ghci-history-parser
src/GHCi/History/Parse.hs
unlicense
1,065
0
8
195
96
68
28
9
1
module Main where import qualified Data.FormulaBench import Criterion.Main import Criterion.Types reportFilePath :: FilePath reportFilePath = "mso-bench.html" main :: IO () main = defaultMainWith defaultConfig{reportFile = Just reportFilePath} [ bgroup "all" [ Data.FormulaBench.benchs ] ]
jokusi/mso
bench/mso-bench.hs
apache-2.0
306
0
9
50
75
43
32
10
1
module Graham.A269045Spec (main, spec) where import Test.Hspec import Graham.A269045 (a269045) main :: IO () main = hspec spec spec :: Spec spec = describe "A269045" $ it "correctly computes the first 20 elements" $ take 20 (map a269045 [1..]) `shouldBe` expectedValue where expectedValue = [1,2,3,4,6,8,9,...
peterokagey/haskellOEIS
test/Graham/A269045Spec.hs
apache-2.0
360
0
10
59
160
95
65
10
1
-- Copyright 2020 Google LLC -- -- 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 ...
google/cabal2bazel
bzl/tests/ffi/SimpleFFI.hs
apache-2.0
748
0
6
128
59
41
18
5
1
module Hyper.Canvas.Concurrent ( CState , newCState , stepCState , enqueueDraws ) where import System.IO (hPutStrLn, stderr) import Data.Queue import Control.Event.Handler (Handler) import Control.Concurrent.STM import Contro...
RoboNickBot/interactive-tree-demos
src/Hyper/Canvas/Concurrent.hs
bsd-2-clause
4,047
0
16
1,225
1,189
606
583
86
2
{-# LANGUAGE OverloadedStrings #-} -- | NKJP parsing utilities. module Text.NKJP.Utils ( P, Q , fStrQ , fSymQ , idesQ , idesQ' ) where import Control.Applicative import qualified Data.Text.Lazy as L import qualified Text.HTML.TagSoup as S import Text.XML.PolySoup hiding (P, Q) import qualified T...
kawu/nkjp
src/Text/NKJP/Utils.hs
bsd-2-clause
1,352
0
12
348
476
257
219
37
2
{-# LANGUAGE NoImplicitPrelude, Arrows #-} module Simulation.Continuous ( module Simulation.Continuous.Base , module Simulation.Continuous.Signal , ContinuousRK , ContinuousEU , integrator , integratorS , switch , watch , accumulator , delay , filterT , filter1 , filter1Mod , modFrac ) where import NumericPrelude i...
balodja/contisim
lib/Simulation/Continuous.hs
bsd-2-clause
2,348
3
21
638
1,064
568
496
55
2
{-# LANGUAGE DeriveDataTypeable, DeriveGeneric, RecordWildCards #-} -- | -- Module : Criterion.Main.Options -- Copyright : (c) 2014 Bryan O'Sullivan -- -- License : BSD-style -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : GHC -- -- Benchmarking command-line configuration....
iu-parfunc/criterion
Criterion/Main/Options.hs
bsd-2-clause
7,103
0
23
2,079
1,841
954
887
147
2
{-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE OverloadedStrings #-} import Data.Attoparsec.Text (parseOnly) import Data.Maybe import qualified Data.Text.IO as TIO import Control.Applicative import Options.Applicative import Lucid import Diff2Html import Chunk import Diff import Style parseChunks :: FilePath -> ...
bgamari/diff-utils
Main.hs
bsd-3-clause
1,103
0
13
257
337
171
166
32
1
{-# OPTIONS_GHC -w #-} {-# LANGUAGE OverloadedStrings #-} module Lang.TopLevel.HParser where import Data.Map (Map) import qualified Data.Map as Map import Data.Text (Text) import qualified Data.Text as T import Lang.TopLevel.Tokenizer -- parser produced by Happy Version 1.18.6 data HappyAbsSyn = HappyTerminal (...
Alasdair/Mella
Lang/TopLevel/HParser.hs
bsd-3-clause
18,583
513
19
3,357
5,398
2,988
2,410
438
12
{-# LANGUAGE ScopedTypeVariables #-} module Empty where import Control.Applicative import Test.Tasty import Test.Tasty.QuickCheck as QC import Text.Earley tests :: TestTree tests = testGroup "Empty productions" [ QC.testProperty "The empty production doesn't parse anything" $ \(input :: String) -> allPars...
sboosali/Earley
tests/Empty.hs
bsd-3-clause
932
0
19
329
278
154
124
20
1
{-| Module : Data.Array.BitArray.ByteString Copyright : (c) Claude Heiland-Allen 2012 License : BSD3 Maintainer : claude@mathr.co.uk Stability : unstable Portability : portable Copy bit array data to and from ByteStrings. -} module Data.Array.BitArray.ByteString ( -- * Immutable copying. ...
ekmett/bitwise
src/Data/Array/BitArray/ByteString.hs
bsd-3-clause
2,558
0
17
501
643
354
289
47
1
-- Copyright: 2007-2012 Dino Morelli -- License: BSD3 (see LICENSE) -- Author: Dino Morelli <dino@ui3.info> module Util ( binPath, resourcesPath, getProcessOutput, getBinaryOutput, assertFalse ) where import System.IO import System.Process import Test.HUnit binPath :: FilePath binPath = "dist/build/phot...
tkawachi/photoname
testsuite/Util.hs
bsd-3-clause
1,047
0
8
179
207
115
92
20
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperato...
orangefiredragon/bear
src/Servant/Ekg.hs
bsd-3-clause
6,603
0
19
1,754
2,045
1,068
977
136
3
{-# LANGUAGE TupleSections, OverloadedStrings #-} module Handler.Molecule ( getMoleculeR , postMoleculeR ) where import Import import Data.Conduit(($$)) import Data.Conduit.List(consume) import Data.Text.Encoding(decodeUtf8) import Ouch.Input.Smiles(readSmi) import Ouch.Output.Smiles(writeSmiles) import Ouch.Pro...
mkrauskopf/ouch-web
Handler/Molecule.hs
bsd-3-clause
2,705
0
15
617
760
410
350
-1
-1
{-# LANGUAGE CPP #-} module Main where import Control.Applicative import Control.Monad import Control.Monad.Reader import Control.Monad.Error import Control.Concurrent import Control.Concurrent.STM import qualified Data.Map as DM import Data.Maybe import qualified Data.Text as DT import Data.Version import Distributio...
freebsd-haskell/hsporter
src-hsupdater/Main.hs
bsd-3-clause
11,307
0
31
2,612
4,077
1,978
2,099
306
4
{-# language CPP #-} -- | = Name -- -- VK_KHR_external_semaphore - device extension -- -- == VK_KHR_external_semaphore -- -- [__Name String__] -- @VK_KHR_external_semaphore@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 78 -- -- [__Revision__] -- 1 -- -- [__Ex...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_KHR_external_semaphore.hs
bsd-3-clause
7,000
0
8
1,376
394
301
93
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Berp.Base.LiftedIO -- Copyright : (c) 2010 Bernie Pope -- License : BSD-style -- Maintainer : florbitous@gmail.com -- Stability : experimental -- Portability : ghc -- -- Lifted versions of standard IO functions....
bjpop/berp
libs/src/Berp/Base/LiftedIO.hs
bsd-3-clause
1,958
0
9
334
585
322
263
32
1
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE TemplateHaskell #-} {-# ...
tomberek/RETE
src/RETE/Lib.hs
bsd-3-clause
3,789
0
13
791
1,595
831
764
89
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Snap.Test.Common ( coverEqInstance , coverOrdInstance , coverReadInstance , coverShowInstance , coverTypeableInstance , forceSameType , expectException , expectExceptionH , liftQ ...
f-me/snap-core
test/suite/Snap/Test/Common.hs
bsd-3-clause
3,818
0
13
765
1,031
556
475
77
2
import Test.DocTest main :: IO () main = doctest ["src/2010africa/B.hs"]
yuto-matsum/googlecodejam2016-hs
test/2010africa/BSpec.hs
bsd-3-clause
84
0
6
21
27
14
13
3
1
import Genome.Dna.Dna import Genome.Dna.Kmer import Test.Util.Util import Test.Genome.Dna.Dna import Test.Genome.Dna.Kmer import Test.QuickCheck import Test.HUnit import Control.Monad import qualified Data.Set as Set import qualified Data.Map as M {- For now the tests are defined here, along with the main. Tests in gen...
visood/bioalgo
test/Spec.hs
bsd-3-clause
2,721
0
14
543
643
313
330
66
1
module Paths_simple_c_value ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName ) where import qualified Control.Exception as Exception import Data.Version (Version(..)) import System.Environment (getEnv) import Prelude catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a c...
jfischoff/simple-c-value
dist/build/autogen/Paths_simple_c_value.hs
bsd-3-clause
1,372
0
10
167
332
190
142
26
1
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtype...
yoo-e/yesod-helpers
tests/test.hs
bsd-3-clause
8,773
0
22
2,839
2,388
1,146
1,242
209
3
{-# LANGUAGE TypeFamilies, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, RankNTypes, GADTs, DeriveGeneric #-} module QueryArrow.Cypher.Neo4j where import QueryArrow.Config import QueryArrow.DB.DB import QueryArrow.Cypher.Mapping import QueryArrow.Plugin import QueryArrow.DB.Abstract...
xu-hao/QueryArrow
QueryArrow-db-cypher/src/QueryArrow/Cypher/Neo4j.hs
bsd-3-clause
1,140
0
12
170
256
142
114
29
0
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} module Data.Var ( -- * Different types of variables Sig , newSig , Ref , newRef , Var , newVar -- * Generic operations , Settable , set , Gettable , get , modify , modifyWith , Subscr...
beni55/fay
fay-base/src/Data/Var.hs
bsd-3-clause
9,660
0
22
2,285
2,931
1,454
1,477
-1
-1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleInstances #-} import Control.Concurrent (threadDelay) import qualified Control.Exception as E import Control.Lens hiding (argument) im...
bennofs/ghc-server
src/Main.hs
bsd-3-clause
10,330
0
20
2,624
2,738
1,362
1,376
-1
-1
{-# LANGUAGE ViewPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | Export to Org mode for Emacs. module ICal.Org (-- * Handy export functions exportFromToFile ,parseFromObject -- * Conversions ,documentParser ,buildDocument -- * Types ,Event (..) ) ...
chrisdone/ical
src/ICal/Org.hs
bsd-3-clause
5,771
0
21
2,085
1,343
697
646
149
6
module Main where import Cartel ver :: Version ver = [0,30,0,10] atLeast :: NonEmptyString -> [Word] -> Package atLeast name ver = package name (gtEq ver) base :: Package base = closedOpen "base" [4,7,0,0] [5] quickCheck :: Package quickCheck = atLeast "QuickCheck" [2,7] quickpull :: Package quickpull = atLeast "...
massysett/multiarg
genCabal.hs
bsd-3-clause
3,328
0
13
809
920
519
401
110
1
----------------------------------------------------------------------------- -- | -- Module : TestSuite.Uninterpreted.Axioms -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Test suite for basic axioms and uninterpreted functions --...
Copilot-Language/sbv-for-copilot
SBVUnitTest/TestSuite/Uninterpreted/Axioms.hs
bsd-3-clause
1,315
0
10
256
283
151
132
27
1
{-# LANGUAGE OverloadedStrings,ScopedTypeVariables #-} module Main where import System.ZMQ4 hiding (message,source) import System.Posix.Signals (installHandler, Handler(Catch), sigINT, sigTERM) --import Control.Applicative import Control.Concurrent import Control.Mona...
svenkeidel/monto-broker
broker/Main.hs
bsd-3-clause
5,374
0
37
1,321
1,754
894
860
112
3
{-# LANGUAGE TemplateHaskell, DeriveGeneric #-} {-| Module : Database.DataType Description : Contains a single enumeration type, ShapeType. This is a small module that contains a single enumeration type. Note that we can't include this in "Database.Tables" because of a restriction on Template Haskell. -}...
hermish/courseography
app/Database/DataType.hs
gpl-3.0
1,336
0
6
179
142
80
62
15
0
{-# LANGUAGE OverloadedStrings #-} -- Module : Test.AWS.DeviceFarm -- Copyright : (c) 2013-2015 Brendan Hay -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- A copy of the MPL can be found in the LICENSE file or -- ...
fmapfmapfmap/amazonka
amazonka-devicefarm/test/Test/AWS/DeviceFarm.hs
mpl-2.0
752
0
5
201
73
50
23
11
1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Data/Attoparsec/Zepto.hs" #-} {-# LANGUAGE CPP #-} {-# LANGUAGE Trustworthy #-} -- Data.ByteString.Unsafe {-# LANGUAGE BangPatterns #-} -- | -- Module : Data.Attoparsec.Zepto -- Copyright : Bryan O'Sulliv...
phischu/fragnix
tests/packages/scotty/Data.Attoparsec.Zepto.hs
bsd-3-clause
5,239
0
17
1,390
1,527
809
718
132
2
{-# LANGUAGE GADTs, KindSignatures #-} module Expr0 where -- See #301 -- This one *does* use GADTs (Fct) import Data.Kind (Type) data Expr :: Type -> Type where Const :: Show a => a -> Expr a Apply :: Fct a b -> Expr a -> Expr b data Fct :: Type -> Type -> Type where Succ :: Fct Int Int EqZero :: Fct Int B...
sdiehl/ghc
testsuite/tests/gadt/karl2.hs
bsd-3-clause
3,583
0
10
931
498
261
237
-1
-1
module B2 where import Control.Parallel.Strategies (rseq,rpar,runEval) -- test when already import strategies the import doesn't change. -- here we need to add rpar and runEval to the import list qsort (x:xs) = lsort_2 ++ [x] ++ hsort_2 where lsort = qsort (filter (<) x xs) hsort = qsort (filter (>=) x xs...
RefactoringTools/HaRe
old/testing/evalAddEvalMon/B2_TokOut.hs
bsd-3-clause
499
0
12
155
141
77
64
10
1
module Roman where -- This is a simplified version of simplCore/should_compile/spec-inline.hs -- -- It reproduces a problem where workers get specialized in different ways -- depending on the values of uniques. -- -- Compare: -- -- $s$wgo_s1CN :: Int# -> Int -> Int# -- [LclId, Arity=2, Str=DmdType <L,U><L,U>] -- ...
mcschroeder/ghc
testsuite/tests/determinism/simplCore/should_compile/spec-inline-determ.hs
bsd-3-clause
1,172
0
12
330
173
101
72
8
2
module Data.Aeson.Encode.Functions ( brackets , builder , char7 , encode , foldable , list , pairs ) where import Data.Aeson.Encode.Builder import Data.Aeson.Types.Class import Data.Aeson.Types.Internal import Data.ByteString.Builder (Builder, char7) import Data.ByteString.Builder...
abbradar/aeson
Data/Aeson/Encode/Functions.hs
bsd-3-clause
1,657
0
12
354
466
262
204
40
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="en-GB"> <title>Python Scripting</title> <maps> <homeID>top</homeID> <mapref...
thc202/zap-extensions
addOns/jython/src/main/javahelp/org/zaproxy/zap/extension/jython/resources/help/helpset.hs
apache-2.0
974
81
67
169
417
213
204
-1
-1
{-# LANGUAGE TypeFamilies #-} -- Trac #3346 module Foo where class EP a where type Result a from :: a -> Result a to :: Result a -> a {-# RULES "rule1" forall x. to (from x) = x #-} {-# RULES "rule2" forall x. from (to x) = x #-} foo :: EP a => a -> a -- This is typed in a way rather similarly to RULE...
frantisekfarka/ghc-dsi
testsuite/tests/typecheck/should_compile/T3346.hs
bsd-3-clause
472
0
8
125
82
46
36
10
1
main = putStrLn (case [1,2,3,4,5] of [1,2,3,4,6] -> "6!" [1,2,4,2,4] -> "a!" [1,2,3,4,5] -> "OK." _ -> "Broken.")
seereason/ghcjs
test/fay/caseList.hs
mit
132
0
10
36
100
60
40
5
4
{-# LANGUAGE TypeOperators #-} module Ticket75 where data a :- b = Q -- | A reference to ':-' f :: Int f = undefined
DavidAlphaFox/ghc
utils/haddock/html-test/src/Ticket75.hs
bsd-3-clause
119
0
5
27
26
17
9
5
1
module Text.BraVal ( parser , module Text.BraVal.Types ) where import Text.BraVal.Types import Data.Monoid ((<>)) import Control.Monad.Trans.Writer import Control.Arrow ((>>>)) insert :: (Symbolic a) => a -> [a] -> Writer [a] [a] insert s a | isBlank s = pure a | isOpen s = pure (s:a) | (not ....
kindaro/BraVal
src/Text/BraVal.hs
isc
512
0
12
118
258
140
118
15
1
{-# LANGUAGE RecordWildCards #-} module Control.Workflow.Main.Command ( SubParser(..) , mkArgsParser , runParser , viewParser , remoteParser , deleteParser , showParser ) where import Options.Applicative import Control.Workflow.Main.Types import Control.Workflow.Main.Command....
kaizhang/SciFlow
SciFlow-app/src/Control/Workflow/Main/Command.hs
mit
2,313
0
13
518
517
299
218
58
1
module B9.RepositorySpec ( spec, filterRepoImagesMapReturnsAllAndOnlyImagesSatisfieingTheFilterPredicate, filterRepoImagesMapReturnsAllAndOnlyReposSatisfieingTheFilterPredicate, allSharedImagesWithRepoReturnsAllNonEmptyRepos, allSharedImagesWithRepoReturnsOnlyReposContainedInTheParameter, allShare...
sheyll/b9-vm-image-builder
src/tests/B9/RepositorySpec.hs
mit
11,209
0
32
3,927
1,975
984
991
-1
-1
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.HTMLTemplateElement (getContent, HTMLTemplateElement(..), gTypeHTMLTemplateElement) where import Prelude (...
ghcjs/jsaddle-dom
src/JSDOM/Generated/HTMLTemplateElement.hs
mit
1,336
0
10
156
345
224
121
22
1
--5 Problem 15 --(**) Replicate the elements of a list a given number of times. replicate_me [] n = [] replicate_me (x:xs) n = [x | y <- [1..n]] ++ replicate_me xs n --Problem 16 --(**) Drop every N'th element from a list. dropNth [] n acc = acc dropNth x n acc | (length x) < n = x ++ acc | (length x) == n = (tak...
sajit/learnyou
haskell/src/99questions/problem15plus.hs
mit
1,186
3
11
287
390
200
190
17
1
{- Lab Session Software Testing 2013, Week 5 Tuba Kaya Chomette, Sander Leer, Martijn Stegeman 6 October 2013 -} module Week5Sol_Q1_Q2 where import Data.List import Week5 import System.Random import Control.Monad -- -- Question 1 | Time spent: 1 hour -- mergeSrt :: Ord a => [a] -> [a] mergeSrt [] = [] mergeSrt...
stgm/prac-testing
week5/Week5Sol_Q1_Q2.hs
mit
2,789
4
12
651
909
473
436
51
1
{-# LANGUAGE PackageImports #-} {-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-unused-imports #-} -- | Reexports "Foreign.Marshal.Compat" -- from a globally unique namespace. module Foreign.Marshal.Compat.Repl ( module Foreign.Marshal.Compat ) where import "this" Foreign.Marshal.Compat
haskell-compat/base-compat
base-compat/src/Foreign/Marshal/Compat/Repl.hs
mit
292
0
5
31
28
21
7
5
0
module JSONSchema.Draft4.Schema where import Import hiding (mapMaybe) import qualified Data.HashMap.Strict as HM import Data.List.NonEmpty (NonEmpty) import Data.Maybe (fromJust, isJust) import Data.Scientific import qualified Data.Set as Set import qualified Data.Text as T im...
seagreen/hjsonschema
src/JSONSchema/Draft4/Schema.hs
mit
13,911
0
16
5,658
2,654
1,455
1,199
254
1
module Absyn.Type where import Util.PrettyPrint import Prelude hiding (concat) data Type = TName String | TApp Type [Type] | TArrow [Type] Type | TRecord [(String, Type)] | TVoid | TPlaceholder instance Show Type where show = Util.PrettyPrint.print instance PrettyPrint Type where pprint (TName na...
tadeuzagallo/verve-lang
src/Absyn/Type.hs
mit
1,032
0
11
367
352
183
169
36
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Main ( ...
AndrewRademacher/drifter
test/Main.hs
mit
3,731
0
14
818
834
450
384
-1
-1
{-# OPTIONS_GHC -Wall -fno-warn-missing-methods #-} {-# LANGUAGE BangPatterns #-} module HW06 where import Data.List -- Exercise 1 ----------------------------------------- fib :: Integer -> Integer fib 0 = 1 fib 1 = 1 fib n = fib (n-1) + fib (n-2) fibs1 :: [Integer] fibs1 = map fib [0..] -- Exercise 2 ----------...
hanjoes/cis194
hw6/HW06.hs
mit
2,937
0
12
637
1,064
547
517
60
2
import Data.Bits import Data.Char import Data.List.Split allhex s = all isHexDigit s combineHex [x,y] = shiftL x 4 + y hex2intList h = result where hexPairs = chunksOf 2 (map digitToInt h) result = map combineHex hexPairs nibble2Hex n = (concat [['0'..'9'],['a'..'f']]) !! n byte2hex b = [nibble2Hex (shiftR...
mozkeeler/cryptopals
set1/challenge2/fixedXOR.hs
mit
956
0
11
239
421
218
203
26
2
module CCTextParser where import Text.ParserCombinators.Parsec import Data.Functor import Numeric -- output type data Value = IString String | INumber Double | IBool Bool deriving (Eq, Ord, Show) type KVPair = [(String, Value)] data ItemValue = ID String | Type Str...
cloudorz/parsec_practice
cc_text_parse/src/CCTextParser.hs
mit
2,575
0
13
836
848
454
394
63
2
import Data.Char import Control.Monad main = forever $ do putStr "Input:" l <- getLine putStrLn $ map toUpper l
feliposz/learning-stuff
haskell/capslocker.hs
mit
125
0
9
32
45
21
24
6
1
{-# LANGUAGE OverloadedStrings #-} module Kafkaesque.Queries.Log ( writeMessageSet ) where import qualified Data.ByteString (length) import Data.Int (Int32, Int64) import Data.List (foldl') import Data.Serialize.Put (runPut) import qualified Database.PostgreSQL.Simple as PG import Kafkaesque.Message (Message(..)...
cjlarose/kafkaesque
src/Kafkaesque/Queries/Log.hs
mit
2,600
0
20
626
648
345
303
59
1