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 : ChainFlyer Copyright : (c) Tatsuya Hirose, 2015 License : BSD3 Maintainer : tatsuya.hirose.0804@gmail.com -} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} module Servant.ChainFlyer.Types.Block ( Block(..) ) where import Control.Monad (mzero) import Data.Aeson import Data....
lotz84/chainFlyer
src/Servant/ChainFlyer/Types/Block.hs
bsd-3-clause
1,437
0
28
546
295
170
125
39
0
module Data.Aeson.Versions.CatMaybes where import Data.Functor.Identity import Data.Foldable import Data.Traversable import Data.Maybe import Prelude hiding (sequence) -- | Generalization of catMaybes that allows to remove `Nothings` -- from singleton types class Functor f => CatMaybes f where catMaybes' :: f (M...
vfiles/aeson-versioned
src/Data/Aeson/Versions/CatMaybes.hs
bsd-3-clause
519
0
10
84
128
71
57
14
0
-- | -- Module: FRP.Netwire.Move -- Copyright: (c) 2013 Ertugrul Soeylemez -- License: BSD3 -- Maintainer: Ertugrul Soeylemez <es@ertes.de> module FRP.Netwire.Move ( -- * Calculus derivative, integral, integralWith ) where import Control.Wire -- | Time derivative of the input s...
Teaspot-Studio/netwire
FRP/Netwire/Move.hs
bsd-3-clause
2,077
0
16
650
492
269
223
37
1
module RoundTripSpec (main, spec) where import Test.Hspec import Language.Haskell.Refact.Refactoring.RoundTrip import TestUtils main :: IO () main = do hspec spec spec :: Spec spec = do describe "roundtrip" $ do it "roundtrips B" $ do r <- ct $ roundTrip defaultTestSettings testOptions "Cas...
mpickering/HaRe
test/RoundTripSpec.hs
bsd-3-clause
2,578
0
15
551
333
171
162
34
1
module Main where import Game import Rendering import System.Console.ANSI import System.Random runLoop :: RandomGen g => (GameBoard, Bool, Integer, Bool, g) -> IO () runLoop (board, _, score, True, _) = do clearScreen putStr "\n" putStr $ printBoard board putStr...
anuraags/hs2048
app/Main.hs
bsd-3-clause
929
0
11
258
315
157
158
28
5
module Data.Blockchain.Types ( module Data.Blockchain.Types.Blockchain , module Data.Blockchain.Types.Block , module Data.Blockchain.Types.BlockchainConfig , module Data.Blockchain.Types.Difficulty , module Data.Blockchain.Types.Hex , module Data.Blockchain.Types.Transaction ) where import ...
TGOlson/blockchain
lib/Data/Blockchain/Types.hs
bsd-3-clause
548
0
5
63
99
72
27
13
0
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} -- Perform a build module Stack.Build.Execute ( printPlan , executePlan ) ...
mietek/stack
src/Stack/Build/Execute.hs
bsd-3-clause
21,775
0
27
8,520
4,403
2,218
2,185
423
27
{-# LANGUAGE PartialTypeSignatures #-} import Opwer import Upwork import Web.Authenticate.OAuth( Credential ) import Data.ByteString( ByteString ) import Data.String( fromString ) import Data.Maybe( Maybe( Just ) ) import System.Environment( getArgs ) import Control.Exception( catch ) import Data.Aeson( decode ) import...
danse/opwer
app/opwer-search-and-fetch.hs
bsd-3-clause
1,244
0
17
203
419
222
197
31
2
{-# LANGUAGE OverloadedStrings #-} module ProveEverywhere.Types where import Control.Applicative (empty) import Data.Aeson import Data.ByteString (ByteString) import qualified Data.HashMap.Strict as HM import Data.Monoid import Data.Text ...
prove-everywhere/server
src/ProveEverywhere/Types.hs
bsd-3-clause
8,024
0
17
2,864
1,899
1,019
880
191
0
module Data.Blockchain.Crypto.ECDSASpec (spec) where import TestUtil import Data.Blockchain.Crypto spec :: Spec spec = describe "Data.Blockchain.Crypto.ECDSA" $ do safeJSONDeserializeSpec (Proxy :: Proxy PublicKey) safeJSONDeserializeSpec (Proxy :: Proxy PrivateKey) safeJSONDeserializeSpe...
TGOlson/blockchain
test/Data/Blockchain/Crypto/ECDSASpec.hs
bsd-3-clause
756
0
15
201
191
94
97
17
1
{-# LANGUAGE DeriveDataTypeable, DeriveGeneric, TemplateHaskell, TypeFamilies #-} module Ext.TH where import Data.Typeable import GHC.Generics import Language.Haskell.TH.Name.CamelCase (conCamelcaseName, ConName) -- | derivingGeneric derivingGeneric :: ConName derivingGeneric = conCamelcaseName "Generic" -- | deriv...
cutsea110/sig
sig-api/Ext/TH.hs
bsd-3-clause
485
0
5
53
75
46
29
11
1
{- DATX02-17-26, automated assessment of imperative programs. - Copyright, 2017, see AUTHORS.md. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at...
DATX02-17-26/DATX02-17-26
libsrc/Util/RoseGen.hs
gpl-2.0
3,931
0
16
807
1,018
528
490
62
1
module StatsUtils ( avgTest , tTest , StatsUtils.mean , StatsUtils.std , median , StatsUtils.skewness , StatsUtils.kurtosis ) where import Data.List as List import Data.Vector.Generic as Vect import Statistics.Distribution as Distr import Statistic...
thalerjonathan/phd
public/towards/SugarScape/experimental/chapter2_environment/src/test/StatsUtils.hs
gpl-3.0
3,933
0
17
1,116
870
460
410
70
3
{-# 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-rds/test/Main.hs
mpl-2.0
522
0
8
103
76
47
29
9
1
{-# LANGUAGE OverloadedStrings, RecordWildCards, DoAndIfThenElse #-} module Git.Store.ObjectStore ( createEmptyGitRepository , pathForObject , pathForPack , createGitRepositoryFromPackfile , updateHead , readTree , readObject , readSymRef , createRef , getGitDirectory ) where import qualified Da...
fcharlie/hgit
src/Git/Store/ObjectStore.hs
bsd-3-clause
7,965
0
18
2,350
2,311
1,171
1,140
156
11
module Koan.Simple where import Prelude hiding (all, any, const, curry, drop, dropWhile, elem, filter, flip, foldl, foldr, id, iterate, length, map, max, maximum, min, minimum, repeat, reverse, take, takeWhile, uncurry, zipWith, (!!), ($), (++), (.)) enrolled :: Bool enrolled = False id :: a -> a id a = a ...
Kheldar/hw-koans
solution/Koan/Simple.hs
bsd-3-clause
4,030
0
9
894
1,866
999
867
91
2
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ViewPatterns #-} {-# OPTIONS -f...
rahulmutt/ghcvm
eta/Eta/REPL/UI.hs
bsd-3-clause
159,863
11
83
45,438
38,799
19,413
19,386
-1
-1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Futhark.Representation.AST.SyntaxTests () where -- There isn't anything to test in this module. At some point, maybe -- we can put some Arbitrary instances here.
ihc/futhark
unittests/Futhark/Representation/AST/SyntaxTests.hs
isc
211
0
3
33
14
11
3
3
0
-- Test case constributed by Till Theis {-# LANGUAGE CPP #-} module Tests.DataToTag where import Control.Monad import System.IO.Unsafe #ifdef __HASTE__ import Haste output = alert #else output = putStrLn #endif trace :: Show a => a -> b -> b trace msg = seq $ unsafePerformIO (output $ show msg) runTest :: IO String...
joelburget/haste-compiler
Tests/DataToTag.hs
bsd-3-clause
1,962
0
13
521
723
379
344
43
3
{-# LANGUAGE BangPatterns, NoImplicitPrelude, RecordWildCards, Trustworthy #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} module GHC.Event.IntTable ( IntTable , new , lookup , insertWith , reset , delete , updateWith ) where import Control.Monad ((=<<), liftM, unless, when) imp...
frantisekfarka/ghc-dsi
libraries/base/GHC/Event/IntTable.hs
bsd-3-clause
4,807
0
21
1,426
1,900
967
933
117
4
{-# LANGUAGE TupleSections #-} {-# LANGUAGE ForeignFunctionInterface #-} module GHCi.StaticPtrTable ( sptAddEntry ) where import Prelude -- See note [Why do we import Prelude here?] import Data.Word import Foreign import GHC.Fingerprint import GHCi.RemoteTypes -- | Used by GHCi to add an SPT entry for a set of inter...
sdiehl/ghc
libraries/ghci/GHCi/StaticPtrTable.hs
bsd-3-clause
900
0
11
171
175
91
84
17
1
-- | -- Module : Language.C.Parser.Builtin -- Copyright : (c) 2001 Manuel M. T. Chakravarty -- License : BSD-style -- Maintainer : benedikt.huber@gmail.com -- Portability : portable -- -- This module provides information about builtin entities. -- -- Currently, only builtin type names are supported. ...
acowley/language-c
src/Language/C/Parser/Builtin.hs
bsd-3-clause
632
0
6
107
61
44
17
5
1
module Test0 () where import Language.Haskell.Liquid.Prelude x = choose 0 foo :: Num a => a -> a foo x = 0 - x prop_abs :: Bool prop_abs = if x > 0 then baz (foo x) else False baz :: (Num a, Ord a) => a -> Bool baz z = liquidAssertB (z > 0)
ssaavedra/liquidhaskell
tests/neg/test00b.hs
bsd-3-clause
249
0
8
64
123
67
56
9
2
{-# Language TypeSynonymInstances #-} {-# Language FlexibleInstances, MagicHash #-} module Pretty( ppr, pp, banner, render, Pretty) where import Prelude hiding ((<$>)) import Core import Type import Weight import DataCon import Text.PrettyPrint.Leijen hiding (Pretty) parensIf :: Bool -> Doc -> Doc parensIf True = paren...
C-Elegans/linear
Pretty.hs
mit
3,417
0
13
1,099
1,648
806
842
78
1
module Main where import qualified TicTacToe main :: IO () main = TicTacToe.run
tomphp/haskell-tictactoe
app/Main.hs
mit
82
0
6
15
25
15
10
4
1
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : Network.Policy.Serialize -- Copyright : (c) 2014 Stefan Bühler -- License : MIT-style (see the file COPYING) -- -- Maintainer : stbuehler@web.de -- Stability : experiment...
stbuehler/haskell-mail-policy
src/Network/Policy/Serialize.hs
mit
4,828
20
20
851
1,241
650
591
81
7
{-# LANGUAGE UnicodeSyntax #-} -------------------------------------------------------------------------------- -- File : Main -- Author : Alejandro Gómez Londoño -- Date : Fri Aug 7 23:51:30 2015 -- Description : Testing for CM0081 programming lab 1 ----------------------------------------------------------------...
agomezl/fluffy-chainsaw
test/Main.hs
mit
2,757
0
11
723
978
501
477
71
7
{-# Language DeriveGeneric #-} module Unison.Runtime.JournaledMap where import Control.Concurrent.STM (atomically) import Data.ByteString (ByteString) import Data.Bytes.Serial (Serial) import Data.Map (Map) import GHC.Generics import qualified Data.Map as Map import qualified Unison.BlockStore as BS import qualified ...
nightscape/platform
node/src/Unison/Runtime/JournaledMap.hs
mit
2,266
0
12
571
932
482
450
54
3
-- Counting power sets -- http://www.codewars.com/kata/54381f0b6f032f933c000108/ module PowerSetCounting where powers :: Num a => [t] -> a powers = (2^) . length
gafiatulin/codewars
src/7 kyu/PowerSetCounting.hs
mit
164
0
7
24
38
23
15
3
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Main (main) where import Control.Applicative ((<*>), (<|>), optional, many, pure) import Data.Foldable (traverse_) import Data.Functor ((<$>)) import Data.List (intercalate) import Data.M...
fpco/ghc-prof-flamegraph
ghc-prof-flamegraph.hs
mit
6,351
0
24
1,821
1,763
920
843
136
7
module Data.Advent.Day05 ( partOne, partTwo ) where import Crypto.Hash (Digest, MD5, hash) import Data.ByteString (ByteString) import Data.ByteString.Char8 (pack) import Data.List (isPrefixOf) import qualified Data.Map.Lazy as Map import...
yurrriq/advent-of-idris
src/Data/Advent/Day05.hs
mit
1,318
0
11
402
494
263
231
31
1
{-# Language ScopedTypeVariables, CPP #-} module FindSymbol ( findSymbol ) where #if __GLASGOW_HASKELL__ >= 802 import GhcMonad (liftIO) #elif __GLASGOW_HASKELL__ >= 710 import GHC.PackageDb (exposedName) import GhcMonad (liftIO) #else import Control.Applicative ((<$>)) import qualified UniqFM #endif import ...
hdevtools/hdevtools
src/FindSymbol.hs
mit
3,051
0
17
655
623
326
297
50
2
-- https://hackage.haskell.org/package/fasta-0.10.4.2 -- Parse module. -- By G.W. Schwartz -- {- | Collection of functions for the parsing of a fasta file. Uses the string type. -} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE BangPatterns #-} module ProjectRosalind.Fasta ( eoe ...
brodyberg/Notes
ProjectRosalind.hsproj/LearnHaskell/lib/ProjectRosalind/Fasta.hs
mit
4,666
0
19
1,646
1,181
641
540
90
3
module Main where import System.IO import Control.Exception import qualified Crypto.Hash.SHA512 as S(hashlazy) import qualified Crypto.Hash.Whirlpool as W(hashlazy) import Data.ByteString.Builder(toLazyByteString, stringUtf8) import qualified Data.ByteString.Lazy as L(ByteString, fromStrict, toStrict, concat, singleto...
akraievoy/funstuff
stretch/src/Main.hs
mit
3,554
0
15
788
1,178
612
566
92
3
import Data.Char import Data.Char import Data.List import Data.List.Split pkcs7pad len bytes = result where chunks = chunksOf len bytes lst = last chunks needed = len - (length lst) padding = repeat needed paddedLast = concat [lst,(take needed padding)] chunksMinusLast = take (length chunks -...
mozkeeler/cryptopals
set2/challenge9/pkcs7pad.hs
mit
504
6
8
113
204
96
108
16
1
{- Homework 2 (14.09.2015) Author: Mikhail Kita, group 271 -} import Data.List(delete) -- Takes n first elements from the list take' 0 _ = [] take' n (x:xs) = [x] ++ (take (n - 1) xs) -- Deletes repeat values from the list nub [] = [] nub (x:xs) = [x] ++ nub (newList x xs) where newList a [] = [] ...
MaKToff/SPbSU_Homeworks
Semester 3/Homework 2/Homework2.hs
mit
771
6
12
213
450
221
229
16
3
{-# LANGUAGE ApplicativeDo #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE...
oisdk/SSystemOpt
src/Text/Parse/ODEBench.hs
mit
11,286
0
15
2,961
2,429
1,316
1,113
215
2
{-# LANGUAGE OverloadedStrings, TemplateHaskell #-} module Leankit.Types.Board where import Data.Aeson.TH import Leankit.Types.Common import Leankit.Types.User import Leankit.Types.Lane import Leankit.Types.TH data Board = Board { _active :: Maybe Bool, _title :: M...
dtorok/leankit-hsapi
Leankit/Types/Board.hs
mit
1,334
44
9
482
314
178
136
32
0
{-# LANGUAGE OverloadedStrings #-} module Server.Views ( indexPage , showPage , error404Page , error500Page ) where import Control.Monad (forM_) import Network.URI (URI) import Data.Text (Text) import Text.Blaze ((!)) import Text.Blaze.Html (Html) import qualified Text.Blaze.Html5 as Html import qualified Text.Blaze...
Jonplussed/url-text-histogram
src/Server/Views.hs
mit
2,729
0
21
732
778
399
379
82
1
module BST where data BST = EmptyNode | Node BST Int BST deriving (Show, Eq) inOrder :: BST -> [Int] inOrder EmptyNode = [] inOrder (Node l v r) = inOrder l ++ [v] ++ inOrder r find :: BST -> Int -> Bool find EmptyNode _ = False find (Node l v r) x | x == v = True | x > v = find r x | otherwise = fin...
abhin4v/haskell-classes
2016-03-01/BST.hs
cc0-1.0
968
0
10
245
525
262
263
26
1
import Data.List
t00n/ProjectEuler
modules.hs
epl-1.0
16
0
4
1
6
3
3
1
0
module LF.MorphParser where import LF.Sign import LF.Morphism import Common.Lexer import Common.Parsec import Common.AnnoParser (commentLine) import Text.ParserCombinators.Parsec import System.Directory import System.IO.Unsafe import qualified Data.Map as Map readMorphism :: FilePath -> Morphism readMorphism fil...
nevrenato/Hets_Fork
LF/MorphParser.hs
gpl-2.0
5,359
0
14
1,506
1,855
837
1,018
181
3
module TMVar where import Control.Monad (void) import Control.Monad.STM import Control.Concurrent import Control.Concurrent.STM.TVar newtype TMVar a = TMVar (TVar (Maybe a)) newEmptyTMVar :: STM (TMVar a) newEmptyTMVar = do t <- newTVar Nothing return $ TMVar t takeTMVar :: TMVar a -> STM a takeTMVar (TMVar tva...
y-kamiya/parallel-concurrent-haskell
src/Stm/TMVar.hs
gpl-2.0
739
0
13
161
317
156
161
24
2
module Data.CycleRoll.Internal.LCP where import Prelude hiding ( null, head, tail, length, last, sum ) import qualified Data.CycleRoll.Internal.SuffixArray as SA import Data.Vector.Unboxed hiding (find, sum) import qualified Data.Vector.Primitive as PV import qualified Data.List as List import qualified Data.Hea...
cantora/cycle-roll
src/Data/CycleRoll/Internal/LCP.hs
gpl-3.0
3,509
0
19
1,044
1,287
663
624
81
1
module Functions.Combinatorics.CombFunc (fact ,comb ,perm ) where import Functions.Algebra (incSum) --Single Factorial fact :: Float -> Float fact 0 = 1 fact n = n * (fact $ n - 1) comb :: Float -> Float -> Float comb n m | m > n = 0 | otherwise = perm n m / fact m perm :: Float -> Float -> Float pe...
LeoMingo/RPNMathParser
Functions/Combinatorics/CombFunc.hs
gpl-3.0
388
0
9
113
185
95
90
14
1
----------------------------------------------------------------------------- -- Standard Library: List operations -- -- Suitable for use with Helium, derived from Hugs 98 Standard Library -- Modifications: -- * tuple constructors for zip functions -- * 'generic' functions for Integral type class are excluded -- ...
roberth/uu-helium
lib/List.hs
gpl-3.0
8,351
0
13
3,333
4,249
2,376
1,873
148
2
-- | -- Module : Aura.Commands.O -- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> -- -- Handle all @-O@ flags - those which involve orphan packages. module Aura.Commands.O ( displayOrphans, adoptPkg ) where import Aura.Core (Env(..), orphans, sudo...
bb010g/aura
aura/exec/Aura/Commands/O.hs
gpl-3.0
696
0
8
117
154
91
63
10
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-cloudwatch-logs/gen/Network/AWS/CloudWatchLogs/GetLogEvents.hs
mpl-2.0
7,145
0
14
1,561
1,056
625
431
107
1
module Import.Layout (layout) where import Import.Base import Import.Enum import Import.Piece import Foundation import Model import Text.Julius (juliusFile) import qualified Data.Aeson as Json import qualified Data.CaseInsensitive as CI import Import.Message wrap :: Widget -> Text -> Widget wrap w "navbar" = do ...
sir-murray/lol
Import/Layout.hs
agpl-3.0
3,359
0
15
814
1,007
501
506
-1
-1
{-# LANGUAGE TemplateHaskell #-} module Ui ( Ui , UiType(..) , UiTypeMenu(..) , defaultUi , uiVisible , _MkUiTypeMenu ) where import Control.Lens data Ui = MkUi { _uiVisible :: [UiType] } data UiType = MkUiTypeMenu UiTypeMenu -- | MkUiTypeOverlay UiTypeOverlay data...
nitrix/lspace
legacy/Ui.hs
unlicense
584
0
9
178
114
68
46
20
1
{-# LANGUAGE CPP #-} {-| Module : Main Description : roguelike game with puzzle elements Copyright : (c) Khadaev Konstantin, 2016 License : Unlicense Maintainer : khadaev98@gmail.com Stability : experimental Portability : POSIX -} module Main where import Data.Const import Data.World import Data.Define i...
green-orange/trapHack
src/Main.hs
unlicense
5,308
58
27
1,220
1,907
961
946
138
8
module Main where import Data.Char import SIL --import SIL.Llvm import SIL.Parser import SIL.RunTime import SIL.TypeChecker (typeCheck, inferType) import SIL.Optimizer import SIL.Eval import qualified System.IO.Strict as Strict main = do preludeFile <- Strict.readFile "Prelude.sil" let prelude = case parsePr...
sfultong/stand-in-language
app/Main.hs
apache-2.0
1,497
0
17
335
317
164
153
23
4
{-# LANGUAGE UndecidableInstances #-} --import Data.Fix as Fix {-data Expr = Const' Int | Add' Expr Expr | Mul' Expr Expr deriving (Show) -} data ExprF a = Const Int | Add a a | Mul a a deriving (Show) type Expr = Fix ExprF newtype Fix f = In ( f (Fix f)) instance Sh...
egaburov/funstuff
Haskell/dsl_fold/falgebra.hs
apache-2.0
2,313
21
13
633
1,091
524
567
-1
-1
-- Copyright (c) 2013-2014 PivotCloud, Inc. -- -- Aws.DynamoDb.Streams.Commands.DescribeStream -- -- Please feel free to contact us at licensing@pivotmail.com with any -- contributions, additions, or other feedback; we would love to hear from -- you. -- -- Licensed under the Apache License, Version 2.0 (the "License");...
jonsterling/hs-aws-dynamodb-streams
src/Aws/DynamoDb/Streams/Commands/DescribeStream.hs
apache-2.0
5,907
0
14
969
962
544
418
126
1
module Test where triple :: Integer -> Integer triple x = x * 3 x = 7 y = 10 f = x + y -- Intermission: Exercises half x = x / 2 square x = x * x piSquare x = 3.14 * square x
logistark/haskellbookexercises
2- Hello, Haskell/test.hs
apache-2.0
178
0
6
50
84
45
39
9
1
----------------------------------------------------------------------------- -- -- Module : AI.Network.RNN -- Copyright : (c) JP Moresmau -- License : BSD3 -- -- Maintainer : JP Moresmau <jp@moresmau.fr> -- Stability : experimental -- Portability : -- -- | Library API -- ----------------------------...
JPMoresmau/rnn
src/AI/Network/RNN.hs
bsd-2-clause
1,133
0
5
192
179
127
52
40
0
module NLP.LTAG.Early4.Test3 where import Control.Applicative ((<$>), (<*>)) import Control.Monad (void) import qualified Data.IntMap as I import qualified Data.Set as S import Data.List (sortBy) import Data.Ord (comparing) import NLP.LTAG.Tree (AuxTree(AuxTree), Tr...
kawu/ltag
src/NLP/LTAG/Early4/Test3.hs
bsd-2-clause
1,038
0
12
326
371
206
165
35
1
{- | Module : Data.Set.Range.Modify Description : Basic functions to modify the contents of a range set. Copyright : (c) 2017 Daniel Lovasko License : BSD2 Maintainer : Daniel Lovasko <daniel.lovasko@gmail.com> Stability : stable Portability : portable -} module Data.Set.Range.Modify ( insertPoint , ins...
lovasko/rset
src/Data/Set/Range/Modify.hs
bsd-2-clause
1,135
0
8
256
267
150
117
27
1
import Driver import Control.Monad import System.Environment import Text.Printf import Orthogonal( tests_Orthogonal ) main :: IO () main = do args <- getArgs let n = if null args then 100 else read (head args) printf "\nRunnings tests for field `%s'\n" field (results, passed) <- liftM unzip...
patperry/lapack
tests/Main.hs
bsd-3-clause
911
1
19
322
308
154
154
22
2
{-# LANGUAGE TypeFamilies, ConstraintKinds #-} {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} {-# LANGUAGE CPP #-} {-# LANGUAGE UndecidableInstances #-} -- see below {-# OPTIONS_GHC -Wall #-} -- {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP -- {-# OPTIONS_GHC -fno-warn-unused-binds #-} -- TEMP ---...
conal/linear-map-gadt
src/Control/ConstraintKinds/Category.hs
bsd-3-clause
3,684
2
11
960
797
461
336
-1
-1
{-# LANGUAGE TemplateHaskell, FlexibleInstances #-} import System.IO.Unsafe (unsafePerformIO) import Test.QuickCheck import Test.QuickCheck.Monadic import Test.Framework import Test.Framework.TH import Test.Framework.Providers.QuickCheck2 import Crypto.Paillier instance Show (IO (PubKey, PrvKey)) where show a ...
onemouth/HsPaillier
test/TestMain.hs
bsd-3-clause
835
1
12
155
281
143
138
23
1
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, GADTs, TypeFamilies #-} module Test.Hspec.LeanCheck ( prop , forAll , suchThat ) where import Control.Exception import Data.Bifunctor (first) import Data.List (intercalate) import Data.Maybe import Data.String (String) import Data.Typeable import GHC.Stack import Tes...
robrix/surface
test/Test/Hspec/LeanCheck.hs
bsd-3-clause
3,871
0
17
734
1,191
624
567
-1
-1
{-# OPTIONS -fno-warn-missing-signatures #-} ---------------------------------------------------------------------------- -- -- Module : HXML.LLParsing -- Copyright : (C) 2000-2002 Joe English. Freely redistributable. -- License : "MIT-style" -- -- Author : Joe English <jenglish@flightlab.com> -- Stability : experimen...
pepeiborra/xml-bench
hxml-0.2/LLParsing.hs
bsd-3-clause
3,739
56
15
987
1,150
623
527
43
3
module Network.DNS.Cache.Utils where import qualified Data.ByteString.Char8 as BS import Data.Char (isDigit) import Network.DNS.Cache.Types isIPAddr :: Domain -> Bool isIPAddr hn = length groups == 4 && all ip groups where groups = BS.split '.' hn ip x = BS.length x <= 3 && BS.all isDigit x ...
kazu-yamamoto/concurrent-dns-cache
Network/DNS/Cache/Utils.hs
bsd-3-clause
636
0
12
133
239
125
114
17
1
{-# LANGUAGE OverloadedStrings #-} module SlashRedirect where import Nero import Nero.Application (slashRedirect) app :: Request -> Maybe Response app request = request ^? _GET >>= slashRedirect (prefixed "/hello/" . suffixed "/") (\name -> ok $ "<h1>Hello " <> name <> "</h1>")
plutonbrb/nero-examples
examples/SlashRedirect.hs
bsd-3-clause
319
0
11
81
84
45
39
8
1
{-# LANGUAGE NoImplicitPrelude #-} -- | -- Module: $HEADER$ -- Description: Type proxies for Data.Monoid module. -- Copyright: (c) 2015, Peter Trško -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com -- Stability: experimental -- Portability: NoImplicitPrelude -- -- Type proxies for "Data.Mon...
trskop/type-proxies
src/Data/Proxy/Monoid.hs
bsd-3-clause
5,002
0
8
999
829
481
348
107
1
-- This is where you can change the default config path & other build-in defaults. module Constants where configPrefix = "config/" -- Here's for a system program: -- configPrefix = "/etc/progname/config/"
athanclark/optionz
src/Constants.hs
bsd-3-clause
208
0
4
34
12
9
3
2
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE ScopedTypeVariables #-} module Render.Fast.Model where import Control.Lens ((.=), (+=), preuse, ix, (^.), zoom, use, (%=), Traversal', _1, _2) import Control.Monad (when, liftM) import Data.Binary.IEEE754 (wordToFlo...
ksaveljev/hake-2
src/Render/Fast/Model.hs
bsd-3-clause
47,565
0
25
15,294
14,222
7,317
6,905
-1
-1
module HsLexerPass1(module HsLexerPass1,module HsLexerPos) where import HsLex(haskellLex) import HsLexUtils import HsLayoutPre(layoutPre,PosToken) import HsLexerPos import List(mapAccumL) default(Int) {-+ The function #lexerPass1# handles the part of lexical analysis that can be done independently of the parser, i.e....
forste/haReFork
tools/base/parse2/Lexer/HsLexerPass1.hs
bsd-3-clause
1,447
0
11
277
301
171
130
26
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE EmptyCase #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE TypeOperato...
mstksg/tensor-ops
src/Data/Type/Length/Util.hs
bsd-3-clause
7,365
0
19
2,407
2,594
1,327
1,267
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} module Main where import Pronunciations import qualified Data.Text as T import qualified Data.Text.IO as T import System.IO import System.Environment import System.Directory import Control.Applicative import Control.Monad import Data.Functor imp...
bitemyapp/pronunciations
app/Main.hs
bsd-3-clause
1,804
0
33
630
364
184
180
42
6
----------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- -- | -- | Module : Export library modules -- | Author : Xiao Ling -- | Date : 8/10/2016 -- | ------...
lingxiao/GoodGreatIntensity
lib/Lib.hs
bsd-3-clause
709
0
4
93
43
33
10
9
0
module PTEstruturado.Data where {- modulo que contem a definicação das estruturas da Linguagem de programação -} data Variavel = Variavel {nome::String, tipo::Tipo} deriving (Show) data Tipo = Inteiro | Fracionario | Logico deriving (Eq) instance Show Tipo where show In...
dsvictor94/pt-estruturado
PTEstruturado/Data.hs
bsd-3-clause
1,661
0
8
711
349
202
147
48
0
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE OverloadedStrings #-} module Duckling.Numeral.GA.Corpus ( corpus ) where import Data.String im...
facebookincubator/duckling
Duckling/Numeral/GA/Corpus.hs
bsd-3-clause
1,216
0
9
419
220
130
90
32
1
{-# LANGUAGE FlexibleInstances, TypeFamilies, TypeSynonymInstances, GeneralizedNewtypeDeriving #-} module Examples.Slider where import Data.Default import Data.Dynamic import Control.Newtype (pack) import Graphics.UI.Toy.Prelude import Graphics.UI.Toy.Slider import Graphics.UI.Toy.Transformed newtype State = State (...
mgsloan/toy-gtk-diagrams
Examples/Slider.hs
bsd-3-clause
700
0
15
107
193
109
84
18
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE Ran...
broma0/nysql
src/hs/Database/NySQL/TH.hs
bsd-3-clause
6,137
0
39
1,988
1,884
1,018
866
157
4
----------------------------------------------------------------------------- -- -- Module : GenerateForm -- Copyright : -- License : BSD3 -- -- Maintainer : agocorona@gmail.com -- Stability : experimental -- Portability : -- -- | -- --------------------------------------------------------------------...
agocorona/MFlow
Demos/GenerateFormUndoMsg.hs
bsd-3-clause
7,177
0
24
2,034
2,317
1,154
1,163
151
7
-- | Parsing and evaluation of strict Loop. module Language.LoopGotoWhile.Loop.Strict ( run , eval , parse , prettyPrint ) where import Control.Monad import Text.ParserCombinators.Parsec hiding (parse) import Language.LoopGotoWhile.Shared.Util (mkStdParser, mkStdRunner) import Language.LoopGotoWh...
eugenkiss/loopgotowhile
src/Language/LoopGotoWhile/Loop/Strict.hs
bsd-3-clause
2,281
0
11
533
579
302
277
61
3
module Main (main) where import System.Environment (getArgs) import OnPing.DataServer.Language (prelude, runScript, runEval) import OnPing.DataServer.Language.Parser (parseScriptFile) main :: IO () main = do xs <- getArgs mapM_ runFile xs runFile :: FilePath -> IO () runFile fp = do putStrLn $ "Running file: ...
plow-technologies/onping-data-language
main/Main.hs
bsd-3-clause
450
0
11
88
160
82
78
15
2
module Language.Epilog.Treelike ( Tree(..) , Treelike , drawTree , leaf , posRoot , toForest , toForest' , toTree ) where -------------------------------------------------------------------------------- import Language.Epilog.Common -----------------------------------------------------------...
adgalad/Epilog
src/Haskell/Language/Epilog/Treelike.hs
bsd-3-clause
979
0
13
195
279
155
124
23
1
{-# LANGUAGE ForeignFunctionInterface, CPP #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.ARB.VertexType2101010Rev -- Copyright : (c) Sven Panne 2014 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com>...
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/ARB/VertexType2101010Rev.hs
bsd-3-clause
6,980
0
13
580
1,582
899
683
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} module Tests.DevsTest (devs_tests) where import Data.Monoid import Test.Framework import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 import Test.HUnit import Test.QuickCheck import Data.Typeable (Typeable) import qualified Prelude as P import Numeric...
alios/lambda-devs
Test/Tests/DevsTest.hs
bsd-3-clause
1,826
0
11
462
402
220
182
42
1
{-# LANGUAGE TemplateHaskell #-} module Debug where import Language.Haskell.TH import Language.Haskell.TH.Syntax import Language.Haskell.TH.Ppr {-| Debugging Template Haskell stuff at the GHCi REPL is hard because everything ends up in the "Q" monad and there is no way to print the "Q" monad. These functions call pp...
DanielG/deepcopy
Debug.hs
bsd-3-clause
765
0
9
147
134
77
57
9
1
module CO4.Example.LPOStandalone where import Prelude hiding (lex,lookup) import CO4.Prelude.Nat type Map k v = [(k,v)] type Symbol = Nat data Term = Var Symbol | Node Symbol [Term] deriving (Show) data Order = Gr | Eq | NGe type Rule = (Term,Term) type Trs ...
apunktbau/co4
test/CO4/Example/LPOStandalone.hs
gpl-3.0
2,964
0
23
1,137
1,282
662
620
87
10
{-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS -fno-warn-orphans #-} module System.Random.Utils ( splits, randFunc, genFromHashable ) where import Prelude.Compat import Data.Binary (Binary(..)) import Data.Hashable (Hashable, hashWithSalt) import System.Random (RandomGen, Random, StdGen, split, mkStdGen, rand...
da-x/lamdu
bottlelib/System/Random/Utils.hs
gpl-3.0
709
0
9
127
214
122
92
17
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/ResetNetworkInterfaceAttribute.hs
mpl-2.0
4,705
0
11
857
524
316
208
73
1
{-# LANGUAGE ScopedTypeVariables #-} module Test where import Prelude hiding (id,(.),(<*>),(<$>),pure,(*>),(<*),foldl,print) import qualified Prelude as P import Lojban import OpenCog.Lojban import OpenCog.Lojban.Util import OpenCog.Lojban.Syntax import OpenCog.Lojban.Syntax.Util import OpenCog.Lojban.Syntax.Types i...
misgeatgit/opencog
opencog/nlp/lojban/HaskellLib/test/Test.hs
agpl-3.0
1,425
0
12
344
483
283
200
41
2
----------------------------------------------------------------------------- -- | -- Module : Data.BEncode -- Copyright : (c) 2005 Jesper Louis Andersen <jlouis@mongers.org> -- 2006 Lemmih <lemmih@gmail.com> -- License : BSD3 -- Maintainer : lemmih@gmail.com -- Stability : believe...
matthewleon/bencode
src/Data/BEncode.hs
bsd-3-clause
4,586
0
15
1,266
1,370
705
665
93
4
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Main where import Control.Monad import Control.Monad.State.Strict import Data.ByteString (ByteString, pack) import Pipes.Parse import Test.Hspec import Test.Hspec.Quick...
anchor/vaultaire
tests/InternalStoreTest.hs
bsd-3-clause
3,256
0
18
826
776
398
378
66
1
module Development.Abba.Core ( buildTargets , shell , clean ) where import Data.Graph.Inductive.Graph import Data.Graph.Inductive.Query.BFS import Data.List import Data.Maybe import Data.Ord import Data.Set ( Set ) import qualified Data.Set as Set import Foreign.Marshal.Error import System.Directory impo...
mgeorgehansen/Abba
Development/Abba/Core.hs
bsd-3-clause
2,896
0
17
918
755
396
359
-1
-1
module Language.Pali -- -- $Id$ ( pali , nopali ) where import Language.Type import Autolib.Util.Zufall import Autolib.Set import Data.List (intersperse) pali :: String -> Language pali sigma = Language { abbreviation = foldl1 (++) [ "{ w | w in {" , intersperse ',' sigma , "}^* un...
florianpilz/autotool
src/Language/Pali.hs
gpl-2.0
1,652
15
19
537
652
339
313
50
1
{-# LANGUAGE CPP #-} -- -*-haskell-*- -- GIMP Toolkit (GTK) CustomStore TreeModel -- -- Author : Duncan Coutts, Axel Simon -- -- Created: 11 Feburary 2006 -- -- Copyright (C) 2005 Duncan Coutts, Axel Simon -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU ...
k0001/gtk2hs
gtk/Graphics/UI/Gtk/ModelView/ListStore.hs
gpl-3.0
12,452
0
20
2,961
2,494
1,315
1,179
163
6
{- A first example in equalional reasoning. From the definition of append we should be able to semi-automatically prove the three axioms. -} {-@ LIQUID "--no-termination" @-} module Append where data L a = N | C a (L a) deriving (Eq) data Proof = Proof append :: L a -> L a -> L a append N xs = ...
abakst/liquidhaskell
tests/equationalproofs/neg/Append.hs
bsd-3-clause
2,627
6
12
805
768
388
380
41
1
{-# LANGUAGE MagicHash #-} module Main where import GHC.Prim data A = A Word# deriving Show main = print (A (int2Word# 4#))
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/deriving/should_run/T8280.hs
bsd-3-clause
127
0
9
25
42
24
18
5
1
{-# LANGUAGE RankNTypes, ScopedTypeVariables #-} module Paths where import ClassyPrelude import Patterns data Sel = SelTitle TitlePat | SelIndex Int instance Show Sel where show (SelTitle t) = unpack $ renderTitlePat t show (SelIndex i) = show i data MSel = MSelList [Sel] instance Show MSel where show (...
aelve/Jane
Paths.hs
mit
719
0
8
147
211
115
96
22
1
module GameTypes.ClientGame where import Net.Communication (send, connect, receive) import Net.Protocol (Message(..)) import System.IO (hClose) import TicTacToe (Token(..)) import Players.LocalPlayer import Players.RemotePlayer cleanUp :: (RemotePlayer, LocalPlayer) -> IO () cleanUp ((RemotePl...
davidarnarsson/tictactoe
GameTypes/ClientGame.hs
mit
807
0
10
186
242
129
113
20
1
{-# LANGUAGE OverloadedStrings #-} module Distribution.Archlinux.PackageInfo.Parse ( comment , definition , Definition , field , pkginfo , value ) where import Data.Attoparsec.Char8 import Control.Applicative ((<*), (<|>)) import qualified Data.Attoparsec.Char8 as A8 import qualified Data.At...
sebnow/archlinux-pacman
Distribution/Archlinux/PackageInfo/Parse.hs
mit
1,136
0
9
213
310
172
138
32
1
module Attacker where import Creature class (Creature a) => Attacker a where damage :: a -> Int dealDamage :: (Attacker a, Creature c) => a -> c -> c dealDamage attacker = receiveDamage (damage attacker) duel :: Attacker a => a -> a -> (a, a) duel = duel' True where duel' isAttacking off def | isAl...
StanislavKhalash/cruel-world-hs
src/Attacker.hs
mit
467
0
11
121
194
99
95
12
1
{-# LANGUAGE OverloadedStrings #-} module Handler.Scim.Auth ( scimAuthHandler ) where import Handler (HandlerFunc) import ByteStringTools import Network.Socket import Network.Socket.ByteString (sendAllTo, recvFrom) import qualified Data.ByteString.Lazy as L (ByteString, take, pack, unpack, length, intercalate) i...
stnma7e/scim_serv
src/Handler/Scim/Auth.hs
mit
2,964
0
16
680
1,029
532
497
68
3
{-# OPTIONS_GHC -fno-warn-orphans #-} module Application ( getApplicationDev , appMain , develMain , makeFoundation -- * for DevelMain , getApplicationRepl , shutdownApp -- * for GHCI , handler , db ) where import Control.Monad.Logger (liftLoc, runLoggingT) i...
ahushh/Monaba
monaba/src/Application.hs
mit
7,802
0
13
1,887
1,266
695
571
-1
-1