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 : Language.PureScript.Sugar.TypeDeclarations -- Copyright : (c) Phil Freeman 2013 -- License : MIT -- -- Maintainer : Phil Freeman <paf31@cantab.net> -- Stability : experimental -- Portability : -- -- | -- This...
bergmark/purescript
src/Language/PureScript/Sugar/TypeDeclarations.hs
mit
2,918
0
15
427
727
383
344
36
4
module Language.MSH.Constructor where import Language.Haskell.TH import Language.Haskell.TH.Syntax data StateCtr = SCtr { sctrDec :: Dec, sctrTypes :: [Type] }
mbg/monadic-state-hierarchies
Language/MSH/Constructor.hs
mit
171
0
9
30
44
29
15
6
0
import Control.Monad import Data.List.Extra import Data.Maybe import qualified Data.Char as C import qualified Data.Map as Map -------- input = "...^^^^^..^...^...^^^^^^...^.^^^.^.^.^^.^^^.....^.^^^...^^^^^^.....^.^^...^^^^^...^.^^^.^^......^^^^" one "^^." = '^' one ".^^" = '^' one "^.." = '^' one "..^" = '^' one _ ...
msullivan/advent-of-code
2016/A18.hs
mit
582
0
11
114
209
107
102
15
1
module Text.Pit.Lexer ( lex ) where import Prelude hiding (lex, showChar) import Data.Char (isSpace, isLower, isUpper, isAlphaNum, isPrint, ord) import Data.List (isPrefixOf) import Data.Maybe (isJust) import Control.Monad.Writer import Text.Pit.Types -- Content is a string added with the information ...
ShabbyX/pit
src/Text/Pit/Lexer.hs
gpl-2.0
10,039
0
18
4,054
2,271
1,232
1,039
-1
-1
module Geometry ( sphereVolume , sphereArea , cubeVolume , cubeArea , cuboidArea , cuboidVolume ) where sphereVolume :: Float -> Float sphereVolume radius = (4.0 / 3.0) * pi * (radius ^ 3) sphereArea :: Float -> Float sphereArea radius = 4 * pi * (radius ^ 2) cubeVolume :: Float -> Float cubeVolume side = cuboidVolu...
softwaremechanic/Miscellaneous
Haskell/Geometry.hs
gpl-2.0
1,344
22
11
279
631
325
306
-1
-1
module Hob.ControlSpec (main, spec) where import Data.IORef import Test.Hspec import Hob.Control main :: IO () main = hspec spec spec :: Spec spec = describe "maybeDo" $ do it "does not execute on Nothing" $ do (executor, mockReader) <- mockedExecutor maybeDo executor Nothing executio...
svalaskevicius/hob
test/Hob/ControlSpec.hs
gpl-3.0
787
0
12
187
235
116
119
23
1
module PathSpec(main, spec) where import Test.Hspec import Coords import Path import Path.Internal import Data.List (sort) import Data.Default import Data.Maybe (isJust,isNothing) import qualified Data.Map as Map import qualified Data.PSQueue as PSQ import Control.Lens main :: IO () main = hspec spec pathFrom2d :: ...
svenkeidel/gnome-citadel
test/PathSpec.hs
gpl-3.0
8,495
1
30
3,591
2,335
1,290
1,045
131
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {- | Module : $Header$ Description : The tempuhs server database functions. Copyright : (c) plaimi 2014 License : AGPL-3 Maintainer : tempuhs@plaimi.net -} modul...
plaimi/tempuhs-server
src/Tempuhs/Server/Database.hs
agpl-3.0
4,700
0
15
1,158
1,074
598
476
108
2
-- | * The CoALP top-level module. module CoALP ( Term (..) , Clause (..) , Program , Term1 , Clause1 , Program1 , gc1 , gc2 , gc3 ) where import CoALP.Program import CoALP.Guards
frantisekfarka/CoALP
src/CoALP.hs
lgpl-3.0
197
6
5
52
58
38
20
13
0
module Main ( main ) where import Control.Monad ( forM_ ) import Data.Maybe ( fromMaybe ) import qualified Data.Map.Strict as Map import System.Environment ( getArgs, getEnvironment, getProgName ) import qualified Network.FCP as FCP data ValueType = Counter | Gauge type ValueSet = (String, String, [(String, Str...
waldheinz/h-fcp
munin/Main.hs
lgpl-3.0
6,383
0
17
1,673
1,589
935
654
123
3
module PreArrow where import Set import PairSet import PreMapping import SetArrow -- The preimage arrow: one of the main contributions in Toronto & McCarthy 2014. -- Instances (over-)approximately run programs backward on sets of outputs. newtype PreArrow s1 s2 = PreArrow { runPreArrow :: s1 -> PreMapping s1 s2 } -...
ntoronto/drbayes
drbayes/direct/haskell-impl/PreArrow.hs
lgpl-3.0
1,728
0
15
541
551
285
266
34
1
-- file: ch27/syslogclient.hs import Data.Bits import Network.Socket import Network.BSD import Data.List import SyslogTypes data SyslogHandle = SyslogHandle {slSocket :: Socket, slProgram :: String, slAddress :: SockAddr} openlog :: HostName -- ^ Remote hostname,...
caiorss/Functional-Programming
haskell/rwh/ch27/syslogclient.hs
unlicense
1,998
0
12
647
428
219
209
37
2
{- Copyrights (c) 2016. Samsung Electronics Ltd. All right reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable l...
ryzhyk/cocoon
cocoon/Pos.hs
apache-2.0
1,616
0
12
479
327
172
155
27
3
module HW6test where import HW6parse import HW6 main = do print (parseExp "2 + 23 * (3 + 2) / 2") print (parseExp "let x = 3 in x * x") print (parseExp "let f = fun(x) x in f(3)") print (parseExp "let T = fun(x) fun(y) x in let F = fun(x) fun(y) y in T F") print (parseExp "let y = 2 in let f = fun(n) n * y ...
fredfeng/HaskellCodes
hw6test.hs
apache-2.0
336
0
9
92
75
35
40
9
1
squareAll list = map square list where square x = x * x
fbartnitzek/notes
7_languages/Haskell/maps.hs
apache-2.0
59
0
7
16
28
13
15
2
1
#!/usr/bin/env stack -- stack --install-ghc runghc --package turtle --package riak --package bytestring {-# LANGUAGE OverloadedStrings #-} module Main where import qualified Data.ByteString.Lazy as B import Data.ByteString.Lazy.Char8 () import qualified Network.Riak.Basic as RB import Network.Ria...
Briends/k8s-riak
riak-test-client/src/Main.hs
apache-2.0
1,914
0
14
364
532
263
269
46
1
{-# language TupleSections #-} module Huffman where import Data.Map (Map, empty, fromListWith, toList, singleton, union, (!)) import qualified Data.Map as Map import Data.List (sortBy,insertBy) import Data.Ord (comparing) frequencies :: String -> Map Char Int frequencies = fromListWith (+) . map (,1) data Tree = Le...
alexandersgreen/hoodlums
Huffman/Huffman.hs
apache-2.0
2,117
0
10
477
978
517
461
61
4
import Control.Applicative ((<$>)) import Data.Char (ord) import Network.Wai.Handler.Warp (Port) import System.Environment import Web.Scotty (json) import Rest.Service import qualified Anagram.Solver as A import qualified Data.ByteString.Char8 as BS defaultPort :: Port defaultPort = foldr1 (+) $ map ord "anagram-servi...
jotrk/anagram-service
src/Main.hs
bsd-2-clause
909
0
14
175
314
165
149
24
3
module Harihara.Utils ( module Harihara.Utils , Text ) where import Text.Show.Pretty import Data.Char as C import Data.Text as T pretty :: (Show a) => a -> Text pretty = pack . ppShow whenJust :: Monad m => Maybe a -> (a -> m ()) -> m () whenJust ma f = maybe (return ()) f ma withEither :: Either a b -> (a ...
kylcarte/harihara
src/Harihara/Utils.hs
bsd-3-clause
817
0
11
214
368
197
171
30
2
module Numerical.HBLAS.Lapack.FFI where import Foreign.Ptr import Foreign() import Foreign.C.Types import Data.Complex import Data.Int {- stylenote: we will not use the LAPACKE_* operations, only the LAPACKE_*_work variants that require an explicitly provided work buffer. This is to ensure that solver routine al...
yangjueji/hblas
src/Numerical/HBLAS/Lapack/FFI.hs
bsd-3-clause
4,442
0
28
943
717
385
332
40
0
{-# LANGUAGE OverloadedStrings #-} -- | This module creates simple default switch without user program -- that can be used for testing purposes: -- -- This program should be as simple as possibe module Main where import Control.Concurrent (threadDelay) import Control.Monad (replicateM_) import Control.Monad.Trans (l...
ARCCN/hcprobe
src/examples/packet_examples.hs
bsd-3-clause
6,017
28
19
2,597
1,091
548
543
128
1
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module Rachel.Parser ( -- * Parser type RachelP , OpTable , runRachelP -- * Parsers , p_Ident , p_Type , p_TypeDec , p_Exp , p_FunDec , p_InfixDec , p_Dec -- * Utils , spaces1 , witheof ) where import Rachel.Types import Rachel.Eval...
Daniel-Diaz/rachel
Rachel/Parser.hs
bsd-3-clause
5,726
1
29
1,407
2,308
1,138
1,170
209
3
{-# LANGUAGE EmptyDataDecls, TypeSynonymInstances #-} {-# OPTIONS_GHC -fcontext-stack42 #-} module Games.Chaos2010.Database.Board_size where import Games.Chaos2010.Database.Fields import Database.HaskellDB.DBLayout type Board_size = Record (HCons (LVPair Width (Expr Int)) (HCons (LVPair Height ...
JakeWheat/Chaos-2010
Games/Chaos2010/Database/Board_size.hs
bsd-3-clause
407
0
13
65
92
52
40
11
1
{-# LANGUAGE OverloadedStrings #-} module Test1 where import qualified Dictionary as D import qualified Data.ByteString.Char8 as BS import Data.Monoid import Data.List.Ordered (nubSort) import Data.Ord import Data.List import Control.Monad -- load dictionary and return access functions readDict = do words <- BS.r...
erantapaa/test-spelling
src/Test1.hs
bsd-3-clause
397
0
10
57
96
57
39
12
1
{-# LANGUAGE OverloadedStrings #-} module ParserSpec where import Test.Hspec import Apps.Juno.Parser import Data.Ratio import Data.Text as T import Juno.Hoplite.Term import Juno.Hoplite.Types (Literal(..)) spec :: Spec spec = do describe "admins" testAdmins describe "hopperLite" testHopperLite describe "transma...
buckie/juno
tests/ParserSpec.hs
bsd-3-clause
1,650
0
20
499
434
222
212
42
1
----------------------------------------------------------------------------- -- | -- Module : Numeric.LinearAlgebra.Matrix.Statistics -- Copyright : Copyright (c) 2010, Patrick Perry <patperry@gmail.com> -- License : BSD3 -- Maintainer : Patrick Perry <patperry@gmail.com> -- Stability : experimental -- -- Bas...
patperry/hs-linear-algebra
lib/Numeric/LinearAlgebra/Matrix/Statistics.hs
bsd-3-clause
5,693
0
17
1,638
1,682
886
796
115
3
{-# OPTIONS -fglasgow-exts -fffi #-} module PluginEvalAux where import System.Plugins.Make import System.Plugins.Load import System.Plugins.Utils import Foreign.C import Control.Exception ( evaluate ) import System.IO import System.Directory ( renameFile, removeFile ) symbol = "resource" evalWithStr...
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/testsuite/objc/expression_parser/PluginEvalAux.hs
bsd-3-clause
1,192
1
17
251
364
176
188
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE BangPatterns #-} -- TODO: RealFloat instance -- | Universal numbers...
hsyl20/unums
src/Data/Unums/Unum.hs
bsd-3-clause
20,000
0
16
5,559
6,163
3,267
2,896
580
7
{-# LANGUAGE RecursiveDo, ScopedTypeVariables #-} module Main where import LOGL.Application import LOGL.Camera import Foreign.Ptr import Graphics.UI.GLFW as GLFW import Graphics.Rendering.OpenGL.GL as GL hiding (normalize, position) import Graphics.GLUtil import System.FilePath import Graphics.Rendering.OpenGL.GL.Shad...
atwupack/LearnOpenGL
app/2_Lighting/3_Materials/Materials.hs
bsd-3-clause
4,765
0
15
906
1,374
666
708
101
1
{-| Module : ReplyQueue Description : Tests for Network.Kademlia.ReplyQueue Tests specific to Network.Kademlia.ReplyQueue -} module ReplyQueue where import Test.QuickCheck import Test.QuickCheck.Monadic import Control.Concurrent.Chan import Control.Concurrent.STM import Data.Maybe (isJust) import Network.Kade...
froozen/kademlia
test/ReplyQueue.hs
bsd-3-clause
2,493
0
22
733
728
346
382
56
5
----------------------------------------------------------------------------- -- | -- Module : Turbinado.Server.RequestProcess -- Copyright : (c) Alson Kemp 2008, Niklas Broberg 2004, -- License : BSD-style (see the file LICENSE) -- -- Maintainer : Alson Kemp, Alson@AlsonKemp.com -- Stability : expe...
abuiles/turbinado-blog
Turbinado/Server/RequestProcess.hs
bsd-3-clause
5,073
0
18
1,473
611
333
278
68
6
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Main where import Control.Applicative (optional, (<|>)) import Control.Exception (SomeException) import Data.Version (showVersion) import Options.Applicative (Parser, ParserInfo) import qualified Control.Exception import qualified ...
Gabriel439/Haskell-Dhall-Library
dhall-csv/dhall-to-csv/Main.hs
bsd-3-clause
3,100
0
20
1,074
673
358
315
83
5
{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, ScopedTypeVariables, RecordWildCards, UndecidableInstances, TupleSections, ImplicitParams #-} module Main where import qualified Data.Map as M import Data.Tuple.Select import Data.Maybe import Data.Char import Control.Monad import Control.Monad....
termite2/termite-app
termite.hs
bsd-3-clause
10,507
2
22
3,758
2,657
1,404
1,253
191
5
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[RnNames]{Extracting imported and top-level names in scope} -} {-# LANGUAGE CPP, NondecreasingIndentation, MultiWayIf, NamedFieldPuns #-} module RnNames ( rnImports, getLocalNonValBinders, newRecordSelector, extendGlobalRdrEnvRn, ...
mettekou/ghc
compiler/rename/RnNames.hs
bsd-3-clause
69,078
13
30
21,364
11,840
6,141
5,699
-1
-1
{-# LANGUAGE TypeSynonymInstances, TypeOperators, MultiParamTypeClasses, FunctionalDependencies, RecordWildCards #-} {-# LANGUAGE BangPatterns #-} {-| This module provides @Get@ values for parsing various IP packets and headers from ByteStrings into a byte-sequence-independent representation as Haskell datatypes. ...
frenetic-lang/nettle-openflow
src/Nettle/IPv4/IPPacket.hs
bsd-3-clause
6,909
0
18
1,808
1,449
777
672
160
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1999 Analysis functions over data types. Specficially, detecting recursive types. This stuff is only used for source-code decls; it's recorded in interface files for imported data types. -} module ETA.TypeCheck.TcTyDecls( ...
alexander-at-github/eta
compiler/ETA/TypeCheck/TcTyDecls.hs
bsd-3-clause
34,579
2
19
9,488
4,765
2,523
2,242
312
10
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} module Stash.Types.PagedResponse where import Data.Aeson import GHC.Generics import Stash.Types.Project as P import Stash.Types.Repo as R data PagedResponse a = PagedResponse { size :: Int , limit...
wayofthepie/stash-client
src/Stash/Types/PagedResponse.hs
bsd-3-clause
532
0
9
117
130
79
51
17
0
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} module Test.Tinfoil.Data.Key where import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BSC import Disorder.Core.Tripping (tripping) imp...
ambiata/tinfoil
test/Test/Tinfoil/Data/Key.hs
bsd-3-clause
886
0
11
167
188
108
80
21
1
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.EXT.Texture -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : p...
haskell-opengl/OpenGLRaw
src/Graphics/GL/EXT/Texture.hs
bsd-3-clause
1,879
0
5
259
257
162
95
49
0
-- class HRL (n :: Nat) (as :: [*]) where -- member :: Proxy n -> TypeAt n as -> HyperRelation' as -> Bool -- lookupIndices :: Proxy n -> TypeAt n as -> HyperRelation' as -> HS.HashSet Int -- instance HRL n '[] where -- member Proxy _ EndHR = False -- lookupIndices Proxy _ EndHR = HS.empty -...
meditans/hyper-relation
src/Data/HRL.hs
bsd-3-clause
1,057
0
2
263
18
17
1
1
0
{-| Module : Graphics.Sudbury.Argument Description : Various type tricks to play with wayland arguments as types and values Copyright : (c) Auke Booij, 2015-2017 License : MIT Maintainer : auke@tulcod.com Stability : experimental -} {-# LANGUAGE TemplateHaskell #-} module Graphics.Sudbury.Argument where ...
abooij/sudbury
Graphics/Sudbury/Argument.hs
mit
1,539
0
9
384
353
172
181
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} -- | -- Module : Yi.Frontend.Vty -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimen...
siddhanathan/yi
yi-frontend-vty/src/Yi/Frontend/Vty.hs
gpl-2.0
17,825
0
25
6,479
4,770
2,572
2,198
315
10
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.STS.Types.Sum -- Copyrigh...
fmapfmapfmap/amazonka
amazonka-sts/gen/Network/AWS/STS/Types/Sum.hs
mpl-2.0
615
0
4
115
29
25
4
7
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/UpdateBandwidthRateLimit.hs
mpl-2.0
5,767
0
10
1,122
616
370
246
74
1
{-# LANGUAGE MultiParamTypeClasses, TemplateHaskell, FlexibleInstances, FunctionalDependencies, TypeFamilies, UndecidableInstances #-} {-| This module defines a generic @Transform@ typeclass which allows general transformations over a data type. It also provides Template Haskell routines to generate naturally h...
DaMSL/K3
src/Language/K3/Utils/TemplateHaskell/Transform.hs
apache-2.0
8,882
0
20
2,360
1,812
917
895
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PatternSynonyms #-} {-# LAN...
reflex-frp/reflex
bench/RunAll.hs
bsd-3-clause
4,672
0
21
969
1,465
758
707
129
3
{-# LANGUAGE FlexibleContexts, PatternGuards #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Hooks.DynamicLog -- Copyright : (c) Don Stewart <dons@cse.unsw.edu.au> -- License : BSD3-style (see LICENSE) -- -- Maintainer : Don Stewart <dons@cse.un...
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Hooks/DynamicLog.hs
bsd-2-clause
21,303
0
18
6,517
3,485
1,957
1,528
241
4
module NN(module X) where import NN.CLI as X import NN.DSL as X import NN.Graph as X import NN.Passes as X import NN.Visualize as X
timjb/dnngraph
NN.hs
bsd-3-clause
202
0
4
94
45
32
13
6
0
{- (c) The AQUA Project, Glasgow University, 1994-1998 \section[LiberateCase]{Unroll recursion to allow evals to be lifted from a loop} -} {-# LANGUAGE CPP #-} module LiberateCase ( liberateCase ) where #include "HsVersions.h" import GhcPrelude import DynFlags import CoreSyn import CoreUnfold ( couldBeSmallE...
shlevy/ghc
compiler/simplCore/LiberateCase.hs
bsd-3-clause
15,187
0
13
4,876
1,847
1,004
843
128
3
{- Author: George Karachalias <george.karachalias@cs.kuleuven.be> Haskell expressions (as used by the pattern matching checker) and utilities. -} {-# LANGUAGE CPP #-} module PmExpr ( PmExpr(..), PmLit(..), SimpleEq, ComplexEq, toComplex, eqPmLit, truePmExpr, falsePmExpr, isTruePmExpr, isFalsePmExpr, ...
sgillespie/ghc
compiler/deSugar/PmExpr.hs
bsd-3-clause
16,874
0
15
3,938
3,327
1,720
1,607
198
4
module H where x = True
ezyang/ghc
testsuite/tests/backpack/cabal/bkpcabal01/impl/H.hs
bsd-3-clause
24
0
4
6
9
6
3
2
1
{-# LANGUAGE TypeFamilies #-} module T3092 where data T a = T1 a data instance T Int = T2 Char type S b = b type instance S Int = Char
urbanslug/ghc
testsuite/tests/indexed-types/should_fail/T3092.hs
bsd-3-clause
139
0
6
35
46
28
18
6
0
module Main (main) where import Nauva.Client import Nauva.Product.Nauva.Book.App main :: IO () main = runClient bookApp
wereHamster/nauva
product/nauva/book/native/Main.hs
mit
123
0
6
19
40
24
16
5
1
module GLMatrixProps ( suite ) where import Graphics.Math.GLMatrix (GLMatrix (..), identity, transpose, (>*<)) import Control.Applicative ((<$>), (<*>)) import Test.Framework (Test, testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.QuickCheck instance (Arbitrary a) => Ar...
kosmoskatten/glmat
test/GLMatrixProps.hs
mit
1,347
0
21
363
312
173
139
26
1
-- https://skillsmatter.com/skillscasts/6644-keynote-from-simon-marlow -- https://github.com/facebook/Haxl -- https://github.com/simonmar/haskell-eXchange-2015 -- http://gelisam.blogspot.co.uk/2015/01/haxl-anti-tutorial.html -- https://en.wikibooks.org/wiki/Haskell/GADT -- https://wiki.haskell.org/Existential_type -- ...
NickAger/LearningHaskell
haskellForMacMiscPlayground/haxl.hsproj/HShaxl.hs
mit
926
0
2
98
12
11
1
1
0
-- Stop gninnipS My sdroW! -- http://www.codewars.com/kata/5264d2b162488dc400000001/ module Codewars.Kata.Spinning where spinWords :: String -> String spinWords = unwords . map (\w -> if (<5) . length $ w then w else reverse w) . words
gafiatulin/codewars
src/6 kyu/Spinning.hs
mit
238
0
13
37
65
38
27
3
2
{-# LANGUAGE CPP #-} {-# LANGUAGE PatternGuards #-} module AddHandler (addHandler) where import Prelude hiding (readFile) import System.IO (hFlush, stdout) import Data.Char (isLower, toLower, isSpace) import Data.List (isPrefixOf, isSuffixOf, stripPrefix) import Data.Maybe (fromMaybe, listToMaybe) import qualified ...
psibi/yesod
yesod-bin/AddHandler.hs
mit
7,809
0
18
2,203
2,226
1,134
1,092
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} module Web.Ogma.Data ( Title , Name , Description , AbsoluteTime , absToInt , intToAbs , TimeInterval , boundedTime , before , after , exact , union , overlap ...
ogma-project/ogma
src/Web/Ogma/Data.hs
mit
9,760
0
17
3,101
3,376
1,713
1,663
224
1
module Main where import Lib import Data.List as List import Data.Set as Set main :: IO() main = do print nums print $ sum nums -- '$' is a precedence-0 do-nothing (identity) operator that basically means "evaluate -- everything that comes after me before you continue ...
JohnL4/ProjectEuler
Haskell/Problem001/app/Main.hs
mit
4,064
0
10
1,679
160
104
56
21
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE StandaloneDeriving #-} module VDPQ.Types where import Data.Map (Map...
danidiaz/vdpq
library/VDPQ/Types.hs
mit
4,529
0
10
1,395
1,382
736
646
120
1
{- Copyright (C) 2012 Kacper Bak, Jimmy Liang <http://gsd.uwaterloo.ca> 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, co...
juodaspaulius/bclafer_old
src/Language/Clafer/Generator/Xml.hs
mit
6,157
0
13
1,373
1,569
772
797
121
11
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-keyvalue.html module Stratosphere.ResourceProperties.EMRClusterKeyValue where impor...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EMRClusterKeyValue.hs
mit
1,730
0
12
205
264
151
113
27
1
module GlobRegex ( globToRegex, matchesGlob ) where import Text.Regex.Posix((=~)) import Data.Char (toLower) globToRegex :: String -> String globToRegex cs = '^': globToRegex' cs ++ "$" globToRegex' :: String -> String globToRegex' "" = "" globToRegex' ('*':cs) = ".*" ++ globToRegex' cs globToRegex' ('?':cs) =...
zhangjiji/real-world-haskell
ch8/GlobRegex.hs
mit
1,036
0
9
185
433
226
207
27
1
-- PCA.hs -- Compiles to library. -- This library contains the functions needed to perform principle -- component anlysis on vectorized data. module PCA ( Hyperplane (..) , mean , saveHyperplane , loadHyperplane , linRegression , distance ) where import Numeric.LinearAlgebra.HMatrix import Numeric.LinearAlgebra.Data i...
IsToomersCornerBeingRolledRightNow/principalComponentAnalysisViaSingularValueDecomposition
PCA.hs
mit
2,696
0
12
558
641
342
299
42
1
{-# LANGUAGE CPP #-} module Jakway.Blackjack.IO.DatabaseWrites where import Jakway.Blackjack.CardOps import Jakway.Blackjack.Match import Jakway.Blackjack.AI import Jakway.Blackjack.IO.DatabaseCommon import Jakway.Blackjack.IO.TableNames import Database.HDBC import Data.Maybe (fromJust) --PostgreSQL doesn't support P...
tjakway/blackjack-simulator
src/Jakway/Blackjack/IO/DatabaseWrites.hs
mit
7,144
0
17
1,732
1,536
806
730
78
2
-- | module Chapter3 where import Prelude hiding (curry) {- Intermission: Exercises 1. These lines of code are from a REPL session. Is y in scope for z? Prelude> let x = 5 Prelude> let y = 7 Prelude> let z = x * y => y is from the global scope 2. These lines of code are from a REPL session. Is h in scope for fu...
Numberartificial/workflow
haskell-first-principles/haskell-programming-from-first-principles-master/src/Chapter3.hs
mit
6,707
0
8
1,415
131
72
59
11
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlapi.html module Stratosphere.Resources.AppSyncGraphQLApi where import Stratosphere.ResourceImpo...
frontrowed/stratosphere
library-gen/Stratosphere/Resources/AppSyncGraphQLApi.hs
mit
3,867
0
15
412
534
307
227
49
1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Application ( makeApplication , getApplicationDev , makeFoundation ) where import Import import Settings import Yesod.Auth import Yesod.Default.Config import Yesod.Default.Main import Yesod.Default.Handlers import Network.Wai.Middleware.RequestLogger ( m...
tagami-keisuke/yesod-blog
Application.hs
mit
3,390
0
13
617
633
354
279
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE PatternGuards #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} --------------------------------------------------------- -- -- Module : Network.Wai.Handler.Warp -- Copyright : Michael Snoyman -- License : BSD3 -- -- Maintainer : Michael Sn...
utdemir/wai
warp/Network/Wai/Handler/Warp.hs
mit
13,706
0
13
2,405
1,651
1,034
617
138
1
module Main where import Testing.Term main :: IO () main = undefined
nna774/term
src/Main.hs
gpl-3.0
71
0
6
14
24
14
10
4
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Language.Nautilus.Bytecode.Machine ( -- * Interpreter Monad NBCI , runNBCI -- * Primitive Actions , system , peekIP , moveIP , halt , pushData , peekData , popData -- * Inspection , infoIP -- ** Machine Dump ...
Zankoku-Okuno/nautilus-bytecode
src/Language/Nautilus/Bytecode/Machine.hs
gpl-3.0
3,657
0
15
1,081
1,125
610
515
103
2
{- This file is part of HNH. HNH 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 later version. HNH is distributed in the hope that ...
fferreira/hnh
PolyType.hs
gpl-3.0
2,037
0
12
595
471
230
241
38
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Jobs/Delete.hs
mpl-2.0
6,632
0
22
1,679
1,015
589
426
147
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE OverloadedStrings #-} -- | -- Module : Czar.Server.Routing -- Copyright : (c) 2013 Brendan Hay <brendan.g.hay@gmail.com> -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- A copy ...
brendanhay/czar
czar-server/Czar/Server/Routing.hs
mpl-2.0
3,201
0
14
978
907
487
420
65
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/Insert.hs
mpl-2.0
4,854
0
17
1,116
559
335
224
86
1
{-# LANGUAGE EmptyDataDecls #-} module HEP.Jet.FastJet.Class.JetDefinition where data Strategy = N2MinHeapTiled | N2Tiled | N2PoorTiled | N2Plain | N3Dumb | Best | NlnN | NlnN3pi | NlnN4pi |...
wavewave/HFastJet
oldsrc/HEP/Jet/FastJet/Class/JetDefinition.hs
lgpl-2.1
1,164
0
5
588
127
84
43
-1
-1
{-# LANGUAGE DataKinds, EmptyDataDecls, FlexibleInstances, TypeFamilies, TypeSynonymInstances, UndecidableInstances #-} {-| Module: HaskHOL.Lib.Haskell.Context Copyright: (c) The University of Kansas 2013 LICENSE: BSD3 Maintainer: ecaustin@ittc.ku.edu Stability: unstable Portability: ...
ecaustin/haskhol-haskell
src/HaskHOL/Lib/Haskell/Context.hs
bsd-2-clause
978
0
8
172
150
87
63
-1
-1
{-# LANGUAGE PackageImports #-} import "hackason" Application (getApplicationDev) import Network.Wai.Handler.Warp (runSettings, defaultSettings, settingsPort) import Control.Concurrent (forkIO) import System.Directory (doesFileExist, removeFile) import System.Exit (exitSuccess) import Control.Concurrent (threadDela...
ma2gedev/yesod-sample
devel.hs
bsd-2-clause
702
0
10
123
186
101
85
23
2
{-# LANGUAGE CPP #-} -------------------------------------------------------------------------------- -- | Pretty print LLVM IR Code. -- module Llvm.PpLlvm ( -- * Top level LLVM objects. ppLlvmModule, ppLlvmComments, ppLlvmComment, ppLlvmGlobals, ppLlvmGlobal, ppLlvmAliases, ppLlvmAli...
jstolarek/ghc
compiler/llvmGen/Llvm/PpLlvm.hs
bsd-3-clause
16,887
0
18
4,781
4,645
2,268
2,377
308
15
module Glob (glob, matches) where import Text.Regex.Posix (match, makeRegexOpts, defaultCompOpt, compIgnoreCase, defaultExecOpt) import System.Directory (getDirectoryContents, doesDirectoryExist) import System.FilePath ((</>), takeDirectory, takeFileName) import Control.Monad (filterM) globTo...
kataoka271/vmgconv
src/Glob.hs
bsd-3-clause
1,858
0
12
413
663
348
315
41
1
{-# LANGUAGE CPP #-} #include "fusion-phases.h" -- | Parallel operations on unlifted arrays -- -- * This is an internal API and shouldn't need to be used directly. -- Client programs should use "Data.Array.Parallel.Unlifted" -- NOTE: Each of the sections in the export list corresponds to one of the -- ...
mainland/dph
dph-prim-par/Data/Array/Parallel/Unlifted/Parallel.hs
bsd-3-clause
2,277
0
4
694
262
191
71
52
0
module Day6 where import Data.List.Split import Data.List import Debug.Trace import Data.Ord origMsg :: String -> String origMsg = findCommon maximumBy origMsgB = findCommon minimumBy findCommon f = map common . transpose . splitLines where common = fst . f (comparing snd) . freq splitLines = filter notEmpty...
amirci/aoc2016-hs
src/Day6.hs
bsd-3-clause
461
0
11
94
193
105
88
14
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} -- | -- Module: $HEADER$ -- Description: Data type for DHT operation result. -- Copyright: (c) 2015 Jan Šipr, Matej Kollár, Peter Trško -- License: BSD3 -- -- Stability: ex...
FPBrno/dht-api
src/Data/DHT/Type/Result.hs
bsd-3-clause
5,675
0
13
1,227
1,017
588
429
88
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} import Criterion import Criterion.Main import Static import Util import Layers import Network import Network.Runners import Data.Functor.Identity type N = 16 type BaseInput = (ZZ ::. N ::. 3 ::. 32 ::. 32) type BaseLayers = '[ Convolution 1 3 9 9 24 24 ...
jonascarpay/convoluted
bench/Bench.hs
bsd-3-clause
1,948
0
14
717
561
304
257
43
1
{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-} {-# OPTIONS_GHC -O -funbox-strict-fields #-} -- We always optimise this, otherwise performance of a non-optimised -- compiler is severely affected -- -- (c) The University of Glasgow 2002-2006 -- -- Binary I/O library, with special tweaks for GHC -- -- Based on the nhc98 ...
jstolarek/ghc
compiler/utils/Binary.hs
bsd-3-clause
27,737
0
19
8,912
8,974
4,373
4,601
647
2
module Main where import Control.Concurrent (threadDelay, forkIO) import Control.Concurrent.Async (race) import Control.Exception (Exception, IOException, catch, handle, throwIO, SomeException) import Control.Lens (folded, maximumOf, (.~), (^.), (^..), (^?), (^?!)) import Data.Aeson (Value, encode, object, toJSON) imp...
nicball/fvckbot
src/Main.hs
bsd-3-clause
7,825
0
25
1,799
2,689
1,401
1,288
-1
-1
{-# OPTIONS_GHC -W #-} module Generate.JavaScript.Ports (incoming, outgoing) where import Generate.JavaScript.Helpers import qualified SourceSyntax.Helpers as Help import SourceSyntax.Type as T import Language.ECMAScript3.Syntax data JSType = JSNumber | JSBoolean | JSString | JSArray | JSObject [String] deriving ...
deadfoxygrandpa/Elm
compiler/Generate/JavaScript/Ports.hs
bsd-3-clause
4,913
0
17
1,798
1,751
855
896
105
9
{-# LANGUAGE PatternGuards, Rank2Types, ScopedTypeVariables, CPP #-} -- TODO: Drop this when we remove support for Data.Attoparsec.Number #if MIN_VERSION_attoparsec(0,12,0) {-# OPTIONS_GHC -fno-warn-deprecations #-} #endif -- | -- Module: Data.Aeson.Generic -- Copyright: (c) 2011, 2012, 2013 Bryan O'Sullivan -...
jprider63/aeson-ios-0.8.0.2
Data/Aeson/Generic.hs
bsd-3-clause
14,219
0
36
4,775
4,103
2,218
1,885
250
12
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.Version10 -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : por...
haskell-opengl/OpenGLRaw
src/Graphics/GL/Version10.hs
bsd-3-clause
19,805
0
5
3,156
3,639
2,255
1,384
852
0
{-# OPTIONS_GHC -Wall #-} module Language.Haskell.Exts.Desugar.Case where import qualified Prelude import Prelude (Integer,Enum(..)) import Language.Haskell.Exts hiding (binds,alt) import Language.Haskell.Exts.SrcLoc(noLoc) import Language.Haskell.Exts.Unique import Language.Haskell.Exts.Desugar import...
shayan-najd/Haskell-Desugar
Language/Haskell/Exts/Desugar/Case.hs
bsd-3-clause
13,495
10
26
5,064
5,218
2,688
2,530
375
2
module Gentoo.Cabal2Ebuild (cabal2ebuild) where import Distribution.Package -- import Distribution.Version import Distribution.PackageDescription import Distribution.PackageDescription.Parse import Distribution.Verbosity import Data.Maybe import Data.Version import Distribution.License -- import System.Directory impor...
YoshikuniJujo/cabal2ebuild
src-lib/Gentoo/Cabal2Ebuild.hs
bsd-3-clause
4,869
4
36
1,025
1,461
750
711
125
3
import TinyControl.Server import Data.ByteString (ByteString) import Data.ByteString.Char8 (pack, unpack) import Control.Concurrent(myThreadId, forkIO, threadDelay) main :: IO () main = do msg <- readFile "testdata" serveData "1514" (\d -> do {return (pack msg)})
Josh211ua/TinyControl
ServerApp.hs
bsd-3-clause
273
0
14
41
101
55
46
8
1
{- Parser of ARFF adecls, data and data types. -} module ARFFParser.Adecls ( parseAdecls, parseData ) where import ARFFParser.AST import ARFFParser.BasicCombinators import ARFFParser.Junk import ARFFParser.Value (parseIntLit, parseStringLit, parseValueList) import ARFFParser.Pairs (parsePairs) import Control.Appl...
shirazb/orpiva-k-means
src/ARFFParser/Adecls.hs
bsd-3-clause
1,621
0
13
298
437
223
214
49
2
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -Wall #-} -- | An interface to bitcoind's available mining RPC calls. The implementation -- of these functions can be found at <https://github.com/bitcoin/bitcoin/blob/master/src/rpcmining.cpp>. -- -- If any APIs are missing, patches are always welcome. If you look...
WraithM/network-bitcoin
src/Network/Bitcoin/Mining.hs
bsd-3-clause
12,717
0
31
5,164
1,592
894
698
156
1
module B1.Program.Chart.Screen ( drawScreen ) where import Control.Concurrent import Control.Concurrent.MVar import Control.Monad import Data.Maybe import Debug.Trace import Graphics.Rendering.OpenGL import Graphics.UI.GLFW import System.Directory import System.FilePath import System.IO import B1.Control.TaskMana...
btmura/b1
src/B1/Program/Chart/Screen.hs
bsd-3-clause
8,520
0
21
2,252
2,032
1,124
908
197
3
{-# LANGUAGE Rank2Types #-} -- from base import Control.Applicative ((<$>)) import Control.Monad.ST (runST) import Data.Word (Word8) -- from bytestring import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as L -- from crypto-api import Crypto.Classes ((.::.)) import qualified Crypto.Classes as...
prowdsponsor/crypto-conduit
tests/runtests.hs
bsd-3-clause
7,148
0
18
1,538
2,107
1,061
1,046
151
2
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} module Fragment.If ( module X ...
dalaing/type-systems
src/Fragment/If.hs
bsd-3-clause
1,441
1
8
298
400
223
177
-1
-1
module Utility (module Utility) where import Data.Bits as Bits import Prelude as P import qualified Data.Map as Map data Data = Int Int | Double Double | Bool Bool type Dict = Map.Map String Data go :: (Dict -> Data) -> (Dict -> IO Dict) -> Dict -> IO Dict go expr func vmap | (case expr vmap of Bool a -> a) = func ...
eosW/Morphling
Utility.hs
mit
4,297
0
12
1,457
2,563
1,209
1,354
108
1
module Pos.Chain.Ssc.Payload ( SscPayload (..) , checkSscPayload , spVss ) where import Universum hiding (id) import Control.Monad.Except (MonadError) import qualified Data.HashMap.Strict as HM import Data.SafeCopy (base, deriveSafeCopySimple) import ...
input-output-hk/pos-haskell-prototype
chain/src/Pos/Chain/Ssc/Payload.hs
mit
4,244
0
12
1,291
998
535
463
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.DirectConnect.Types.Produ...
fmapfmapfmap/amazonka
amazonka-directconnect/gen/Network/AWS/DirectConnect/Types/Product.hs
mpl-2.0
30,249
0
25
6,648
5,890
3,433
2,457
581
1