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 : Tarefa5_2017li1g183 Description : Módulo da Tarefa 5 para LI1 17/18 Módulo para a realização da Tarefa 5 de LI1 em 2017/18. -} module Main where import LI11718 import Graphics.Gloss {-| Função principal usada para animar um jogo completo. Compilar com o GHC. -} main :: IO () main = undefined
hpacheco/HAAP
examples/plab/svn/2017li1g183/src/Tarefa5_2017li1g183.hs
mit
319
0
6
60
29
18
11
5
1
{-# LANGUAGE TypeFamilies #-} import Data.Acid import Data.Acid.Centered import Data.SafeCopy import Data.Typeable import Control.Monad (forever, replicateM_) import System.Exit (exitSuccess) -- state structures import IntCommon -- actual test main :: IO () main = do acid <- enslaveState "localhost" 3333 (IntSt...
sdx23/acid-state-dist
examples/IntSlaveInteractive.hs
mit
1,252
0
19
454
300
147
153
32
6
main = print $ sum [ x | x <- [1..999], x `mod` 3 == 0 || x `mod` 5 == 0 ]
lekto/haskell
Project-Euler-Solutions/problem0001.hs
mit
75
0
13
23
57
31
26
1
1
module Galua.Micro.Compile (compile) where import Data.Typeable (Typeable) import Control.Exception (bracket,Exception(..),throw) import System.Directory (removeFile, getTemporaryDirectory) import System.FilePath (addExtension, dropExtension) import System.IO (hClose, openTempFile) import Dat...
GaloisInc/galua
galua-jit/src/Galua/Micro/Compile.hs
mit
4,275
0
21
1,373
919
472
447
85
2
-- Copyright 2013 Thomas Szczarkowski module DuplexChannel where import Control.Monad import Control.Applicative import Control.Concurrent.Chan import Control.Concurrent.Thread as Thread import qualified Data.Binary as Binary import qualified Data.ByteString.Lazy.Internal as ByteString import Bytes -- wraps Contro...
tom-szczarkowski/matasano-crypto-puzzles-solutions
set5/DuplexChannel.hs
mit
1,634
0
10
275
480
245
235
33
1
{- | module : DataBase.MySQLX.Document description : Basic Operations for Collections copyright : (c) naoto ogawa, 2017 license : MIT maintainer : stability : experimental portability : -} module DataBase.MySQLX.Document ( -- * Basic Operations for Collections createCollection , dropCollect...
naoto-ogawa/h-xproto-mysql
src/DataBase/MySQLX/Document.hs
mit
3,335
0
14
874
607
369
238
61
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} module Scrabble.Move.Scoring where import Data.List (foldl') import Data.Set (Set) import Prelude import Scrabble.Bag import Scrabble.Board.Board import qualified Data.Set as Set type Scorer = [Square] -> Board -> Score n...
joshcough/Scrabble
src/Scrabble/Move/Scoring.hs
mit
2,190
0
12
512
532
286
246
46
8
{-# LANGUAGE OverloadedStrings #-} module Yesod.Form.I18n.Japanese where import Yesod.Form.Types (FormMessage (..)) import Data.Monoid (mappend) import Data.Text (Text) japaneseFormMessage :: FormMessage -> Text japaneseFormMessage (MsgInvalidInteger t) = "無効な整数です: " `Data.Monoid.mappend` t japaneseFormMessage (MsgIn...
yesodweb/yesod
yesod-form/Yesod/Form/I18n/Japanese.hs
mit
1,783
0
7
144
340
189
151
25
1
{-# LANGUAGE TupleSections, FlexibleInstances #-} module CABI.EntryPoint ( FuncSpec(..) , DefinitionLocation(..) , getCABI ) where import CABI.Common import Data.Functor ((<$>)) import Data.Maybe (fromMaybe, maybeToList) import Data.Word (Word) import Data.Monoid (Monoid) import Control.Applicative ((<*)) import Cont...
elegios/datalang
src/CABI/EntryPoint.hs
mit
8,647
0
25
2,407
3,459
1,801
1,658
169
17
import Data.List import Data.Map (Map, (!)) import qualified Data.Map as Map import Data.Maybe data Arg = Register Char | Literal Int data Instruction = Cpy Arg Arg | Inc Char | Dec Char | Jnz Arg Arg | Out Arg type State = (Int, Map Char Int) execute :: [Instruction] -> State -> Maybe (Maybe Int, State) execute inst...
seishun/aoc2016
day25.hs
mit
2,077
0
21
489
1,068
559
509
46
10
{- Geometries module. Exports all modules in Geometries. -} module Graphics.ThreeJs.Geometries ( -- * Modules module Graphics.ThreeJs.Geometries.BoxGeometry ) where import Graphics.ThreeJs.Geometries.BoxGeometry
sanghakchun/three-js-haste
src/Graphics/ThreeJs/Geometries.hs
mit
222
0
5
31
26
19
7
4
0
{-# LANGUAGE MagicHash, OverloadedStrings, PatternSynonyms, RecordWildCards, ScopedTypeVariables #-} module System.Win32.Cryptography.Certificates ( PCERT_CONTEXT , certCreateCertificateContext , withCertCreateCertificateContext , CryptAcquireContextFlags (..) , pattern CRYPT_VERIFYCONTEXT , pattern CRYPT_N...
anton-dessiatov/Win32-cryptography
src/System/Win32/Cryptography/Certificates.hs
mit
15,035
0
22
2,744
3,161
1,682
1,479
298
3
import Data.BinaryList (BinList) import qualified Data.BinaryList as BL import Data.Map (Map) import qualified Data.Map as M import Data.Maybe (fromJust) import qualified Data.Foldable as F import Control.Arrow ((&&&)) import Graphics.Gloss import Graphics.Gloss.Interface.Pure.Game -- Theory part data Bijection a...
plow-technologies/downsampling
downsampling.hs
mit
6,155
0
17
1,567
2,503
1,337
1,166
151
6
{-# LANGUAGE DataKinds, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, MultiParamTypeClasses, PolyKinds, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TypeFamilies, TypeOperators, UndecidableInstances #-} module Hasql.Typed where import Control.Len...
mikeplus64/hasql-typed
src/Hasql/Typed.hs
mit
6,052
0
24
1,559
1,939
1,024
915
-1
-1
module Unused.CLI ( module X ) where import Unused.CLI.GitContext as X import Unused.CLI.Search as X import Unused.CLI.Util as X
joshuaclayton/unused
src/Unused/CLI.hs
mit
138
0
4
28
36
26
10
5
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-hostedzone-hostedzoneconfig.html module Stratosphere.ResourceProperties.Route53HostedZoneHostedZoneCo...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/Route53HostedZoneHostedZoneConfig.hs
mit
1,582
0
12
157
173
100
73
22
1
module Data.ArgParser.Types ( ParseStateType (..), ParseState (..), defaultParseState, ParseOptions (..), defaultParseOptions ) where data ParseStateType = NONE | CHAR | QUOTE data ParseState = ParseState { quoteChar :: Char } defaultParseState :: ParseState defaultParseState = ParseState { q...
adarqui/argparser-hs
src/Data/ArgParser/Types.hs
mit
529
0
8
111
127
81
46
19
1
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 1.0//EN" "http://java.sun.com/products/javahelp/helpset_1_0.dtd"> <helpset version="1.0"> <!-- title --> <title>Hilfe zum Dijkstra-Modul</title> <!-- maps --> <maps> <homeID>d...
jurkov/j-algo-mod
res/module/dijkstra/help/jhelp/dijkstra_help.hs
gpl-2.0
1,637
124
90
217
647
323
324
-1
-1
module Pump.Inter where import Pump.Type import Pump.Positiv import Pump.Negativ import Language.Syntax import Language.Inter import Language import Pump.Conf import qualified Pump.Quiz import Challenger.Partial import Autolib.Util.Sort import Autolib.Util.Seed import Autolib.Util.Zufall import Autolib.FiniteMap ...
florianpilz/autotool
src/Pump/Inter.hs
gpl-2.0
2,924
18
21
825
946
492
454
-1
-1
{-# LANGUAGE MultiParamTypeClasses #-} module Main where import Data.Ix import Control.DeepSeq (deepseq) import Control.Parallel.Strategies f1 = ([]::[Int]) == ([]::[Int]) f2 = 1 == 1 type Function a = [a] -> a f :: (Num a) => Function a f [a,b,c] = a + b + c f _ = undefined class Integrate a b where integrate :...
cgo/graphical-models
src/functions_test.hs
gpl-3.0
2,412
0
14
574
754
427
327
40
3
{-# LANGUAGE OverloadedStrings, TemplateHaskell #-} module IssueParser where import Types import Network import qualified Data.ByteString as BS issueInfo :: BS.ByteString -> BS.ByteString -> Int -> IO (Either String Issue) issueInfo owner' project' id = let owner = BS.unpack owner' project = BS.unpack project' ...
gltronred/issue-recommendation-crawler
src/IssueParser.hs
gpl-3.0
348
0
10
62
99
52
47
11
1
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid 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 Lice...
karamellpelle/grid
source/Game/LevelPuzzle/Output/Fancy/Screen.hs
gpl-3.0
19,714
0
17
5,192
4,834
2,361
2,473
351
3
module Data.BooleanList where import Data.List import Data.Word import qualified Data.ByteString import Control.Arrow import Control.Monad import Data.Maybe boolsRequiredForInteger n = length $ integerToBooleanList n maximumIntegerForBools n = booleanListToInteger $ replicate n True integerToBooleanList :: Integral...
xpika/boolean-list
Data/BooleanList.hs
gpl-3.0
6,032
0
13
884
1,710
878
832
99
2
module XorEncode where import Data.Bits (xor) import Data.ByteString as B (ByteString) import Data.ByteString.Char8 (pack, unpack) import CryptoChallenge xorEncode::Plain -> Key -> Cipher xorEncode plain key = [xor (fst p) (snd p) | p <- zip plain (cycle key)] xorEncodeText :: String -> String -> Cipher xorEncodeTe...
CharlesRandles/cryptoChallenge
xorencode.hs
gpl-3.0
517
0
10
78
193
103
90
11
1
{-| Module: Database.CourseQueries Description: Respond to various requests involving database course information. This module contains the functions that perform different database queries and serve the information back to the client. -} module Database.CourseQueries (retrieveCourse, ...
Courseography/courseography
app/Database/CourseQueries.hs
gpl-3.0
11,083
0
23
3,340
2,620
1,314
1,306
-1
-1
import Test.QuickCheck import Data.List import Prelude -- 20 min -- This one was kind of easy. If you accept the fact that it will go into an infinite loop if you give it the wrong parameter :P -- I could try and see if I can solve it in a less naive way. -- Given in lab prime :: Integer -> Bool prime n = n > 1 && ...
vdweegen/UvA-Software_Testing
Lab1/Jordan/exercise5.hs
gpl-3.0
603
0
11
147
191
101
90
12
1
module SalsaParser(parseFile, parseString) where import SalsaAst as S import SimpleParse import Data.Char import Control.Applicative import Data.String.Utils data Error = AmbiguousParse | NoParse deriving Show reserved :: [String] reserved = ["toggle", "hidden", "circle", "rectangle"] colors :: [String...
Rathcke/uni
ap/advanced programming/assignment2/SalsaParser.hs
gpl-3.0
5,556
0
14
2,469
1,722
834
888
159
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-config/gen/Network/AWS/Config/DescribeDeliveryChannels.hs
mpl-2.0
4,808
0
10
868
561
338
223
67
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-s3/gen/Network/AWS/S3/PutBucketPolicy.hs
mpl-2.0
3,573
0
11
706
527
313
214
68
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Accounts/Link.hs
mpl-2.0
5,649
0
20
1,400
905
524
381
127
1
{-# LANGUAGE TemplateHaskell #-} -------------------------------------------------------- -- | -- Module : Crypto.Noise.Internal.Handshake.Pattern -- Maintainer : John Galt <jgalt@centromere.net> -- Stability : experimental -- Portability : POSIX module Crypto.Noise.Internal.Handshake.Pattern where import Cont...
centromere/cacophony
src/Crypto/Noise/Internal/Handshake/Pattern.hs
unlicense
2,735
0
10
572
757
401
356
65
5
{-# LANGUAGE ScopedTypeVariables #-} module HOImap where import CLaSH.Prelude -- apply input signal on function matching address -- other functions gets input nothing -- Does sythesize busSwitch2 :: forall n a b . KnownNat n => Vec n (Signal (Maybe a) -> Signal b ) -- vector of functions -> Signa...
ggreif/clash-compiler
tests/shouldwork/HOPrim/HOImap.hs
bsd-2-clause
2,405
0
16
895
831
434
397
-1
-1
{-# LANGUAGE PolyKinds #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE UndecidableInstances #-} -- | n-ary products (and products of products) module Data.SOP.NP ( -- * Datatypes NP(..) , POP(..) , unPOP -- * Constructing products , pure_NP , pure_POP , cpure_NP , cpure_POP -- ** Construc...
well-typed/generics-sop
sop-core/src/Data/SOP/NP.hs
bsd-3-clause
26,032
0
17
6,399
8,229
4,347
3,882
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleInstances, MultiParamTypeClasses, UndecidableInstances #-} module VarEnvironment( Environment , EnvironmentT , MonadEnvironment(..) , evalInEnvironment , evalInEnvironmentT ...
projedi/type-inference-rank2
src/VarEnvironment.hs
bsd-3-clause
2,083
0
19
463
650
356
294
40
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Package -- Copyright : Isaac Jones 2003-2004 -- License : BSD3 -- -- Maintainer : cabal-devel@haskell.org -- Portability : port...
christiaanb/cabal
Cabal/Distribution/Package.hs
bsd-3-clause
14,237
0
17
3,084
2,550
1,393
1,157
183
1
{-# LANGUAGE EmptyDataDecls, NoMonomorphismRestriction #-} {-# LANGUAGE TypeFamilies #-} -- | Context-free grammar with quantifiers -- -- We extend CFG.hs to add quantified noun phrases -- in the tradition of Montague -- module Lambda.QCFG where import Lambda.Semantics import Lambda.CFG -...
suhailshergill/liboleg
Lambda/QCFG.hs
bsd-3-clause
3,637
0
18
1,019
948
502
446
-1
-1
import GUI main :: IO () main = startGUI
owestphal/label-generator
src/gui/Main.hs
bsd-3-clause
52
0
6
20
19
10
9
3
1
{-# LANGUAGE FlexibleContexts #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} module Poll ( recentPollsList , userPollsList , loadPollStats , loadPollChoices , voteFor , newPoll , interpret , Repository , InterpretRepository , PollId, ChoiceId, IpAddr , PollDescription (..) , PollStat (..), St...
CarstenKoenig/YouVote
src/server/Poll.hs
bsd-3-clause
3,118
0
12
683
899
458
441
88
3
module Entity where import Action import Bullet import Collision import Control.Wire hiding (object) import qualified Control.Wire as Wire import Core import Data.Aeson import Data.Char (toLower) import Data.VectorSpace import Ge...
nullobject/flatland-haskell
src/Entity.hs
bsd-3-clause
7,413
1
13
2,429
1,461
789
672
-1
-1
module Main where import Idris.Core.TT import Idris.AbsSyntax import Idris.ElabDecls import Idris.REPL import IRTS.Compiler import IRTS.CodegenJavaScript import System.Environment import System.Exit import Paths_idris data Opts = Opts { really :: Bool , inputs :: [FilePath] , outp...
rpglover64/Idris-dev
codegen/idris-codegen-node/Main.hs
bsd-3-clause
1,746
0
12
573
447
228
219
38
4
module Lib ( someFunc ) where someFunc :: IO () someFunc = putStrLn "custom someFunc"
ImsungChoi/haskell-test
src/Lib.hs
bsd-3-clause
95
0
6
24
27
15
12
4
1
import System.Console.MultiArg.SampleParser main :: IO () main = sampleMain
massysett/multiarg
doc/sample.hs
bsd-3-clause
77
0
6
10
23
13
10
3
1
-- |This library aims to make writing XMPP clients (in particular -- bots) easy and fun. Here is a small example: -- -- > import Network -- > import Network.XMPP -- > -- > -- The bot's JID is "bot@example.com" -- > botUsername = "bot" -- > botServer = "example.com" -- > botPassword = "secret" -- > botResource = "bot" ...
drpowell/XMPP
Network/XMPP.hs
bsd-3-clause
2,351
0
5
702
185
142
43
23
0
----------------------------------------------------------------------------- -- | -- Module : Debug.QuickCheck -- Copyright : (c) Koen Claessen, John Hughes 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : deprecated -- Portab...
FranklinChen/hugs98-plus-Sep2006
packages/QuickCheck/Debug/QuickCheck.hs
bsd-3-clause
606
0
5
89
32
25
7
4
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} -- | module VK.API.Types where import Data.Aeson import Data.Aeson.Casing import qualified Data.Default.Generics as D import qualified Data.Text as T import GHC.Generics (Generic) -- for UTCTime Show import ...
eryx67/vk-api
src/VK/API/Types.hs
bsd-3-clause
5,601
0
12
1,461
598
369
229
109
0
{-# LANGUAGE TemplateHaskell #-} module Feldspar.Vector.Test where import qualified Prelude as P import qualified Data.List as P import Feldspar import Feldspar.Prelude import Feldspar.Vector.Internal import Test.Framework import Test.Framework.TH import Test.Framework.Providers.QuickCheck2 tests = $(testGroupGene...
rCEx/feldspar-lang-small
tests/Feldspar/Vector/Test.hs
bsd-3-clause
892
0
11
135
303
169
134
18
1
{-# LANGUAGE OverlappingInstances #-} module Main where import YaLedger.Types.Reports import YaLedger.Main import YaLedger.Reports.Cat import YaLedger.Reports.Holds import YaLedger.Reports.CoA import YaLedger.Reports.Balance import YaLedger.Reports.Saldo import YaLedger.Reports.Details import YaLedger.Reports.Registry...
portnov/yaledger
yaledger.hs
bsd-3-clause
1,016
0
8
173
268
163
105
33
1
{-# LANGUAGE OverloadedStrings #-} module Render where import Data.Points import Data.TileSet import Error import Texture import Tile.Load import Util import Data.Text (Text, unpack) selectTileFor :: (CoordType c) => Text -> [(Text,Textures)] -> TileData c -> TileIndex -> Coord c -> Error (Maybe Texture) selectTi...
kylcarte/wangtiles
src/Render.hs
bsd-3-clause
864
0
14
164
289
148
141
24
2
{-# LANGUAGE QuasiQuotes #-} import LiquidHaskell import Language.Haskell.Liquid.Prelude import Prelude hiding (reverse) data L a = N | C a (L a) [lq| data L [llen] |] [lq| measure llen :: (L a) -> Int llen(N) = 0 llen(C x xs) = 1 + (llen xs) |] [lq| invariant {v: L a | (llen v) >= 0} |] ...
spinda/liquidhaskell
tests/gsoc15/unknown/pos/ListReverse-LType.hs
bsd-3-clause
407
0
9
114
128
73
55
11
1
{-# LANGUAGE OverloadedStrings #-} module Snap.Snaplet.Heist.Tests where ------------------------------------------------------------------------------ import Control.Applicative import Control.Monad (join) import Control.Monad.IO.Class (liftIO) import qualified...
snapframework/snap
test/suite/Snap/Snaplet/Heist/Tests.hs
bsd-3-clause
13,696
0
16
2,858
3,171
1,601
1,570
238
1
{-# LANGUAGE OverloadedStrings #-} module Weibo where import Data.Aeson (decode) import qualified Data.ByteString.Lazy.Char8 as BSL import Data.Maybe (fromJust, isJust) import Test.Framework (Test, defaultMain, testGroup) import...
HaskellCNOrg/snaplet-oauth
tests/Weibo.hs
bsd-3-clause
1,941
0
9
502
347
194
153
33
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} ------------------------------------------------------------------- -- | -- Module : Irreverent.Bitbucket.Http.Paginated -- Copyright : (C) 2017 - 2018 Irreverent Pixel Feats -- Licen...
irreverent-pixel-feats/bitbucket
bitbucket-http-client/src/Irreverent/Bitbucket/Http/Paginated.hs
bsd-3-clause
1,721
0
18
260
405
238
167
33
1
{-# LANGUAGE PackageImports #-} module System.Environment (module M) where import "base" System.Environment as M
silkapp/base-noprelude
src/System/Environment.hs
bsd-3-clause
118
0
4
18
21
15
6
3
0
module Arhelk.Lexer( module X ) where import Arhelk.Lexer.Grammar as X import Arhelk.Lexer.Language as X import Arhelk.Lexer.Token as X
Teaspot-Studio/arhelk-lexer
src/Arhelk/Lexer.hs
bsd-3-clause
144
0
4
26
36
26
10
5
0
{-# LANGUAGE OverloadedStrings #-} module Main where import qualified Data.ByteString.Lazy as LBS ( readFile, writeFile ) import Data.Maybe ( listToMaybe ) import GCHQ.Data.Puzzle ( readPuzzleJSON, solvePuzzle, writePuzzleJSON ) import System.Environment ( getArgs ) main :: IO () main = listToMaybe <$> getArgs >>= r...
jship/gchq-shading-puzzle2015
solver/Main.hs
bsd-3-clause
865
0
20
228
208
108
100
20
4
{-# OPTIONS_GHC -Wall #-} module CommandLine.Args ( chomp , ElmRoute(..) , DevFlags(..) , MakeFlags(..) , ReplFlags(..) ) where import CommandLine.Args.Internal as Args import qualified Data.Text as Text import qualified Elm.Diff as Diff import qualified Elm.Package as Pkg import qualified Elm.Project.F...
evancz/cli
src/CommandLine/Args.hs
bsd-3-clause
3,144
0
17
781
900
484
416
100
4
module Asteroids.UILogic.AspectRatio ( AspectRatio, aspectRatio, adjustAspectRatio, defaultAspectRatio, computeAspectRatio, obscureBorders ) where import Asteroids.UILogic.Drawable import Graphics.UI.GLUT data AspectRatio = AspectRatio { aspectSize :: Size ...
trenttobler/hs-asteroids
src/Asteroids/UILogic/AspectRatio.hs
bsd-3-clause
2,056
0
12
594
793
447
346
58
2
-- | -- Module : $Header$ -- Copyright : (c) 2013-2015 Galois, Inc. -- License : BSD3 -- Maintainer : cryptol@galois.com -- Stability : provisional -- Portability : portable -- -- This module contains types used during type inference. {-# LANGUAGE Safe #-} {-# LANGUAGE FlexibleInstances, FlexibleCo...
ntc2/cryptol
src/Cryptol/TypeCheck/InferTypes.hs
bsd-3-clause
19,427
0
19
6,517
4,664
2,342
2,322
378
4
{-# LANGUAGE OverloadedStrings #-} -- ^ -- Common mocks module Mocks.Common where import Data.Bson import qualified Data.Map.Strict as Map import Persistence.Common import TestHelper import Types.Common import Util.Constants -- ^ -- definitions def1 :: RecordDefinition def1 = RecordDefinition mempty mempty mempty ...
gabesoft/kapi
test/Mocks/Common.hs
bsd-3-clause
8,688
0
13
2,166
2,144
1,139
1,005
295
1
{-# LANGUAGE FlexibleContexts #-} module Network.HTTP.Conduit.Backtrack.Navigation where import Data.Text as T ( Text, pack, unpack, take ) import Data.ByteString.Char8 as S ( ByteString, pack ) import qualified Data.Map ...
ZjMNZHgG5jMXw/http-conduit-backtrack
Network/HTTP/Conduit/Backtrack/Navigation.hs
bsd-3-clause
4,260
0
19
1,258
1,330
723
607
66
1
{-# LINE 1 "Foreign.C.Error.hs" #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.C.Error -- Copyright : (c) The FFI task force 2001 -- Licens...
phischu/fragnix
builtins/base/Foreign.C.Error.hs
bsd-3-clause
22,037
0
14
6,658
4,868
2,674
2,194
381
4
module Game.GamesLibrary.TicTacToe where import Data.List as List import Game.Board -- data setup -------------------------------------------------- type X = First type O = Second type Point = (Int,Int) type Square = Maybe Player type TTTBoard = [[Square]] data TTTGame = Game TTTBoard Player deriving (Eq) instan...
rudyardrichter/MCTS
old/source/Game/GamesLibrary/TicTacToe.hs
mit
3,268
0
14
766
1,143
602
541
77
2
{- 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/GenStrat.hs
gpl-2.0
7,133
0
18
1,768
2,598
1,348
1,250
124
4
-- | Migrate any older version to current module Lamdu.Data.Export.JSON.Migration ( migrateAsNeeded , currentVersion ) where import qualified Control.Lens as Lens import qualified Data.Aeson as Aeson import Data.Text (unpack) import qualified Lamdu.Data.Export.JSON.Codec as Codec import qualified...
lamdu/lamdu
src/Lamdu/Data/Export/JSON/Migration.hs
gpl-3.0
3,589
0
14
676
855
497
358
77
5
{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Test.AWS.Gen.ECS -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay...
fmapfmapfmap/amazonka
amazonka-ecs/test/Test/AWS/Gen/ECS.hs
mpl-2.0
15,678
0
7
3,029
1,606
944
662
279
1
-- GSoC 2015 - Haskell bindings for OpenCog. {-# LANGUAGE GADTs #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE AutoDeriveTypeable #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE Cons...
jswiergo/atomspace
opencog/haskell/OpenCog/AtomSpace/Types.hs
agpl-3.0
4,752
0
10
1,739
1,141
606
535
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MonadComprehensions #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RebindableSyntax #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANG...
ulricha/dsh-tpc-h
Queries/TPCH/Standard/Q2.hs
bsd-3-clause
3,788
0
12
938
1,163
617
546
100
1
{- Teak synthesiser for the Balsa language Copyright (C) 2007-2010 The University of Manchester 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...
Mahdi89/eTeak
src/Gates.hs
bsd-3-clause
19,072
0
27
6,247
4,717
2,352
2,365
363
11
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} -- | The Github Repos API, as documented at -- <http://developer.github.com/v3/repos/> module Github.Repos ( -- * Querying repositories userRepos ,userRepos' ,userRepo ,userRepo' ,organizationRepos ,organizationRepos' ,organizationRepo ,organizationRepo' ,contri...
deckool/my-hs-github
Github/Repos.hs
bsd-3-clause
10,141
0
23
2,476
1,869
1,055
814
167
3
-- numeric :: (Num a, Fractional a) => a -> Int numeric x = 1
themattchan/tandoori
input/num.2.hs
bsd-3-clause
62
0
5
15
10
5
5
1
1
module Network.Wreq.Lens.Machinery ( makeLenses , fieldName , toCamelCase ) where import Control.Lens ((&), (.~)) import Control.Lens.TH hiding (makeLenses) import Data.Char (toUpper) import Language.Haskell.TH.Syntax (Dec, Name, Q, mkName, nameBase) defaultRules :: LensRules defaultRules = lens...
bitemyapp/wreq
Network/Wreq/Lens/Machinery.hs
bsd-3-clause
763
0
10
178
304
170
134
21
3
module Grin.Embed((.>>=),(.>>),GG,VVar,TyNode,TyTag,TyPtr,TyRaw,embedTest) where import Doc.Pretty import GenUtil import Grin.Grin import Grin.Show import StringTable.Atom import Support.CanType import Util.UniqueMonad newtype GG = GG { unGG :: (Uniq Exp) } data TyNode data TyTag data TyPtr a data TyRaw a data TyUnk...
hvr/jhc
src/Grin/Embed.hs
mit
2,972
0
15
812
1,356
697
659
-1
-1
-- !!! Stress test for type checker module ShouldSucceed where import Prelude hiding (head) one = one head (x:xs) = x bottom = head absIf a b c = a absAnd a b = head [a,b] fac_rec fac0 n a = (absIf (absAnd (s_3_0 n) one) (s_2_0 a) (fac0 (absAnd (s_3_2 n) one) (absAnd (s_3_1 n) (s_2_1 ...
hvr/jhc
regress/tests/1_typecheck/2_pass/ghc/tc089.hs
mit
1,992
0
14
589
893
462
431
47
1
module GitLsRemoteTags where import qualified Github.GitData.References as Github import Data.List (intercalate) main = do possibleReferences <- Github.namespacedReferences "thoughtbot" "paperclip" "tags" case possibleReferences of (Left error) -> putStrLn $ "Error: " ++ show error (Right refe...
bitemyapp/github
samples/GitData/References/GitLsRemoteTags.hs
bsd-3-clause
611
0
14
112
149
75
74
13
2
{-# LANGUAGE TypeFamilies, ConstraintKinds #-} module ShouldFail where import GHC.Exts( Constraint ) type family F a :: Constraint class C a where instance (F a) => C [a] where
ezyang/ghc
testsuite/tests/typecheck/should_fail/tcfail214.hs
bsd-3-clause
180
0
6
32
53
31
22
-1
-1
module T7697 where f :: Int => Int f x = x
wxwxwwxxx/ghc
testsuite/tests/typecheck/should_fail/T7697.hs
bsd-3-clause
44
0
6
13
22
12
10
-1
-1
{-# htermination liftM :: Monad m => (a -> b) -> (m a -> m b) #-} import Monad
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Monad_liftM_1.hs
mit
79
0
3
19
5
3
2
1
0
{-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeOperators #-} module Eventful.Serializer ( -- * Class Serializer (..) , simpleSerializer , composeSerializers -- * Common serializers , idSerializer ...
jdreaver/eventful
eventful-core/src/Eventful/Serializer.hs
mit
7,178
0
12
1,378
1,216
674
542
102
3
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleInstances #-} module System.Xen.Types.Tests (tests) where import Control.Applicative ((<$>), (<*>)) import Data.Word (Word32) import Foreign.Marsha...
selectel/hen
tests/System/Xen/Types/Tests.hs
mit
3,117
0
16
863
644
355
289
67
1
module Main where import qualified Web.JWTTests import qualified Web.JWTTestsCompat import qualified Web.JWTInteropTests import qualified Data.ByteString.ExtendedTests import qualified Data.Text.ExtendedTests import Test.Tasty main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "JWT ...
juretta/haskell-jwt
tests/src/TestRunner.hs
mit
639
0
7
169
106
67
39
16
1
{-# LANGUAGE OverloadedStrings #-} module Haskbot.Plugin.Help (register) where import Control.Applicative ((<$>)) import Data.List (find) import qualified Data.Text as T import Haskbot.Plugin import Haskbot.SlashCommand import Haskbot.Types -- constants name :: Command name = setCommand "haskbot" helpText :: T.Tex...
Jonplussed/haskbot-core
src/Haskbot/Plugin/Help.hs
mit
1,302
0
11
256
351
190
161
29
1
module TopBind where (x,y) = (True, False) z = x
antalsz/hs-to-coq
examples/tests/TopBind.hs
mit
51
0
5
12
27
17
10
3
1
module System.AtomicWrite.Writer.ByteStringSpec (spec) where import Test.Hspec (Spec, describe, it, shouldBe) import System.AtomicWrite.Writer.ByteString (atomicWriteFile, ...
stackbuilders/atomic-write
spec/System/AtomicWrite/Writer/ByteStringSpec.hs
mit
5,276
0
18
1,609
883
432
451
77
1
module PitchExtractor where import Data.List import Data.Text as Text (pack, unpack, replace, head, Text) import TextShow (showt) import qualified Control.Foldl as F import qualified Turtle as T import Prelude hiding (FilePath, head) import Filesystem.Path.CurrentOS as Path import Data.Monoid ...
dpren/pitch-extractor
src/PitchExtractor.hs
mit
4,518
0
18
1,040
1,347
678
669
-1
-1
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-} module ViewModels.YoutubeViewModel where import qualified Data.Text as T import Data.Data import qualified ViewModels.ShortUserViewModel as SUVM import qualified ViewModels.YearMenuItemViewModel as YMIVM data YoutubeVideoViewModel = YoutubeVideoViewModel { vid...
itsuart/fdc_archivist
src/ViewModels/YoutubeViewModel.hs
mit
609
0
10
82
126
80
46
16
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module ZTail.Tools.EKG ( EKG(..), getLineLoop, ekg'bootstrap, updateSuccessfulEkgStats, updateFailureEkgStats, timed, getTime ) where import Control.Monad import Data.List import Data.Int import Data.Time.Clock.POSIX (getP...
adarqui/ztail-tools-redis
src/ZTail/Tools/EKG.hs
mit
2,424
0
11
461
588
321
267
62
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} module Draw.Grid where import qualified Data.AffineSpace as AS import Data.Char (isUpper) import Data.Grid import qualified Data.GridShape as Data import Data.GridShape ( C, Co...
robx/puzzle-draw
src/Draw/Grid.hs
mit
8,384
0
16
2,198
3,298
1,697
1,601
-1
-1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.Points -- Copyright : (c) Sven Panne 2002-2009 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : sven.panne@aedion.de -- Stability : stable -...
ducis/haAni
hs/common/Graphics/Rendering/OpenGL/GL/Points.hs
gpl-2.0
9,284
0
10
1,376
571
380
191
48
1
{-# LANGUAGE DoAndIfThenElse , FlexibleContexts , OverloadedStrings , RecordWildCards #-} module CreateSendAPI.V3.List.Subscribers where import Control.Applicative ((<$>), (<*>)) import Control.Monad.IO.Class (MonadIO) import Data.Aeson (FromJSON (parseJSON), Value (Object),...
pavpen/createsend-haskell
src/CreateSendAPI/V3/List/Subscribers.hs
gpl-2.0
3,327
56
11
680
984
552
432
74
2
module Main where import qualified Math.TSP() main :: IO () main = do putStrLn "Travelling Salesman Problem example:" putStrLn "TODO"
AaronRobson/travelling-salesman-problem
example/Main.hs
gpl-3.0
140
0
7
26
40
21
19
6
1
module Fizz.Log where import Data.Time fizzLog :: String -> IO () fizzLog s = do getCurrentTime >>= (putStr . (++": ") . show) putStrLn s
josuf107/Fizzckle
src/Fizz/Log.hs
gpl-3.0
148
0
11
35
61
32
29
6
1
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} -- |Interface to Nominatim -- (http://wiki.openstreetmap.org/wiki/Nominatim) and contains caches -- for avoiding flooding of OSM servers. module Nominatim where import Control.Monad import Control.Applicative import Data.Aeson import Data.Binary (Binary,get,put) impo...
zouppen/hsgeocoder
Nominatim.hs
gpl-3.0
1,924
0
10
508
426
233
193
38
1
{-# LANGUAGE OverloadedStrings #-} module Common (fnTests) where import Control.Lens ((^.)) import Control.Monad (void) import Data.Pool (withResource) import qualified Database.PostgreSQL.Simple as PG import System.Environment ...
huggablemonad/smooch
app/tests/Common.hs
gpl-3.0
977
0
11
312
230
126
104
24
1
{-# LANGUAGE BangPatterns, ScopedTypeVariables #-} -- | Uses the JobDaemon to fetch EXIF tags of an image in background. module JobsDaemon.ExifTags ( exifTags -- * Job , jobExifTags -- * Background compression queue management , putFile ) where import Import import qualified Control.Exception...
RaphaelJ/getwebb.org
JobsDaemon/ExifTags.hs
gpl-3.0
1,849
0
18
499
499
257
242
38
2
{-# LANGUAGE FlexibleContexts #-} module Check where import Control.Monad.State import Control.Monad.Except import CommandAST import Map import State (initCheckMapList) import Monads (Check, runChecker, raise) check :: Comm -> Either String Comm check (Comm p c) = let s = mapFromList $ initCheckMap...
jgalat0/bot
src/Check.hs
gpl-3.0
3,298
0
14
909
1,363
658
705
93
2
module Main where import System.Exit import Data.Map (Map) import qualified Data.Map as Map import Control.Monad import Language.Nautilus.Bytecode.Machine (runNBCI) import Language.Nautilus.Bytecode.Abstract import Language.Nautilus.Bytecode.Interpreter main :: IO () main = do (exitcode, dump) <- runNBCI ("foo...
Zankoku-Okuno/nautilus-bytecode
src/Main.hs
gpl-3.0
732
0
11
221
218
121
97
22
2
module Languages where import Prelude ( Read , Show , Enum , Eq , Bounded ) import Data.Data import Database.Persist.TH data Language = English | German deriving (Read, Show, Eq, Enum, Bounded, Data, Typeable) derivePersistField...
mmarx/minitrue
Languages.hs
gpl-3.0
332
0
6
128
82
47
35
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-doubleclick-bids/gen/Network/Google/Resource/DoubleClickBidManager/Queries/RunQuery.hs
mpl-2.0
5,381
0
19
1,301
880
509
371
126
1
{-# LANGUAGE CPP #-} module Graphics.UI.Gtk.WebKit.GtkInternals ( module Graphics.UI.GtkInternals ) where import Graphics.UI.GtkInternals (GObjectClass(..), GObject(..), unGObject, toGObject, #ifdef MIN_VERSION_gtk ObjectClass(..), Object(..), unObject, toObject, #endif objectUnrefFromMainloop, ContainerCl...
gtk2hs/webkit
Graphics/UI/Gtk/WebKit/GtkInternals.hs
lgpl-2.1
429
0
6
51
107
75
32
6
0
-- | Parsers loader module THIS.Config.Parser (loadParser ) where import Control.Applicative import Control.Monad.Error import Control.Failure import Data.Maybe import Data.Char import Data.Object import THIS.Types import THIS.Util import THIS.Yaml -- | Load parser by name loadParser :: String -> THIS Parser loa...
portnov/integration-server
THIS/Config/Parser.hs
lgpl-3.0
2,477
0
17
687
769
389
380
52
7