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 RebindableSyntax #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} -- | This module duplicates the "Control.Monad.Trans.Class" module for -- constrained monads. module Control.Monad.Constrained.Trans (MonadTrans(..)) where import Control.Monad.Constrained ...
oisdk/constrained-monads
src/Control/Monad/Constrained/Trans.hs
mit
2,554
0
12
655
664
382
282
-1
-1
{-# OPTIONS_GHC -Wall #-} module LogAnalysis where import Log parseMessage :: String -> LogMessage parseMessage msg = case (words msg) of ("I":time:string) -> LogMessage Info (read time) (unwords string) ("W":time:string) -> LogMessage Warning (read time) (unwords string) ("E":code:time:string) -> LogMessage (E...
tamasgal/haskell_exercises
CIS-194/homework-02/LogAnalysis.hs
mit
1,296
0
12
305
566
285
281
31
4
{-# htermination (<=) :: Bool -> Bool -> Bool #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_LTEQ_8.hs
mit
50
0
2
10
3
2
1
1
0
{-# LANGUAGE TemplateHaskell #-} module Data.Bitcoin.ScriptSpec where import Data.Bitcoin.Script import qualified Data.ByteString.Char8 as BS8 (pack) import qualified Data.ByteString.Lazy.Char8 as BSL8 (pack) import Test.Hspec spec :: Spec spec = do describe "when decompiling a specifi...
solatis/haskell-bitcoin-script
test/Data/Bitcoin/ScriptSpec.hs
mit
1,196
0
20
282
272
142
130
22
2
{-# LANGUAGE OverloadedStrings #-} -- | A set of example programs to demonstrate NATS features and the -- API of the "Network.Nats" library. module Main ( main ) where import Control.Exception import Control.Monad import Data.Maybe import Network.Nats import System.Environment import Text.Printf main :: IO ()...
kosmoskatten/hats
example/Examples.hs
mit
5,850
0
18
1,767
1,187
596
591
95
9
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.SQLResultSetRowList (item, item_, getLength, SQLResultSetRowList(..), gTypeSQLResultSetRowList) wh...
ghcjs/jsaddle-dom
src/JSDOM/Generated/SQLResultSetRowList.hs
mit
1,920
0
12
244
495
302
193
31
1
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE RankNTypes #-} module Text.PrintfA where import Text.Printf data PrintfArgT = forall a. PrintfArg a => P a data PrintfTypeT = T { unT :: forall r. PrintfType r => r } printfa :: PrintfType t => String -> [ PrintfArgT ] -> t printfa format = (\(T t) -> t) . fold...
tdammers/ginger
src/Text/PrintfA.hs
mit
369
0
11
75
154
83
71
8
1
{- Copyright (c) 2008 Russell O'Connor Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute...
haasn/colour
Data/Colour/SRGB.hs
mit
4,868
0
15
1,049
1,208
633
575
66
3
{-| Module: Sally.Game Description: Core game logic and some database operations Maintainer: lawrence.dunn.iii@gmail.com License: MIT -} {-# language OverloadedStrings #-} {-# language TypeOperators #-} {-# language DeriveGeneric #-} module Sally.Game where import Data.Char (isSpace) import Data...
dunnl/sally
src/Sally/Game.hs
mit
3,286
0
11
872
731
391
340
67
1
module KMC.Syntax.Parser (parseRegex, anchoredRegexP) where import Control.Applicative hiding (optional, many) import Data.Char (chr) import Data.Functor.Identity (Identity) import Text.Parsec.Expr (Assoc (..), Operator (..), OperatorTable, buildExpressionParser) import Text.Parsec.Prim (parse...
diku-kmc/regexps-syntax
KMC/Syntax/Parser.hs
mit
11,095
0
20
3,415
2,534
1,360
1,174
160
6
{-# LANGUAGE OverloadedStrings #-} module PureScript.Ide.FilterSpec where import Test.Hspec import PureScript.Ide.Filter import PureScript.Ide.Types modules :: [Module] modules = [ ("Module.A", [FunctionDecl "function1" ""]), ("Module.B", [DataDecl "data1" ""]), ("Module.C", [ModuleDecl "Module.C" []]),...
kRITZCREEK/psc-ide
test/PureScript/Ide/FilterSpec.hs
mit
2,170
0
13
447
618
318
300
47
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeSynonymInstances #-} module PostgREST.DbStructure ( getDbStructure , accessibleTables ) where import qualified Hasql.Decoders as...
Skyfold/postgrest
src/PostgREST/DbStructure.hs
mit
32,378
0
19
8,892
4,189
2,199
1,990
232
7
import Distribution.Simple import Distribution.Simple.Setup ( haddockDistPref, Flag(..)) import Distribution.Verbosity ( normal ) import Distribution.Simple.Utils ( copyFiles ) import Distribution.Text ( display ) import System.FilePath ((</>)) import System.Directory -- Ugly hack, logic copied from...
lpsmith/split-channel
Setup.hs
mit
810
1
13
190
206
112
94
16
2
#!/usr/bin/env runhaskell main = do putStrLn "What is your name ?" n <- getLine putStrLn ("Happy New Year " ++ n) -- main = putStrLn "Hello World!" megaAct = do act1 act2 act3 act1 = putStrLn "This is a string on a line" act2 = putStrLn "This is another string on a l...
UCSD-PL/230-web
static/hello.hs
mit
383
0
9
119
72
34
38
9
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-applicationsource.html module Stratosphere.ResourceProperties.AutoScalingPlansSc...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/AutoScalingPlansScalingPlanApplicationSource.hs
mit
2,776
0
12
206
266
155
111
28
1
import Char sumDigits :: Integer -> Int sumDigits n = sum $ map digitToInt (show n) result :: Int result = sumDigits $ product [1..100] main = putStrLn $ show $ result
nbartlomiej/haskeuler
020/problem-020.hs
mit
171
0
8
35
71
37
34
6
1
import qualified Data.Map as Map ns = [7,6..1] chunks n xs | n <= length xs = fst (splitAt n xs) : chunks n (tail xs) | otherwise = [] rootmap str = Map.fromListWith (Map.unionWith (+)) t where t = [(init s, Map.singleton (last s) 1) | s <- chks str] chks str = concat [chunks x str | x <- ns]...
jsavatgy/dit-doo
code/fold-map-02.hs
gpl-2.0
866
2
13
236
457
221
236
28
1
module Main ( main ) where {- External Library Module Imports -} {- Standard Library Module Imports -} {- Local Module Imports -} import Smc.Cli ( srmcManual ) import Ipc.Cli ( printManual ) {- End of Imports -} {- This is the main function which when the file is run as program will generate latex source f...
allanderek/ipclib
Smc/CliDoc.hs
gpl-2.0
420
0
7
93
62
37
25
10
1
{-# OPTIONS -w -O0 #-} {- | Module : ATC/DevGraph.der.hs Description : generated Typeable, ShATermLG instances Copyright : (c) DFKI Bremen 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-portable(overlapping Typeable i...
nevrenato/Hets_Fork
ATC/DevGraph.der.hs
gpl-2.0
5,689
0
4
640
293
216
77
39
0
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances #-} {- | Module : $Header$ Description : Comorphism from CommonLogic to CommonLogic Copyright : (c) Eugen Kuksa, Uni Bremen 2011 License : GPLv2 or higher, see LICENSE.txt Maintainer : eugenk@informatik.uni-bremen.de Stability : experimental ...
nevrenato/Hets_Fork
Comorphisms/CommonLogicModuleElimination.hs
gpl-2.0
9,335
0
21
2,399
2,216
1,157
1,059
171
5
{-| Re-export the modules of the hledger-web program. -} module Hledger.Web ( module Hledger.Web.Foundation, module Hledger.Web.Application, module Hledger.Web.Handlers, module Hledger.Web.Options, module Hledger.W...
Lainepress/hledger
hledger-web/Hledger/Web.hs
gpl-3.0
935
0
6
234
118
81
37
18
1
module ShowFunctions where main :: IO () main = putStr $ unlines [ show (-412) , show 0 , show 34 , show 1000 , show ' ' , show '\n' , show 'A' , show True , show False , show () , show (1,2) , show (1,2,3) , show (1,2,3,4) , show (1,2,3,4,5) , show (1,2,3,4...
Helium4Haskell/helium
test/correct/ShowFunctions.hs
gpl-3.0
647
0
10
217
373
216
157
30
1
{-| The Hledger.Data library allows parsing and querying of C++ ledger-style journal files. It generally provides a compatible subset of C++ ledger's functionality. This package re-exports all the Hledger.Data.* modules (except UTF8, which requires an explicit import.) -} module Hledger.Data ( modul...
ony/hledger
hledger-lib/Hledger/Data.hs
gpl-3.0
2,092
0
6
471
271
185
86
48
1
{-# LANGUAGE TupleSections #-} module Data.IORef.Utils ( atomicModifyIORef_ ) where import Data.IORef atomicModifyIORef_ :: IORef a -> (a -> a) -> IO () atomicModifyIORef_ var f = atomicModifyIORef var ((, ()) . f)
da-x/lamdu
bottlelib/Data/IORef/Utils.hs
gpl-3.0
225
0
9
43
74
41
33
6
1
module Main where import Application.PVP2LibLinear.ArgsParser as AP import Application.PVP2LibLinear.Conduit import Application.PVP2LibLinear.Utility import Classifier.LibLinear import Control.Monad as M import Data.Conduit import ...
XinhuaZhang/PetaVisionHaskell
Application/PVP2LibLinear/Train.hs
gpl-3.0
2,886
0
24
1,371
592
316
276
65
3
module Main where import Control.Monad.State import System.Random import GeneA.Genetic import GeneA.Genetic.Operators import GeneA.Population import GeneA.Prob size = 100 sRate = 0.25 mRate = 0.01 pSize = 100 target = 100 main = do putStr "Getting random number generator..." st <- getStdGen putStr...
dglmoore/genea
src/examples/BinGen.hs
gpl-3.0
2,049
0
16
571
727
365
362
56
3
{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.S3 -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan...
fmapfmapfmap/amazonka
amazonka-s3/gen/Network/AWS/S3.hs
mpl-2.0
17,331
0
5
4,353
1,944
1,415
529
398
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-sqladmin/gen/Network/Google/Resource/SQL/SSLCerts/Get.hs
mpl-2.0
3,847
0
16
917
467
280
187
75
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Workspaces/BuiltInVariables/List.hs
mpl-2.0
6,566
0
18
1,406
789
460
329
127
1
{-# language TupleSections #-} {-# language FlexibleContexts #-} module Nanocoin.Network.P2P ( bootstrap, ) where import Protolude import Control.Monad.Base import Control.Distributed.Process.Lifted import Control.Distributed.Process.Lifted.Class import Control.Distributed.Process.Node.Lifted import qualified Dat...
tdietert/nanocoin
src/Nanocoin/Network/P2P.hs
apache-2.0
5,646
0
20
1,141
1,359
682
677
122
2
{-# LANGUAGE OverloadedStrings #-} module Language.Sigil.Show ( showSigil ) where import Control.Monad.Free import Language.Sigil.Types showSigil :: (Show a, Show r) => Free (Sigil a) r -> String showSigil (Free (Push s next)) = show s ++ "\n" ++ showSigil next showSigil (Free (Pop ne...
erochest/sigil
Language/Sigil/Show.hs
apache-2.0
403
0
9
108
144
75
69
9
1
module M0ld.Yeast where import M0ld.AST import M0ld.M0ld import qualified M0ld.C import qualified Data.Map as Map wrap a b (f,c,p) = (f,a++c++b,p) indent depth code = unlines $ map indentLine $ lines code where indentLine "" = "" indentLine line = (take depth $ repeat ' ') ++ line emitStmt regs labels hints (...
gitpan/SMOP
m0ld/M0ld/Yeast.hs
artistic-2.0
5,175
0
28
1,355
1,780
906
874
91
13
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QStyleOptionViewItemV3.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:35 Warning : this file is machine gener...
uduki/hsQt
Qtc/Enums/Gui/QStyleOptionViewItemV3.hs
bsd-2-clause
2,747
0
18
509
572
288
284
48
1
module Propellor.Git.VerifiedBranch where import Propellor.Base import Propellor.Git import Propellor.PrivData.Paths import Utility.FileMode {- To verify origin branch commit's signature, have to convince gpg - to use our keyring. - While running git log. Which has no way to pass options to gpg. - Argh! -} verify...
ArchiveTeam/glowing-computing-machine
src/Propellor/Git/VerifiedBranch.hs
bsd-2-clause
1,743
14
15
301
406
199
207
36
1
{-# LANGUAGE OverloadedStrings #-} module Home ( homeView ) where import Control.Monad (forM_) import Lib import Text.Blaze.XHtml5 ((!)) import qualified Text.Blaze.XHtml5 as H import qualified Text.Blaze.XHtml5.Attributes as A homeView :: H.Html homeView = do H.head $ do H.title "GRE-1" H.b...
rubenpieters/gre-project
ui/src/Home.hs
bsd-3-clause
694
0
13
182
258
140
118
25
1
module Machines where import Turing readMachine :: String -> Machine readMachine = zip x . map f . words where x = concat [[(s, blankSymbol), (s, '1')] | s<-['A'..]] f [st, s, d] = (s, read [d], st) machines :: [Machine] machines = map (readMachine . fst) table table :: [(String, String)] table = [ (...
divipp/turing-music
Machines.hs
bsd-3-clause
3,538
0
14
1,067
701
387
314
55
1
module Main(main) where import Control.Exception (bracket_) import System.Environment (getArgs, getProgName) import System.IO (hSetEcho, hFlush, stdin, stdout) import Web.Zenfolio.API import qualified Web.Zenfolio.Photos.Upload as Upload import qualified Web.Zenfolio.Users as Users prompt :: String -> IO P...
md5/hs-zenfolio
examples/UploadPhoto.hs
bsd-3-clause
1,801
0
19
536
518
257
261
43
4
module Roguelike.AI.Class where import Control.Monad.Random import Roguelike.Event import Roguelike.Creature import Roguelike.Action import Roguelike.SubjectiveWorld class AI a where perceive :: MonadRandom m => SubjectiveWorld -> Creature -> a -> Event -> a action :: MonadRandom m => TurnStatus -> a -> Action
abbradar/roguelike
src/Roguelike/AI/Class.hs
bsd-3-clause
319
0
11
48
90
49
41
9
0
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE DeriveFunctor #-} module Types.Users ( UserInfo(..) , UserStatus(..) , Users -- constructor remains internal -- * Lenses created for accessing UserInfo fields , uiName, uiId, uiStatus, uiInTeam, uiNickName, uiFirstName, uiLastName, u...
aisamanra/matterhorn
src/Types/Users.hs
bsd-3-clause
7,234
0
17
1,753
1,502
842
660
-1
-1
{- - Hacq (c) 2013 NEC Laboratories America, Inc. All rights reserved. - - This file is part of Hacq. - Hacq is distributed under the 3-clause BSD license. - See the LICENSE file for more details. -} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE ...
ti1024/hacq
src/Data/Quantum/Gate.hs
bsd-3-clause
1,508
0
12
353
456
242
214
74
0
module Control.Concurrent.STM.ChunkedQueue ( -- * Simple Chunked Queue ChunkedQueue(..), consumeQueue, enqueueOne, enqueueMany, ) where import Data.Monoid -- | Abstract type representing a chunked queue. Acts as API for drainining -- queues. data ChunkedQueue a = ChunkedQueue [Chunk a] instan...
KholdStare/stm-chunked-queues
src/Control/Concurrent/STM/ChunkedQueue.hs
bsd-3-clause
1,207
0
11
255
439
231
208
25
3
module Language.SequentCore.WiredIn ( kontKindTyCon, kontTyCon, ubxExistsTyCon, mkKontKind, mkKontTy, mkUbxExistsTy, isKontKind, isKontKind_maybe, isKontTy, isKontTy_maybe, isUbxExistsTy, isUbxExistsTy_maybe, applyUbxExists, applyUbxExists_maybe, applysUbxExists_maybe, sequentCoreTag, sequentCoreWired...
pdownen/sequent-core
src/Language/SequentCore/WiredIn.hs
bsd-3-clause
4,087
0
11
750
972
531
441
82
1
{-# LANGUAGE OverloadedStrings #-} import Test.Hspec import Data.Text.Paragraph main :: IO () main = hspec spec spec :: Spec spec = do describe "left justify" $ do let go xs ys = justifyLeft 5 xs `shouldBe` ys it "doesnt affect short lines" (go "foo" "foo") it "retains ne...
mitchellwrosen/reddit-cli
test/Spec.hs
bsd-3-clause
854
0
14
286
204
95
109
17
1
{-# LANGUAGE RecordWildCards, DeriveDataTypeable #-} -- | Nix configuration module Stack.Config.Nix (nixOptsFromMonoid ,nixCompiler ,StackNixException(..) ) where import Control.Applicative import Control.Monad (join, when) import Data.Maybe import Data.Monoid.Extra import qualified Data.T...
phadej/stack
src/Stack/Config/Nix.hs
bsd-3-clause
2,575
0
16
535
657
343
314
55
4
module Test4b where import qualified Data.HashMap.Strict as H import qualified Data.Text as T import qualified Data.Text.IO as T import Data.List isAlpha ch = ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') wrds :: T.Text -> [ T.Text ] wrds bs = let (w, r2) = T.span isAlpha $ T.dropWhile (not . isAlpha)...
erantapaa/test-spelling
src/Test4b.hs
bsd-3-clause
689
0
15
183
316
167
149
19
2
-- Copyright : (C) 2009 Corey O'Connor -- License : BSD-style (see the file LICENSE) -- The current ghc compiler is not capable of solving some tests within a reasonable time. #define ONLY_SMALL_CASES 1 {-# LANGUAGE RankNTypes #-} import Bind.Marshal.Prelude import Bind.Marshal.Verify import qualified Contro...
coreyoconnor/bind-marshal
test/old_verify_data_model_proto.hs
bsd-3-clause
11,194
0
24
2,527
2,876
1,489
1,387
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} module Mismi.Autoscaling.Amazonka ( module AWS ) where import Network.AWS.AutoScaling as AWS
ambiata/mismi
mismi-autoscaling/src/Mismi/Autoscaling/Amazonka.hs
bsd-3-clause
146
0
4
33
22
16
6
4
0
{-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module ThemeSpec where import Test.Hspec import Graphics.HSD3.Chart import Graphics.HSD3.Theme import Utils spec :: Spec spec = describe "Themes" $ do ...
Soostone/hs-d3
test/suite/ThemeSpec.hs
bsd-3-clause
3,102
0
19
1,062
1,038
598
440
56
1
module Examples.Blog where import qualified Graphics.UI.Threepenny as UI import Graphics.UI.Threepenny.Core import Foundation.Common import Control.Applicative import Data.List (intersperse) import Data.IORef -- Nav Bar {{{ navBar :: IO Element navBar = row12ColClass [ navBarRight [ ("Link 1","#") , ...
kylcarte/threepenny-extras
src/Examples/Blog.hs
bsd-3-clause
2,695
0
15
703
849
454
395
73
1
{-# LANGUAGE OverloadedStrings #-} module Main ( main ) where import qualified Crypto.Hash.MD5 as MD5 import qualified Crypto.Hash.SHA1 as SHA1 import qualified Crypto.Hash.SHA256 as SHA2 import qualified Crypto.Hash.SHA3 as SHA3 import qualified Crypto.Hash.Skein256 as Skein import qualified Crypto.Hash.Tiger as Tige...
tsuraan/hs-blake2
benches/BenchAll.hs
bsd-3-clause
1,415
0
15
343
440
248
192
33
1
-- | Contains the main functions for interfacing with the engine. -- This can be thought of Helm's own Prelude. module Helm ( -- * Types Cmd(..) , Engine , GameLifecycle(..) , GameConfig(..) , Graphics(..) , Image , FPSLimit(..) , Sub(..) -- * Engine , run , defaultConfig ) where impo...
switchface/helm
src/Helm.hs
mit
8,593
0
14
1,944
1,674
902
772
-1
-1
{-# LANGUAGE ViewPatterns #-} module Builder.Sequence(newCornerPointsWith10DegreesBuilder, newCornerPointsWith5DegreesBuilder, newCornerPointsWithDegreesBuilder, (||@~+++^||), (@~+++#@|>), (@~+++@|>)) where import CornerPoints.CornerPointsWithDegrees(DegreeRange(..), CornerPointsWithDegrees(.....
heathweiss/Tricad
src/Builder/Sequence.hs
gpl-2.0
4,071
0
9
575
577
343
234
30
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-opsworks/gen/Network/AWS/OpsWorks/UpdateRDSDBInstance.hs
mpl-2.0
4,459
0
12
937
568
341
227
78
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-iam/gen/Network/AWS/IAM/DeleteSSHPublicKey.hs
mpl-2.0
3,948
0
9
758
445
272
173
63
1
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="id-ID"> <title>Aturan Aktif Pemindai | ZAP Eksistensi</title> <maps> <homeID>top</homeID> ...
veggiespam/zap-extensions
addOns/ascanrules/src/main/javahelp/org/zaproxy/zap/extension/ascanrules/resources/help_id_ID/helpset_id_ID.hs
apache-2.0
984
85
52
161
400
211
189
-1
-1
{-# LANGUAGE TupleSections #-} module PatHOCon where import CLaSH.Prelude topEntity :: Vec 8 (Unsigned 8) -> Vec 8 (Unsigned 4,Unsigned 8) topEntity = map (4,)
christiaanb/clash-compiler
tests/shouldwork/Vector/PatHOCon.hs
bsd-2-clause
162
0
8
27
59
32
27
-1
-1
{-# OPTIONS_HADDOCK hide #-} module Foundation.System.Bindings.Windows where
vincenthz/hs-foundation
foundation/Foundation/System/Bindings/Windows.hs
bsd-3-clause
82
0
3
12
9
7
2
2
0
module Solver (Solver,solvers) where import Common import qualified Vector as SV import qualified Vectorised as SPA import qualified Data.Vector as V import qualified Data.Vector.Unboxed as VU import qualified Data.Array.Parallel as P import...
mainland/dph
dph-examples/examples/spectral/Pluecker/Solver.hs
bsd-3-clause
967
4
10
249
429
235
194
27
1
-- Spark pool and fishing -- -- Visibility: HdpH, HdpH.Internal -- Author: Patrick Maier <P.Maier@hw.ac.uk> -- Created: 02 Jul 2011 -- ----------------------------------------------------------------------------- {-# LANGUAGE ScopedTypeVariables #-} -- req'd for type annotations module Control.Parallel.HdpH.Interna...
robstewart57/hdph-rs
src/Control/Parallel/HdpH/Internal/Sparkpool.hs
bsd-3-clause
28,112
9
28
7,564
5,573
2,855
2,718
462
7
{-# LANGUAGE ConstraintKinds, TypeFamilies, FlexibleContexts, DataKinds, GADTs, ScopedTypeVariables, FlexibleInstances, RecursiveDo, TemplateHaskell #-} module Reflex.Dom.Widget.Input (module Reflex.Dom.Widget.Input, def, (&), (.~)) where import Prelude import Reflex.Dom.Class import Reflex.Dom.Widget.Basic import R...
hamishmack/reflex-dom
src/Reflex/Dom/Widget/Input.hs
bsd-3-clause
11,905
0
20
2,722
3,078
1,577
1,501
202
2
----------------------------------------------------------------------------- -- | -- License : BSD-3-Clause -- Maintainer : Oleg Grenrus <oleg.grenrus@iki.fi> -- -- The API for underlying git commits of a Github repo, as described on -- <http://developer.github.com/v3/git/commits/>. module GitHub.Endpoints.GitD...
jwiegley/github
src/GitHub/Endpoints/GitData/Commits.hs
bsd-3-clause
706
0
8
102
117
68
49
8
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RankNTypes #-} module Bead.Controller.ServiceContext ( UsrToken , UserToken(..) , UserState(..) , StatusMessage(..) , statusMessage , userStateCata , userNotLoggedIn , userRole , getStatus , setStatus , clearStatus , usernameInState , InRole(.....
pgj/bead
src/Bead/Controller/ServiceContext.hs
bsd-3-clause
5,400
0
20
1,240
1,547
835
712
130
4
module LetIn2 where --A definition can be removed if it is not used by other declarations. --Where a definition is removed, it's type signature should also be removed. --In this Example: remove the defintion 'square' sumSquares x y = sq x + sq y sq x=x^pow where pow=2 anotherFun x =sumSquares x x
SAdams601/HaRe
old/testing/removeDef/LetIn2_TokOut.hs
bsd-3-clause
319
0
6
74
59
31
28
5
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeOperators #-} {- Playing with lens zippers, to understand how they can be used to manage a Data.Tree -} import Control.Applicative import Control.Lens....
RefactoringTools/HaRe
experiments/ZipperPlayLens.hs
bsd-3-clause
6,133
48
14
1,702
1,193
621
572
97
1
module HsPropPretty where import HsPropStruct import PrettyPrint import PrettySymbols as S import HsIdentPretty() --delta = kwIfUnicode '\x0394' "$" delta = "$" instance Printable Quantifier where ppi All = S.all ppi Exist = exist instance (Printable i,Printable pa,Printable pp) => Printable (PD i pa pp) where ...
forste/haReFork
tools/property/AST/HsPropPretty.hs
bsd-3-clause
2,666
2
15
781
1,147
553
594
67
4
{-# OPTIONS_GHC -Wall #-} module AST.Expression.Valid where import qualified AST.Expression.General as General import qualified AST.Pattern as Pattern import qualified AST.Type as Type import qualified AST.Variable as Var import qualified Reporting.Region as R {-| "Normal" expressions. When the compiler checks that ...
Axure/elm-compiler
src/AST/Expression/Valid.hs
bsd-3-clause
704
0
9
116
126
78
48
14
0
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE DataKinds #-} module MoreExplicitForalls where import Data.Proxy data family F1 a data instance forall (x :: Bool). F1 (Proxy x) = MkF class ...
sdiehl/ghc
testsuite/tests/hiefile/should_compile/hie010.hs
bsd-3-clause
510
1
9
114
159
88
71
-1
-1
module IncludeTest where import Test.QuickCheck import IncludeTest_Types import IncludedTest_Types import Util propToFoo = foo == roundTrip foo where foo = Foo { foo_Bar = 5, foo_Baz = 10 } roundTrip = to_Foo . from_Foo propDefaultFoo = default_Foo { foo_Baz = 1 } == bar_baz default_Bar main :: IO () ma...
getyourguide/fbthrift
thrift/lib/hs/tests/IncludeTest.hs
apache-2.0
394
0
8
73
110
63
47
11
1
module C2 where {-Unfold 'sq' should fail as 'pow', which is used in the definiton of 'sq' is not in scope. -} import D2 hiding (main,pow) sumSquares1 (x:xs) = sq x + sumSquares1 xs sumSquares1 [] = 0
kmate/HaRe
old/testing/unfoldDef/C2_TokOut.hs
bsd-3-clause
209
0
7
46
52
29
23
4
1
{-# LANGUAGE GADTs, MultiParamTypeClasses #-} module T14325 where class (a~b) => C a b foo :: C a b => a -> b foo x = x hm3 :: C (f b) b => b -> f b hm3 x = foo x
ezyang/ghc
testsuite/tests/typecheck/should_fail/T14325.hs
bsd-3-clause
167
0
8
47
89
45
44
-1
-1
{-# LANGUAGE FlexibleContexts #-} {- | Provides the primary functons for the storage system -} module Solar.Storage.Functions where import Solar.Data.KV as K import Solar.Storage.Types import Solar.Storage.Class import Control.Monad.Trans.RWS as R import Control.Monad....
Cordite-Studios/solar
solar-cells/Solar/Storage/Functions.hs
mit
1,717
0
11
553
492
257
235
35
1
module Control.Monad.Pool (WithResource, withResource, tryWithResource, runPooled, runDedicated) where import qualified Control.Monad.Trans.Pool as T import Data.Pool (Pool) newtype WithResource r a = WithResource (T.WithResource r a) runPooled :: WithResource r a -> Pool r -> IO a runPooled (WithResource m) = T.ru...
srijs/haskell-resource-pool-monad
src/Control/Monad/Pool.hs
mit
631
0
8
96
223
120
103
12
1
module Main(main) where import Text.Printf import Graphics.Gloss import Graphics.Gloss.Data.Vector import Data.List import Bezier data Rule = Rule Char String deriving (Show) newtype Axiom = Axiom String deriving (Show) newtype Angle = Angle Float deriving (Show) data LSystem = LSystem Angle Axiom [Rule] deriving (Sh...
thip/developing-fractal
Main.hs
mit
4,628
1
16
1,064
1,808
957
851
93
1
-- | Functions for producing RenderedCode values from PureScript Type values. module Language.PureScript.Docs.RenderedCode.Render ( renderType, renderTypeAtom, renderRow, renderKind, RenderTypeOptions(..), defaultRenderTypeOptions, renderTypeWithOptions ) where import Prelude () import P...
michaelficarra/purescript
src/Language/PureScript/Docs/RenderedCode/Render.hs
mit
5,472
0
16
1,128
1,684
881
803
124
8
import Control.Monad import Data.Matrix type Cell = Bool next :: Cell -> [Cell] -> Cell next True cs | neighbors < 2 = False | neighbors == 2 || neighbors == 3 = True | otherwise = False where neighbors = liveCount cs next False cs | liveCount cs == 3 = True | otherwise = F...
ajm188/conway
Conway.hs
mit
1,331
0
13
423
624
315
309
34
2
{-# LANGUAGE OverloadedStrings #-} module Iptf.Hosts.Internal where import Control.Applicative (pure) import Data.Changeable (Changeable (..)) import qualified Data.Map.Strict as Map import qualified Data.Set as S import Data.Text (Text) import Iptf...
werbitt/ip-to-file
src/Iptf/Hosts/Internal.hs
mit
3,479
0
11
961
1,235
635
600
69
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GADTs #-} module Web.Markury where import Web.Markury.Action.BookmarkAction import Web.Markury.Action.LoginAction import Web.Markury.Action.TagAction import Web.Markury.Action.UserAction import Web.Markury.Model.DB import Web.Markury.Model.Input import Control.Monad.Log...
y-taka-23/markury
src/Web/Markury.hs
mit
1,780
0
17
558
432
211
221
46
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Yesod.Default.Main ( defaultMain , defaultMainLog , defaultRunner , defaultDevelApp , LogFunc ) where import Yesod.Default.Config import Network...
tolysz/yesod
yesod/Yesod/Default/Main.hs
mit
4,453
0
19
1,014
945
520
425
87
1
-- | This file defines tests tree evaluation and parser functions. -- -- Author: Thorsten Rangwich. See file <../LICENSE> for details. -- -- This needs QuickCheck in at least version 2. Otherwise you have to replace QuickCheck2 with QuickCheck and -- either implement an instance for Arbitrary Char or leave out the st...
tnrangwi/grill
test/functional/test_EvalTrees.hs
mit
3,563
0
12
623
848
470
378
48
2
{-| Stability: experimental The functions here pretty-print numbers in a compact format. Examples: >>> showSciRational (-0.0e+3) -- result: "0" >>> showSciRational (0.25e+2) -- result: "25" >>> showSciRational (-1.0e-1) -- result: "-.1" >>> showSciRational (5.0e+20 / 6) -- result: "2.5e20...
Rufflewind/sci-ratio
src/Data/SciRatio/Show.hs
mit
4,126
0
14
985
764
408
356
56
4
to_tens :: Integer -> [Integer] to_tens 0 = [] to_tens n = to_tens (n `div` 10) ++ [n `mod` 10] is_num_valid 1 = False is_num_valid num = let tens = to_tens num in (sum $ map (\x -> x^5) tens) == num
stefan-j/ProjectEuler
q30.hs
mit
223
2
13
65
116
61
55
6
1
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} module FruRein ( fruRein , FruRein ) where import Control.Monad.Random import qualified Data.Map.Strict as M import Graph (vertices, Graph, Vertex(..), neighbors) import Tutte (ForceAlgo(..)) type Map = M.Map type R = Float type Vector2 = (R...
j-rock/tutte-your-stuff
src/FruRein.hs
mit
3,348
0
18
1,158
1,320
707
613
97
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-relationaldatabaseconfig.html module Stratosphere.ResourceProperties.AppSyncDataSourceRela...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/AppSyncDataSourceRelationalDatabaseConfig.hs
mit
2,939
0
13
212
260
150
110
29
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-ebsconfiguration.html module Stratosphere.ResourceProperties.EMRInstanceGroupConfigEbsConfiguration where...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EMRInstanceGroupConfigEbsConfiguration.hs
mit
2,530
0
12
205
265
154
111
28
1
{-# LANGUAGE TemplateHaskell, TypeSynonymInstances, FlexibleInstances #-} module Test where import Infernu.Types main :: IO () main = do res <- runAllTests print res return ()
sinelaw/infernu
test/Test.hs
gpl-2.0
185
0
8
34
46
23
23
8
1
{- Haskell implementation of cat http://linux.die.net/man/1/cat -} module Main where import System.Environment(getArgs) printFile :: FilePath -> IO () printFile filePath = readFile filePath >>= putStrLn main:: IO () main = getArgs >>= mapM_ printFile
huseyinyilmaz/hs-gnu-core-utils
src/cat.hs
gpl-2.0
255
0
7
38
66
35
31
6
1
module Text.Pit ( module Text.Pit.Types, module Text.Pit.Lexer, module Text.Pit.Parser, module Text.Pit.Unification, module Text.Pit.Sld, ) where import Text.Pit.Types import Text.Pit.Lexer import Text.Pit.Parser import Text.Pit.Unification import Text.Pit.Sld
ShabbyX/pit
src/Text/Pit.hs
gpl-2.0
310
0
5
74
74
51
23
11
0
module IO.KeyInput where --Standard libraries import System.Exit (exitSuccess) --Avoid conflicts with the Direction data type. import Prelude hiding (Left,Right) import qualified Graphics.UI.SDL as SDL import qualified Character.Player as P import qualified Character.Actor as A import qualified GameState.GameState a...
MortimerMcMire315/rogue_nads
src/IO/KeyInput.hs
gpl-3.0
3,305
0
13
687
691
374
317
41
7
{- This file is part of PhoneDirectory. Copyright (C) 2009 Michael Steele PhoneDirectory is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any lat...
mikesteele81/Phone-Directory
src/TestPriority.hs
gpl-3.0
1,086
0
9
206
80
44
36
12
1
module Chap06.Data.Sortable where class Sortable s where empty :: Ord a => s a add :: Ord a => a -> s a -> s a sort :: Ord a => s a -> [a]
stappit/okasaki-pfds
src/Chap06/Data/Sortable.hs
gpl-3.0
151
0
10
47
79
39
40
5
0
{-# LANGUAGE NoMonomorphismRestriction #-} import XMonad import XMonad.Actions.GridSelect import XMonad.Util.EZConfig myGsconfig = (buildDefaultGSConfig colorizer) { gs_cellheight = 30 , gs_cellwidth = 350 , gs_font = fontXft } where colorizer = colorRangeFromClassNam...
c0c0n3/archlinux
mactop/_root_/home/andrea/.xmonad/xmonad.hs
gpl-3.0
2,564
0
11
1,020
379
238
141
39
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Services/List.hs
mpl-2.0
6,235
0
21
1,635
1,043
601
442
146
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/Returnlineitem.hs
mpl-2.0
3,827
0
15
877
483
287
196
73
1
module Affection.MessageBus.Message.MouseMessage ( MouseMessage(..) -- | SDL reexports , SDL.Window , SDL.MouseDevice , SDL.MouseButton , SDL.InputMotion , SDL.MouseScrollDirection ) where import Affection.MessageBus.Message.Class import Data.Word (Word8) import Data.Int (Int32) import qualified SDL ...
nek0/affection
src/Affection/MessageBus/Message/MouseMessage.hs
lgpl-3.0
1,994
0
10
541
366
224
142
39
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE ScopedTypeVariables #-} {- Copyright 2019 The CodeWorld Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance wi...
pranjaltale16/codeworld
codeworld-compiler/src/CodeWorld/Compile/Stages.hs
apache-2.0
13,079
0
18
2,874
3,309
1,707
1,602
235
4
{- | Pipelining is sending multiple requests over a socket and receiving the responses later in the same order (a' la HTTP pipelining). This is faster than sending one request, waiting for the response, then sending the next request, and so on. This implementation returns a /promise (future)/ response for each request ...
selectel/mongoDB-haskell
System/IO/Pipeline.hs
apache-2.0
5,494
0
14
1,157
874
459
415
67
4
{-# LANGUAGE CPP #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE DeriveDataTypeable, DeriveGeneric, GADTs, RecordWildCards #-} {-# OPTIONS_GHC -funbox-strict-fields #-} -- | -- Module : Criterion.Types -- Copyright : (c) 2009-2014 Bryan O'Sullivan -- -- License : BSD-style -- Maint...
bgamari/criterion
Criterion/Types.hs
bsd-2-clause
31,745
0
16
7,846
5,220
2,917
2,303
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS -Wall #-} ---------------------------------------------------------------------- -- | -- Module : Data.ZoomCache.PCM.Enumeratee -- Copyright : Conrad Parker -- License : BSD3-style (see LICENSE) -- -- Maintainer : Conrad Parker <...
kfish/zoom-cache-pcm
Data/ZoomCache/PCM/Enumeratee.hs
bsd-2-clause
10,562
0
15
3,797
3,519
1,769
1,750
157
1
{-| Module: HaskHOL.Lib.Haskell.A.Base Copyright: (c) The University of Kansas 2013 LICENSE: BSD3 Maintainer: ecaustin@ittc.ku.edu Stability: unstable Portability: unknown -} module HaskHOL.Lib.Haskell.A.Base where import HaskHOL.Core import HaskHOL.Math tyDefIdentity' :: MathCtxt thry => HOL The...
ecaustin/haskhol-haskell
src/HaskHOL/Lib/Haskell/A/Base.hs
bsd-2-clause
1,384
0
7
264
297
168
129
-1
-1
-- | Representation and computation of visiblity of atomic commands -- by clients. -- -- See -- <https://github.com/LambdaHack/LambdaHack/wiki/Client-server-architecture>. module Game.LambdaHack.Atomic.PosAtomicRead ( PosAtomic(..), posUpdAtomic, posSfxAtomic, iidUpdAtomic, iidSfxAtomic , breakUpdAtomic, lidOfPos, ...
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Atomic/PosAtomicRead.hs
bsd-3-clause
21,199
0
18
4,929
6,058
3,018
3,040
381
58