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
-- -- Author: Benjamin Schulz -- License: BSD3 -- module Numerical.Roots.Basic where -- | When searching for roots, it's a good idea to maintain a bracket -- around the suspected root. ReducibleInterval additionally allows us -- to encode where in that interval we suspect the root to be. data ReducibleInterval a = Lo...
bysy/hs-numerical
Numerical/Roots/Basic.hs
bsd-3-clause
1,424
0
8
367
487
265
222
26
2
-- Copyright (c) 2014-present, Facebook, Inc. -- All rights reserved. -- -- This source code is distributed under the terms of a BSD license, -- found in the LICENSE file. {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGU...
jiayuanmark/Haxl
Haxl/Core/StateStore.hs
bsd-3-clause
2,748
0
14
554
488
276
212
38
2
module Main where import qualified Caturday.Model.Fields as F import qualified Caturday.Model.Tables as T import Caturday.Types.Enums import Database.HaskellDB import Database.HaskellDB.HDBRec import Database.HaskellDB.Extra import Database.Ha...
chrisdone/haskelldb-demo
src/Main.hs
bsd-3-clause
2,743
0
14
703
892
445
447
77
1
----------------------------------------------------------------------------- -- Work stealing DEQUES implemented in Haskell ----------------------------------------------------------------------------- -- These are surely not as efficient as they could be. Currently we -- use atomic variables containing Data.Seq. ...
rrnewton/Haskell-CnC
Intel/work_stealing_deques.hs
bsd-3-clause
4,270
29
20
1,119
805
404
401
-1
-1
module Module3.Task17_Unique (change) where import Data.List (nub, sort) -- system code coins :: (Ord a, Num a) => [a] coins = [2, 3, 7] --solution code change :: (Ord a, Num a) => a -> [[a]] change = f where f 0 = [[]] f s = nub [ sort (coin:ch) | coin <- coins, coin <= s, ch <- (f $ s - coin)]
dstarcev/stepic-haskell
src/Module3/Task17_Unique.hs
bsd-3-clause
320
0
13
88
172
97
75
12
2
module Main where import qualified Insomnia.Main as M main :: IO () main = M.interpreterMain
lambdageek/insomnia
main-interp/Main.hs
bsd-3-clause
95
0
6
17
29
18
11
4
1
module Language.Wart.Scheme ( module Language.Wart.Scheme.Syntax , module Language.Wart.Scheme.Unify ) where import Language.Wart.Scheme.Syntax import Language.Wart.Scheme.Unify
sonyandy/wart
src/Language/Wart/Scheme.hs
bsd-3-clause
200
0
5
36
39
28
11
5
0
module Navigation where import Data.List (unfoldr) import Definition -- | Split a list into length-n pieces, with last piece length < n splitEvery :: Int -> [a] -> [[a]] splitEvery n xs = (takeWhile (not . null) . unfoldr (Just . splitAt n)) xs -- | Return a list of pages paginate :: Int -> [a] -> [(IndexNavigat...
mazelife/agilulf
src/Agiluf/Navigation.hs
bsd-3-clause
2,192
0
12
504
771
412
359
35
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} module FHue.Hue (Hue, runHue, HueException (..)) where import Control.Exception import Control.Lens import Control.Monad.State.Strict import Data.Aeson import Data.Aeson.Lens import...
madjar/fhue
src/FHue/Hue.hs
bsd-3-clause
6,033
0
14
1,983
1,509
773
736
-1
-1
module Yesod.Static.Jquery where import Yesod.Core (Route) import Yesod.EmbeddedStatic (EmbeddedStatic) import Yesod.Static.Commons.Internal version_1_12_0 :: Route EmbeddedStatic version_1_12_0 = jquery_jquery_1_12_0_min_js version_2_2_0 :: Route EmbeddedSta...
andrewthad/yesod-static-commons
src/Yesod/Static/Jquery.hs
bsd-3-clause
368
0
5
87
60
36
24
8
1
module Haskmon.Types.Description( module Haskmon.Types.Description, I.Description, I.MetaDescription ) where import Haskmon.Types.Internals(MetaData, MetaPokemon, MetaGame, MetaDescription, Description) import qualified Haskmon.Types.Internals as I mDescriptionName :: MetaDescription -> String mDescriptionNam...
bitemyapp/Haskmon
src/Haskmon/Types/Description.hs
mit
860
0
6
94
176
105
71
19
1
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeOperators #-} {-| Module : DeepLearning.ConvNet Description : Deep Learning Copyright : (c) Andrew Tulloch, 201...
silky/deeplearning-hs
DeepLearning/ConvNet.hs
mit
7,059
0
12
1,774
1,897
1,037
860
117
2
{-# 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 #-} -- ...
olorin/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DescribeVPCAttribute.hs
mpl-2.0
6,211
0
14
1,241
872
520
352
105
1
-- | module System.RedPitaya.Tutorial ( {-| == tutorial for System.Readpitaya Libraray #tutorial-for-system.readpitaya-libraray# System.Readpitaya native haskell library for <http://redpitaya.com/ redpitaya> that enables bindings on <https://github.com/RedPitaya/RedPitaya/blob/master/fpga/doc/RedPitaya_HDL_memory_...
ra1u/HaskellPitaya
src/System/RedPitaya/Tutorial.hs
lgpl-3.0
1,774
0
4
258
18
13
5
2
0
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : Rect.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:14 Warning : this file is machine generated - do not modi...
uduki/hsQt
Qth/Core/Rect.hs
bsd-2-clause
9,657
0
15
2,609
5,106
2,595
2,511
-1
-1
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} module Main where import Test.DocTest main = doctest [ "sources/Commands/Frontends/Dragon13/Serialize.hs" -- Commands.Frontends.Dragon13.Serialize ]
sboosali/commands-frontend-DragonNaturallySpeaking
tests/DocTest.hs
bsd-3-clause
201
0
6
20
22
14
8
5
1
-- -- Copyright © 2013-2015 Anchor Systems, Pty Ltd and Others -- -- The code in this file, and the program it is a part of, is -- made available to you by its authors as open source software: -- you can redistribute it and/or modify it under the terms of -- the 3-clause BSD licence. -- {-# LANGUAGE DeriveDataTypeable...
jasonzoladz/oauth2-server
lib/Network/OAuth2/Server/Types/Token.hs
bsd-3-clause
6,667
0
14
2,115
1,140
641
499
102
1
module Grammatik ( module Grammatik.Type ) where -- -- $Id$ import Grammatik.Type
florianpilz/autotool
src/Grammatik.hs
gpl-2.0
88
0
5
18
18
12
6
3
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-route53/gen/Network/AWS/Route53/GetGeoLocation.hs
mpl-2.0
5,282
0
9
1,062
597
363
234
70
1
{-# LANGUAGE FlexibleContexts, LambdaCase, TemplateHaskell, DeriveFunctor, DeriveFoldable, DeriveTraversable, NoMonomorphismRestriction, TypeFamilies, StandaloneDeriving #-} module HN.TypeTools (isFunctionType, hasFunctionalType, cppCannotInferReturnType, typeTu, typeTv, mapTypeTV, addTU, tv, TF(..)) where import SPL...
kayuri/HNC
HN/TypeTools.hs
lgpl-3.0
1,170
0
10
205
423
219
204
33
2
<?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="en-GB"> <title>Save Raw Message</title> <maps> <homeID>saverawmessage</homeID> ...
veggiespam/zap-extensions
addOns/saverawmessage/src/main/javahelp/help/helpset.hs
apache-2.0
985
85
50
170
403
214
189
-1
-1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE...
nomlab/nomnichi-haskell
db_migrate_second_20141016.hs
bsd-2-clause
1,967
1
14
392
398
205
193
48
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="hu-HU"> <title>Automation Framework</title> <maps> <homeID>top</homeID> <mapref locatio...
kingthorin/zap-extensions
addOns/automation/src/main/javahelp/org/zaproxy/addon/automation/resources/help_hu_HU/helpset_hu_HU.hs
apache-2.0
965
82
52
156
390
206
184
-1
-1
{-# LANGUAGE OverloadedStrings #-} module MD5 (msgMD5, srvMD5) where import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as B import Data.Digest.Pure.MD5 (md5) import Data.ByteString.Lazy (fromChunks) import Data.Map ((!)) import qualified Data.Map as M import Parse (simpleFieldAssoc) impor...
bitemyapp/roshask
src/executable/MD5.hs
bsd-3-clause
2,395
0
13
516
652
345
307
44
3
module ShouldCompile where import Prelude () import Data.Maybe( Maybe(..) ) import Data.Maybe f x = Just x
urbanslug/ghc
testsuite/tests/module/mod177.hs
bsd-3-clause
109
0
6
19
40
24
16
5
1
module T8329_Com where import Data.String (fromString) encodingName :: String encodingName = fromString ""
urbanslug/ghc
testsuite/tests/simplCore/should_compile/T8329_Com.hs
bsd-3-clause
109
0
5
15
27
16
11
4
1
-- !!! Exporting non-existent type/class module M(T) where x = 'a' -- dummy definition to get round a separate bug
sdiehl/ghc
testsuite/tests/module/mod7.hs
bsd-3-clause
115
0
4
20
16
11
5
2
1
module Display where import Graphics.Vty.Attributes import Graphics.Vty.Image import Graphics.Vty import Board import Types -- Generating styling for a Tile generateAttr :: Tile -> Attr generateAttr Player = defAttr `withForeColor` green generateAttr Empty = defAttr `withForeColor` black generateAttr Wall = defAt...
crockeo/maze
src/Display.hs
mit
1,310
0
10
234
298
169
129
27
2
import Types import Utils import Algorithms import IO import Control.Monad import System.Exit import System.Environment import Data.IORef import Data.List.Split(splitOn) import Graphics.Rendering.OpenGL.GL.CoordTrans ( Position(..), Size(..) ) import Graphics.Rendering.OpenGL.GL.StateVar ( ($=), ($=!), get ) import q...
5outh/Haskell-Graphics-Projects
Project4/main.hs
mit
6,131
1
19
1,823
2,296
1,134
1,162
169
22
{-# LANGUAGE OverloadedStrings #-} module Unison.Test.Html where import Data.Text (pack) import Test.Tasty import Test.Tasty.HUnit import Unison.Note (Noted) import Unison.Parsers (unsafeParseTerm) import Unison.Runtime.Html as Html import Unison.Test.Util import qualified Data.Vector as Vector import qualified Unison...
nightscape/platform
node/tests/Unison/Test/Html.hs
mit
2,873
0
16
582
754
414
340
68
3
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-| Module : Calculational.MonoidExt Description : Expressions parser Copyright : (c) Francisco J Cháves, 2012 License : MIT Maintain...
pachopepe/Calculational
src/Calculational/MonoidExt.hs
mit
6,916
0
10
1,686
2,333
1,239
1,094
-1
-1
module Main where import Graphics.Cogh import FRP.Gearh quitOutput :: Bool -> Output quitOutput True = quit quitOutput False = mempty renderOutput :: Window -> Element -> Output renderOutput window = output . renderRoot window eventInput :: Window -> Input Event eventInput = manytimes . getEvents data State = ...
ivokosir/gearh
test/renderWithReturn.hs
mit
1,540
0
13
369
599
315
284
49
1
-- | -- Asynchronous client-to-server (DEALER to ROUTER) p.111 -- Compile with -threaded module Main where import System.ZMQ4.Monadic import ZHelpers (setRandomIdentity) import Control.Concurrent (threadDelay) import Data.ByteString.Char8 (pack, unpack) import Control.Monad (forever, forM_, replicateM_) import System...
soscpd/bee
root/tests/zguide/examples/Haskell/asyncsrv.hs
mit
2,245
0
20
672
606
300
306
50
1
{-# LANGUAGE ViewPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} {-@ LIQUID "--no-termination" @-} module Main (main) where import Data.IORef import Text.Pandoc.JSON import Text.Pandoc import Text.Pandoc.Walk (walkM) import Data.List (isSuffixOf, isPrefixOf) import Debug.Trace import...
ucsd-progsys/liquidhaskell-tutorial
filters/Figures.hs
mit
4,034
0
12
1,061
1,486
758
728
111
5
module LensDemo (runLensDemos) where import Ch03DecisionTrees.DecisionTree import Data.List.Split import MLUtil.Graphics import Paths_ch03_decision_trees import qualified System.IO.Strict as IOS newtype LensFeature = LF String deriving (Eq, Ord, Show) instance BranchLabel LensF...
rcook/mlutil
ch03-decision-trees/src/LensDemo.hs
mit
1,029
0
18
210
329
176
153
22
1
module Unused.CLI.Util ( resetScreen , withRuntime , installChildInterruptHandler , module System.Console.ANSI ) where import qualified Control.Concurrent as CC import qualified Control.Concurrent.ParallelIO as PIO import qualified Control.Exception as E import qualified Control.Monad as M import ...
joshuaclayton/unused
src/Unused/CLI/Util.hs
mit
1,868
0
12
351
525
269
256
53
1
import qualified Data.ByteString.Lazy.Char8 as BL import qualified Data.HashMap.Strict as H import Text.Regex.PCRE import Data.Digest.Pure.MD5 main :: IO () main = do seed <- getLine print . take 64 $ genKey seed H.empty 1 hashN :: String -> Int -> String hashN s n = expandedMD5 $ s ++ show n where md5strin...
lzlarryli/advent_of_code_2016
day14/part2.hs
mit
1,734
2
16
720
639
333
306
42
6
{-# LANGUAGE OverloadedStrings #-} module Parse where import Forms import FormTypes import Shared (both, trim) import Types import Urls import Data.Char (isSpace, toLower) import Data.CaseInsensitive (mk) import Data.ByteString.Char8 (ByteString) import Data.List (find) import Da...
jahaynes/crawler
src/Parse.hs
mit
2,010
0
21
494
641
342
299
41
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} -- | -- Module : Network.OAuth.Signing -- Copyright : (c) Joseph Abrahamson 2013 -- License : MIT -- -- Maintainer : me@jspha.com -- Stability : experimental -- Portability : non-portable -- -- Signin...
tel/oauthenticated
src/Network/OAuth/Signing.hs
mit
8,784
0
16
2,223
1,828
994
834
-1
-1
reactStackError :: StackError DInTmRN -> TermReact reactStackError (StackError errors) = div_ [ class_ "stack-error" ] $ do div_ [] "Error:" ul_ [ class_ "stack-error-list" ] $ forReact errors $ \error -> li_ [ class_ "stack-error-item" ] $ mapM_ reactErrorTok error reac...
kwangkim/pigment
src-web/hs/Cochon/OldView.hs
mit
15,553
5
22
4,674
3,912
1,895
2,017
-1
-1
module GraphBuild where import Proxy.Types.Game import Data.Array import Proxy.Math.Graph eightWay :: (Num a,Eq a,Ix a) => (a,a) -> [(a,a)] eightWay (x,y) = filter (/= (x,y)) (range ((x-1,y-1),(x+1,y+1))) euclD :: (Int,Int) -> (Int,Int) -> Float euclD (x,y) (z,w) = sqrt . fromIntegral $ (x - z) ^ 2 + (y - w) ^ 2 po...
mapinguari/SC_HS_Proxy
src/GraphBuild.hs
mit
917
0
14
208
549
305
244
20
1
module Signs.Grammar where import Signs.Sign import Signs.Term import Signs.Type import Signs.MyError import Signs.Inference import Signs.Reductions import qualified Data.Map as Map import Data.List import Data.Maybe import Control.Monad import Control.Monad.Except import Control.Monad.State import Control.Monad.Reade...
ChrisBlom/Signs
src/Signs/Grammar.hs
mit
12,698
0
18
2,734
4,297
2,179
2,118
236
14
--file CH8/Regexp.hs module Regexp where import Text.Regex.Posix import System.Directory (doesDirectoryExist, doesFileExist, getCurrentDirectory, getDirectoryContents) import System.FilePath import Control.Exception (handle, SomeException) import Control.Monad (forM) main :: IO () main = undefin...
Numberartificial/workflow
haskell-first-principles/src/RW/CH8/Regexp.hs
mit
2,219
0
21
581
726
377
349
54
5
putStr' :: String -> IO () putStr' [] = return () putStr' (x:xs) = putChar x >> putStr' xs putStrLn' :: String -> IO () -- correct --putStrLn' [] = putChar '\n' --putStrLn' xs = putStr' xs >> putStrLn' "" -- correct putStrLn' [] = putChar '\n' putStrLn' xs = putStr' xs >> putChar '\n' -- correct --putStrLn' [] = pu...
AlexMckey/FP101x-ItFP_Haskell
Sources/HW8.hs
cc0-1.0
2,043
1
13
505
381
216
165
21
2
module TimesRoman where import Data.Maybe -- textWidth :: String -> Double -- textWidth str = sum $ map (fromJust . lookup timesRomanWidths) str textWidth :: String -> Double textWidth = sum . widths widths :: String -> [Double] widths str = map (fromJust . (flip lookup) timesRomanWidths) str timesRomanWidths = [ ...
pbevin/toycss
src/TimesRoman.hs
gpl-2.0
1,206
0
10
217
552
360
192
60
1
{-# LANGUAGE ScopedTypeVariables #-} import Network.Curl import qualified Data.Aeson as A import qualified Data.Attoparsec as A import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import Mescaline.Analysis (Analysis) import Mescaline.Analysis.JSON () import System.Environment ...
kaoskorobase/mescaline
tools/curlikofski.hs
gpl-3.0
1,729
1
15
545
504
253
251
41
4
{-# LANGUAGE UnicodeSyntax, NoImplicitPrelude #-} module Layout.Pos ( Pos(..) , posAndXkbKeycode ) where import BasePrelude hiding (Space, Down) import Prelude.Unicode import Util (HumanReadable(..)) import Data.Aeson (ToJSON, FromJSON, toJSON, parseJSON) data Pos = Tilde | N1 | N2 | N3 | N4 | N5 | ...
39aldo39/klfc
src/Layout/Pos.hs
gpl-3.0
10,692
0
7
3,269
3,980
2,645
1,335
404
1
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns #-} -- | -- Copyright : (c) 2010-2012 Benedikt Schmidt & Simon Meier -- License : GPL v3 (see LICENSE) -- -- Maintainer : Simon Meier <iridcode@gmail.com> -- Portability : GHC only -- -- A monad for writing constraint ...
samscott89/tamarin-prover
lib/theory/src/Theory/Constraint/Solver/Reduction.hs
gpl-3.0
29,402
4
37
9,125
6,597
3,290
3,307
458
14
module Fetchers where import Network.HTTP.Conduit import Language.Haskell.TH.Ppr (bytesToString) import qualified Data.ByteString.Lazy as BL import Data.Text.Lazy.Encoding (decodeUtf8) import Data.Text.Lazy (unpack) import Types stationUrl = "http://infopasazer.intercity.pl/?p=station&id=" trainUrl = "http://infopas...
mkawalec/infopassenger-crawler
src/Fetchers.hs
gpl-3.0
700
0
9
93
180
99
81
16
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/Patch.hs
mpl-2.0
7,883
0
23
1,931
1,185
689
496
168
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.Redis -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Public...
brendanhay/gogol
gogol-redis/gen/Network/Google/Redis.hs
mpl-2.0
10,546
0
20
2,004
1,103
816
287
231
0
{-# OPTIONS_GHC -fno-warn-orphans #-} -- | -- Module : Properties.Types -- Copyright : (c) 2012 Brendan Hay <brendan@soundcloud.com> -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- A copy of the MPL can be found in the LICEN...
brendanhay/numbersd
test/Properties/Types.hs
mpl-2.0
7,717
0
14
2,270
1,811
964
847
169
5
module Akarui.Parser.Bool ( parseBool , getBool , getTop , getBot ) where import Text.Parsec import Text.Parsec.String (Parser) import Akarui.Parser.Core parseBool :: String -> Either ParseError Bool parseBool = parse (contents getBool) "<stdin>" getBool, getTop, getBot :: Parser Bool getBool = try getTop <|> getBot...
PhDP/Manticore
Akarui/Parser/Bool.hs
apache-2.0
497
0
7
74
166
97
69
14
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} import Control.Exception.Lifted import qualified Data.Aeson as A import Data.Aeson.TH import qualified Data.ByteString.Lazy.UTF8 as L import ...
Knewton/check-graph
src/Main.hs
apache-2.0
6,765
0
24
1,995
1,903
977
926
153
7
main = print (solveIt 4000000) solveIt n = sum (filter even (fibonacciTo n)) fibonacciTo max = fibHelper max [1, 1] fibHelper :: Int -> [Int] -> [Int] fibHelper max list = let (y, allButY) = pop list x = last allButY next = x + y in if (next < max) then (fibHelper max (list ++ [next])) ...
pdbartlett/misc-stuff
euler/haskell/euler2.hs
apache-2.0
388
0
12
112
200
106
94
11
2
{-# LANGUAGE DeriveGeneric #-} module Kubernetes.V1.Metadata where import Data.Aeson import System.IO.Streams() import GHC.Generics (Generic) data Metadata = Metadata {name :: Maybe String, selfLink :: String, resourceVersion :: String} deriving (Show, Generic) instance FromJSON M...
satnam6502/haskell-kubernetes
Kubernetes/V1/Metadata.hs
apache-2.0
328
0
9
73
80
48
32
11
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Kubernetes.V1.NodeSystemInfo where import GHC.Generics import Data.Text import qualified Data.Aeson -- | NodeSystemInfo is a set of ids/uuids ...
minhdoboi/deprecated-openshift-haskell-api
kubernetes/lib/Kubernetes/V1/NodeSystemInfo.hs
apache-2.0
1,215
0
8
220
129
84
45
21
0
-- Copyright 2020 TensorFlow authors. -- -- 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 law or agree...
tensorflow/haskell
tensorflow-ops/src/TensorFlow/Convolution.hs
apache-2.0
13,611
0
13
4,586
2,691
1,426
1,265
-1
-1
module NW.Error where import Control.Monad import Data.List import Data.Maybe import System.Directory import System.Exit import System.IO import NW.Util dbgMsg :: Bool -> String -> IO () dbgMsg b str | b = putStrLn $ "debug: " ++ str | otherwise = return () errMsg :: String -> IO () errMsg = hPutStr stderr . ("er...
listx/netherworld
src/NW/Error.hs
bsd-2-clause
1,517
12
12
320
576
284
292
49
2
----------------------------------------------------------------------------- -- | -- Module : Text.Parsec.Prim -- Copyright : (c) Daan Leijen 1999-2001, (c) Paolo Martini 2007 -- License : BSD-style (see the LICENSE file) -- -- Maintainer : derek.a.elkins@gmail.com -- Stability : provisional -- Por...
scott-fleischman/parsec
Text/Parsec/Prim.hs
bsd-2-clause
27,326
0
20
8,172
6,660
3,479
3,181
-1
-1
-- | Provides functionality of rendering the application model. module Renderer ( Descriptor , initialize , terminate , render ) where import Foreign.Marshal.Array import Foreign.Ptr import Foreign.Storable import Graphics.Rendering.OpenGL import Linear import System.IO import qualified LoadShade...
fujiyan/toriaezuzakki
haskell/opengl/uniform-matrix/Renderer.hs
bsd-2-clause
5,177
1
15
1,232
1,276
647
629
114
1
module Propellor.Property.Cron where import Propellor import qualified Propellor.Property.File as File import qualified Propellor.Property.Apt as Apt import Utility.SafeCommand import Data.Char type CronTimes = String -- | Installs a cron job, run as a specified user, in a particular -- directory. Note that the Des...
abailly/propellor-test2
src/Propellor/Property/Cron.hs
bsd-2-clause
1,702
12
16
310
359
200
159
30
1
{-# LANGUAGE MultiParamTypeClasses , TypeFamilies , TupleSections , ViewPatterns #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.UI.Toy -- Copyright : (c) 2012 Michael Sloan -- License : BSD-style (see the LICENSE file) -- Maintain...
mgsloan/toy-interface
src/Graphics/UI/Toy.hs
bsd-3-clause
6,846
0
10
1,418
1,121
636
485
63
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeApplications #-} -- | module Test88 where import Control.Lens import Data.Generics.Product.Param import GHC.Generics data Foo a = Foo a deriving (Eq, Show, Generic) data Bar b = Bar b deriving (Eq, Show, Generic) data FooBar c = FooBar (Foo ...
kcsongor/generic-lens
generic-lens/test/Test88.hs
bsd-3-clause
421
0
10
73
145
82
63
12
1
module InferTest where import Test.Framework import Test.Framework.Providers.HUnit import Test.HUnit import Syntax import Parser import Infer support e tenv = subst s ρ where (s, _) = infer tenv e ρ 1 ρ = TVar 0 inferTests = [ "Infer base 1" ~: inferExpr (parseExpr "1") ...
succzero/fino
test/InferTest.hs
bsd-3-clause
2,649
0
16
1,137
725
359
366
52
1
module MML ( saveMelody ) where import qualified Data.Music.Music as GM import Haskore.Interface.MIDI.Render as Render import Haskore.Music.GeneralMIDI as MidiMusic import Haskore.Interface.MML saveMelody :: GM.Melody -- Мелодия в терминах нашей проги -> Int -- Начальная октава мелодии -> St...
Teaspot-Studio/genmus
src/MML.hs
bsd-3-clause
785
0
9
153
155
88
67
16
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DefaultSignatures, FlexibleInstances, UndecidableInstances #-} {-# LANGUAGE IncoherentInstances #-} module Main where import FunctionAbstraction import Numeric.AERN.MPFRBasis.Interval main :: IO () main = do putStrLn "runFnRepComparison not implemented yet" ...
michalkonecny/aern
aern-temp/benchmarks/FnRepComparison/runFnRepComparison.hs
bsd-3-clause
1,751
0
15
587
536
282
254
43
3
----------------------------------------------------------------------------- -- -- Module : Memoization -- Copyright : Alberto GOmez Corona -- License : BSD3 -- -- Maintainer : agocorona@gmail.com -- Stability : Experimental -- Portability : Non portable (uses stablenames) -- -- | -- --------------...
ariep/TCache
src/Data/TCache/Memoization.hs
bsd-3-clause
5,076
0
16
1,152
1,235
649
586
82
3
{-# LANGUAGE CPP #-} -- | This is partial implementation of the priority of HTTP/2. -- -- This implementation does support structured priority queue -- but not support re-structuring. This means that it is assumed that -- an entry created by a Priority frame is never closed. The entry -- behaves an intermediate node, ...
bergmark/http2
Network/HTTP2/Priority.hs
bsd-3-clause
3,965
0
16
910
977
510
467
68
2
{-# LANGUAGE OverloadedStrings #-} import Test.Hspec import Text.MonadicPrinter import Data.ByteString (ByteString) import Data.Text as T (Text, unlines) import Data.Sequence import Data.Foldable (toList) combinerSpec :: Spec combinerSpec = do describe "mempty" $ it "produces an empty printer" $ getLine...
JustusAdam/monadic-printer
test/Spec.hs
bsd-3-clause
2,164
0
18
499
697
358
339
56
1
{-# LANGUAGE TemplateHaskell #-} import Test.Framework import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 import Test.Framework.TH import Test.HUnit import Test.QuickCheck import Control.Concurrent import Control.Monad.State import Data.Knob import Data.List import Data.Maybe import Netw...
alanz/htelehash
runtests.hs
bsd-3-clause
50,222
0
22
13,045
12,181
6,578
5,603
899
8
and' = (&&) or' = (||) nand a b = not (and' a b) nor a b = not (or' a b) impl a b = or' (not a) b equ' a b = a == b table :: (Bool -> Bool -> Bool) -> IO () table f = mapM_ putStrLn [show a ++ " " ++ show b ++ " " ++ show (f a b) | a <- [True, False], b <- [True, False]]
m00nlight/99-problems
haskell/p-46.hs
bsd-3-clause
308
0
11
113
194
99
95
9
1
----------------------------------------------------------------------------- -- | -- Module : B -- Copyright : (c) 2008 - 2010 Universiteit Utrecht -- License : BSD3 -- -- Maintainer : generics@haskell.org -- -- An example type representation. -----------------------------------------------------------...
spl/emgm
tests/B.hs
bsd-3-clause
5,395
0
19
1,736
2,413
1,297
1,116
115
5
module Configuration.Util where import Data.Yaml import Configuration.Types readConfiguration :: FilePath -> IO (Maybe Configuration) readConfiguration filePath = decodeFile filePath
stevechy/HaskellCakeStore
Configuration/Util.hs
bsd-3-clause
186
0
8
22
45
24
21
5
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} module Area.Site where import Servant import Text.Blaze.Html5 hiding (head, area) import Database.Persist.Postgresql import Control.Monad.Trans.Class import Control.Monad.Trans.Either import Data.Text (Text) import AppM impor...
hectorhon/autotrace2
app/Area/Site.hs
bsd-3-clause
2,315
0
19
497
835
407
428
71
3
module Factory.Producer where import Graphics.UI.GLUT import GameObjects.Objects.Ball import GameObjects.Objects.Polygon import GameObjects.Objects.Segment import Common.Drawable import Collision.VectorOperations as O import Data.Map as M -- Smart constructors polygon :: Int -> Vector -> [V...
Zielon/Bounce
src/Factory/Producer.hs
bsd-3-clause
1,900
0
13
702
828
485
343
30
1
{-# LANGUAGE Arrows, ScopedTypeVariables, OverloadedStrings #-} module Blankeroids.Asteroids where import FRP.Yampa import FRP.Yampa.Vector2 import Control.Monad import Control.Monad.Random import Blankeroids.Polygons import Blankeroids.Types import Blankeroids.Utils import Blankeroids.Debris initAsterVel :: Doub...
markgrebe/Blankeroids
Blankeroids/Asteroids.hs
bsd-3-clause
9,658
1
17
2,858
2,390
1,333
1,057
152
7
module Topic ( TopicApi , topicServer ) where import Topic.Api import Topic.Controller (topicServer)
Unisay/dancher
src/Topic.hs
bsd-3-clause
108
0
5
20
27
17
10
5
0
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE OverloadedStrings #-} -- | Filter operators for JSON values added to PostgreSQL 9.4 module Database.Persist.Postgresql.JSON ( (@>.) , (<@.) , Value() ) where import Data.Aeson (FromJSON, ToJSON, Value, encode, eitherDecodeStrict) import qualified Data.ByteStr...
plow-technologies/persistent
persistent-postgresql/Database/Persist/Postgresql/JSON.hs
mit
6,447
0
10
1,551
801
495
306
64
3
module Test.Pos.Infra.Diffusion.Subscription.SubscriptionSpec ( spec ) where import Prelude import Control.Concurrent.Async (AsyncCancelled (..), async, cancel, waitCatch) import Control.Concurrent.MVar (newEmptyMVar, takeMVar) import Control.Except...
input-output-hk/pos-haskell-prototype
infra/test/Test/Pos/Infra/Diffusion/Subscription/SubscriptionSpec.hs
mit
2,285
0
13
574
417
225
192
40
3
module Hledger.Utils.Test where import Test.HUnit import Text.Megaparsec -- | Get a Test's label, or the empty string. testName :: Test -> String testName (TestLabel n _) = n testName _ = "" -- | Flatten a Test containing TestLists into a list of single tests. flattenTests :: Test -> [Test] flattenTests (TestLabel _...
ony/hledger
hledger-lib/Hledger/Utils/Test.hs
gpl-3.0
1,745
0
10
309
548
285
263
24
1
module Eta.Debug (module Eta.Utils.Outputable, unsafePerformIO, str, debugIO) where import Eta.Utils.Outputable hiding ((<>)) import Eta.Utils.FastString import Control.Monad.IO.Class import System.IO.Unsafe(unsafePerformIO) str :: String -> SDoc str = ptext . sLit debugIO :: (MonadIO m) => String -> m ()...
rahulmutt/ghcvm
compiler/Eta/Debug.hs
bsd-3-clause
383
0
8
63
126
75
51
13
1
{-# LANGUAGE ScopedTypeVariables, KindSignatures, TemplateHaskell, GADTs, GeneralizedNewtypeDeriving, InstanceSigs, OverloadedStrings #-} module Graphics.Storyboard.Paragraph where import Data.Text (Text) import Data.Monoid import Graphics.Storyboard.Literals import Graphics.Storyboard.Mosaic import Graphics.Storybo...
tonymorris/story-board
src/Graphics/Storyboard/Paragraph.hs
bsd-3-clause
3,453
0
17
812
845
456
389
69
2
{-# OPTIONS_GHC -Wall #-} module Canonicalize.Type (tipe) where import qualified Data.Traversable as Trav import qualified AST.Type as T import qualified AST.Variable as Var import qualified Reporting.Annotation as A import qualified Reporting.Error.Canonicalize as Error import qualified Reporting.Region as R import...
mgold/Elm
src/Canonicalize/Type.hs
bsd-3-clause
2,263
0
17
646
720
374
346
66
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-sns/gen/Network/AWS/SNS/SetTopicAttributes.hs
mpl-2.0
3,847
0
9
842
468
285
183
59
1
{-# LANGUAGE BangPatterns, CPP, ScopedTypeVariables #-} -- | -- Module : Data.Attoparsec.Internal -- Copyright : Bryan O'Sullivan 2007-2015 -- License : BSD3 -- -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : unknown -- -- Simple, efficient parser combinators, loosely...
Fuuzetsu/haddock
haddock-library/vendor/attoparsec-0.13.1.0/Data/Attoparsec/Internal.hs
bsd-2-clause
6,334
0
16
1,825
1,585
812
773
108
3
module Parsing ( ChapterData(..) , TagList ) where -- -- Common parsing data types -- import BasicPrelude import Text.HTML.TagSoup type TagList = [Tag Text] -- A datatype for parameter passing: low-level parsing results -- which the detailed parser functions use as input. data ChapterD...
dogweather/nevada-revised-statutes-parser
src/Parsing.hs
bsd-3-clause
417
0
9
98
72
48
24
10
0
module ModuleRecordClash2 where import FFI import ModuleRecordClash2_Hello alert :: String -> Fay () alert = ffi "console.log(%1)" main = alert (greeting defaultHello)
beni55/fay
tests/ModuleRecordClash2.hs
bsd-3-clause
191
0
7
45
46
25
21
6
1
pairs (x:xs) = map (\y -> (x,y)) xs ++ pairs xs
bitemyapp/apply-refact
tests/examples/Default84.hs
bsd-3-clause
47
0
9
10
42
22
20
1
1
{-# LANGUAGE OverloadedStrings #-} module Snap.Internal.Http.Server.TimeoutManager.Tests ( tests ) where ------------------------------------------------------------------------------ import Control.Concurrent (newEmptyMVar, putMVar, takeMVar) import Control.Concurrent.Thre...
k-bx/snap-server
test/Snap/Internal/Http/Server/TimeoutManager/Tests.hs
bsd-3-clause
5,071
0
14
1,200
1,278
619
659
102
1
module Propellor.Property.Grub where import Propellor import qualified Propellor.Property.File as File import qualified Propellor.Property.Apt as Apt -- | Eg, \"hd0,0\" or \"xen/xvda1\" type GrubDevice = String -- | Eg, \"\/dev/sda\" type OSDevice = String type TimeoutSecs = Int -- | Types of machines that grub ca...
shosti/propellor
src/Propellor/Property/Grub.hs
bsd-2-clause
2,466
20
13
438
398
236
162
39
5
{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE RankNTypes, PolyKinds, DataKinds, TypeFamilies #-} module SAKS_Fail023 where import Data.Kind import Data.Proxy type C :: Type -> Constraint class C (a :: k) where type F :: k -> k
sdiehl/ghc
testsuite/tests/saks/should_fail/saks_fail023.hs
bsd-3-clause
241
0
7
41
51
31
20
-1
-1
module Idris.Directives(directiveAction) where import Idris.AbsSyntax import Idris.ASTUtils import Idris.Imports import Idris.Output (sendHighlighting) import Idris.Core.Evaluate import Idris.Core.TT import Util.DynamicLinker -- | Run the action corresponding to a directive directiveAction :: Directive -> Idris ()...
TimRichter/Idris-dev
src/Idris/Directives.hs
bsd-3-clause
3,304
0
14
1,260
1,010
493
517
59
3
-- | Parsing and UTF8 utilities module Distribution.Server.Util.Parse ( int, unpackUTF8, packUTF8 ) where import qualified Distribution.Compat.ReadP as Parse import qualified Data.Char as Char import Data.ByteString.Lazy (ByteString) import qualified Data.Text.Lazy as Text import qualified Data.Text.L...
mpickering/hackage-server
Distribution/Server/Util/Parse.hs
bsd-3-clause
1,285
0
14
412
249
146
103
22
2
{-# LANGUAGE PatternSynonyms #-} module T12007 where data Foo a = Foo a a pattern A a1 a2 = Foo a1 a2 pattern B a1 a2 = A a1 a2
ezyang/ghc
testsuite/tests/ghci/scripts/T12007.hs
bsd-3-clause
130
0
6
32
53
27
26
5
0
module Bar where
urbanslug/ghc
testsuite/tests/ghci/prog012/Bar1.hs
bsd-3-clause
17
0
2
3
4
3
1
1
0
module CLikeTypes where data Node = Node { nodeKind :: NodeKind , nodeData :: Maybe NodeDataType , children :: [Node] -- , parent :: Maybe Node } deriving Show getNodeChildren :: Node -> [Node] getNodeChildren node@(Node k d c) = c data NodeDataType = StringData String | IntegerData Int...
gik0geck0/CLikeHaskellCompiler
types.hs
mit
3,118
0
9
759
364
229
135
52
1
{-# LANGUAGE DeriveDataTypeable #-} {-| Module : Driver.Options Description : A command-line options processor. Copyright : (c) Michael Lopez, 2017 License : MIT Maintainer : m-lopez (github) Stability : unstable Portability : non-portable -} module Driver.Options ( Stage(..), Options(..), processOptions ...
m-lopez/jack
src/Driver/Options.hs
mit
1,344
0
11
352
269
151
118
28
1
module Optimize.QP where
Zomega/thesis
Wurm/Optimize/QP.hs
mit
25
0
3
3
6
4
2
1
0
module Utils where ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ import Application ------------------------------------------------------------------------------ concatListAppHandler :: Monad m ...
lkania/Haskitter
src/Utils.hs
mit
820
0
12
134
292
154
138
10
1