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 Exercises where import Lab3.Lecture3 import Data.String.Utils import Data.List -- Define Main -- main = do putStrLn $ "====================" putStrLn $ "Assignment 3 / Lab 3" putStrLn $ "====================" putStrLn $ "> Exercise 1" exercise1 putStrLn $ "> Exercise 2" exercise2 ...
vdweegen/UvA-Software_Testing
Lab3/Cas/Exercises.hs
gpl-3.0
9,415
0
14
1,966
3,672
1,877
1,795
192
2
-- Sortable Test -- Copyright (C) 2015 Jonathan Lamothe -- <jonathan@jlamothe.net> -- 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...
jlamothe/sortable-test
Daily.hs
gpl-3.0
3,076
0
15
694
810
437
373
60
1
{-# LANGUAGE OverloadedStrings #-} import Control.Monad (void) import Data.Graph.Builder.GraphViz import Data.GraphViz import Data.GraphViz.Attributes.Complete import Data.GraphViz.Helpers mytasks :: Graph mytasks = digraph [RankDir FromLeft] $ do t1 <- node [ htmlLabel [ formatBold "Lorem ipsum dolor sit...
cblp/graph-dsl-graphviz
examples/FirstTry.hs
gpl-3.0
2,098
0
13
699
457
235
222
46
1
module TypeBug8 where infixl 6 <*!> infixl 7 <$!> type Parser symbol result = [symbol] -> [(result,[symbol])] (<*!>) :: Parser s (a -> b) -> Parser s a -> Parser s b (<$!>) :: (a -> b) -> Parser s a -> Parser s b (<*!>) = undefined (<$!>) = undefined many :: Parser s a -> Parser s [a] many = undefined ----...
Helium4Haskell/helium
test/typeerrors/Examples/TypeBug8.hs
gpl-3.0
554
0
10
154
280
155
125
15
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} -------------------------------------------------------------------------------- -- | -- Module : Dhek.Widget.BlankDocument -- -- -------------------------------------------------------------------------...
cchantep/dhek
Dhek/Widget/BlankDocument.hs
gpl-3.0
6,507
0
15
1,855
1,378
669
709
-1
-1
elementAt :: (Num b, Eq b) => [a] -> b -> a elementAt [] _ = error "Element out of range" elementAt (x:xs) 1 = x elementAt (x:xs) y = elementAt xs (y-1)
carlosavieira/self-study
programming/Haskell/99 problems/solutions/03.hs
gpl-3.0
152
0
7
32
93
48
45
4
1
module Ledger.Main where import Ledger.Application (application, defaultState, middleware) import Ledger.Config (getConfig) import Ledger.Settings (getSettings) import Ledger.State (getState) import Network.Wai.Handler.Warp (Settings, getHost, getPort, runSettings) main :: IO () main = do config <- getConfig ...
asm-products/ledger-backend
library/Ledger/Main.hs
agpl-3.0
657
0
12
118
202
106
96
19
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Main where import Control.Lens {-- Snap --} import Snap.Http.Server (defaultConfig) import Snap.Util.FileServe (serveDirectory) {-- Snaplets --} import Snap.Snaplet import Snap.Snaplet.Auth import Snap.Snaplet.Auth.Backends.PostgresqlSimple ...
statusfailed/snaplet-job-board
src/Main.hs
agpl-3.0
1,446
0
12
249
381
203
178
36
1
{-# LANGUAGE BangPatterns, OverloadedStrings #-} module Util (BString, joinWith, joinWithBS, pack, unpack, bsNull, dropSpaces, mapFst, mapSnd, listEscape, ifFails, commaList, downCase, slurpFile, utilTests ) where import qualified Data.ByteString.Char8 as B -- impor...
tolysz/hiccup
Util.hs
lgpl-2.1
3,605
0
16
1,220
1,150
626
524
79
6
import Data.List import Data.Maybe (fromJust) import Numeric.LinearAlgebra import Numeric.LinearAlgebra.NIPALS import Foreign.Storable import Test.Framework (defaultMain, testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.QuickCheck hiding ((><)) main = defaultMain tests tests = [ t...
alanfalloon/hmatrix-nipals
test/tests.hs
lgpl-2.1
2,329
0
14
613
816
428
388
-1
-1
{-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving, TypeFamilies #-} module Vision.Image.Grey.Type ( Grey, GreyPixel (..), GreyDelayed ) where import Data.Bits import Data.Word import Foreign.Storable (Storable) import Vision.Image.Interpolate (Interpolable (..)) import Vision.Image.Type (Pixel (..), Ma...
TomMD/friday
src/Vision/Image/Grey/Type.hs
lgpl-3.0
865
0
9
171
239
136
103
22
0
module Calculator where import CLaSH.Prelude import CalculatorTypes (.:) :: (c -> d) -> (a -> b -> c) -> a -> b -> d (f .: g) a b = f (g a b) infixr 9 .: alu :: Num a => OPC a -> a -> a -> Maybe a alu ADD = Just .: (+) alu MUL = Just .: (*) alu (Imm i) = const . const (Just i) alu _ = const . const No...
christiaanb/clash-compiler
examples/Calculator.hs
bsd-2-clause
1,552
0
12
403
827
457
370
-1
-1
{-# LANGUAGE OverloadedStrings #-} import System.IO import System.Environment import System.Directory import Control.Monad import qualified Data.ByteString.Lazy.Char8 as L import Data.Text.Encoding import Network.HTTP.Conduit import qualified Data.Text as T import Text.HTML.DOM (parseLBS) import Text.XML.Cursor (Curso...
shevkunov/workout
fsharp/lab3/Lab3.hs
bsd-3-clause
1,332
0
17
212
430
232
198
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE Und...
Ericson2314/modular-arithmetic
src/Data/Modular.hs
bsd-3-clause
7,047
22
12
1,644
1,905
1,060
845
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TupleSections #-} import Plots import Plots.Axis import Plots.Types hiding (B) import Plots.Themes import Plots.Utils import Data.List import Diagrams.Prelude import Diagrams.Backend.Rasterific import Diagrams.Backend.CmdLine import Diagrams.Coordinates.Polar...
bergey/plots
examples/points.hs
bsd-3-clause
873
0
9
141
406
234
172
25
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE DeriveDataTypeable , DeriveGeneric , TemplateHaskell , TypeFamilies #-} module Type.Invoice where import Data.Aeson import Data.JSON.Schema import Data.Text (Text) import Data.Time (UTCTime) import Data.Typeable import GHC.Generics import Generics.Regular ...
tinkerthaler/basic-invoice-rest
example-api/Type/Invoice.hs
bsd-3-clause
951
0
9
178
225
133
92
33
0
{-| Module : Ralgebra Description : Implements basic raltional algebra operators and operations. Copyright : (c) Nikos KAragiannidis, 2016 License : GPL-3 Maintainer : nkarag@gmail.com Stability : experimental Portability : POSIX Here is a longer description of this module, c...
nkarag/haskell-CSVDB
src/Obsolete/Ralgebra.hs
bsd-3-clause
4,241
0
6
1,287
199
134
65
32
0
{-# OPTIONS -fno-implicit-prelude #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal -- Copyright : (c) The FFI task force 2003 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : ffi@haskell.org -- Stability ...
OS2World/DEV-UTIL-HUGS
libraries/Foreign/Marshal.hs
bsd-3-clause
848
0
5
147
87
64
23
12
0
module System.Posix.Daemonize ( -- * Simple daemonization daemonize, -- * Building system services serviced, CreateDaemon(..), simpleDaemon -- * An example -- -- | Here is an example of a full program which writes a message to -- syslog on...
t0yv0/hdaemonize
System/Posix/Daemonize.hs
bsd-3-clause
12,084
0
22
3,735
1,852
989
863
133
8
{-# LANGUAGE TypeOperators, StandaloneDeriving, FlexibleInstances #-} module Compiler.LiftDefinitions ( DefinitionA (..) , Definition , DefinitionsA (..) , Definitions , lift , eliminiateDoubles , dump ) where import Compiler.Generics import Compiler.Expression import Control.Arrow hiding (app) import Data.List (int...
sebastiaanvisser/AwesomePrelude
src/Compiler/LiftDefinitions.hs
bsd-3-clause
2,106
0
14
489
667
356
311
-1
-1
{-| Module : TypeSafeRoute.HTTP Description : Statically checked HTTP handlers. Copyright : (c) Alexander Vieth, 2015 Licence : BSD3 Maintainer : aovieth@gmail.com Stability : experimental Portability : non-portable (GHC only) -} {-# LANGUAGE AutoDeriveTypeable #-} {-# LANGUAGE KindSignatures #-} {-# LAN...
avieth/TypeSafeRoute
Network/TypeSafeRoute/HTTP.hs
bsd-3-clause
21,440
68
22
4,863
6,476
3,450
3,026
421
6
module Environment where import Control.Monad.Except import Data.IORef import Data.Maybe import Syntax type Env = IORef [(String, IORef LispVal)] nullEnv :: IO Env nullEnv = newIORef [] type IOThrowsError = ExceptT LispError IO liftThrows :: ThrowsError a -> IOThrowsError a ...
juanbono/my-scheme
src/Environment.hs
bsd-3-clause
1,850
0
14
440
604
297
307
44
2
{-# OPTIONS_GHC -F -pgmF htfpp #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module Text.HSmarty.Parser.SmartyTest where import Data.Attoparsec.Text import Paths_HSmarty import Test.Framework import Text.HSmarty.Parser.Smarty import Text.HSmarty.Types import qualified Data.Aeson as A import qualif...
agrafix/HSmarty
test/Text/HSmarty/Parser/SmartyTest.hs
bsd-3-clause
2,869
0
26
988
696
364
332
70
2
module ThreadsLang.EvaluatorSuite ( tests ) where import Control.Monad.Except import Control.Monad.Trans.State.Lazy (evalStateT) import Data.List (stripPrefix) import Test.HUnit import Text.Megaparsec import ThreadsLang.Data import ...
li-zhirui/EoplLangs
test/ThreadsLang/EvaluatorSuite.hs
bsd-3-clause
7,998
0
11
3,685
1,245
684
561
229
1
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE OverloadedStrings #-} module Repl where import Prelude hiding (lines, read) import Control.Applicative ((<|>)) import Control.Monad.RWS (lift, liftIO) import qualified Control.Monad.RWS as RWS import qualified Data.ByteString.Builder as B import qualified Data.ByteString.Char8 a...
evancz/cli
src/Repl.hs
bsd-3-clause
9,658
0
18
2,469
2,798
1,439
1,359
248
11
module Cauterize.ErlangRef.Options ( runWithOptions , ErlangOpts(..) ) where import Options.Applicative runWithOptions :: (ErlangOpts -> IO ()) -> IO () runWithOptions fn = execParser options >>= fn data ErlangOpts = ErlangOpts { specFile :: FilePath , outputDirectory :: FilePath } deriving (Show) optio...
cauterize-tools/caut-erl-ref
app/Cauterize/ErlangRef/Options.hs
bsd-3-clause
797
0
12
192
209
108
101
26
1
module Main where import Control.Exception (try, SomeException) import System.Environment (getArgs) import Network.HTTP.Conduit as C import Network.HTTP.Types as C main = do url <- (!! 0) `fmap` getArgs eresp <- try (loadWebsite url) case eresp of Left e -> putStrLn ("Falsch: " ++ ...
rethab/tagger
src/Tagger/Conduit.hs
bsd-3-clause
651
0
17
196
227
119
108
16
2
{-# LINE 1 "System.Posix.Types.hs" #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP , NoImplicitPrelude , MagicHash , GeneralizedNewtypeDeriving #-} {-# LANGUAGE StandaloneDeriving #-} --------------------------------------------------------...
phischu/fragnix
builtins/base/System.Posix.Types.hs
bsd-3-clause
10,661
0
9
3,040
2,798
1,637
1,161
69
0
{-# LANGUAGE DataKinds, PolyKinds, TypeFamilies, TypeOperators, OverloadedStrings #-} module Database.Edis.Command.ZSet where import Database.Edis.Type import Database.Edis.Helper import Data.Proxy (Proxy) import Data.Serialize (Serialize, encode) import Data.Type.Bool import Database.Redis a...
banacorn/tredis
src/Database/Edis/Command/ZSet.hs
mit
6,239
0
15
1,454
2,420
1,210
1,210
118
1
{-# LANGUAGE DeriveDataTypeable #-} {- Abstract syntax for Events -} module EVT.AS ( EVTQualId (..) , Sentence , ACTION (..) , GUARD (..) , EVENT (..) , MACHINE (..) , EVENT_NAME --, mapQualId --, ge...
keithodulaigh/Hets
EVT/AS.hs
gpl-2.0
2,753
0
11
1,065
603
333
270
55
0
{-# LANGUAGE DeriveDataTypeable #-} -- | -- Module : Args -- Copyright : [2011] The Accelerate Team -- License : BSD3 -- -- Maintainer : Trevor L. McDonell <tmcdonell@cse.unsw.edu.au> -- Stability : experimental -- Portability : non-partable (GHC extensions) -- module Args where import Data.Version impo...
wilbowma/accelerate
accelerate-buildbot/src/Args.hs
bsd-3-clause
2,848
0
14
929
538
288
250
89
1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Network/Wai/Handler/Warp/Conduit.hs" #-} {-# LANGUAGE CPP #-} module Network.Wai.Handler.Warp.Conduit where import Control.Exception import Control.Monad (when, ...
phischu/fragnix
tests/packages/scotty/Network.Wai.Handler.Warp.Conduit.hs
bsd-3-clause
5,920
26
23
2,387
1,330
665
665
135
16
{-# OPTIONS_GHC -fno-warn-type-defaults #-} import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Triplet (isPythagorean, mkTriplet, pythagoreanTriplets) main :: IO () main = hspecWith defaultConfig {configFa...
c19/Exercism-Haskell
pythagorean-triplet/test/Tests.hs
mit
1,622
3
9
588
564
333
231
29
1
{-# language NamedFieldPuns, DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable #-} module Base.Grounds where import Safe import Data.Indexable as I import Data.Data import Data.Foldable (Foldable) import Data.Traversable (Traversable) import Data.Initial import Data.Accessor import Graphics....
changlinli/nikki
src/Base/Grounds.hs
lgpl-3.0
6,494
0
13
1,300
1,905
987
918
117
5
module Main where import Data.List import Language.C import Language.C.Analysis.AstAnalysis import Language.C.Analysis.TravMonad import Language.C.System.GCC import System.Console.GetOpt import System.Environment import System.Exit import System.IO processFile :: CLanguage -> [String] -> FilePath -> IO () processFile...
llelf/language-c
examples/TypeCheck.hs
bsd-3-clause
953
0
16
235
325
164
161
26
3
----------------------------------------------------------------------------- -- | -- Module : Text.PrettyPrint.Leijen -- Copyright : Daan Leijen (c) 2000, http://www.cs.uu.nl/~daan -- License : BSD-style (see the file LICENSE) -- -- Maintainer : otakar.smrz cmu.edu -- Stability : provisional -- Port...
hvr/jhc
src/Text/PrettyPrint/Leijen.hs
mit
31,245
0
16
7,756
4,736
2,719
2,017
296
10
{-# LANGUAGE PatternGuards #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.CopyWindow -- Copyright : (c) David Roundy <droundy@darcs.net>, Ivan Veselov <veselov@gmail.com>, Lanny Ripple <lan3ny@gmail.com> -- License : BSD3-style (see LICENS...
markus1189/xmonad-contrib-710
XMonad/Actions/CopyWindow.hs
bsd-3-clause
7,090
0
16
1,965
1,260
688
572
-1
-1
module B where -- Test for refactor of if to case foo x = if (odd x) then "Odd" else "Even" bob x y = x + y foo' x = case (odd x) of True -> "Odd" False -> "Even" main = do putStrLn $ show $ foo 5 mary = [1,2,3] h = bob 1 2 data D = A | B String | C
RefactoringTools/HaRe
old/refactorer/B.hs
bsd-3-clause
265
0
8
82
129
70
59
11
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Program.Db -- Copyright : Isaac Jones 2006, Duncan Coutts 2007-2009 -- -- Maintainer : cabal-de...
mydaum/cabal
Cabal/Distribution/Simple/Program/Db.hs
bsd-3-clause
18,220
0
20
4,191
2,968
1,623
1,345
262
4
module ParserM ( -- Parser Monad ParserM(..), AlexInput, run_parser, -- Parser state St, StartCode, start_code, set_start_code, inc_brace_depth, dec_brace_depth, -- Tokens Token(..), -- Actions Action, andBegin, mkT, mkTv, -- Positions get_pos, show_pos, -- Input ...
frantisekfarka/ghc-dsi
utils/genprimopcode/ParserM.hs
bsd-3-clause
4,761
1
14
1,755
1,457
805
652
138
2
module Test0 () where import Language.Haskell.Liquid.Prelude x :: Int x = 4
mightymoose/liquidhaskell
tests/pos/profcrasher.hs
bsd-3-clause
78
0
4
14
24
16
8
4
1
module UnitTests.Distribution.Compat.CreatePipe (tests) where import Distribution.Compat.CreatePipe import System.IO (hClose, hGetContents, hPutStr, hSetEncoding, localeEncoding) import Test.Tasty import Test.Tasty.HUnit tests :: [TestTree] tests = [testCase "Locale Encoding" case_Locale_Encoding] case_Locale_Encodi...
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/tests/UnitTests/Distribution/Compat/CreatePipe.hs
bsd-3-clause
534
0
10
90
152
82
70
16
1
{-# LANGUAGE MagicHash, TypeOperators, MultiParamTypeClasses, TypeFamilies, DataKinds, FlexibleContexts, OverloadedStrings, ScopedTypeVariables #-} import Java import AkkaStream main :: IO () main = return ()
filippovitale/eta-playground
scala-akka-stream-eta-echoflow/src/main/eta/src/Main.hs
mit
211
1
6
25
31
15
16
5
1
module Main where import Program import Parser import Continuations import LParse doExec :: String -> String -> String doExec pro par = run (pFunc parseProgram pro) (\(p,_) -> printRes $ exec p (parsePar par)) (const "ERR") parsePar :: String -> [Bool] parsePar [] = [] parsePar ('0':ss) = False:parsePar ss parsePar ...
MarcusVoelker/Smilefuck
Main.hs
mit
586
0
11
107
278
144
134
21
1
import Data.List (nub) main = do contents <- getContents let lns = lines contents print $ length lns - (length . nub) lns
MAPSuio/spring-challenge16
dejavu/larstvei.hs
mit
129
1
10
30
62
28
34
5
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} module Hydrazine.Client.API where import Servant import Servant.Client import Control.Monad.Trans.Either import Network.HTTP.Media.MediaType (MediaType) import Network.HTTP.Client (Response) import Network.HTTP.Types.Method (...
dgonyeo/hydrazine
src/Hydrazine/Client/API.hs
mit
1,611
0
16
229
443
245
198
42
1
{-# LANGUAGE CPP, EmptyDataDecls #-} module Melchior.Dom ( -- * Types Dom , Element (unEl) , Node , Document , Input , Div , Span , Canvas , Image , ListItem , ensures , assuredly -- * Typeclasses , DomNode -- * Functions , toElement , toInpu...
kjgorman/melchior
Melchior/Dom.hs
mit
5,380
12
12
1,032
1,017
620
397
-1
-1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE Functional...
mbg/monadic-state-hierarchies
examples/Stack.hs
mit
1,090
0
9
258
181
99
82
25
1
-- Copyright © 2013 Bart Massey -- [This work is licensed under the "MIT License"] -- Please see the file COPYING in the source -- distribution of this software for license terms. -- Default main for "Genuine Sieve of Eratosthenes" implementations. module DefaultMain (defaultMain) where import Data.List (foldl') imp...
BartMassey/genuine-sieve
DefaultMain.hs
mit
2,252
0
18
827
540
288
252
55
7
module Tamien.TestUtil where import Test.QuickCheck import Text.Printf check s a = printf "%-25s: " s >> quickCheck a
cpettitt/tamien
Tamien/TestUtil.hs
mit
120
0
6
20
38
20
18
4
1
{-# LANGUAGE OverloadedStrings #-} module Y2020.M12.D09.Solution where {-- Okay! Yesterday we associated aliases to countries, YAY! Now, however, we still have the problem that we have data (alliances) associated to the aliases, not to the countries. We have to do that. Why? So that the USA and UK can be part of NAT...
geophf/1HaskellADay
exercises/HAD/Y2020/M12/D09/Solution.hs
mit
7,428
0
14
1,227
685
405
280
-1
-1
module Interface.General ( MenueState(..) ) where data MenueState = Done | Redo instance Eq MenueState where Done == Done = True Redo == Redo = True x == y = False
DevWurm/numeric-sequences-haskell
src/Interface/General.hs
mit
183
0
6
50
66
35
31
7
0
-- author : Lukasz Wolochowski (l.wolochowski@students.mimuw.edu.pl) module Letter where import Data.Set (Set) import qualified Data.Set as Set import Data.Map ((!)) import qualified Data.Map as Map import qualified Data.List as List import Math.Algebra.Group.PermutationGroup(Permutation, (.^)) import qualified...
luke725/alphabets
src/Letter.hs
mit
2,466
163
11
475
931
514
417
57
2
{-# LANGUAGE TypeFamilies #-} module Data.Summary.Bool (BoolSumm, Summary(..), boolSumm) where import Data.Result (Result(..)) import Data.Summary (Summary(..)) import Data.List (foldl') import Control.DeepSeq (NFData(..)) -- | A 'BoolSumm' counts the number of True and all events observed. data BoolSumm = BoolS...
fffej/hs-carbon
src/Data/Summary/Bool.hs
mit
1,286
0
11
322
419
227
192
35
1
module Y2016.M11.D16.Exercise where {-- Today we focus on the important things: coffee and chocolate. So, we have two chemicals: caffeine and theobromine (chocolate), if we look at their chemical compositions, see caffeine.png and chocolate.jpeg here in this directory or at the URLs: https://github.com/geophf/1Hask...
geophf/1HaskellADay
exercises/HAD/Y2016/M11/D16/Exercise.hs
mit
2,063
0
7
362
172
111
61
11
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE CPP #-} ---------------------------------------------------------------------- -- | -- Module: Web.Slack.Classy -- Description: For compatibility with Web.Slack prior to v0.4.0.0. -- -- -- -------------------------...
jpvillaisaza/slack-web
src/Web/Slack/Classy.hs
mit
7,062
0
13
1,179
1,267
729
538
114
1
module StabilizationNum where import Types newStbNum :: StabilizationNum newStbNum = 0 isNone :: StabilizationNum -> Bool isNone = (==) none isSome :: StabilizationNum -> Bool isSome = (>= 0) add1 :: StabilizationNum -> StabilizationNum add1 = (+ 1)
JenniferWang/incremental-haskell
src/StabilizationNum.hs
mit
257
0
5
45
72
44
28
10
1
-- test/Mataskell/Base64Spec.hs module Mataskell.Base64Spec (spec) where import Mataskell.Base64 (encode64, decode64) import Test.Hspec import Test.Hspec.QuickCheck spec :: Spec spec = do describe "Mataskell.Base64" $ do context "plaintext decoding" $ do it "decodes hex values" $ do ...
tylerjl/mataskell
test/Mataskell/Base64Spec.hs
gpl-2.0
583
0
18
122
106
55
51
12
1
{- Copyright (C) 2014 Ellis Whitehead 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 distributed in the hope...
ellis/OnTopOfThings
old-20150308/src/OnTopOfThings/Actions/Mod.hs
gpl-3.0
7,706
0
24
1,819
2,165
1,135
1,030
158
5
----------------------------------------------------------------------------- -- | -- Module : HEP.Parser.LHE.Sanitizer.FileIO -- Copyright : (c) 2013 Ian-Woo Kim -- -- License : GPL-3 -- Maintainer : Ian-Woo Kim <ianwookim@gmail.com> -- Stability : experimental -- Portability : GHC -- -- LHE file IO oper...
wavewave/LHE-sanitizer
src/HEP/Parser/LHE/Sanitizer/FileIO.hs
gpl-3.0
1,121
0
16
200
214
127
87
21
1
{-# LANGUAGE DeriveDataTypeable #-} {- | Module : Postmaster.FSM.Spooler Copyright : (c) 2004-2008 by Peter Simons License : GPL2 Maintainer : simons@cryp.to Stability : provisional Portability : Haskell 2-pre -} module Postmaster.FSM.Spooler where import Foreign import Control...
richardfontana/postmaster
Postmaster/FSM/Spooler.hs
gpl-3.0
4,043
0
22
1,064
1,373
682
691
98
3
-- This file is formatted with Ormolu {-# LANGUAGE BlockArguments #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE NumericUnderscores #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE Overlo...
rgleichman/glance
gui/GuiInternals.hs
gpl-3.0
32,861
0
28
8,929
7,348
3,945
3,403
805
7
module Handler.HomeSpec (spec) where import TestImport spec :: Spec spec = withApp $ do it "loads the index and checks it looks right" $ do get HomeR statusIs 200 htmlAllContain "h1" "Welcome to Yesod" request $ do setMethod "POST" setUrl HomeR ...
prikhi/MyBookList
test/Handler/HomeSpec.hs
gpl-3.0
1,103
0
16
346
202
89
113
23
1
module HEP.Automation.MadGraph.Dataset.Set20110316set9 where import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.Cluster import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Dataset.Common my_ssetup :: S...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110316set9.hs
gpl-3.0
1,696
0
10
409
356
219
137
46
1
module Hadolint.Formatter.Checkstyle ( printResults, formatResult, ) where import qualified Control.Foldl as Foldl import qualified Data.ByteString.Builder as Builder import qualified Data.ByteString.Lazy.Char8 as B import Data.Char (isAsciiLower, isAsciiUpper, isDigit, ord) import qualified Data.Text as Text ...
lukasmartinelli/hadolint
src/Hadolint/Formatter/Checkstyle.hs
gpl-3.0
3,688
0
14
732
1,119
613
506
-1
-1
{-# LANGUAGE NoImplicitPrelude, RecordWildCards, OverloadedStrings #-} module Lamdu.GUI.ExpressionEdit.GetVarEdit ( make ) where import qualified Control.Lens as Lens import Control.Lens.Operators import qualified Data.ByteString.Char8 as SBS8 import Data.Monoid ((<>)) import Data...
da-x/lamdu
Lamdu/GUI/ExpressionEdit/GetVarEdit.hs
gpl-3.0
5,065
0
22
1,350
1,259
665
594
111
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingListShares/Get.hs
mpl-2.0
3,781
0
14
825
421
249
172
69
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.DLP.Types -- Copyright : (c) 2015-2016 Brendan Hay -- ...
brendanhay/gogol
gogol-dlp/gen/Network/Google/DLP/Types.hs
mpl-2.0
43,290
0
7
7,805
3,316
2,301
1,015
972
1
filter' :: (a -> Bool) -> [a] -> [a] filter' _ [] = [] filter' p (x:xs) | p x = x : filter p xs | otherwise = filter p xs
tokyo-jesus/university
src/haskell/higherOrderFunctions/filter.hs
unlicense
136
0
8
46
90
44
46
5
1
module Problem073 where import Data.List import Data.Ratio main = print $ length $ takeWhile (< 1 % 2) $ dropWhile (<= 1 % 3) $ farey 12000 farey n = 0 : unfoldr step (0, 1, 1, n) where step (a, b, c, d) | c > n = Nothing | otherwise = let k = (n + b) `quot` d in ...
vasily-kartashov/playground
euler/problem-073.hs
apache-2.0
383
0
14
154
195
106
89
8
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QComboBox_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:21 Warning : this file is machine generated - do n...
uduki/hsQt
Qtc/Gui/QComboBox_h.hs
bsd-2-clause
56,032
0
18
12,116
18,697
9,019
9,678
-1
-1
{-# OPTIONS -fglasgow-exts #-} module Text.RegexC where newtype Regex a = Rx { runRegex :: (RxTarget -> [(RxTarget, a)]) } -- rxTargetBefore and rxTargetMatched hold scanned and matched chars in reverse order data RxTarget = RxTarget { rxTargetBefore :: String, rxTargetMatched :: String, rxT...
harai/regexC
Text/RegexC.hs
bsd-2-clause
5,239
0
20
1,543
1,900
1,010
890
-1
-1
module Tisp.Value (Literal(..), Var(..), Neutral(..), Value(..), ValueVal(..), Name(..), nameBase) where import Data.Text (Text) import qualified Data.Text as T import Data.Word (Word64) import Data.String (IsString, fromString) import Data.Ratio import Text.PrettyPrint.ANSI.Leijen (Pretty, pretty, (<>), (<+>)) impor...
Ralith/tisp
src/Tisp/Value.hs
bsd-3-clause
1,835
0
11
456
734
402
332
41
1
import Data.ByteString.Lazy.Char8 (unpack) import Data.Digest.SRI.Lazy main :: IO () main = do integrity <- sriHash256File "srihash.cabal" putStrLn (unpack integrity)
nejstastnejsistene/srihash
test/Spec.hs
bsd-3-clause
172
0
9
24
57
30
27
6
1
{-# LANGUAGE NoMonomorphismRestriction #-} module DetermineTheType where -- simple example example = 1 example1 = (* 9) 6 example2 = head [(0,"doge"),(1,"kitteh")] example3 = head [(0 :: Integer, "doge"),(1, "kitteh")] example4 = if False then True else False example5 = length [1, 2, 3, 4, 5] example6 = (length [1,2,...
pdmurray/haskell-book-ex
src/ch5/DetermineTheType.hs
bsd-3-clause
467
0
8
104
221
132
89
18
2
{-# LANGUAGE FlexibleContexts #-} module TTT.Minimax.Internal where import Control.Monad.State (MonadState(..), modify) import qualified Data.Map as M (Map(..), empty, insert, lookup) import TTT.GameState (GameState(..), Token(..), availableMoves, choose, isWinFor, makeMove) minimax gameState = do cache <- get ...
jcg3challenges/haskell_ttt
src/TTT/Minimax/Internal.hs
bsd-3-clause
1,014
0
14
229
363
191
172
20
2
-- | -- Module : $Header$ -- Copyright : (c) 2013-2015 Galois, Inc. -- License : BSD3 -- Maintainer : cryptol@galois.com -- Stability : provisional -- Portability : portable {-# LANGUAGE Safe #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE Patter...
iblumenfeld/cryptol
src/Cryptol/TypeCheck/AST.hs
bsd-3-clause
29,048
0
18
10,635
9,676
4,979
4,697
642
4
{-| Module : Riff.Files Description : Functions for working with file pairs and obtaining directory listings Copyright : (c) 2019 Steven Meunier License : BSD-style (see the file LICENSE) -} module Riff.Files ( -- * Types FilePair(..) , FilePairs -- * FilePairs , new , old , newExist ,...
solaryeti/riff
src/Riff/Files.hs
bsd-3-clause
3,914
0
11
1,258
713
398
315
61
1
{-# LANGUAGE FlexibleContexts #-} module Network.Salvia.Handler.SendFile (hSendFileResource) where import Control.Monad.Trans import Data.Record.Label import Network.Protocol.Http import Network.Salvia import Network.Socket.SendFile import System.IO -- TODO: closing of file after getting filesize? hSendFileResource ...
sebastiaanvisser/salvia-extras
src/Network/Salvia/Handler/SendFile.hs
bsd-3-clause
709
0
17
160
207
109
98
17
1
{-# LANGUAGE OverloadedStrings #-} -- | -- Module : HaskDeep.Computation.Writer -- Copyright : Mauro Taraborelli 2012 -- License : BSD3 -- -- Maintainer : maurotaraborelli@gmail.com -- Stability : experimental -- Portability : unknown -- -- Computes hashes traversing recursively through a directory ...
maurotrb/haskdeep
src/HaskDeep/KnownHash/Writer.hs
bsd-3-clause
3,320
0
13
1,119
627
365
262
52
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module KnownNat where import Data.Proxy import GHC.TypeLits {- $setup >>> :set -XDataKinds -} {-| >>> f (Proxy :: Proxy 1) 3 -} f :: forall n m. (KnownNat n, KnownNat m...
notae/haskell-exercise
type/KnownNat.hs
bsd-3-clause
389
0
10
92
88
51
37
9
1
module ProgramExecutionSpec where import ProgramExecution (RunType (..)) import Test.Hspec import Test.Hspec.Checkers import Test.QuickCheck.Classes rtSpec :: SpecWith () rtSpec = describe "RunType ?Monoid?" $ testBatch $ monoid (undefined :: RunType)
qfjp/csce_dfa_project_test
test/ProgramExecutionSpec.hs
bsd-3-clause
310
0
7
87
68
40
28
9
1
module CUDA (hasCUDA, loadCUDAArray, synchronizeCUDA, getCudaArchitecture) where import Data.Int import Foreign.Ptr #ifdef DEX_CUDA import Foreign.C #else #endif hasCUDA :: Bool #ifdef DEX_CUDA hasCUDA = True foreign import ccall "dex_cuMemcpyDtoH" cuMemcpyDToH :: Int64 -> Ptr () -> Ptr () -> IO () foreign i...
google-research/dex-lang
src/lib/CUDA.hs
bsd-3-clause
1,241
0
10
198
254
133
121
17
1
import Disorder.Core.Main import qualified Test.Mismi.EC2.Data main :: IO () main = disorderMain [ Test.Mismi.EC2.Data.tests ]
ambiata/mismi
mismi-ec2/test/test.hs
bsd-3-clause
151
0
7
39
41
25
16
6
1
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} module Graphics.CadSim.Boolean where class BooleanOps a where union :: a -> a -> a intersection :: a -> a -> a xor :: a -> a -> a
chetant/cadsim
Graphics/CadSim/Boolean.hs
bsd-3-clause
207
0
8
47
56
31
25
6
0
{-# LANGUAGE DeriveDataTypeable #-} import Prelude hiding (readFile, catch) import Control.Exception import Control.Applicative import Control.Monad.Writer import Data.Map (Map) import Data.Set (Set) import Data.Maybe import Data.Foldable (foldMap) import Data.Traversable (for) import Data.List import Data.Version ...
ezyang/hackage-query
hackage-query.hs
bsd-3-clause
13,234
0
26
3,233
3,408
1,744
1,664
220
6
module Bindings (idle,display,reshape,keyboardMouse) where import Graphics.Rendering.OpenGL import Graphics.UI.GLUT import Data.IORef import Display reshape s@(Size w h) = do viewport $= (Position 0 0, s) keyboardAct delta (Char '+') Down = do delta' <- get delta delta $= 2*delta' keyboardAct delta (Char...
kjellwinblad/HaskellGravityWorld
Bindings.hs
bsd-3-clause
493
0
9
93
196
100
96
16
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} module Templates.Styles where import Text.Lucius import qualified Data.Text as T import qualified Data.Text.Lazy as LT import Language.Haskell.TH mainStyle :: LT.Text mainStyle = renderCss $ mainStyle' undefined where ...
athanclark/deconfigured
src/Templates/Styles.hs
bsd-3-clause
5,098
0
6
1,012
125
82
43
28
1
{-# LANGUAGE LambdaCase, RecordWildCards #-} module AbstractInterpretation.HeapPointsTo.Pretty where import Data.Functor.Foldable as Foldable import Text.PrettyPrint.ANSI.Leijen import Data.Set (Set) import qualified Data.Set as Set import Data.Map (Map) import qualified Data.Map as Map import Data.IntMap (IntMap) ...
andorp/grin
grin/src/AbstractInterpretation/HeapPointsTo/Pretty.hs
bsd-3-clause
1,622
0
15
287
559
300
259
33
1
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, UndecidableInstances, GeneralizedNewtypeDeriving #-} {- | Module : System.Console.Haskeline.Class Copyright : (c) Antoine Latter, 2009 License : BSD3 Maintainer : Antoine Latter <aslatter@gmail.com> Stability : experimental Portability : Flexi...
aslatter/haskeline-class
System/Console/Haskeline/Class.hs
bsd-3-clause
2,942
0
10
531
538
295
243
48
1
{-# LANGUAGE DataKinds, GADTs, StandaloneDeriving #-} module Page2 (Red(Red), Black(Leaf, Black2, Black3, Black4), Root(Root)) where import Data.Type.Natural data Red a n where Red :: a -> (Black a n) -> (Black a n) -> Red a n data Black a n where Leaf :: Black a Z Black2 :: a -> (Black a n) -> (Black a n) ->...
farrellm/dependent-rbtree
src/Page2.hs
bsd-3-clause
632
0
11
152
321
174
147
22
0
module Unison.Note where import Data.List import Control.Monad import Control.Applicative -- | Hierarchical error message type used throughout Unison newtype Note = Note [String] -- | Monad transformer for adding notes newtype Noted m a = Noted { unnote :: m (Either Note a) } run :: Monad m => Noted m a -> m a run ...
CGenie/platform
shared/src/Unison/Note.hs
mit
2,236
0
13
540
1,130
552
578
54
2
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-} module Tests.Writers.HTML (tests) where import Test.Framework import Text.Pandoc.Builder import Text.Pandoc import Tests.Helpers import Tests.Arbitrary() import Text.Pandoc.Highlighting (languages) -- null if no hl support html :: (ToString a, ToPandoc a) => a -> String...
sol/pandoc
src/Tests/Writers/HTML.hs
gpl-2.0
1,376
0
13
349
292
167
125
27
2
--{-# OPTIONS_GHC -Wextra -fplugin ThinErr #-} module Generics.SOP.Monadic ( SumChoiceT, PerformChoiceT, ReadFieldT , Result , recover -- reexports , DatatypeInfo(..), ConstructorInfo(..), FieldInfo(..) ) where import qualified Data.List as L import qualified Generics.SOP ...
deepfire/mood
src/Generics/SOP/Monadic.hs
agpl-3.0
5,124
2
20
1,485
1,933
1,020
913
-1
-1
module CobolLib ( parseCobol, parseCobolFile, module CobolSyntax, module CobolSyntaxTermInstances, module CobolSyntaxATermConvertibleInstances, module ATermLib ) where import CobolSyntax import CobolSyntaxTermInstances import CobolSyntaxATermConvertibleInstances import ATermLib import SGLR import Configuration ...
jkoppel/Strafunski-Sdf2Haskell
examples/vs-cobol-ii/CobolLib.hs
bsd-3-clause
876
0
11
142
149
82
67
-1
-1
{-# LANGUAGE DeriveDataTypeable, MultiParamTypeClasses, PatternGuards, RankNTypes, TypeSynonymInstances #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.Navigation2D -- Copyright : (c) 2011 Norbert Zeh <nzeh@cs.dal.ca> -- License : BSD3-sty...
kmels/xmonad-launcher
XMonad/Actions/Navigation2D.hs
bsd-3-clause
39,746
0
20
13,349
5,448
2,995
2,453
311
2
{-# LANGUAGE PatternGuards #-} module Config ( Config(..) , defaultMailer , slurpConfig) where import BuildBox import Args import System.Console.ParseArgs hiding (args) import System.Directory import Control.Monad import Data.Maybe import qualified Data.Traversable as T -- Config -------------------------...
mainland/dph
dph-buildbot/src/Config.hs
bsd-3-clause
5,995
285
10
1,427
1,281
717
564
125
4
<?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="tr-TR"> <title>AdvFuzzer Eklentisi</title> <maps> <homeID>top</homeID> <mapref location...
kingthorin/zap-extensions
addOns/fuzz/src/main/javahelp/org/zaproxy/zap/extension/fuzz/resources/help_tr_TR/helpset_tr_TR.hs
apache-2.0
968
82
52
156
393
207
186
-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="es-ES"> <title>SAML Support</title> <maps> <homeID>saml</homeID> <mapref location="map....
denniskniep/zap-extensions
addOns/saml/src/main/javahelp/help_es_ES/helpset_es_ES.hs
apache-2.0
958
82
52
156
390
206
184
-1
-1
{-# LANGUAGE DeriveGeneric #-} module Distribution.Solver.Types.SolverId ( SolverId(..) ) where import Distribution.Compat.Binary (Binary(..)) import Distribution.Package (PackageId, Package(..), UnitId) import GHC.Generics (Generic) -- | The solver can produce references to existing packages or -- packages ...
mydaum/cabal
cabal-install/Distribution/Solver/Types/SolverId.hs
bsd-3-clause
793
0
8
144
152
94
58
14
0