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 NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Network.HTTPMock.WebServers.Scotty (startServer) where import ClassyPrelude import Control.Lens import Data.Default import Data.Conduit ( runResourceT , ($$)) import Data.Conduit.List (consume) import Data.Maybe (maybe) im...
MichaelXavier/HTTPMock
src/Network/HTTPMock/WebServers/Scotty.hs
bsd-2-clause
2,873
0
12
1,026
677
356
321
-1
-1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module Terrain where import Data.Aeson import GHC.Generics import Control.Lens import GPS type Loc = (Int, Int) data TerrainFeature = Clear | Restricted | SeverelyRestricted | Water | Town deriving (Show, Eq, Generic) data Terrain = Terra...
nbrk/ld
library/Terrain.hs
bsd-2-clause
1,592
0
11
429
478
256
222
47
3
module IRC.Commands ( -- * Types Channel , Password -- * IRC Functions , nick , user , joinChan , part , quit , privmsg ) where import IRC.Base type Channel = String type Password = String mkMessage :: String -> [Parameter] -...
scvalex/logorrhea
lib/IRC/Commands.hs
bsd-3-clause
874
0
8
254
294
160
134
27
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ExistentialQuantification #-} {- | 'Var' is the reference type used for incremental computing. It has a cached value and a list of dependent children to update when it chan...
jfischoff/tweak
src/Control/Tweak/Var.hs
bsd-3-clause
6,038
0
10
1,590
1,267
679
588
99
1
-- Copyright (c) 2010-2011 -- The President and Fellows of Harvard College. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- 1. Redistributions of source code must retain the above copyright -- notice...
HIPERFIT/language-c-quote
Language/C/Quote.hs
bsd-3-clause
6,712
0
4
1,068
175
169
6
3
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE RecordWildCards #-} module Database.Cassandra.Pool ( CPool , Server , defServer , defServers , KeySpace , Cassandra (..) , createCassandraPoo...
Soostone/cassy
src/Database/Cassandra/Pool.hs
bsd-3-clause
7,911
0
16
2,372
1,602
862
740
137
2
module Language.Gator.Gates.Input where import Language.Gator.IO data Input = Input Name GateID deriving (Show, Eq, Ord) instance GIdent Input where gid (Input _ g) = g instance Named Input where name (Input n _) = n instance Out Input
sw17ch/gator
src/Language/Gator/Gates/Input.hs
bsd-3-clause
253
0
8
55
95
51
44
9
0
{-# LANGUAGE PatternSynonyms #-} module SimpleExpr where import Text.Parsec hiding (State) import Text.Parsec.String import Data.Char import Data.Monoid import qualified Data.Map as Map import Data.Map (Map) import Control.Monad.State.Lazy data Expr b = Application (Expr b) (Expr b) | Lambda b (Expr b) | Poly...
Lazersmoke/rhc
src/SimpleExpr.hs
bsd-3-clause
11,888
0
15
2,674
3,886
1,965
1,921
-1
-1
data AB = A | B deriving Show data S = Rec S AB | Atom AB deriving Show testPackrat :: S testPackrat = fromReturn $ drvS $ parse [A, B, B] fromReturn (Return x _) = x data Return a = Return a Derivs | LR Bool | Fail data Derivs = Derivs { drvS :: Return S, chars :: Return AB } parse :: [AB] -> Derivs parse s = ...
YoshikuniJujo/papillon
test/leftRecursion/abb.hs
bsd-3-clause
873
4
18
258
442
223
219
29
9
module EFA.Flow.Cumulated.AssignMap where import qualified EFA.Flow.Cumulated.Variable as Var import qualified EFA.Graph.Topology.Node as Node import EFA.Report.FormatValue (FormatValue, formatAssign) import EFA.Report.Format (Format) import qualified Data.Map as Map ; import Data.Map (Map) import Data.Monoid (Mon...
energyflowanalysis/efa-2.1
src/EFA/Flow/Cumulated/AssignMap.hs
bsd-3-clause
1,782
0
10
393
676
352
324
59
1
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Database.Persist.File.BlackBox where import Control.Applicative import Control.Monad.State.Class import Control.Monad.Trans.State import Database.Persist.File.Base import Test.QuickCheck.Gen newtype Partition a = Partition { unPart ::...
andorp/file-persist
src/Database/Persist/File/BlackBox.hs
bsd-3-clause
1,308
0
8
225
358
201
157
34
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} module Main (main) where import Bot (connect, disconnect, runBot) import Control.Exception (bracket) import Control.Monad (when) import Data.Configurator (load, Worth(..), require) import Data.List (intercalate) import Data.Version (showVersion) im...
bus000/Dikunt
main/Main.hs
bsd-3-clause
6,402
0
16
1,446
1,517
796
721
122
2
{-# LANGUAGE FlexibleInstances, InstanceSigs, PolyKinds, RankNTypes, ScopedTypeVariables, TypeFamilies, TypeOperators #-} module Data.Higher.Graph ( Rec(..) , RecF(..) , Graph(..) , var , mu , wrap , gfold , grfold , fold , rfold , transform , liftRec , pjoin , modifyGraph , eqRec ) where import Control.Applicative im...
robrix/derivative-parsing
src/Data/Higher/Graph.hs
bsd-3-clause
3,637
0
16
1,049
2,043
1,027
1,016
94
4
{-# LANGUAGE TupleSections, TypeFamilies, FlexibleContexts, RankNTypes, PackageImports #-} module Data.Pipe ( PipeClass(..), PipeChoice(..), (=@=), runPipe_, convert, Pipe, finally, bracket ) where import Data.Pipe.Core
YoshikuniJujo/simple-pipe
src/Data/Pipe.hs
bsd-3-clause
225
4
5
28
53
36
17
6
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} module Lanthanum.API.Files where import Control.Monad.Trans.Resource import Data.ByteString.Lazy (ByteString) import Network.Wa...
fizruk/lanthanum
src/Lanthanum/API/Files.hs
bsd-3-clause
1,258
0
13
243
374
202
172
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE CPP #-} #ifdef DEBUG_CONFLICT_SETS {-# LANGUAGE ImplicitParams #-} #endif module Distribution.Solver.Modular.Validate (validateTree) where -- Validation of the tree. -- -- The task here is to make sure all constraints hold....
mydaum/cabal
cabal-install/Distribution/Solver/Modular/Validate.hs
bsd-3-clause
18,341
0
20
5,118
3,670
1,912
1,758
197
14
{-# OPTIONS_HADDOCK not-home #-} module Pinchot.Rules where import Control.Monad (join) import Control.Monad.Trans.State (get, put, State) import qualified Control.Monad.Trans.State as State import qualified Data.List.NonEmpty as NE import Data.Set (Set) import qualified Data.Set as Set import qualified Language.Haske...
massysett/pinchot
pinchot/lib/Pinchot/Rules.hs
bsd-3-clause
7,155
0
19
1,645
1,326
708
618
106
9
module Din ( module Din , module Exports ) where import Din.Monad as Exports
elliottt/din
src/Din.hs
bsd-3-clause
86
0
4
23
21
15
6
4
0
{-# LANGUAGE FlexibleContexts #-} module Kuelmann97 where import Verilog import Equivalence import Graph import BDDGraph (BDD(B), BDDState, runBDDState, negateBDD, initialBDD, cashOut, bddZero, bddOne, bddAndMany, reduceAll, bddPurge, logBDD) --Graph (BDD, initialBDD, negateBDD, bddOne, bddAnd) --impor...
wuerges/vlsi_verification
src/Kuelmann97.hs
bsd-3-clause
6,051
0
14
1,761
1,867
985
882
129
6
{-# LANGUAGE DeriveFoldable , DeriveFunctor , TypeFamilies #-} module IntSet ( IntSet , singleton , insert , member , notMember , delete , intersection ) where import Control.Lens import Data.Constraint import Data.Foldable import Data.IntMap.Strict (Int...
sonyandy/mlf
src/IntSet.hs
bsd-3-clause
1,796
0
9
498
666
338
328
48
1
-- | -- Module : LambdaCat.History -- Copyright : Andreas Baldeau, Daniel Ehlers -- License : BSD3 -- Maintainer : Andreas Baldeau <andreas@baldeau.net>, -- Daniel Ehlers <danielehlers@mindeye.net> -- Stability : Alpha -- -- This module provides lambdacat's history functionality. The history...
baldo/lambdacat
LambdaCat/History.hs
bsd-3-clause
4,378
0
14
1,339
857
477
380
87
2
module Fragnix.SliceSymbols ( updateEnvironment , findMainSliceIDs , lookupLocalIDs ) where import Fragnix.Slice (SliceID,sliceIDModuleName) import Fragnix.LocalSlice (LocalSliceID) import Language.Haskell.Names ( Environment, Symbol(symbolName,symbolModule)) import Language.Haskell.Exts ( ModuleName(...
phischu/fragnix
src/Fragnix/SliceSymbols.hs
bsd-3-clause
1,745
0
12
308
403
218
185
33
2
module Main where import System.Environment (getArgs, getProgName) import Control.Monad (when) import System.Exit (exitSuccess, exitFailure) import Import (importModules, concatModules, listupModules) import Options (getOptions, Options(..)) import WatchFile (watchFiles) main :: IO [FilePath] main = do args <- ...
ayachigin/importjs
src/Main.hs
bsd-3-clause
735
0
11
125
233
122
111
21
2
module Main where import Control.Monad (void) import Sound.Player (appMain) main :: IO () main = void appMain
potomak/haskell-player
app/Main.hs
bsd-3-clause
114
0
6
21
42
24
18
5
1
----------------------------------------------------------------------------- -- | -- Module : Network.AWS.AWSConnection -- Copyright : (c) Greg Heartsfield 2007 -- License : BSD3 -- -- Connection and authentication info for an Amazon AWS request. ----------------------------------------------------------...
necrobious/hS3
Network/AWS/AWSConnection.hs
bsd-3-clause
2,395
0
13
566
326
193
133
30
4
module Main ( main ) where ------------------------------------------------------------------------------- import Control.Applicative import Control.Monad.State import Data.Attoparsec.ByteString import qualified Data.ByteString as BS import Debug.Trace import ...
MichaelXavier/redis-rdb-parser
test/Main.hs
bsd-3-clause
1,753
0
16
334
402
212
190
36
2
module TriPt2 ( TriPt2(..), triMidPt2, triAreaPt2, triAreaMidPt2 ) where import Pt2 newtype TriPt2 a = TriPt2 (Pt2 a,Pt2 a,Pt2 a) deriving Show triMidPt2 :: Fractional a => TriPt2 a -> Pt2 a triMidPt2 (TriPt2 (a,b,c)) = ( a + b + c ) `divPt2` 3 -- | NOTE: clockwise area is positive, ...
trenttobler/hs-asteroids
src/TriPt2.hs
bsd-3-clause
632
0
8
149
233
129
104
13
1
module Main where import ABS.Runtime import Test.Tasty import Test.Tasty.HUnit import Test.Tasty.Runners.Html import System.IO.Silently (hCapture) import System.Environment (getArgs, withArgs) import System.IO import Control.Monad (replicateM_, replicateM) import Control.Monad.Trans.Class (lift) import Control.Concu...
abstools/habs-runtime
tests/unit.hs
bsd-3-clause
6,136
0
23
2,545
1,909
917
992
130
1
import GHC.Generics import Control.Monad import Control.Monad.Reader import System.IO import Database.Seakale.PostgreSQL hiding (withConn) import Database.Seakale.PostgreSQL.FromRow import Database.Seakale.Store import Database.Seakale.Store.Join import Shared newtype TableStats = TableStats { numRows :: Integer }...
thoferon/seakale
demo/src/Join.hs
bsd-3-clause
2,312
0
23
527
643
340
303
-1
-1
{-# LANGUAGE CPP #-} -- ghc options {-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- {-# OPTIONS_GHC -fno-warn-missing-signatures #-} -- {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} -- {-# OPTIONS_GH...
reuleaux/pire
src/Pire/Pretty/Binder.hs
bsd-3-clause
1,895
0
9
418
278
159
119
24
1
{-# LANGUAGE OverloadedStrings #-} module AudioResource where import Data.Aeson import Control.Applicative data AudioResource = AudioResource [String] String deriving (Show) instance FromJSON AudioResource where parseJSON (Object x) = AudioResource <$> x .: "Audio" <*> x .: "download" parseJSON _ = fail "Failed...
ksaveljev/udemy-downloader
AudioResource.hs
mit
352
0
9
53
85
46
39
8
0
-- © 2001 Peter Thiemann module Wash.PPM where import Char data Pixmap = Pixmap { width :: Int , height :: Int , maximumColorValue :: Int , pixelFun :: Int -> Int -> Pixel } type Pixel = (Int, Int, Int) instance Show Pixmap where show pm = if maximumColorValue pm > 255 then showPixmap pm ...
Erdwolf/autotool-bonn
src/Wash/PPM.hs
gpl-2.0
8,547
199
42
2,538
2,868
1,737
1,131
220
19
module Snap.Snaplet.Router.Types ( RouterState (..) , HasRouter (..) , PathInfo (..) -- * Re-exported for convenience , Generic ) where import Snap.Snaplet.Router.Internal.Types import Web.Routes (PathInfo, Generic)
lukerandall/snap-web-routes
src/Snap/Snaplet/Router/Types.hs
bsd-3-clause
230
0
5
40
56
39
17
7
0
-- | -- Module : Language.C.Quote -- Copyright : (c) 2010-2011 Harvard University -- (c) 2011-2013 Geoffrey Mainland -- : (c) 2013-2015 Drexel University -- License : BSD-style -- Maintainer : mainland@cs.drexel.edu -- -- There are five modules that provide quasiquoters, each...
flowbox-public/language-c-quote
Language/C/Quote.hs
bsd-3-clause
9,622
0
5
1,524
289
278
11
5
0
-- | -- Module : Foundation.List.ListN -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : portable -- -- A Nat-sized list abstraction -- -- Using this module is limited to GHC 7.10 and above. -- module Foundation.List.ListN ( module X ) wh...
vincenthz/hs-foundation
foundation/Foundation/List/ListN.hs
bsd-3-clause
357
0
4
67
32
26
6
2
0
{-# LANGUAGE OverloadedStrings #-} -- Turn data types into equivalent Java classes. -- -- easy case: -- data Foo a b = Foo { frotz :: a, xyzzy :: b } -- -- becomes -- class Foo<A, B> { -- private A frotz; -- private B xyzzy; -- Baz(A frotz, B xyzzy) { this.frotz = frotz; this.xyzzy = xyzzy; } -- A ...
florianpilz/autotool
server/gen/JData.hs
gpl-2.0
6,094
0
25
2,415
1,687
896
791
109
3
<?xml version='1.0' encoding='ISO-8859-1' ?> <!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"> <title>Collocation Tool Help</title> <maps> <homeID>top</homeID> ...
arraydev/snap-desktop
snap-collocation-ui/src/main/resources/org/esa/snap/collocation/docs/help.hs
gpl-3.0
777
54
44
165
283
143
140
-1
-1
{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-} -- | -- Module : Statistics.Internal -- Copyright : (c) 2009 Bryan O'Sullivan -- License : BSD3 -- -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : portable -- -- Scary internal functions. module Statistics.Internal ( inlin...
fpco/statistics
Statistics/Internal.hs
bsd-2-clause
1,153
0
8
186
116
77
39
10
1
{-# LANGUAGE TemplateHaskell, CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Implementation of the Ganeti data collector types. -} {- Copyright (C) 2012, 2013 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the followi...
mbakke/ganeti
src/Ganeti/DataCollectors/Types.hs
bsd-2-clause
8,946
0
14
2,040
1,620
908
712
135
2
module KeepCafs1 where import KeepCafsBase foreign export ccall "getX" getX :: IO Int getX :: IO Int getX = return x
sdiehl/ghc
testsuite/tests/rts/KeepCafs1.hs
bsd-3-clause
122
0
6
26
38
21
17
6
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : System.IO.Error -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintai...
mightymoose/liquidhaskell
benchmarks/base-4.5.1.0/System/IO/Error.hs
bsd-3-clause
17,945
0
11
4,111
2,058
1,211
847
128
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Program.Db -- Copyright : Isaac Jones 2006, Duncan Coutts 2007-2009 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This provides a 'ProgramDb' type which holds confi...
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Distribution/Simple/Program/Db.hs
bsd-3-clause
17,726
0
20
4,155
2,929
1,601
1,328
258
4
{-# LANGUAGE Unsafe #-} module Check03 where import Check03_B mainN = do let n = mainM 1 print $ n
siddhanathan/ghc
testsuite/tests/safeHaskell/check/Check03.hs
bsd-3-clause
110
0
10
31
32
17
15
6
1
{-# LANGUAGE TemplateHaskell #-} -- | provides the parser functions module EmacsKeys.Parser (Modifier(..) ,parseEmacsKeys) where import Data.Char import Data.Either import Data.List.Split import Language.Haskell.TH.Lift import Text.XkbCommon -- | Represents the accepted modifiers 'C','M','S' data Modifier = Ct...
cocreature/emacs-keys
src/EmacsKeys/Parser.hs
isc
1,619
0
11
357
418
235
183
34
2
#!/usr/bin/env runhaskell import System.Environment import Text.Printf main :: IO () main = do (fnPredict: fnObserve: _) <- getArgs predStr <- readFile fnPredict obsvStr <- readFile fnObserve let preds = map (head . words) $ lines predStr obsvs = map (head . words) $ lines obsvStr count :: ...
nushio3/UFCORIN
exe-src/skill-score.hs
mit
878
0
19
280
374
189
185
26
1
{- MsgFragments.hs: helper for backends that need to split up a message into multiple fragments. Part of Flounder: a message passing IDL for Barrelfish Copyright (c) 2007-2010, ETH Zurich. All rights reserved. This file is distributed under the terms in the attached LICENSE file. If you do not f...
8l/barrelfish
tools/flounder/MsgFragments.hs
mit
14,228
0
15
3,455
3,680
1,911
1,769
205
14
------------------------------------------------------------------------- -- -- Set.hs -- -- ADT of sets, implemented as ordered lists without repetitions. -- -- (c) Addison-Welsey, 1996-2011. -- --------------------------------------------------------------------------- modul...
CarmineM74/haskell_craft3e
Set.hs
mit
4,148
32
11
1,358
2,077
1,054
1,023
106
3
---------------------------------------- -- Syntax.hs -- 抽象構文木の定義 -- -- 新入生SG お手本インタプリタ -- 2012/05/23 高島尚希 ---------------------------------------- module Syntax where import Control.Monad -------------------------------- -- トップレベル式 -------------------------------- type TopExpr = [(Id, TypeString, Expr)] type T...
lambdataro/Dive
Syntax.hs
mit
4,616
0
15
1,029
1,623
878
745
135
2
-- | Implementation of an execution environment that uses /podman/. module B9.Podman ( Podman (..), ) where import B9.B9Config ( getB9Config, podmanConfigs, ) import B9.B9Config.Podman as X import B9.Container import B9.DiskImages import B9.ShellScript import Control.Lens (view) newtype Podman = Podman Po...
sheyll/b9-vm-image-builder
src/lib/B9/Podman.hs
mit
821
0
11
180
162
94
68
19
0
{-# LANGUAGE Safe #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} module FP15.Compiler.Syntax.Precedence ( -- * Examples -- $examples -- * The Same Typeclass Same(key, same), Self(..), -- * Main Types Assoc(..), P...
Ming-Tang/FP15
src/FP15/Compiler/Syntax/Precedence.hs
mit
10,309
0
19
2,368
3,176
1,708
1,468
-1
-1
-- | -- Module : HGE2D.Engine -- Copyright : (c) 2016 Martin Buck -- License : see LICENSE -- -- Containing functions for the engine, mostly to interact with GLUT and OpenGL module HGE2D.Engine where import HGE2D.Datas import HGE2D.Classes import HGE2D.Time import HGE2D.Render () import Control.Concurr...
I3ck/HGE2D
src/HGE2D/Engine.hs
mit
6,745
0
14
1,757
1,961
949
1,012
114
1
{-# htermination addToFM_C :: Ord a => (b -> b -> b) -> FiniteMap a b -> a -> b -> FiniteMap a b #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_addToFM_C_1.hs
mit
118
0
3
27
5
3
2
1
0
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.MediaDevices (enumerateDevices, enumerateDevices_, getSupportedConstraints, getSupportedConstraints_, get...
ghcjs/jsaddle-dom
src/JSDOM/Generated/MediaDevices.hs
mit
3,499
0
14
492
708
413
295
52
1
module TaGenerator.AstParser where import TaGenerator.DocumentParser import Control.Applicative import qualified Data.Text as T import qualified Data.Map as M class FromAst a where fromAst :: Ast -> Maybe a -- Basic instances instance FromAst Bool where fromAst = boolConst instance FromAst T.Text where ...
jkpl/tagenerator
src/TaGenerator/AstParser.hs
mit
1,254
0
10
238
466
236
230
34
1
-- | Specification for the exercises of Chapter 3. module Chapter03Spec where import Chapter03 (double, pair, palindrome, second, swap, t0, t1, twice, xs0, xs1, xs2, xs3) import Test.Hspec (Spec, describe, it, shouldBe) import Test.QuickCheck ...
EindhovenHaskellMeetup/meetup
courses/programming-in-haskell/pih-exercises/test/Chapter03Spec.hs
mit
1,665
0
20
492
693
376
317
36
1
module SetGame.PlayGame where import Control.Applicative import Data.List import Data.Maybe import Data.Monoid import System.Random import System.Random.Shuffle import SetGame.Cards import SetGame.GameState drawCards :: Int -> GameState -> GameState drawCards n (GameState board deck sets) = GameState updatedBoard u...
cmwilhelm/setGame
library/SetGame/PlayGame.hs
mit
2,414
0
12
789
741
391
350
54
2
module Main where import Lambda import Parser import Type main = do putStrLn "-----------------------------------------------------" putStrLn "Type Infer to Lambda Expressions!--------------------" putStrLn "Insert the name of the txt with an Lambda expression!" putStrLn "-----...
LeonardoRigon/TypeInfer-LambdaExpressions-in-Haskell
Main.hs
mit
800
0
15
211
184
86
98
17
1
{-# LANGUAGE OverloadedStrings #-} module UtilProperties ( testUtils ) where import Test.Framework.Providers.QuickCheck2 import Test.Framework import Test.QuickCheck import Util import qualified Crypto.Saltine.Internal.Util as U -- | Testing the comparison of keys keyEquality :: ByteString32 -> Property keyEqua...
tel/saltine
tests/UtilProperties.hs
mit
740
0
11
127
184
102
82
18
1
import XMonad import Data.Monoid import System.IO import System.Exit import XMonad.Prompt.RunOrRaise import XMonad.Prompt.Window --import XMonad.Prompt.XMonad import XMonad.Hooks.DynamicLog import XMonad.Hooks.SetWMName import XMonad.Hooks.ManageHelpers import XMonad.Hooks.ManageDocks import XMonad.Hooks....
transtone/transconfig
.xmonad/xmonad.hs
mit
10,615
3
22
2,905
2,178
1,265
913
149
3
{-# LANGUAGE Trustworthy #-} module Scheduler.Main ( MainScheduler , getMainScheduler , runMainScheduler ) where import Control.Concurrent import Control.Concurrent.STM import Data.IORef import Scheduler import Scheduler.Internal import System.IO.Unsaf...
jspahrsummers/RxHaskell
Scheduler/Main.hs
mit
1,514
0
10
347
267
141
126
33
2
module Main where import Language.Egison.Core import Language.Egison.Types import Control.Monad.Error evalTopExprs :: Env -> [TopExpr] -> IO () evalTopExprs _ [] = return () evalTopExprs env (topExpr:rest) = do str <- runIOThrowsREPL $ evalTopExpr env topExpr case topExpr of Test _ -> do putStrLn str ...
aretoky/egison2
etc/template-for-test.hs
mit
462
0
12
101
164
81
83
16
2
module Athame where import Athame.Types import Athame.Show import Athame.Read import Athame.Canon
rmartinho/athame
src/Athame.hs
cc0-1.0
99
0
4
12
24
15
9
5
0
module Handler.Echo where import Import getEchoR :: Text -> Handler Html getEchoR txt = defaultLayout $(widgetFile "echo")
ardumont/yesod-lab
Handler/Echo.hs
gpl-2.0
125
0
8
19
39
20
19
4
1
module Cryptography.ComputationalProblems.Reductions.Terms where import Notes makeDefs [ "reduction" , "reduction function" , "performance translation function" , "reducible" ] tReduction :: Note -> Note tReduction t = m t <> "-" <> reduction tReduction' :: Note -> Note tReduction' t =...
NorfairKing/the-notes
src/Cryptography/ComputationalProblems/Reductions/Terms.hs
gpl-2.0
396
0
7
95
94
50
44
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} -- | -- Module: Main -- Copyright: (C) 2015-2018, Virtual Forge GmbH -- License: GPL2 -- Maintainer: Hans-Christian Esperer <hc@hcesperer.org> -- Stability: experimental -- Portability: portable -- | -- (De-)compress SAPCAR files module Main where import Control...
VirtualForgeGmbH/hascar
app/Main.hs
gpl-2.0
5,767
0
31
1,803
1,463
729
734
112
5
{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable #-} -- | Security protocol represented as a set of roles which are sequences of -- send and receive steps. module Scyther.Protocol ( -- * Types Id(..) , VarId(..) , Pattern(..) , Label(..) , RoleStep(..) , Role(..) , Protocol(..) , RoleStepO...
meiersi/scyther-proof
src/Scyther/Protocol.hs
gpl-3.0
18,878
0
16
5,025
5,996
3,041
2,955
354
15
{-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE LambdaCase #-} module ProofCas.Backends.SFP.Proofs where import Utils.ABT import Utils.Vars import Utils.Unifier import Dependent.Core.Term import Dependent.Unification.Unification import Dependent.Unification.Elaborator import Control.Lens hiding (rewrite) import Control....
benzrf/cas
src/ProofCas/Backends/SFP/Proofs.hs
gpl-3.0
3,894
0
22
875
1,860
947
913
83
4
{- - Copyright (C) 2014 Alexander Berntsen <alexander@plaimi.net> - - This file is part of coreutilhs. - - coreutilhs 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 y...
alexander-b/coreutilhs
cf.hs
gpl-3.0
1,696
0
12
308
343
180
163
28
2
module Builtin.Error where import Builtin.Utils import Eval import AST import Object import qualified Data.Map as M errorClass = buildClass "Error" bootError bootError = M.fromList [ ("initialize", VFunction initFn (2,Nothing)) ] initFn :: [Value] -> EvalM() initFn (name:msg:objs) = evalT $ flip Block "Built...
antarestrader/sapphire
Builtin/Error.hs
gpl-3.0
479
0
12
93
178
95
83
14
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Settings/Filters/Delete.hs
mpl-2.0
3,267
0
15
742
385
232
153
60
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Accounts/Proposals/Pause.hs
mpl-2.0
6,224
0
19
1,415
868
508
360
127
1
-- | -- General Considerations -- -- <https://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf saml-bindings-2.0-os> §3.1 module SAML2.Bindings.General where import Data.ByteString (ByteString) import Data.String (IsString(fromString)) type RelayState = ByteString -- |The name of the parameter used by...
dylex/hsaml2
SAML2/Bindings/General.hs
apache-2.0
695
0
6
80
100
57
43
9
1
{-# LANGUAGE Safe #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE Functiona...
anthezium/rcu
src/Control/Concurrent/RCU/Class.hs
bsd-2-clause
9,187
0
12
1,707
2,980
1,538
1,442
166
1
module FindingAnAppointment where import Data.List import Data.Char timeOff = -540 timeMax = 599 timeStrToInt ts = ((\(h, m) -> h * 60 + m + timeOff) . mapt ((read :: String -> Int) . filter isDigit) . break (== ':')) ts where mapt f (x, y) = (f x, f y) timeIntToStr t = let t2 = t - timeOff ...
lisphacker/codewars
FindingAnAppointment.hs
bsd-2-clause
1,912
0
15
802
729
411
318
32
4
{-# LANGUAGE ForeignFunctionInterface #-} -- | -- Copyright : Anders Claesson 2013 -- Maintainer : Anders Claesson <anders.claesson@gmail.com> -- module Sym.Perm.Sort ( stackSort , bubbleSort ) where import Sym.Perm import Foreign import Foreign.C.Types import System.IO.Unsafe foreign import cc...
akc/sym
Sym/Perm/Sort.hs
bsd-3-clause
981
0
13
209
258
137
121
25
1
module URLMapperSpec where import Test.Hspec import Wikirick.Backends.URLMapper import Wikirick.Import import Wikirick.Repository urlMapper :: URLMapper urlMapper = initURLMapper "/base" beExpanded :: URL -> String -> Expectation beExpanded url expectation = expandURL urlMapper url `shouldBe` expectation urlMapper...
keitax/wikirick
spec/URLMapperSpec.hs
bsd-3-clause
598
0
15
90
155
82
73
15
1
-- Copyright © 2013 Bart Massey -- Demo of Text.Printf.Extensible import Text.Printf.Extensible newtype Unary = Unary Int instance PrintfArg Unary where toField (Unary i) ufmt = case ufmt of FieldFormat {fmtChar = 'U'} -> let (s, i') = if i >= 0 then ("", i) else ("-", (-i)) in formatStri...
BartMassey/extensible-printf
Demo.hs
bsd-3-clause
520
0
16
141
202
109
93
14
1
module Tritium.Screen ( mainMenu ) where import Control.Monad (when) import Control.Monad.State (get, modify) import Control.Lens ((^.)) import SFML.Window.Event (SFEvent (..)) import Tritium.Import import Tritium.UI -- | The main menu. mainMenu :: GameS...
sulami/Tritium
src/Tritium/Screen.hs
bsd-3-clause
654
0
15
189
214
110
104
20
2
{-# OPTIONS_GHC -Wall #-} module Reporting.Error.Canonicalize where import qualified Text.PrettyPrint as P import qualified AST.Module as Module import qualified AST.Type as Type import qualified AST.Variable as Var import qualified Reporting.Error.Helpers as Help import qualified Reporting.PrettyPrint as P import qu...
johnpmayer/elm-compiler
src/Reporting/Error/Canonicalize.hs
bsd-3-clause
8,254
0
24
2,486
1,845
954
891
185
14
module Main where import Network.Gitit import Control.Monad import Data.Monoid ((<>)) import Text.XHtml hiding (dir, option, value, header) import Happstack.Server.SimpleHTTP import Options.Applicative import System.Directory import qualified System.FilePath as F import System.Posix.Directory (changeWorkingDirectory) ...
michelk/gitit-server.hs
src/Main.hs
bsd-3-clause
2,452
0
15
630
742
384
358
70
2
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Mismi.Autoscaling.Core.Data ( ConfigurationName (..) , Configuration (..) , AutoscalingMarket (..) , GroupName (..) , Group (..) , NonEmpty (..) , GroupResult (..) , ScalingInstance (..) , ProtectedFromScaleIn (..) , MinI...
ambiata/mismi
mismi-autoscaling-core/src/Mismi/Autoscaling/Core/Data.hs
bsd-3-clause
4,434
0
11
981
1,047
606
441
215
2
---------------------------------------------------------------------------- -- | -- Module : D -- Copyright : (c) Sergey Vinokurov 2016 -- License : BSD3-style (see LICENSE) -- Maintainer : serg.foo@gmail.com -- Created : Sunday, 23 October 2016 ----------------------------------------------------...
sergv/tags-server
test-data/0007resolvable_import_cycle/D.hs
bsd-3-clause
479
0
6
84
58
39
19
5
0
module Board where import Util -------------------------------- -- Cell data Cell = Empty | Gray | Red | Yellow | Purple | Green | Blue | Orange | Cyan deriving Eq cellColor :: (Num t) => Cell -> (t, t, t) cellColor cell = case cell of Gray -> (128, 128, 128) Red -> (255, 0, 0) Yellow -> (255, 255, 0) P...
mokehehe/htetris
Board.hs
bsd-3-clause
3,580
36
12
765
1,690
946
744
85
8
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE Templa...
mikeplus64/snaplet-storage
src/Snap/Snaplet/Storage.hs
bsd-3-clause
7,188
0
22
1,770
2,168
1,108
1,060
-1
-1
{-# LANGUAGE PackageImports #-} -- | -- Module : Crypto.Hash.Whirlpool -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- -- A module containing Whirlpool bindings -- module Crypto.Hash.Whirlpool ( Ctx(..) -- * Increme...
vincenthz/hs-cryptohash
Crypto/Hash/Whirlpool.hs
bsd-3-clause
1,700
0
8
337
322
190
132
28
1
-- -- Copyright (c) 2009-2011, ERICSSON AB -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- this list...
emwap/feldspar-language
src/Feldspar/Core/Frontend/Switch.hs
bsd-3-clause
2,584
0
15
490
349
213
136
17
1
module Graphics.Gnuplot.Private.OS where gnuplotName :: String gnuplotName = "pgnuplot"
kubkon/gnuplot
os/windows/Graphics/Gnuplot/Private/OS.hs
bsd-3-clause
89
0
4
10
18
12
6
3
1
module TimeTableS.LoadFromServer ( loadFaculties , loadGroups , loadDays ) where import Data.Aeson (FromJSON, decode) import Network.HTTP.Conduit (simpleHttp) import TimeTableS.Types import TimeTableS.Utils ((<$$>)) loadFaculties :: IO [Faculty] loadFaculties = do facs <- faculties <$$> getFacultiesRoot ...
zelinskiy/TimeTableS
src/TimeTableS/LoadFromServer.hs
bsd-3-clause
1,387
0
11
251
386
194
192
36
2
{-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {- | Base module for `AntiQuoter`s, defining some basic type-aliases and and combinators for antiquoting. To for examples in the documentation of this library the following data types defining the untyped lambda calculus syntax: @ data Expr = VarE Var | Lam Va...
Laar/antiquoter
src/Language/Haskell/AntiQuoter/Base.hs
bsd-3-clause
6,511
0
9
1,303
522
305
217
41
1
---------------------------------------------------------------------------- -- | -- Module : Dependency -- Copyright : (c) Sergey Vinokurov 2018 -- License : BSD-2 (see LICENSE) -- Maintainer : serg.foo@gmail.com ---------------------------------------------------------------------------- module Depen...
sergv/tags-server
test-data/0019field_names/Dependency.hs
bsd-3-clause
414
0
8
75
46
31
15
6
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE UndecidableInstances, OverlappingInstances, FlexibleInstances #-} ----------------------------------------------------------------------------- -- | -- Module : M...
pepeiborra/muterm-framework
MuTerm/Framework/DotRep.hs
bsd-3-clause
2,566
0
12
513
724
400
324
-1
-1
module System.Build.Access.Group where class Group r where group :: [(String, [String])] -> r -> r getGroup :: r -> [(String, [String])]
tonymorris/lastik
System/Build/Access/Group.hs
bsd-3-clause
168
0
10
52
63
38
25
9
0
module ScrabbleScoreKata.Day2Spec (spec) where import Test.Hspec import ScrabbleScoreKata.Day2 (score) spec :: Spec spec = do it "is zerp when empty input" $ do score "" `shouldBe` 0 it "lowercase letter" $ do score "a" `shouldBe` 1 it "uppercase lette...
Alex-Diez/haskell-tdd-kata
old-katas/test/ScrabbleScoreKata/Day2Spec.hs
bsd-3-clause
986
0
11
370
278
132
146
27
1
module Gvty.Bindings ( onReshape , onInput , onMotion , onIdle , onDisplay ) where import Control.Lens import Control.Monad.State (execState) import Data.IORef import Graphics.UI.GLUT import Gvty.Graph...
coffeecup-winner/gvty
Gvty/Bindings.hs
bsd-3-clause
1,210
0
11
355
400
204
196
30
3
module Libv1 ( main' ) where -- v1 : Break the problem into two parts: parsing input (rankings) -- and calculating output (results). -- data ---------------------------------------------------- -- >> Ranking information. data Ranking = Ranking { } deriving Show -- >> Result information. data Result = R...
mfine/hs-talks
src/Libv1.hs
bsd-3-clause
826
2
7
133
101
64
37
12
1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Ed25519 ( tests -- :: Int -> Tests ) where import Control.Monad import Data.ByteString (ByteString) import qualified Data.ByteString as S import Crypto.Key import Crypto.Sign.Ed25519 import T...
thoughtpolice/hs-nacl
tests/Ed25519.hs
bsd-3-clause
1,797
0
12
418
452
253
199
37
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fplugin Brisk.Plugin #-} {-# OPTIONS_GHC -fplugin-opt Brisk.Plugin:main #-} module Simple03 where import Control.Monad import Control.Distributed.Process import Contro...
abakst/brisk-prelude
examples/Fold00.hs
bsd-3-clause
861
0
14
257
194
102
92
25
2
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad import Data.ByteString.Char8 (ByteString,useAsCString) import Foreign.C.String import Foreign.C.Types import Foreign.Marshal.Alloc (alloca) import Foreign.Marshal.Array (withArray) import Foreign.Storable import HROOT main :: IO () main = do...
wavewave/HROOT
HROOT-generate/template/HROOT/example/random2dApp.hs
gpl-3.0
1,242
0
23
365
459
225
234
39
1
{-# LANGUAGE OverloadedStrings #-} -- Module : Test.AWS.CloudTrail -- 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-cloudtrail/test/Test/AWS/CloudTrail.hs
mpl-2.0
752
0
5
201
73
50
23
11
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -Wall #-} {-| Fortran AST annotations used for Hoare logic checking....
dorchard/camfort
src/Camfort/Specification/Hoare/Annotation.hs
apache-2.0
1,770
0
12
356
308
179
129
32
1