code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
module Src.Model.SecureEmployee(SEmployee, viewPublicDetails, fromEmployee, firstName, lastName, birthdate, salary, email, leader, increaseSalary) where import qualified Src.Model.Employee as E import Security.SecureFlow import Security.Lattice import Security.ThreeLevels -- | A secure version of Employee where every...
mdipirro/haskell-secure-types
app/Src/Model/SecureEmployee.hs
gpl-3.0
2,382
0
16
940
494
264
230
-1
-1
module Public (publicSuffixTests) where import Data.Functor import Test.HUnit import Network.DNS.Public import Network.DNS.Public.Types (dropSubdomains) checkPublicSuffix :: Rules -> String -> String -> Test checkPublicSuffix rules domain suffix = TestLabel label $ TestCase $ assertBool (show $ showDomain <$> suf...
ktvoelker/cookie-jar
test/Public.hs
gpl-3.0
3,412
0
10
537
761
388
373
75
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/BackendServices/List.hs
mpl-2.0
7,205
0
19
1,550
758
454
304
109
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Delete.hs
mpl-2.0
3,342
0
12
677
303
186
117
52
1
{-# LANGUAGE OverloadedStrings #-} module Web.Stylus ( generateStylusCSS ) where import Control.Monad.IO.Class (liftIO) import System.Process (callProcess) import System.FilePath (takeExtensions) import Files import Web import Web.Types import Web.Files import Web.Generate generateStylusCSS :: WebGenerator gener...
databrary/databrary
src/Web/Stylus.hs
agpl-3.0
827
0
15
169
247
135
112
29
2
{-# LANGUAGE TemplateHaskell #-} module Moonbase.Desktop where import Control.Lens import Control.Monad import Control.Monad.STM import Control.Concurrent.STM.TVar import Control.Monad.State import qualified Graphics.UI.Gtk as Gtk import qualified System...
felixsch/moonbase-ng
src/Moonbase/Desktop.hs
lgpl-2.1
6,042
0
14
1,449
1,811
878
933
-1
-1
{-| This package provides test types for Network.Haskoin -} module Network.Haskoin.Test ( -- * Util Arbitrary instances ArbitraryByteString(..) , ArbitraryNotNullByteString(..) , ArbitraryUTCTime(..) -- * Crypto Arbitrary instances , ArbitraryPoint(..) , ArbitraryInfPoint(..) , ArbitraryPrvKey(..) , Arbitrary...
nuttycom/haskoin
Network/Haskoin/Test.hs
unlicense
3,003
0
5
288
732
525
207
104
0
module OpIO (run) where import Hello import Op import Control.Monad.Free import Data.Time.Clock.POSIX import System.Environment run :: Op r -> IO r run (Pure r) = return r run (Free (PutStrLn s t)) = putStrLn s >> run t run (Free (ReadFile p f)) = readFile p >>= run . f run (Free (GetTimestamp f)) = fmap (realToFrac...
aztecrex/haskell-testing-with-free-monad
src/OpIO.hs
unlicense
392
0
9
75
194
100
94
12
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} module DeployR.API where -- this will be split into several files, just for notes right now import Servant.API import Servant.Client -- picked up from servant tutorial code. TODO reduce if possible import Data.Proxy import GHC.Generics import Data.Text(Text)...
jberthold/deployR-hs
src/DeployR/API.hs
apache-2.0
6,370
0
20
1,609
1,036
570
466
107
1
import System.Cmd import System.Environment import System.FilePath import System.Exit import System.Directory import Data.List import Control.Monad import Text.Regex main = do args <- getArgs dir <- getCurrentDirectory contents <- getDirectoryContents (dir </> "output") if not $ null args then mapM ...
nominolo/haddock2
tests/golden-tests/copy.hs
bsd-2-clause
771
0
12
153
257
128
129
22
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Web.Twitter.Conduit.Cursor ( IdsCursorKey, U...
himura/twitter-conduit
src/Web/Twitter/Conduit/Cursor.hs
bsd-2-clause
2,495
0
12
442
410
246
164
39
0
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} import qualified Data.ByteString.Char8 as C import Data.ByteString.Lazy.Builder #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 707 import Data.ByteString.Lazy.Builder.ASCII #endif import Data.Array.Unboxed import Data.Array.IO #if defined(__GLASGOW_HASK...
wangbj/haskell
0005a.hs
bsd-2-clause
2,718
0
16
780
1,228
602
626
69
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} -- | This module contains the code that is used for generating the PureScript -- client code. module PureFlowy.Client where import Control.Applicative import Control.Lens import Data.Proxy import Language.PureScript....
parsonsmatt/pureflowy
src/PureFlowy/Client.hs
bsd-3-clause
1,392
0
10
264
267
144
123
-1
-1
module Liste (skaste, mezofatcidu, mezosetcidu, mezopatcidu) where import Data.Maybe skaste :: [(String, (Int, Int, Int))] skaste = [ ("xekri", (0, 0, 0)), ("blabi", (255, 255, 255)), ("xunre", (255, 0, 0)), ("labri'o", (0, 255, 0)), -- Lime ("crinyblabi", (0, 255, 0)), -- Lime ("blanu", (0, 0, 255)), ("pelx...
YoshikuniJujo/cakyrespa
src/Liste.hs
bsd-3-clause
2,066
74
11
438
1,157
696
461
69
3
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Main (main) where import Data.Text (Text) import qualified Data.Text as Text import qualified Data.Text.IO as Text.IO import Graphics.Blank import qualified Graphics.Blank.Style as Style import Paths_blank_canv...
ku-fpg/blank-canvas
examples/html5canvastutorial/Main.hs
bsd-3-clause
18,901
0
21
6,563
5,879
3,082
2,797
464
3
{-# LANGUAGE FlexibleContexts #-} module Hrpg.Framework.Combat.EncounterData ( EncounterData (..) , doPlayerAction , doMobAction , getMob , getPlayer , updateMob , updatePlayer ) where import Control.Monad.State import Control.Monad.Random import Hrpg.Framework.Combat...
cwmunn/hrpg
src/Hrpg/Framework/Combat/EncounterData.hs
bsd-3-clause
2,542
0
12
517
814
409
405
74
1
module Transformer.SymbolicExecution where import Control.Monad (when) import Printer.Dot import Printer.SymTree () import SymbolicExecution (topLevel) import System.Directory import System.FilePath ((</>)) import System.Process (system) ...
kajigor/uKanren_transformations
src/Transformer/SymbolicExecution.hs
bsd-3-clause
670
0
12
176
181
92
89
18
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Bindings to the Docker Registry API. If you want more control on the -- exact data passed to the server, use `Network.Docker.Registry.Internal`. module Network.Docker.Registry where import Data.ByteString (ByteString) import qualified Data.ByteSt...
noteed/rescoyl-checks
Network/Docker/Registry.hs
bsd-3-clause
2,993
0
16
388
653
351
302
49
1
{-# LANGUAGE OverloadedStrings #-} module PeerReview.SubmissionRepo.FPCourseSpec ( main , spec ) where import Test.Hspec import PeerReview.Config import qualified PeerReview.SubmissionRepo.FPCourse as FPCourse import qualified PeerReview.SubmissionRepo.FPCourseMockAPIClien...
keveri/peer-review-service
test/PeerReview/SubmissionRepo/FPCourseSpec.hs
bsd-3-clause
1,625
0
15
483
351
172
179
46
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE BangPatterns #-} ...
Chobbes/Juicy.Pixels
src/Codec/Picture/Types.hs
bsd-3-clause
100,337
8
29
33,095
24,338
13,029
11,309
1,683
13
import qualified Data.Map as M import Data.List.Split import System.IO import Control.Monad import System.Exit import System.Posix.Signals import Control.Concurrent import Data.List import Data.Ord (comparing) import System.Process type Database = M.Map String Int main :: IO () main = do putStrLn "Input: " inp <-...
coghex/bridgemaker
src/Main.hs
bsd-3-clause
1,744
0
15
425
702
354
348
40
3
module Data.Array.Accelerate.BLAS.Internal.Asum where import Data.Array.Accelerate.BLAS.Internal.Common import Data.Array.Accelerate import Data.Array.Accelerate.CUDA.Foreign import qualified Foreign.CUDA.BLAS as BL import Prelude hiding (zipWith, map) cudaAsumF :: Vector Float -> CIO (Scalar Float) cudaAsumF x = do...
alpmestan/accelerate-blas
src/Data/Array/Accelerate/BLAS/Internal/Asum.hs
bsd-3-clause
1,641
0
12
418
520
262
258
36
1
-- | Folds over the fold family rooted at 'FoldFamily'. module Data.Origami.Internal.Fold( -- * The 'Fold' structure and useful instances Fold(..), idFold, errFold, monadicFold, -- * folding functions foldFoldFamily, foldDataTy, foldDataCase, foldDataField, foldTy ) where...
nedervold/origami
src/Data/Origami/Internal/Fold.hs
bsd-3-clause
4,617
0
12
1,314
1,159
628
531
88
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} -- -- Safe.hs --- Checked binary packing/unpacking. -- -- Copyright (C) 2015, Galois, Inc. -- All Rights Reserved. -- module Ivory.Serialize.Safe.BigEndian where import Ivory.Language import Ivory.Serialize.Atoms import Ivory.Serialize.PackRep packInto ::...
GaloisInc/ivory
ivory-serialize/src/Ivory/Serialize/Safe/BigEndian.hs
bsd-3-clause
2,794
0
15
839
1,040
525
515
65
1
{-# LANGUAGE DataKinds #-} -- | Inventory management and party cycling. -- TODO: document module Game.LambdaHack.Client.UI.InventoryClient ( Suitability(..) , getGroupItem, getAnyItems, getStoreItem , memberCycle, memberBack, pickLeader , cursorPointerFloor, cursorPointerEnemy , moveCursorHuman, tgtFloorHuman...
beni55/LambdaHack
Game/LambdaHack/Client/UI/InventoryClient.hs
bsd-3-clause
46,219
0
35
14,834
12,572
6,409
6,163
-1
-1
module GroupLens where import Control.Parallel.Strategies import Data.Function (on) import Data.List (groupBy) import qualified Data.Map as M import System.Environment (getArgs) import qualified Data.ByteString.Char8 as B import qualified SlopeTwo as S readRating :: B.ByteString -> (Int, Int, Int) readRating line = m...
binesiyu/ifl
examples/ch24/GroupLens.hs
mit
1,075
0
15
267
433
235
198
25
1
instance X => Y where f = g where g = h
itchyny/vim-haskell-indent
test/instance/instance_newline.out.hs
mit
54
0
7
26
24
12
12
-1
-1
{-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Main -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- module Main (main)...
olorin/amazonka
amazonka-sdb/test/Main.hs
mpl-2.0
522
0
8
103
76
47
29
9
1
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="fa-IR"> <title>Import Urls | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref ...
denniskniep/zap-extensions
addOns/importurls/src/main/javahelp/org/zaproxy/zap/extension/importurls/resources/help_fa_IR/helpset_fa_IR.hs
apache-2.0
981
82
64
159
409
207
202
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} module Web.Twitter.Conduit.Types ( TWToken (..) , TWInfo (..) , twitterOAuth , setCredential ) where import Data.Default import Data.Typeable (Typeable) import Web.Authenticate.OAuth import Network.HTTP.Conduit data TWToken = TWToken { twOAuth...
Javran/twitter-conduit
Web/Twitter/Conduit/Types.hs
bsd-2-clause
1,913
0
9
424
322
194
128
39
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE ExistentialQuantification #-} -- | -- Module : Numeric.Series -- Copyright : (c) 2016 Alexey Khudyakov -- License : BSD3 -- -- Maintainer : alexey.skladnoy@gmail.com, bos@serpentine.com -- Stability : experimental -- Portability : portable -- -- Functions ...
bos/math-functions
Numeric/Series.hs
bsd-2-clause
5,101
0
13
1,169
1,193
670
523
89
2
-- | Bomb other users, a fun IRC game {-# LANGUAGE OverloadedStrings #-} module NumberSix.Handlers.Bomb ( handler ) where -------------------------------------------------------------------------------- import Control.Applicative ((<$>)) import Control.Concurrent.MVar import ...
itkovian/number-six
src/NumberSix/Handlers/Bomb.hs
bsd-3-clause
3,961
0
21
1,234
910
468
442
74
4
{-# LANGUAGE OverloadedStrings #-} import Criterion.Main import Blaze.ByteString.Builder import Blaze.ByteString.Builder.Char8 import Blaze.ByteString.Builder.Enumerator import Data.Monoid import qualified Data.Enumerator as E import Data.Enumerator (($$)) import qualified Data.ByteString as S import qualified Data.Byt...
meiersi/blaze-builder-enumerator
bench/pure-enum.hs
bsd-3-clause
2,016
0
25
766
609
304
305
55
2
{-# LANGUAGE Safe #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE UnboxedTuples #-} module Dep05 where import GHC.Arr bad1 = unsafeArray bad2 = fill bad3 = done bad4 = unsafeThawSTArray
sdiehl/ghc
testsuite/tests/safeHaskell/unsafeLibs/Dep05.hs
bsd-3-clause
204
0
4
35
32
21
11
9
1
module ImportHiding where import ImportList1.A hiding (y) import ImportList1.B hiding (x) main :: Fay () main = do print x print y
beni55/fay
tests/ImportHiding.hs
bsd-3-clause
137
0
7
28
53
29
24
7
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="ur-PK"> <title>Import/Export</title> <maps> <homeID>exim</homeID> <mapref location="map...
kingthorin/zap-extensions
addOns/exim/src/main/javahelp/help_ur_PK/helpset_ur_PK.hs
apache-2.0
959
77
67
155
408
207
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="ro-RO"> <title>Reveal | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref locat...
thc202/zap-extensions
addOns/reveal/src/main/javahelp/org/zaproxy/zap/extension/reveal/resources/help_ro_RO/helpset_ro_RO.hs
apache-2.0
967
78
66
158
411
208
203
-1
-1
-- | A description of the platform we're compiling for. -- module Platform ( Platform(..), Arch(..), OS(..), ArmISA(..), ArmISAExt(..), ArmABI(..), PPC_64ABI(..), target32Bit, isARM, osElfTarget, osMachOTarget, platformUse...
urbanslug/ghc
compiler/utils/Platform.hs
bsd-3-clause
4,498
0
9
1,416
750
444
306
117
1
{-# LANGUAGE PatternGuards #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.StackSet -- Copyright : (c) Don Stewart 2007 -- License : BSD3-style (see LICENSE) -- -- Maintainer : dons@galois.com -- Stability : experimental -- Portability : por...
atupal/xmonad-mirror
xmonad/src/XMonad/StackSet.hs
mit
22,645
0
14
5,650
5,114
2,768
2,346
192
4
main = putStrLn (case False of True -> "Hello!" _ -> "Ney!")
seereason/ghcjs
test/fay/caseWildcard.hs
mit
100
0
9
51
28
14
14
3
2
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE Safe #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.OldList -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries...
tolysz/prepare-ghcjs
spec-lts8/base/GHC/OldList.hs
bsd-3-clause
1,120
0
5
160
43
36
7
4
0
module Network.Gazelle.Login ( login, loginRoute ) where import Data.Text (Text) import Network.API.Builder import Network.HTTP.Client import Network.HTTP.Types.Method import Network.Gazelle.Types loginRoute :: Text -> Text -> Route loginRoute user pass = Route { urlPieces = [], urlParams = [ "usern...
mr/gazelle
src/Network/Gazelle/Login.hs
mit
604
0
8
127
173
98
75
18
1
module Main where import qualified Language.BrainFuck as B import qualified Language.ElementaryArithmetic as E import qualified Language.WhiteSpace as W import System.Environment main :: IO () main = do (lang:filePath:_) <- getArgs let interpFile | lang == "-ws" || lang == "--whi...
Alaya-in-Matrix/Anjelica
src/Main.hs
mit
587
0
16
178
162
85
77
13
1
{-# OPTIONS_GHC -Wno-unused-imports #-} {-# OPTIONS_GHC -Wno-dodgy-exports #-} {-# OPTIONS_GHC -Wno-unused-matches #-} {-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-} {-# OPTIONS_GHC -Wno-name-shadowing #-} module Capnp.Gen.ById.Xa93fc509624c72d9.New(module Capnp.Gen.Capnp.Schem...
zenhack/haskell-capnp
gen/lib/Capnp/Gen/ById/Xa93fc509624c72d9/New.hs
mit
505
0
5
49
76
59
17
12
0
-- Taken from Microsoft's Bond module Language.Swift.Util where import Data.Monoid sepEndBy :: (Monoid a, Eq a) => a -> (t -> a) -> [t] -> a sepBeginBy :: (Monoid a, Eq a) => a -> (t -> a) -> [t] -> a sepBy :: (Monoid a, Eq a) => a -> (t -> a) -> [t] -> a sepEndBy _ _ [] = mempty sepEndBy s f (x:xs) | next == m...
CodaFi/language-swift
src/Language/Swift/Util.hs
mit
1,088
0
9
363
539
271
268
33
1
{-# LANGUAGE CPP #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeSynonymInstances #-} -- NOTE: re-exported from Test.Hspec.Core.Spec module Test.Hspec.Core.Example ( Example (..) , Params (..) , defaultParams ,...
hspec/hspec
hspec-core/src/Test/Hspec/Core/Example.hs
mit
7,124
0
19
1,609
2,221
1,152
1,069
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns #-} module Abt.Tutorial wh...
jonsterling/hs-abt
src/Abt/Tutorial.hs
mit
5,337
0
20
1,456
2,008
1,009
999
168
4
import Control.Monad import System.Exit (exitSuccess) import Data.Char (toLower) palindrome :: IO () palindrome = forever $ do line1 <- getLine let normalisedLine = removeSpaces $ map toLower line1 case (normalisedLine == reverse normalisedLine) of True -> putStrLn "It's a palindrome!" False -> do ...
NickAger/LearningHaskell
HaskellProgrammingFromFirstPrinciples/Chapter13/palindrome/Palindrome.hs
mit
408
0
13
88
130
64
66
13
2
data Name = NameConstr String data Color = ColorConstr String showInfos :: Name -> Color -> String showInfos (NameConstr name) (ColorConstr color) = "Name: " ++ name ++ ", Color: " ++ color name = NameConstr "Robin" color = ColorConstr "Blue" main = putStrLn $ showInfos name color
duncanfinney/haskell-play
04-types.hs
mit
287
0
7
53
96
49
47
8
1
{-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE OverloadedStrings #-} -------------------------------------------------------------------------------- -- File : Cmd -- Author : Alejandro Gómez Londoño -- Date : Sat Jun 27 01:12:12 2015 -- Description : Main handler for api calls ----------------------------------------...
agomezl/MonadBox
src/MonadBox/Cmd.hs
mit
1,737
0
15
368
419
238
181
29
2
{-# LANGUAGE GADTs, ViewPatterns, MultiParamTypeClasses, OverloadedStrings #-} {-# LANGUAGE TypeFamilies, TemplateHaskell, QuasiQuotes, FlexibleContexts #-} module Main where import Yesod import Data.Text as T hiding (zip) import Control.Applicative import Control.Monad (forM) import Yesod.Form import Data.String m...
cirquit/quizlearner
resources/form/mforms_customfield_2.hs
mit
1,606
0
14
437
310
170
140
34
3
-- Reverse list recursively -- https://www.codewars.com/kata/57a883cfbb9944a97c000088 module ReverseRecursively where revR :: [Int] -> [Int] revR = foldl (flip (:)) []
gafiatulin/codewars
src/8 kyu/ReverseRecursively.hs
mit
170
0
7
22
41
25
16
3
1
{-# LANGUAGE TemplateHaskell #-} module Tak.Types where import qualified Data.Map as Map import qualified Data.Sequence as Seq import qualified Control.Monad.State as St import qualified Data.Text as Text import Control.Lens (makeLenses) type Line = Text.Text type LineIdx = Int type LineSeq = Seq.Seq Line data Bu...
sixohsix/tak
src/Tak/Types.hs
mit
2,994
0
11
865
869
504
365
106
1
module Rebase.GHC.IO.BufferedIO ( module GHC.IO.BufferedIO ) where import GHC.IO.BufferedIO
nikita-volkov/rebase
library/Rebase/GHC/IO/BufferedIO.hs
mit
95
0
5
12
23
16
7
4
0
{-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Ran...
MaxDaten/yage
src/Yage/Rendering/Pipeline/Deferred/BaseGPass.hs
mit
14,166
0
17
2,819
3,311
1,689
1,622
-1
-1
module Feature.RangeSpec where import Test.Hspec import Test.Hspec.Wai import Test.Hspec.Wai.JSON import Network.HTTP.Types import Network.Wai.Test (SResponse(simpleHeaders,simpleStatus)) import qualified Data.ByteString.Lazy as BL import SpecHelper import Network.Wai (Application) defaultRange :: BL.ByteSt...
league/postgrest
test/Feature/RangeSpec.hs
mit
8,408
0
23
2,826
1,602
831
771
-1
-1
module Main (main) where import Distribution.Simple import AStar main :: IO () main = defaultMain
Lukx19/Astar-Dijkstra-BFS-Haskell
Setup.hs
mit
99
0
6
16
32
19
13
5
1
module Main ( main ) where -- doctest import qualified Test.DocTest as DocTest main :: IO () main = DocTest.doctest [ "-isrc" , "src/Wholemeal.hs" ]
mauriciofierrom/cis194-homework
homework04/test/examples/Main.hs
mit
172
0
6
48
44
27
17
8
1
module Main (main) where import qualified ColorBench -- HASKELETON: import qualified New.ModuleBench import Criterion.Main (bgroup, defaultMain) main :: IO () main = defaultMain [ bgroup "Color" ColorBench.benchmarks -- HASKELETON: , bgroup "New.Module" New.ModuleBench.benchmarks ]
tcsavage/color
benchmark/Bench.hs
mit
298
0
8
49
56
33
23
6
1
module Event where import Data.Acid import Query import Types import Update makeAcidic ''Database [ 'findUser , 'getUserProfile , 'getEntries , 'register , 'createEntry , 'updateEntry ]
ktvoelker/todo
src/Event.hs
gpl-3.0
205
0
6
45
52
34
18
-1
-1
-- | parse DIMACS format. -- Declarations of no. of variables and clauses are ignored. module Satchmo.Parse where import Satchmo.Form -- import Satchmo.Data import qualified Data.ByteString.Lazy as BS import qualified Data.ByteString.Lazy.Char8 as BSC import qualified Data.Attoparsec.ByteString.Char8 as A import D...
jwaldmann/satchmo-solver
src/Satchmo/Parse.hs
gpl-3.0
856
0
23
230
266
147
119
20
2
module Evaluation where import Chromosome import Utility evaluateDataset :: Dataset -> Chromosome -> Double evaluateDataset ds c = mean $ map (\ (d, z) -> sqDist z $ evaluate c d) ds
mrlovre/super-memory
Pro4/src/Evaluation.hs
gpl-3.0
206
0
10
55
68
37
31
5
1
---------------------------------------------- -- This test suite is the most important one for Lambdacula Engine. -- It will check the rules are respected for the given scenario : -- -- a) A world with two rooms. There is a door between the two of them, but it is closed. -- b) The first room contains a test cube. The ...
Raveline/lambdacula
test/SpecWorld.hs
gpl-3.0
12,348
0
19
3,044
2,672
1,401
1,271
153
2
{-# LANGUAGE FlexibleContexts , OverloadedStrings , DeriveGeneric #-} module Application where import Imports hiding ((</>)) import Routes import qualified Data.Text as T import Control.Monad.Reader import Control.Monad.Catch import System.Directory import GHC.Generics data AuthRole = NeedsLogin data Au...
athanclark/happ-store
src/Application.hs
gpl-3.0
1,327
0
13
315
363
184
179
40
2
-- Copyright (C) 2012 Jonathan Lamothe -- This program is free software: you can redistribute it and/or -- modify it under the terms of the GNU General Public License as -- published by the Free Software Foundation, either version 3 of the -- License, or (at your option) any later version. -- This program is distribu...
jlamothe/LD25
Types.hs
gpl-3.0
4,874
0
11
1,253
1,500
812
688
129
7
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/Delete.hs
mpl-2.0
4,743
0
19
1,181
785
456
329
113
1
{-# LANGUAGE OverloadedStrings, TemplateHaskell #-} module HLol.Data.Match where import Control.Applicative import Control.Lens import Control.Monad import Data.Aeson import qualified Data.Map as M import Data.Maybe (isJust, fromJust) import Data.Text (pack) data Position = Position { _x :: Int, _y :: Int } ...
tetigi/hlol
src/HLol/Data/Match.hs
agpl-3.0
13,467
0
131
3,573
3,496
1,914
1,582
423
0
{- | Module: Postmaster.IO Copyright: (C) 2004-2019 Peter Simons License: GNU AFFERO GPL v3 or later Maintainer: simons@cryp.to Stability: experimental Portability: non-portable -} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-...
peti/postmaster
src/Postmaster/IO.hs
agpl-3.0
4,453
0
21
836
1,098
565
533
66
2
{-# LANGUAGE DeriveDataTypeable #-} import Control.Concurrent import Control.Exception import Control.Monad import Data.Binary import Data.ByteString (ByteString) import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BL import ...
tuxmark5/ApexCtl
src/Main.hs
lgpl-3.0
8,275
0
21
1,807
2,381
1,235
1,146
-1
-1
module Bind where import Control.Monad (join) bind :: Monad m => (a -> m b) -> m a -> m b bind f mo = join $ fmap f mo
thewoolleyman/haskellbook
18/02/eric/Bind.hs
unlicense
122
0
9
33
69
35
34
4
1
{-# OPTIONS_GHC -Wall #-} module HW02 where import Data.List {-# ANN module ("HLint: ignore Redundant bracket"::String) #-} -- Mastermind ----------------------------------------- -- A peg can be one of six colors data Peg = Red | Green | Blue | Yellow | Orange | Purple deriving (Show, Eq, Ord) -- A code i...
markmandel/cis194
src/week2/homework/HW02.hs
apache-2.0
3,608
0
11
751
793
428
365
47
1
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-} module Main where import Text.Hal import GHC.Generics import Data.Aeson import Data.Aeson.Encode.Pretty import qualified Data.ByteString.Lazy as B data Person = Person { firstName :: String , lastName :: String , age ...
talios/haskell-hal
Main.hs
apache-2.0
773
0
13
209
184
102
82
20
1
{-# LANGUAGE ImplicitParams, TemplateHaskell, TypeOperators, ConstraintKinds, NoMonomorphismRestriction #-} import PDESpec -- Example specification spec alpha h = ((d h T) === (alpha * d2 h X)) `withDomain` (X :. T :. Nil) -- Example FCTS implementation impl alpha h' (x, t) | x == 0 = 1 | x == ?nx ...
dorchard/pde-specs
TestCaseCmd.hs
bsd-2-clause
6,792
0
21
3,242
2,051
1,068
983
109
4
module Queens where import CLaSH.Prelude import Data.Maybe mem <~ (i,x) = replace mem i x type Word3 = Unsigned 3 type MbWord3 = Maybe Word3 type Din = Vec 8 (MbWord3) type Dout = Vec 8 Word3 din :: Din din = $(v [ Nothing :: Maybe (Unsigned 3), Just 1, Nothing, Nothing, Just 4, Nothing, Just 6, Just 7 ]...
christiaanb/clash-compiler
examples/Queens.hs
bsd-2-clause
814
0
12
287
349
194
155
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {- - Copyright (c) 2015, Peter Lebbing <peter@digitalbrains.com> - All rights reserved. - - Redistribution and use in source and binary forms, with or withou...
DigitalBrains1/clash-lt24
Simul/Toolbox/Blockram2p_2_16.hs
bsd-2-clause
5,174
0
13
1,417
913
492
421
64
3
{-# LANGUAGE TupleSections #-} module Problem1 where import Data.Char import Data.List import Data.Array import Data.Maybe import Data.Ord import Control.Applicative import System.IO -- Primitive calculator main :: IO () main = hSetBuffering stdin NoBuffering >>= \_ -> nextNum >>= \n -> let (count, solution) =...
msosnicki/algorithms
app/week5/Problem1.hs
bsd-3-clause
1,951
0
18
525
866
466
400
53
3
module Hive.Board ( Board , BoardIndex , initialBoard , boardParity , boardTiles , boardWidth , boardHeight , Parity(..) , Adjacency(..) , (!) , boardWinner , growBoard , occupiedNeighbors , occupiedNeighborIndices , cellsAreAdjacent , cellIsOccupied , cellIsUnoccupied ) where impor...
mitchellwrosen/hive
hive/src/Hive/Board.hs
bsd-3-clause
3,883
0
16
880
1,216
652
564
94
5
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE DeriveDataTypeable #-} module Frameworks.CoreFoundation.Types ( CFTypeID , CFOptionFlags , CFHashCode , CFIndex , CFTypeRef , CFStringRef, ObjcCFString ) where import Data.Data import Objective.C.Prim import Foreign.Pt...
ekmett/objective-c
Frameworks/CoreFoundation/Types.hs
bsd-3-clause
579
0
5
106
101
67
34
-1
-1
{-# LANGUAGE PackageImports #-} import "hashprice" Application (getApplicationDev) import Network.Wai.Handler.Warp (runSettings, defaultSettings, setPort) import Control.Concurrent (forkIO) import System.Directory (doesFileExist, removeFile) import System.Exit (exitSuccess) import Control.Concurrent (threadDelay) ...
pirapira/hashprice
devel.hs
bsd-3-clause
680
0
10
104
186
100
86
21
2
{-# LANGUAGE LambdaCase, OverloadedStrings #-} module Mote.Protocol where import Control.Applicative import Control.Monad import Data.Aeson hiding (Error) import qualified Data.Text as T import qualified Data.Vector as V type Pos = (Int, Int) type Span = (Pos,...
imeckler/mote
Mote/Protocol.hs
bsd-3-clause
3,431
0
17
1,014
939
494
445
73
0
module StringCompressorKata.Day4Spec (spec) where import Test.Hspec import StringCompressorKata.Day4 (compress) spec = do it "compresses nothing into the nothing" $ do compress Nothing `shouldBe` Nothing it "compresses an empty string into another empty string" $ do ...
Alex-Diez/haskell-tdd-kata
old-katas/test/StringCompressorKata/Day4Spec.hs
bsd-3-clause
703
0
13
203
177
85
92
14
1
{-# LANGUAGE OverloadedStrings #-} import qualified Haquery as Haq import qualified Hakit as H import qualified TooEasy as Too import qualified Data.Text as T import qualified System.Directory as D siteF = "_site" main = do posts <- Too.loadPosts "posts" templ <- Too.loadTemplate "template.html" sit...
crufter/tooeasy
examples/simple/site.hs
bsd-3-clause
1,050
0
19
303
323
167
156
26
2
{-# LANGUAGE DeriveGeneric #-} module Interfaces.Hoogle ( queryHoogle , formatHoogle ) where import Data.Aeson (eitherDecode, FromJSON(..)) import Control.Applicative ((<$>)) import GHC.Generics import Network.Curl import Network.HTTP (urlEncode) import Interfaces.HTML (fetchLazy) -- |URL to Hoogle's AP...
vehk/Indoril
src/Interfaces/Hoogle.hs
bsd-3-clause
1,628
0
9
388
318
185
133
30
1
{-# LANGUAGE DataKinds, GADTs, KindSignatures, TypeOperators #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE AllowAmbiguousTypes #-} module Data.Fin ( Finite (..) ) where import Data.Nat import Data.SNat (Natural) import Data.Type.Equality ((:~:) (Refl)) import Prelude hiding (suc...
bmsherman/haskell-vect
Data/Fin.hs
bsd-3-clause
1,482
0
14
410
690
364
326
36
0
-- Copyright 2021 Google LLC -- -- Use of this source code is governed by a BSD-style -- license that can be found in the LICENSE file or at -- https://developers.google.com/open-source/licenses/bsd {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGU...
google-research/dex-lang
src/lib/Imp.hs
bsd-3-clause
63,217
4
29
15,852
22,760
10,887
11,873
-1
-1
module Main where import qualified Data.Map as Map import REPL main :: IO () main = do putStrLn "Welcome to Erumpo REPL!" repl Map.empty
TerrorJack/erumpo
src/Main.hs
bsd-3-clause
159
0
8
46
44
24
20
6
1
{-| Description : a simple property involving an integral Copyright : (c) Jan Duracz, Michal Konecny License : BSD3 Maintainer : jan@duracz.net Stability : experimental Portability : portable A simple property involving an integral. -} {- There are several ways to in...
michalkonecny/polypaver
examples/haskell/integral.hs
bsd-3-clause
994
0
12
278
186
108
78
16
1
{-# LANGUAGE ScopedTypeVariables #-} -- | This is a graph widget inspired by the widget of the same name in Awesome -- (the window manager). It plots a series of data points similarly to a bar -- graph. This version must be explicitly fed data with 'graphAddSample'. For a -- more automated version, see "System.Taffybar...
teleshoes/taffybar
src/System/Taffybar/Widget/Generic/Graph.hs
bsd-3-clause
9,225
0
20
2,304
2,365
1,241
1,124
177
2
rotate xs 0 = xs rotate [] _ = [] rotate xs'@(x:xs) n | n < 0 = rotate xs' (length xs' + n) | otherwise = rotate (xs ++ [x]) (n - 1)
bradb/99problems
src/p19.hs
bsd-3-clause
137
0
9
38
101
50
51
5
1
{-# LANGUAGE TemplateHaskell #-} import Data.Generics.TH import Data.String.Utils import Language.Haskell.TH import System.Exit import qualified Data.Set as Set -- This program generates the Data.Generics.TH.VarSet module -- when this module compiles. It is not intended to be run. -- The reason is that Template Has...
TomMD/TYB
util/makeVarSet.hs
bsd-3-clause
1,726
29
10
490
237
127
110
31
1
module SLM.Gobble.Gobble where import qualified Data.IntMap as IM import qualified Data.Vector as V import qualified Data.Vector.Mutable as VM import SLM.DataTypes import SLM.Gobble.GobbleDataTypes import SLM.Gobble.GobbleArgs import Control.Applicative import qualified Data.Foldable as F -- PUBLIC INTERFACE gobble...
timveitch/Gobble
src/SLM/Gobble/Gobble.hs
bsd-3-clause
4,484
0
13
740
1,330
717
613
71
1
module Network.Punch.Peer.Reliable.Types where import Control.Applicative ((<$>), (<*>)) import Control.Concurrent.MVar import Control.Concurrent.Async (Async, async) import Control.Concurrent.STM (STM, TVar) import Control.DeepSeq (NFData, rnf) import qualified Data.ByteString as B import qualified Data.Serialize as ...
overminder/punch-forward
src/Network/Punch/Peer/Reliable/Types.hs
bsd-3-clause
4,161
0
12
858
1,026
588
438
-1
-1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.NV.FramebufferMixedSamples -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : p...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/NV/FramebufferMixedSamples.hs
bsd-3-clause
1,301
0
4
136
97
72
25
21
0
{-# LANGUAGE PatternSynonyms, ViewPatterns #-} module Text.Yapan.Patterns (pattern Block, pattern Inline, pattern Str, pattern Emph, pattern Header) where import Text.Yapan.Base import Data.OpenUnion2 pattern Block a <- Block' (prj -> Just a) pattern Inline a <- Inline' (prj -...
konn/yapan
src/Text/Yapan/Patterns.hs
bsd-3-clause
445
0
9
109
158
80
78
14
0
{-#LANGUAGE FlexibleInstances, GADTs, TypeFamilies, UndecidableInstances, TypeOperators, DataKinds, KindSignatures, ScopedTypeVariables, PolyKinds #-} import Text.APEG.Syntax.APEGSyn import qualified Text.APEG.Semantics...
lives-group/haskell-APEG
test/Spec.hs
bsd-3-clause
1,616
12
12
566
704
371
333
44
1
module Collatz.Plain where -- $Id$ import qualified Collatz.Parameter as P import Collatz.Config import Collatz.Roll import Inter.Types import Inter.Quiz import Autolib.ToDoc import Autolib.Hash import Autolib.Util.Seed import qualified Challenger as C import Data.Typeable import Autolib.Reporter data Collatz_Pla...
florianpilz/autotool
src/Collatz/Plain.hs
gpl-2.0
1,296
3
14
280
377
199
178
-1
-1
commented = commented -- ^comment 0 -- |comment 1
evolutics/haskell-formatter
testsuite/resources/source/comments/keeps_comments_at_bounds_of_file/end/Output.hs
gpl-3.0
51
0
4
10
8
5
3
1
1
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="pt-BR"> <title>Regras de varredura passiva - Beta | Extensão ZAP</title> <maps> <homeID>top...
veggiespam/zap-extensions
addOns/pscanrulesBeta/src/main/javahelp/org/zaproxy/zap/extension/pscanrulesBeta/resources/help_pt_BR/helpset_pt_BR.hs
apache-2.0
1,002
90
29
164
413
219
194
-1
-1
{- Copyright 2012-2013 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 t...
mzero/plush
src/Plush/Run/Posix.hs
apache-2.0
6,087
0
11
1,376
785
455
330
61
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TemplateHaskell #-} module RecordSumOfProducts where import CLaSH.Prelude import Control.Applicative data DbState = DbInitDisp (Unsigned 4) | DbWriteRam (Signed 14) (Signed 14) | DbDone deriving (Show, Eq) data DbS = DbS { dbS :: DbState } topEntity = walkS...
ggreif/clash-compiler
tests/shouldwork/Basic/RecordSumOfProducts.hs
bsd-2-clause
546
0
10
169
176
98
78
15
1