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
-- Joe Jevnik -- 21.9.2013 -- Experiment with threading to do checks. -- Poor performance unfortunatly. import Control.Monad (mapM_) import Control.Concurrent (runInBoundThread) main :: IO () main = mapM_ (runInBoundThread . fizz_buzz) [1..100] where fizz_buzz :: Int -> IO () fizz_buzz n | n `...
llllllllll/fizzbuzz
haskell/forkingfizz.hs
gpl-2.0
521
0
11
166
160
83
77
10
1
module Main where import System.Environment import PlayingWindow import LevelBuilder import LevelParser main = do args <- getArgs case args of {-[width, height] -> showWindow createRandom (read width) (read height)-} [fileName] -> do objects <- createFro...
NemoNessuno/Haskmose
HaskMose.hs
gpl-2.0
428
0
13
153
72
37
35
12
2
{-# OPTIONS_GHC -Wall -fwarn-tabs -Werror #-} ------------------------------------------------------------------------------- -- | -- Module : App -- Copyright : Copyright (c) 2014 Michael R. Shannon -- License : GPLv2 or Later -- Maintainer : mrshannon.aerospace@gmail.com -- Stability : unstable --...
mrshannon/trees
src/App.hs
gpl-2.0
2,856
0
9
957
747
380
367
67
1
{- as3tohaxe - An Actionscript 3 to haXe source file translator Copyright (C) 2008 Don-Duong Quach 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,...
geekrelief/as3tohaxe
Parseit.hs
gpl-3.0
1,154
0
10
290
113
54
59
11
2
module Data.XDR.PrettyPrintJava ( ppJava ) where import Control.Monad import Data.Char import Data.List import Data.Map (Map) import qualified Data.Map as M import Data.Maybe import Data.XDR.AST import Data.XDR.PPKeywords import Data.XDR.PPUtils import Text.PrettyPrint.Leijen as PP hiding (braces, indent) -- ...
jthornber/xdrgen
Data/XDR/PrettyPrintJava.hs
gpl-3.0
15,212
0
23
4,001
5,814
2,981
2,833
386
5
module Main where import Data.List -- задача 1 quickSort [] = [] quickSort (x:xs) = quickSort lesser ++ [x] ++ quickSort greater where lesser = filter (<=x) xs greater = filter (>x) xs multisetSum a b = quickSort (a ++ b) count elem lst = length (filter (==elem) lst) concat_ ll = foldr (++) [] ...
antonpetkoff/learning
haskell/fmi-fp/61793_exam2.hs
gpl-3.0
2,218
0
12
438
960
522
438
41
1
{-# LANGUAGE FlexibleContexts, NoMonomorphismRestriction #-} module Main where import Control.Monad import Control.Monad.Identity import Control.Monad.State import Data.Char import Data.List ((\\)) {- Let us look at parsing a few simple formal languages. Our goal is to first recognize them and then, if possible, ext...
Tuplanolla/ties341-parsing
ParsenatorComments.hs
gpl-3.0
3,144
0
6
693
66
43
23
9
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/GetPasswordData.hs
mpl-2.0
5,157
0
11
1,153
654
396
258
74
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/ConsentStores/Consents/Patch.hs
mpl-2.0
7,602
0
17
1,491
870
512
358
135
1
module Main where import Prelude hiding ((++)) import Control.Monad import Control.Exception import System.IO import System.IO.Error import qualified Data.Text.Encoding as T import System.Posix.ByteString import System.Exit hiding (die) import System.Console.CmdArgs.Explicit import ByteString (ByteString) import qu...
kinoru/wild
src/Main.hs
agpl-3.0
4,793
0
21
1,396
1,523
762
761
-1
-1
{- - This file is part of Bilder. - - Bilder is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Bilder i...
ingemaradahl/bilder
src/Compiler/Utils.hs
lgpl-3.0
17,332
0
12
3,856
9,020
4,497
4,523
288
6
{-# LANGUAGE BangPatterns, OverloadedStrings #-} -- -- Copyright : (c) T.Mishima 2014 -- License : Apache-2.0 -- module Hinecraft.Rendering.WithBasicShader ( BasicShaderProg , makeBasicShdrVAO , orthoProjMatrix , setLightMode , setColorBlendMode , setModelMatrix , setMVPMatrix , setTMatrix , setShado...
tmishima/Hinecraft
Hinecraft/Rendering/WithBasicShader.hs
apache-2.0
6,358
0
14
1,610
1,851
918
933
154
1
module RayCaster ( Camera(..) , Config(..) , Light(..) , Material(..) , Object(..) , Scene(..) , Shape(..) , Vector(..) ) where import RayCaster.Camera (Camera (..)) import RayCaster.DataTypes (Config (..), Light (..), Material (..), Object...
bkach/HaskellRaycaster
src/RayCaster.hs
apache-2.0
440
0
6
150
146
100
46
14
0
module PrettyJSON where import SimpleJSON import PrettyStub renderJSON :: JValue -> Doc renderJSON (JBool True) = text "true"
EricYT/Haskell
src/real_haskell/chapter-5/PrettyJSON.hs
apache-2.0
129
0
7
21
36
20
16
5
1
-- |Environment test cases. The .js files in the environment directory are -- parsed as: -- -- tests ::= test ; -- | ; -- | test ; tests -- -- test ::= ( identifier * ) function-expression -- -- function-expression is defined in TypedJavaScript.Parser. Each test -- lists the the local variables of the...
brownplt/strobe-old
tests/Environment.hs
bsd-2-clause
2,164
0
15
405
444
237
207
33
2
-- | This module provides transition semantics for the SIMPLE language module Language.SIMPLE.TransitionSemantics ( isRedex ,reduceExpr ,reduceSequenceOfExpr ,runExprMachine ,isReducible ,reduceStm ,reduceSequenceOfStm ,runMachine ) where import Control.Applicative import Text.PrettyPrint import Lan...
nobsun/hs-uc
src/Language/SIMPLE/TransitionSemantics.hs
bsd-3-clause
9,218
2
14
2,423
1,928
1,021
907
92
8
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DataKinds #-} module Hardware.KansasLava.Boards.Papilio.LogicStart ( Model(..) -- * Class for the methods of the Spartan3e , LogicStart(..) -- * Initialization, and global settings. , clockRate , board_init , toUCF ...
gergoerdi/kansas-lava-papilio
src/Hardware/KansasLava/Boards/Papilio/LogicStart.hs
bsd-3-clause
4,322
0
13
978
927
502
425
72
2
{-# LANGUAGE UnicodeSyntax #-} module Stat.Base ( dirStat , getFileSystemStats , contentsFileStat , fileStat ) where import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as B import System.Fuse import System.Posix.Files -- for file mode...
marklar/TagFS
src/Stat/Base.hs
bsd-3-clause
3,336
0
8
1,458
460
281
179
58
1
{- Copyright 2013-2019 Mario Blazevic License: BSD3 (see BSD3-LICENSE.txt file) -} -- | This module defines the monoid transformer data type 'Measured'. -- {-# LANGUAGE Haskell2010 #-} module Data.Monoid.Instances.Measured ( Measured, measure, extract ) where import Data.Functor -- ((<$>)) import q...
blamario/monoid-subclasses
src/Data/Monoid/Instances/Measured.hs
bsd-3-clause
5,700
0
13
1,351
2,252
1,178
1,074
90
1
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses #-} module NginxUpdater where import Data.Maybe import Debug.Trace import Data.List import System.Directory import System.IO import System.Process import Text.Regex type AppName = String data DeployInfo = DeployInfo { identifier :: In...
scslab/appdeploy
src/NginxUpdater.hs
bsd-3-clause
5,876
0
23
1,987
1,283
611
672
114
1
{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE ForeignFunctionInterface #-} -- | -- Module : Crypto.Encrypt.SecretBox -- Copyright : (c) Austin Seipp 2011-2013 -- License : BSD3 -- -- Maintainer : aseipp@pobox.com -- Stability : experimental -- Portability : portable -- -- Authenticated secret-key...
thoughtpolice/hs-nacl
src/Crypto/Encrypt/SecretBox.hs
bsd-3-clause
5,406
0
19
1,298
778
442
336
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE LambdaCase, OverloadedStrings #-} module Model ( Step(..) , MaybeStep(..) , MatchAlgo(..) , nextStep , undo , context , suggest , setCurrentComment , getCurrentComment , setTransactionComment ...
rootzlevel/hledger-add
src/Model.hs
bsd-3-clause
16,417
0
17
3,490
4,320
2,210
2,110
270
6
----------------------------------------------------------------------------- -- -- Module : Main -- Copyright : Copyright (c) 2015 Artem Tsushko -- License : BSD3 -- -- Maintainer : Artem Tsushko <artemtsushko@gmail.com> -- Stability : provisional -- -- | -- -----------------------------------------...
artemtsushko/matching-files-copier
test/Main.hs
bsd-3-clause
467
0
6
79
50
34
16
5
1
-- 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.AmountOfMoney.HR.Corpus ( corpus ) where import Data.Stri...
facebookincubator/duckling
Duckling/AmountOfMoney/HR/Corpus.hs
bsd-3-clause
3,564
0
10
1,593
644
368
276
98
1
{-# LANGUAGE CPP, RecordWildCards, BangPatterns #-} {-# OPTIONS_HADDOCK not-home #-} #ifdef __GLASGOW_HASKELL__ {-# LANGUAGE Trustworthy #-} {-# LANGUAGE InterruptibleFFI #-} #endif ----------------------------------------------------------------------------- -- | -- Module : System.Process.Internals -- Copyrigh...
DavidAlphaFox/ghc
libraries/process/System/Process/Internals.hs
bsd-3-clause
28,555
0
32
7,388
2,853
1,598
1,255
126
2
module Data.Connection where import qualified Data.ByteString as B import qualified Data.ByteString.Lazy.Internal as L import qualified System.IO.Streams as S -- | A simple connection abstraction. -- -- 'Connection' s from this package are supposed to have following properties: -- -- * 'S.InputStre...
didi-FP/tcp-streams
Data/Connection.hs
bsd-3-clause
2,248
0
12
508
129
94
35
9
0
{-# LANGUAGE FlexibleInstances #-} import Music.Prelude import qualified Data.Interval as I import qualified TypeUnary.Nat class Display a where display :: a -> IO () display = open . displayS displayS :: a -> Score StandardNote displayS = error "Not implemnented: displayS" instance Display Pitch where ...
music-suite/music-preludes
sketch/display.hs
bsd-3-clause
2,404
0
11
467
869
458
411
55
3
{-# LANGUAGE Trustworthy, TypeOperators, ScopedTypeVariables, BangPatterns, PolyKinds, DataKinds, ConstraintKinds, RankNTypes, TypeFamilies, MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts, FlexibleInstances, UndecidableInstances #-} module Type.BST.BST ( -- * BST, Recor...
Kinokkory/type-level-bst
src/Type/BST/BST.hs
bsd-3-clause
33,231
0
15
8,085
11,504
6,047
5,457
-1
-1
{-# LANGUAGE TypeSynonymInstances, PatternGuards #-} {-| This module is for working with HTML/XML. It deals with both well-formed XML and malformed HTML from the web. It features: * A lazy parser, based on the HTML 5 specification - see 'parseTags'. * A renderer that can write out HTML/XML - see 'ren...
nfjinjing/yuuko
src/Text/HTML/TagSoup.hs
bsd-3-clause
3,702
0
12
949
908
497
411
51
5
{-# LANGUAGE TemplateHaskell, EmptyDataDecls, FlexibleContexts, OverlappingInstances #-} {-# LANGUAGE FlexibleInstances ,TypeSynonymInstances, TypeFamilies, TypeOperators #-} module Main where import Generics.Instant import Language.Haskell.TH import Generics.Instant.Derive data Expr = N Int | V String ...
konn/derive-IG
example/count.hs
bsd-3-clause
1,493
0
8
326
615
315
300
41
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} -------------------------------------------------------------------------------- -- | -- Module: HipChat.Types -- Descr...
mjhopkins/hipchat
src/HipChat/Types.hs
bsd-3-clause
2,267
0
9
412
330
202
128
45
0
{-# LANGUAGE OverloadedStrings #-} module Trombone.Dispatch.NodeJs ( dispatchNodeJs ) where import Control.Applicative import Control.Monad import Control.Monad.IO.Class ( liftIO ) import Data.Aeson import Data.ByteString ( ByteString ) import Data.Text...
johanneshilden/trombone
Trombone/Dispatch/NodeJs.hs
bsd-3-clause
1,253
0
16
368
296
161
135
30
2
{-# LANGUAGE DeriveDataTypeable #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Language.Logo.Exception -- Copyright : (c) 2013-2016, the HLogo team -- License : BSD3 -- Maintainer : Nikolaos Bezirgiannis <bezirgia@cwi.nl> -- Stability : experimental -- -- The exception handling of the ...
bezirg/hlogo
src/Language/Logo/Exception.hs
bsd-3-clause
3,145
0
10
620
447
267
180
37
1
module Lib ( mainWindowTitle ) where mainWindowTitle :: String mainWindowTitle = "Horbits"
chwthewke/horbits2
src/Lib.hs
bsd-3-clause
100
0
4
21
19
12
7
4
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} module Language.Fixpoint.Types.PrettyPrint where import Debug.Trace (trace) import Text.Parsec import Text.PrettyPrint.HughesPJ import qualified Text.PrettyPrint.Boxes as B import qualified Data.HashMap....
gridaphobe/liquid-fixpoint
src/Language/Fixpoint/Types/PrettyPrint.hs
bsd-3-clause
4,468
0
11
1,099
1,735
911
824
109
1
{-# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances, EmptyDataDecls , DataKinds , KindSignatures, TypeFamilies #-} module Data.Shapely.Bool where -- Probably keep private for now, as with Data.Shapely.Category -- Again, these borrowed from Oleg's HList work type family And (a :: Bool)...
jberryman/shapely-data
src/Data/Shapely/Bool.hs
bsd-3-clause
846
0
6
161
189
120
69
15
0
{- arch-tag: log4j XMLLayout log handler Copyright (C) 2007-2008 John Goerzen <jgoerzen@complete.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at ...
abuiles/turbinado-blog
tmp/dependencies/hslogger-1.0.6/src/System/Log/Handler/Log4jXML.hs
bsd-3-clause
9,350
0
18
2,474
1,093
580
513
-1
-1
module Database.Persist.Sql.Raw where import Control.Exception (throwIO) import Control.Monad (liftM, when) import Control.Monad.IO.Class (MonadIO, liftIO) import Control.Monad.Logger (logDebugNS, runLoggingT) import Control.Monad.Reader (MonadReader, ReaderT, ask) import Control.Monad.Trans.Resource (MonadResource, r...
paul-rouse/persistent
persistent/Database/Persist/Sql/Raw.hs
mit
10,187
54
20
3,033
1,775
972
803
-1
-1
{-# LANGUAGE TypeFamilies, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, RankNTypes, ScopedTypeVariables, StandaloneDeriving #-} {-| Module : Control.Monad.Module.IdealCoproduct Copyright : (c) 2015 Maciej Piróg License...
maciejpirog/modules-over-monads
src/Control/Monad/Module/IdealCoproduct.hs
mit
10,943
43
19
2,441
4,206
2,144
2,062
168
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/DeleteInstance.hs
mpl-2.0
4,242
0
9
866
501
304
197
61
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} module Stack.PackageDump ( Line , eachSection , eachPair , DumpPa...
rubik/stack
src/Stack/PackageDump.hs
bsd-3-clause
16,527
1
27
5,401
4,229
2,162
2,067
-1
-1
----------------------------------------------------------------------------- -- | -- Module : System.Mem -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : provisional -- Portability ...
FranklinChen/hugs98-plus-Sep2006
packages/base/System/Mem.hs
bsd-3-clause
766
2
7
117
70
50
20
3
0
{-# LANGUAGE TransformListComp #-} ----------------------------------------------------------------------------- -- | -- Module : Haddock.Backends.Html.Decl -- Copyright : (c) Simon Marlow 2003-2006, -- David Waern 2006-2009, -- Mark Lentczner 2010 -- License : B...
DavidAlphaFox/ghc
utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
bsd-3-clause
39,215
0
22
10,327
11,664
5,910
5,754
613
9
{-# LANGUAGE BangPatterns, CPP, MagicHash #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Trustworthy #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Data.Binary.Builder.Base -- Copyright : Lennart Kolmodin, Ross Paterson -- License : BSD3-style (see...
fpco/binary
src/Data/Binary/Builder/Base.hs
bsd-3-clause
17,914
0
15
4,249
3,575
2,002
1,573
227
2
import Test.HUnit (Assertion, (@=?), runTestTT, Test(..), Counts(..)) import System.Exit (ExitCode(..), exitWith) import Series (digits, slices, largestProduct) exitProperly :: IO Counts -> IO () exitProperly m = do counts <- m exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else ExitSu...
pminten/xhaskell
largest-series-product/largest-series-product_test.hs
mit
1,764
0
12
359
709
388
321
40
2
{-# LANGUAGE CPP #-} module TypeUtilsSpec (main, spec) where import Test.Hspec import TestUtils import qualified GHC.SYB.Utils as SYB import qualified GHC as GHC import qualified GhcMonad as GHC import qualified Name as GHC import qualified RdrName as GHC import qualifi...
RefactoringTools/HaRe
test/TypeUtilsSpec.hs
bsd-3-clause
179,467
548
41
46,279
34,856
17,455
17,401
-1
-1
module ListProp where import List assert ElemProp = {-#cert:Alfa_ElemProp#-} All y . All xs . All ys . True {y `elem` ys} ==> True {y `elem` (xs++ys)} property Reflexive = {| op | All x . True {op x x} |} assert NubByProp = {-#cert:Alfa_NubByProp#-} All eq . Reflexive {eq} ==> All x . {nubBy eq [x,x]} === {[x]} ...
forste/haReFork
tools/hs2alfa/tests/ListProp.hs
bsd-3-clause
537
16
12
109
263
153
110
-1
-1
{-# LANGUAGE PatternSynonyms #-} module T15517 where data Nat = Z | S Nat pattern Zpat = Z sfrom :: Nat -> () -> Bool sfrom Zpat = \_ -> False sfrom (S Z) = \_ -> False
sdiehl/ghc
testsuite/tests/simplCore/should_compile/T15517.hs
bsd-3-clause
173
0
7
42
72
40
32
7
1
import Test.Cabal.Prelude -- NB: cabal-install doesn't understand --dependency main = setupTest $ do skipUnless =<< ghcVersionIs (>= mkVersion [8,1]) withPackageDb $ do withDirectory "sigs" $ setup_install_with_docs ["--cid", "sigs-0.1.0.0", "lib:sigs"] withDirectory "indef" $ setup_install_with_doc...
themoritz/cabal
cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-explicit.test.hs
bsd-3-clause
396
0
13
57
94
49
45
6
1
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import Data.ByteString.Char8 import ServantBench import Hasql.Connection (settings) import System.Environment (getArgs) main :: IO () main = do [host] <- getArgs run 7041 $ dbSettings (pack host) dbSettings :: ByteString -> ByteString dbSettings host ...
ashawnbandy-te-tfb/FrameworkBenchmarks
frameworks/Haskell/servant/driver/Main.hs
bsd-3-clause
391
0
10
57
111
60
51
13
1
module Spear.Math.Collision ( CollisionType(..) -- * 2D Collision , Collisionable2(..) , Collisioner2(..) -- ** Construction , aabb2Collisioner , circleCollisioner , mkCols -- ** Collision test , collide -- ** Manipulation , move -- ** Helpers , buildAABB2 , aab...
jeannekamikaze/Spear
Spear/Math/Collision.hs
mit
8,614
6
15
2,968
2,673
1,402
1,271
161
2
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, FlexibleInstances #-} -- | If you are interested in the IHaskell library for the purpose of augmenting the IHaskell -- notebook or writing your own display mechanisms and widgets, this module contains all functions -- you need. -- -- In order to create a display mecha...
gibiansky/IHaskell
src/IHaskell/Display.hs
mit
6,523
1
10
1,266
997
582
415
102
1
------------------------------------------------------------------------------- -- | -- Module : System.Hardware.Arduino.SamplePrograms.Counter -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Demonstrates using two push-buttons to c...
aufheben/lambda-arduino
packages/hArduino-0.9/System/Hardware/Arduino/SamplePrograms/Counter.hs
mit
1,929
0
15
536
270
151
119
22
4
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Hadoop.Protos.DataTransferProtos.Status (Status(..)) where import Prelude ((+), (/), (.)) import qualified Prelude as Prelude' import qualified Data.Typeable as Prel...
alexbiehl/hoop
hadoop-protos/src/Hadoop/Protos/DataTransferProtos/Status.hs
mit
4,920
0
11
858
1,272
701
571
111
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-dnsconfig.html module Stratosphere.ResourceProperties.ServiceDiscoveryServiceDnsConf...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/ServiceDiscoveryServiceDnsConfig.hs
mit
2,989
0
13
258
359
207
152
34
1
:set prompt "" :module Sound.Tidal.Context let newStream = stream "127.0.0.1" 7771 dirt d1 <- newStream d2 <- newStream d3 <- newStream d4 <- newStream d5 <- newStream d6 <- newStream d7 <- newStream d8 <- newStream d9 <- newStream (cps, getNow) <- bpsUtils let bps x = cps (x/2) let hush = mapM_ ($ silence) [d1,d2...
santolucito/atom-hasklive
lib/BootTidal.hs
mit
387
16
7
71
181
98
83
-1
-1
{-# LANGUAGE LambdaCase #-} module Main ( main ) where import Control.Concurrent import Control.Concurrent.Async import Control.Exception import Control.Monad import System.IO import System.Random {- for some not-yet-explained reason, restarting a looping thread outside of errHandler doesn't seem to be rel...
Javran/misc
thread-exception-tests/src/Main.hs
mit
1,495
0
16
353
320
158
162
29
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE RecordWildCards #-} module Crypto.Sodium.Hash.Internal where import Crypto.Sodium.Internal (constantTimeEq, mkHelper) import Control.Monad (void) import Data.ByteString (ByteString) import qualified...
dnaq/crypto-sodium
src/Crypto/Sodium/Hash/Internal.hs
mit
1,543
0
14
531
390
226
164
32
1
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeFamilies #-} module Data.Monoid.Colorful.Nested ( Style(..) , Color(..) , Term(..) , Colored(..) , hGetTerm , getTerm , hPrintColored , printColored , hPri...
minad/colorful-monoids
src/Data/Monoid/Colorful/Nested.hs
mit
3,579
0
12
868
1,444
761
683
97
7
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Betfair.StreamingAPI.Types.RequestStatus ( RequestStatus(..) ) where import Data.Aeson.TH ...
joe9/streaming-betfair-api
src/Betfair/StreamingAPI/Types/RequestStatus.hs
mit
650
0
9
142
108
67
41
17
0
module SyntaxTreeDetails ( SyntaxTreeWithEOF , syntaxTreeWithoutEOF , simplifySyntaxTree ) where import GrammarDetails ( TerminalsAndEOF(..), ProductionNamesAndStart(..) ) import Grammar import SyntaxTree import Error import Token import Helpers ( maybeToEither ) import Control.Applicative ( (<$>) ) i...
mrwonko/wonkococo
wcc/SyntaxTreeDetails.hs
mit
7,619
0
15
1,406
1,577
801
776
116
4
{-# LANGUAGE OverloadedStrings #-} module Internal.Colors where -- import Data.Word (Word8(..)) import Linear.V4 (V4 (..)) -- clrWhite, clrBlack :: V4 Word8 clrLGray, clrGray :: V4 Word8 clrRed, clrOrange :: V4 Word8 clrYellow, clrGreen :: V4 Word8 clrBlue, clrIndigo :: V4 Word8 clrPurple, clrPink :: V4 Word8 --...
Pixelgebra/tilepin
src/Internal/Colors.hs
mit
699
0
6
180
268
148
120
22
1
fib 0 = 1 fib 1 = 1 fib n = fib (n-1) + fib (n-2) main = do putStrLn "N = " line <- getLine let n = read line putStrLn $ show (fib n)
folivetti/PI-UFABC
AULA_03/Haskell/Fibonacci.hs
mit
163
0
10
65
97
44
53
8
1
import Data.List import Data.Digits import Data.Numbers.Primes import qualified Data.Map as Map import qualified Data.Set as Set below _ [] = [] below max (x:xs) = if (x < max) then [x] ++ (below max xs) else (below max xs) -- get content of list below max and stop (when list is growing) belowStop :: Integral a => a ...
gumgl/project-euler
35/35.hs
mit
1,166
0
9
231
512
274
238
26
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-kernelcapabilities.html module Stratosphere.ResourceProperties.ECSTaskDefinitionKernelCapa...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/ECSTaskDefinitionKernelCapabilities.hs
mit
2,169
0
12
205
264
151
113
27
1
import Distribution.MacOSX import Distribution.Simple main :: IO () main = defaultMainWithHooks $ simpleUserHooks { postBuild = appBundleBuildHook guiApps -- no-op if not MacOS X } guiApps :: [MacApp] guiApps = [MacApp "jsaddle-hello-wkwebview" Nothing (Just "macos/...
ghcjs/jsaddle-hello
Setup.hs
mit
498
0
8
170
84
47
37
12
1
module JVM.State where -- $Id$ import JVM.Type import JVM.Memory import Machine.History import Autolib.ToDoc import Autolib.FiniteMap import Data.Array import Data.Typeable data State = State { schritt :: Int , code :: Array Int Statement , pc :: Int , stack :: [ Integer ] , memory :: Me...
florianpilz/autotool
src/JVM/State.hs
gpl-2.0
923
12
14
273
319
169
150
28
0
module ListManipulation where -- foldl :: (a -> b -> a) -> a -> [b] -> a -- foldl :: ([[a]] -> b -> [[a]]) -> [[a]] -> [b] -> [[a]] pack :: Eq a => [a] -> [[a]] pack list = foldl (\ l e -> case l of [[]] -> [[e]] (x:xs):ys -> if x == e then (e:x:xs):ys else [e]:(x:xs):...
ardumont/haskell-lab
src/ListManipulation.hs
gpl-2.0
421
0
16
137
151
85
66
6
3
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Supply (Supply , next , runSupply, getSupply) where import Control.Monad.State newtype Supply s a = S (State [s] a) deriving(Monad) next = S $ do st <- get case st of [] -> return Nothing (x:xs) ->...
dservgun/haskell_test_code
src/Supply.hs
gpl-2.0
493
0
15
200
172
90
82
15
2
-- file doctests.hs -- Main for doctests. Run it as a normal haskell code. import Test.DocTest main = doctest ["-isrc", "PassGen.hs"]
salmonix/Haskell_smallities
PassGen/DocTest.hs
gpl-3.0
146
0
6
33
22
13
9
2
1
module Snail (snail) where type Matrix = [[Integer]] goRight :: Matrix -> [Integer] goRight = head goDown :: Matrix -> [Integer] goDown = tail . map last rotate :: Matrix -> Matrix rotate = reverse . map reverse submatrix :: Matrix -> Matrix submatrix = tail . map init snail :: Matrix -> [Integer] snail [] = [] s...
luinix/haskell_snail
Snail.hs
gpl-3.0
438
0
10
92
213
114
99
15
1
{- ============================================================================ | Copyright 2010 Matthew D. Steele <mdsteele@alum.mit.edu> | | | | This file is part of Pylos. | ...
mdsteele/pylos
src/Pylos/State.hs
gpl-3.0
3,646
0
15
1,241
395
236
159
51
3
{-# LANGUAGE TemplateHaskell #-} module Tic.Location where import ClassyPrelude import Control.Lens (makeLenses) import Tic.GeoCoord data Location a = Location { _locName :: Text , _locCoord :: GeoCoord a } deriving(Show) $(makeLenses ''Location)
pmiddend/tic
lib/Tic/Location.hs
gpl-3.0
291
0
9
76
69
40
29
10
0
{-# LANGUAGE DeriveGeneric #-} module Game ( Pos (..) , Dir (..) , Color (..) , Snake (..) , Bounds (..) , GameState (..) , inverse , go , canGo , move , canMove , snakeToBodyPositions -- demo , start , advanceRandom ) where import GHC.Generics import Prelude hiding (Left, Right) impor...
nettok/culebra-hs
src/Game.hs
gpl-3.0
2,813
0
11
668
1,089
601
488
85
2
{-# LANGUAGE TypeFamilies, FlexibleContexts, GADTs #-} {-# LANGUAGE OverloadedStrings, FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances, NoMonomorphismRestriction #-} module Teatros.Default (prepararDb) where import Teatros.Persistent import Database.Persist (insertUnique) import ...
arpunk/jfdb
src/Teatros/Default.hs
gpl-3.0
2,195
0
7
561
364
216
148
44
1
{-# LANGUAGE TemplateHaskell #-} -- Copyright (C) 2010-2012 John Millikin <john@john-millikin.com> -- -- 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 -- a...
jotrk/haskell-dbus
tests/DBusTests/BusName.hs
gpl-3.0
2,680
17
15
529
699
354
345
55
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/Orders/Get.hs
mpl-2.0
5,906
0
20
1,477
934
542
392
133
1
module Main where import Kawaii main :: IO () main = runApp $ defaultApp { appTitle = "Lonesome Space" , appMode = Windowed 1024 768 , appStages = [Stage updateGame renderGame] , appGrabInput = True } updateMainMenu :: Event -> Updating () updateMainMenu _ = return Skip renderMainMen...
nitrix/lspace
lspace/Main.hs
unlicense
930
0
9
196
205
107
98
18
1
module WordNumber where import Data.List (intersperse) digitToWord :: Int -> String digitToWord 1 = "one" digitToWord 2 = "two" digitToWord 3 = "three" digitToWord 4 = "four" digitToWord 5 = "five" digitToWord 6 = "six" digitToWord 7 = "seven" digitToWord 8 = "eight" digitToWord 9 = "nine" digits :: Int -> [Int] dig...
aniketd/learn.haskell
haskellbook/wordNumber.hs
unlicense
546
0
12
132
222
112
110
19
1
{-# LANGUAGE LambdaCase #-} {- | Module : Neovim.Debug Description : Utilities to debug Neovim and nvim-hs functionality Copyright : (c) Sebastian Witte License : Apache-2.0 Maintainer : woozletoff@gmail.com Stability : experimental Portability : GHC -} module Neovim.Debug ( debug, debug'...
gibiansky/nvim-hs
library/Neovim/Debug.hs
apache-2.0
4,618
0
20
1,314
908
473
435
79
6
module Primitives( Render(render), Renderable(Renderable), cylinder, sphere ) where import Vector import Material import Graphics.Rendering.OpenGL import Graphics.UI.GLUT -- Like show, but it actually shows it! class Render a where render :: a -> IO () -- Interesting non-standard way making heterogenius ob...
tkerber/-abandoned-3dlsystem-
Primitives.hs
apache-2.0
2,624
0
14
599
799
406
393
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} module Network.HTTP.Neon.ProgType where import System.Console.CmdArgs data Hneon = Test deriving (Show,Data,Typeable) test :: Hneon test = Test mode = modes [test]
wavewave/hneon
lib/Network/HTTP/Neon/ProgType.hs
bsd-2-clause
223
0
6
48
58
35
23
8
1
{-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE UnliftedFFITypes #-} {-# LANGUAGE GHCForeignImportPrim #-} {-# LANGUAGE ForeignFunctionInterface #-} module Concurrent.Primitive.MVar ( localTakeMVar ) where import GHC.IO import GHC.MVar import GHC.Prim foreign import prim "localTakeMVarzh" l...
ekmett/concurrent
src/Concurrent/Primitive/MVar.hs
bsd-2-clause
468
0
9
75
111
61
50
-1
-1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QGraphicsSceneHelpEvent.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:21 Warning : this file is machine gene...
uduki/hsQt
Qtc/Gui/QGraphicsSceneHelpEvent.hs
bsd-2-clause
4,296
0
12
566
981
505
476
-1
-1
{-# LANGUAGE OverloadedStrings #-} module BSPLoader where import Control.Applicative import Control.Monad import Data.Bits import Data.Int import Data.Word import Data.Binary as B import Data.Binary.Get as B import Data.Binary.IEEE754 import Data.Vect hiding (Vector) import Data.Vector (Vector) import qualified Data....
csabahruska/GFXDemo
BSPLoader.hs
bsd-3-clause
8,889
0
22
2,585
2,243
1,237
1,006
221
5
{-# LANGUAGE BangPatterns, TypeOperators, CPP, MultiParamTypeClasses, UnboxedTuples, MagicHash, NamedFieldPuns, FlexibleInstances #-} module Data.TrieMap.WordMap.Searchable () where import Control.Monad.Unpack import Control.Monad.Option import Data.TrieMap.TrieKey import Data.Word import Data.TrieMap.WordMap.Base ...
lowasser/TrieMap
Data/TrieMap/WordMap/Searchable.hs
bsd-3-clause
2,415
28
16
624
1,056
520
536
-1
-1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module GHC.Hs.Instances where -- This module defines the Data instances ...
sdiehl/ghc
compiler/GHC/Hs/Instances.hs
bsd-3-clause
16,662
0
7
2,455
3,715
1,929
1,786
249
0
main :: Stream -> Stream main stdin = toStream "Hello, world!\n"
tromp/hs2blc
examples/hello.hs
bsd-3-clause
65
0
5
11
21
10
11
2
1
module Evaluation where import Syntax import Data.Maybe import Prelude hiding (lookup) -- a frequently used pattern match x1 x2 f1 f2 = if x1 == x2 then f1 else f2 -- see slide 546 type Environment = [(Identifier, Location)] type Store = [(Location, Int)] type Location = Int -- see slide 553 type PEnvironmen...
grammarware/slps
topics/semantics/while/extended/Evaluation.hs
bsd-3-clause
1,641
6
9
330
709
365
344
34
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} module Stack.Solver ( checkResolverSpec , cabalPackagesCheck , findCabalFi...
phadej/stack
src/Stack/Solver.hs
bsd-3-clause
33,609
486
29
10,547
6,541
3,549
2,992
551
8
{-# LANGUAGE Arrows #-} module NPNTool.XMLReader where import Control.Arrow import Text.XML.HXT.Core import NPNTool.PetriNet import NPNTool.NPNet import NPNTool.NPNConstr import NPNTool.PTConstr (PTConstrM) import qualified NPNTool.PTConstr as PTC import Control.Monad import qualified Data.IntMap as IM type Label ...
co-dan/NPNTool
src/NPNTool/XMLReader.hs
bsd-3-clause
5,464
9
17
1,737
1,610
780
830
122
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.ARB.ProgramInterfaceQuery -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : po...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/ARB/ProgramInterfaceQuery.hs
bsd-3-clause
2,240
0
4
250
211
148
63
59
0
{-# LANGUAGE DeriveDataTypeable #-} module Types where import Data.Typeable import Data.Time data Paste = Paste { paste_id :: Int , paste_timestamp :: !(Maybe UTCTime) , paste_content :: String , paste_title :: String , paste_author :: String -- ..md5 sum of email a...
glguy/hpaste
src/Types.hs
bsd-3-clause
827
0
11
273
177
108
69
27
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TemplateHaskell #-} module Numeric.QuaterFloatTest (runTests) where import Numeric.Arbitraries import Numeric.Basics import Numeric.Quaternion import Numeric.Vector import Test.QuickCheck type T = Float -- | Some non-linear function are very unstable; -- it would be a ...
achirkin/easytensor
easytensor/test/Numeric/QuaterFloatTest.hs
bsd-3-clause
4,487
0
12
1,148
1,759
873
886
97
1
{-# LANGUAGE OverloadedStrings #-} {-# LAnGUAGE ExtendedDefaultRules #-} module Lucid.Foundation.Navigation.TopBar where import Lucid.Base import Lucid.Html5 import qualified Data.Text as T import Data.Monoid fixed_ :: Term arg result => arg -> result fixed_ = termWith "div" [class_ "fixed"] contain_to_grid_ :: ...
athanclark/lucid-foundation
src/Lucid/Foundation/Navigation/TopBar.hs
bsd-3-clause
911
0
7
156
255
137
118
31
1
module Homoiconic.Constrained.TH where import Prelude import Control.Monad import Data.Foldable import Data.List import Data.Maybe import Data.Typeable import Data.Proxy import Data.Kind import GHC.Exts hiding (IsList(..)) import Homoiconic.Common.TH import Language.Haskell.TH hiding (Type) import qualified Lang...
mikeizbicki/homoiconic
src/Homoiconic/Constrained/TH.hs
bsd-3-clause
70,464
11
37
45,223
10,686
5,393
5,293
-1
-1
-------------------------------------------------------------------------------- module Hakyll.Core.Provider.MetadataCache ( resourceMetadata , resourceBody , resourceInvalidateMetadataCache ) where -------------------------------------------------------------------------------- import qualified Data....
bergmark/hakyll
src/Hakyll/Core/Provider/MetadataCache.hs
bsd-3-clause
2,406
0
13
512
535
278
257
42
2
{-# LANGUAGE GeneralizedNewtypeDeriving, StandaloneDeriving, FlexibleContexts, FlexibleInstances, NamedFieldPuns #-} module Distribution.Server.Framework.Resource ( -- | Paths DynamicPath, BranchComponent(..), BranchPath, trunkAt, -- | Resources Resource(..), ResourceForma...
edsko/hackage-server
Distribution/Server/Framework/Resource.hs
bsd-3-clause
32,081
0
24
7,258
7,417
3,928
3,489
382
25
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE CPP, DeriveDataTypeable #-} -- | -- #name_types# -- GHC uses several kinds of name internally: -- -- * 'OccName.OccName': see "OccName#name_types" -- -- * 'RdrName.RdrName' is the type of names that come di...
siddhanathan/ghc
compiler/basicTypes/RdrName.hs
bsd-3-clause
40,547
0
16
11,342
7,728
4,105
3,623
493
4
{-# LANGUAGE NoMonomorphismRestriction #-} module Network.DGS.Atto ( module Control.Applicative , module Data.Attoparsec , module Network.DGS.Atto , ByteString ) where import Control.Applicative import Data.Attoparsec hiding (Parser) import Data.Attoparsec as A import Data.ByteString (ByteString) import Data.Int ...
dmwit/dgs
Network/DGS/Atto.hs
bsd-3-clause
2,228
4
13
473
829
431
398
60
1