code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} module Snap.Internal.Http.Server.GnuTLS ( GnuTLSException(..) , initTLS , stopTLS , bindHttps , fre...
janrain/snap-server
src/Snap/Internal/Http/Server/GnuTLS.hs
bsd-3-clause
13,357
0
10
2,735
457
255
202
41
1
module Image where import Data.Array.IArray import Text.Printf import Control.Monad import qualified Data.ByteString.Lazy.Char8 as C type IntMat = Array (Int, Int) Int data Image = Image { imgHeight :: Int , imgWidth :: Int , imgPixels :: IntMat } deriving (Show, Eq) safeParseP5 :: C.ByteString -> Maybe Im...
lauzi/ms-final
src/Image.hs
bsd-3-clause
1,524
0
16
382
554
297
257
41
2
{-# LANGUAGE BangPatterns #-} module D18Lib where import Data.List import Data.Maybe import qualified Data.Map.Strict as Map import qualified Data.Sequence as Seq import Debug.Trace data Operand = Const Int | RegRef Char deriving (Eq, Show) data Op = Snd Operand | Set Operand Operand | Add Operand ...
wfleming/advent-of-code-2016
2017/D18/src/D18Lib.hs
bsd-3-clause
4,438
0
11
1,152
1,881
983
898
107
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} module Network.DNS.Transport ( Resolver(..) , resolve ) where import Control.Concurrent.Async (async, waitAnyCancel) import Control.Exception as E import qualified Data.ByteString.Char8 as BS import qualified Data.List.NonEmpty as NE impor...
kazu-yamamoto/dns
Network/DNS/Transport.hs
bsd-3-clause
9,134
0
21
2,507
2,290
1,160
1,130
158
5
{-# LANGUAGE ScopedTypeVariables #-} module Main where import THilbert --import Test.HUnit --import Test.QuickCheck import Test.Framework import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 main :: IO () main = defaultMain hilbertTests hilbertTests :: [Test] hilbertTests = [ ...
cje/hilbert
test/TMain.hs
bsd-3-clause
10,518
0
8
3,528
1,148
582
566
150
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE UnicodeSyntax #-} {-| [@ISO639-1@] id [@ISO639-2@] ind [@ISO639-3@] ind [@Native name@] Bahasa Indonesia [@English name@] Indonesian -} module Text.Numeral.Language....
telser/numerals
src-test/Text/Numeral/Language/IND/TestData.hs
bsd-3-clause
7,667
0
8
2,211
1,813
1,211
602
203
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. module Duckling.AmountOfMoney.MN.Tests ( tests ) where import Data.String import Prelude import Test.Tasty im...
facebookincubator/duckling
tests/Duckling/AmountOfMoney/MN/Tests.hs
bsd-3-clause
522
0
9
78
79
50
29
11
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE DeriveDataTypeab...
chreekat/stack
src/Stack/Setup.hs
bsd-3-clause
34,542
0
30
11,174
8,650
4,302
4,348
709
15
import Control.StartStop.Core import Control.StartStop.Lib import Control.StartStop.Gloss import Graphics.Gloss import Buttons count :: EvStream t x -> Hold t (Behavior t Int) count e = foldEs' (\v _ -> v + 1) e 0 main :: IO () main = runGlossHoldIO (InWindow "FRP-Zoo" (500,500) (10, 10)) white 10 $ \time events ->...
tylerwx51/StartStopFRP
frpzoo.hs
bsd-3-clause
1,318
0
18
277
504
250
254
27
2
{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE CPP #-} module Generics.Deriving.Base ( #if __GLASGOW_HASKELL__ < 701 -- * Generic represent...
ekmett/generic-deriving
src/Generics/Deriving/Base.hs
bsd-3-clause
4,584
0
5
1,140
189
139
50
-1
-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.EN.NZ.Corpus ( allExamples , negativeExample...
facebookincubator/duckling
Duckling/AmountOfMoney/EN/NZ/Corpus.hs
bsd-3-clause
1,264
0
9
456
226
134
92
35
1
module Ling.Type where import Ling.Abs type Typ = Term
np/ling
Ling/Type.hs
bsd-3-clause
67
0
4
21
17
11
6
3
0
module Main where import ABS (x:n:base:i:next:nn:obj:f:max_val:log_val:the_end) = [0..] main_ :: Method main_ [] this wb k = Assign n (Val (I 4000)) $ Assign base (Val (I 2)) $ Assign max_val (Val (I 11)) $ Assign x (Sync logarithm [n,base,max_val]) $ k logarithm :: Method logarithm [pn, pb, pmax] this w...
abstools/abs-haskell-formal
benchmarks/1_integer_part_logarithm/progs/4000.hs
bsd-3-clause
801
0
20
203
500
253
247
28
1
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE ViewPatterns #-} -- -- Generators for various distributions of particle positions -- module Random.Position where import Common.Type import System.Random.SFMT ( uniformR ) import Data.Array.Accelerate.System.Random.SFMT ( (:~>) ) im...
vollmerm/shallow-fission
tests/n-body/src-acc/Random/Position.hs
bsd-3-clause
1,437
0
13
460
491
271
220
27
5
module Query2 where import Frenetic.NetCore main addr = do let f (sw, n) = do putStrLn ("Counter is: " ++ show n) let pol = Any ==> [Forward AllPorts unmodified] <+> (Switch 5 <&&> DlSrc (EthernetAddress 1)) ==> [CountPackets 0 1000 f] controller addr pol
frenetic-lang/netcore-1.0
examples/Query2.hs
bsd-3-clause
284
0
16
73
117
57
60
8
1
module Main where import MainW (mainW) import Reflex.Dom (run) main :: IO () main = run mainW
gspia/reflex-dom-htmlea
example1/app/Main.hs
bsd-3-clause
105
0
6
28
40
23
17
5
1
module DtdToHaskell.Instance ( mkInstance ) where import Data.List (intersperse) import DtdToHaskell.TypeDef import Text.PrettyPrint.HughesPJ -- | Convert typedef to appropriate instance declaration, either @XmlContent@, -- @XmlAttributes@, or @XmlAttrType@. mkInstance :: TypeDef -> Doc -- no constructors - r...
nevrenato/Hets_Fork
utils/DtdToHaskell-src/current/Instance.hs
gpl-2.0
17,030
0
28
6,873
3,633
1,814
1,819
217
12
{-# LANGUAGE OverloadedStrings #-} module Haddock.Parser.UtilSpec (main, spec) where import Test.Hspec import Data.Either import Data.Attoparsec.ByteString.Char8 import Haddock.Parser.Util main :: IO () main = hspec spec spec :: Spec spec = do describe "takeUntil" $ do ...
jwiegley/ghc-release
utils/haddock/test/Haddock/Parser/UtilSpec.hs
gpl-3.0
683
0
16
157
173
89
84
17
1
{- Copyright 2013 Gabriel Gonzalez This file is part of the Suns Search Engine The Suns Search Engine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your o...
Gabriel439/suns-search
src/Password.hs
gpl-3.0
2,426
0
14
507
206
115
91
18
2
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Unittests for 'Ganeti.Types'. -} {- Copyright (C) 2012, 2013 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1....
mbakke/ganeti
test/hs/Test/Ganeti/Types.hs
bsd-2-clause
16,007
0
16
2,735
2,872
1,527
1,345
295
2
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} module SDL.Input.Mouse ( -- * Relative Mouse Mode LocationMode(..) , setMouseLocationMode , getMouseLocationMode ...
seppeljordan/sdl2
src/SDL/Input/Mouse.hs
bsd-3-clause
8,773
0
15
1,737
1,739
946
793
167
6
{-# LANGUAGE OverloadedStrings #-} module ConnectCmds (connectCmds) where import Control.Lens import Data.Foldable (for_) import Data.Text.Encoding import Data.Monoid ((<>)) import Irc.Message import Irc.Format import ClientState import ServerSettings connectCmds :: EventHandler connectCmds = EventHandler { _evNam...
TomMD/irc-core
driver/ConnectCmds.hs
bsd-3-clause
900
0
14
170
245
130
115
25
1
{-# LANGUAGE NoImplicitPrelude, MagicHash, TypeOperators, DataKinds, TypeFamilies, FlexibleContexts #-} ----------------------------------------------------------------------------- -- | -- Module : Java.NIO -- Copyright : (c) Jyothsna Srinivas 2017 -- -- License : BSD-style (see the file libraries/base...
pparkkin/eta
libraries/base/Java/NIO.hs
bsd-3-clause
25,045
224
9
4,279
7,868
4,170
3,698
-1
-1
module Board.Object.Object where data Object = Object deriving (Show, Eq)
charleso/intellij-haskforce
tests/gold/codeInsight/TotalProject/Board/Object/Object.hs
apache-2.0
74
0
6
10
25
15
10
2
0
{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# OPTIONS -Wall #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | Model-view-controller app types. module Snap.App.Types (Controller(..) ,Model(..) ,ControllerState(..) ,Mod...
lwm/haskellnews
upstream/snap-app/src/Snap/App/Types.hs
bsd-3-clause
2,156
0
9
523
403
247
156
45
0
{-# OPTIONS -fno-warn-tabs #-} -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and -- detab the module (please do the detabbing in a separate patch). See -- http://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces -- for de...
lukexi/ghc-7.8-arm64
compiler/nativeGen/SPARC/Stack.hs
bsd-3-clause
1,770
20
11
359
297
165
132
29
1
{-# LANGUAGE CPP #-} module Util.ScreenSize where import Debug.Trace #ifndef CURSES getScreenWidth :: IO Int getScreenWidth = return 80 #else import UI.HSCurses.Curses getScreenWidth :: IO Int getScreenWidth = do initScr refresh size <- scrSize endWin ...
andyarvanitis/Idris-dev
src/Util/ScreenSize.hs
bsd-3-clause
363
0
5
125
31
19
12
5
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="az-AZ"> <title>WebSockets | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref l...
thc202/zap-extensions
addOns/websocket/src/main/javahelp/org/zaproxy/zap/extension/websocket/resources/help_az_AZ/helpset_az_AZ.hs
apache-2.0
972
78
66
158
411
208
203
-1
-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="fil-PH"> <title>Pagsusuri sa Kontrol ng Pag-access | Ekstensyon ng ZAP</title> <maps> <homeI...
kingthorin/zap-extensions
addOns/accessControl/src/main/javahelp/org/zaproxy/zap/extension/accessControl/resources/help_fil_PH/helpset_fil_PH.hs
apache-2.0
802
63
54
125
354
177
177
-1
-1
Module Foo where
urbanslug/ghc
testsuite/tests/driver/bug1677/Foo.hs
bsd-3-clause
17
0
5
3
9
3
6
-1
-1
main = do putStrLn "Hello hell"
Bolt64/my_code
haskell/99_problems.hs
mit
32
0
7
6
12
5
7
1
1
{-# LANGUAGE ExistentialQuantification #-} module Config.AppConfig ( AppConfig (..) , ConfigException (..) , getAppConfig ) where import Config.Internal.Database (ConnectionPool, makePool) import Config.Environment (Environment (..)) import Control.Exception (Exception, throwIO) import Control.Monad (liftM) i...
gust/feature-creature
feature-creature/backend/src/Config/AppConfig.hs
mit
4,400
0
14
960
971
532
439
96
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoMonomorphismRestriction #-} import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as C import qualified Data.ByteString.Lazy as L import System.Environment (getArgs) import qualified Dat...
f-me/xlsx-parser
temp/expat-enum.hs
mit
1,297
0
17
406
361
198
163
35
4
-- Floating-point Approximation (II) -- https://www.codewars.com/kata/581ee0db1bbdd04e010002fd module Codewars.G964.Approxinter where interp :: (Double -> Double) -> Double -> Double -> Int -> [Double] interp f l u n = map ((/100) . fromInteger . floor . (*100) . (/100000) . fromInteger . round . (* 100000) . f) . ta...
gafiatulin/codewars
src/6 kyu/Approxinter.hs
mit
362
0
17
59
146
82
64
3
1
module Main where import Control.Monad (unless) import Data.IORef import Graphics.Rendering.OpenGL import Graphics.GLUtil import Graphics.UI.GLUT hiding (exit) import Foreign.Marshal.Array (withArray) import Foreign.Storable (sizeOf) import ...
triplepointfive/hogldev
tutorial08/Tutorial08.hs
mit
3,743
0
18
976
958
451
507
94
1
-- | Handler for the 'tick' command. module Commands.Tick.Handler ( handleTickCommand ) where import Types import Util import Parsing import TodoLenses import Commands.What.Handler import Commands.Common import Text.Read (readMaybe) import Data.Char (ord) import Control.Monad (unless) import Control.Exception ...
DimaSamoz/thodo
src/Commands/Tick/Handler.hs
mit
1,565
0
25
636
395
197
198
37
6
{-# LANGUAGE OverloadedStrings #-} -- Generate a palindrom JSON machine from a provided alphabet. module Main where import System.Environment import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy as B (readFile) import qualified Data.Text.Lazy as T (Text) import Text.Printf (printf) import Turin...
range12/there-is-no-B-side
tools/generators/Palindrome/GenPalindromeMachine.hs
mit
4,536
67
14
931
833
578
255
-1
-1
-- First Variation on Caesar Cipher -- http://www.codewars.com/kata/5508249a98b3234f420000fb/ module Codewars.Kata.CaesarCipher (demovingShift, movingShift) where import Data.Char (chr, ord) import Data.List.Split (chunksOf) demovingShift :: [String] -> Int -> String demovingShift xs shift = zipWith (curry f...
gafiatulin/codewars
src/5 kyu/CaesarCipher.hs
mit
794
0
15
176
346
189
157
12
2
module Database.Toy.Internal.Util.FixedSizeSerialize where import Data.Serialize (Serialize) import Database.Toy.Internal.Prelude import Foreign.Storable (sizeOf) -- | Typeclass that guarantees that size of serialized -- object would be the same for any instance of object class Serialize a => FixedSizeSerialize a whe...
dancingrobot84/toydb
src/Database/Toy/Internal/Util/FixedSizeSerialize.hs
mit
654
0
7
108
104
61
43
12
0
module Y2018.M06.D15.Solution where {-- More dater today, but with a dater-fix, too! The tab-separated file (tsv) in this directory is a report of all duplicates- by-article_id in our article database. Your job is to find all the 'older' ids (not article_id) of the articles and create a SQL DELETE statement to purge ...
geophf/1HaskellADay
exercises/HAD/Y2018/M06/D15/Solution.hs
mit
4,682
0
13
825
747
413
334
-1
-1
{-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE PatternSynonyms #-} module U.Codebase.Reference where import Data.Text (Text) import Data.Word (Word64) import qualified U.Util.Hash as Ha...
unisonweb/platform
codebase2/codebase/U/Codebase/Reference.hs
mit
2,376
0
10
411
873
460
413
57
2
{-# OPTIONS_GHC -fno-warn-orphans #-} module Graphics.Urho3D.Math.Matrix4( Matrix4(..) , HasRow1(..) , HasRow2(..) , HasRow3(..) , HasRow4(..) , matrix4Context , loadMatrix4 ) where import qualified Language.C.Inline as C import qualified Language.C.Inline.Cpp as C import Graphics.Urho3D.Creatable ...
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Math/Matrix4.hs
mit
3,948
0
11
870
883
496
387
-1
-1
module MoleculeToAtoms where import Text.ParserCombinators.Parsec import qualified Data.Map as M data AST = Ele String | Count AST Int | Str [AST] deriving (Show) parseMol :: Parser AST parseMol = do e <- parseCount es <- many parseCount return $ if null es then e...
delta4d/codewars
kata/molecule-to-atoms/MoleculeToAtoms.hs
mit
1,361
0
17
407
600
305
295
37
3
-- | Athena.Utils.Monads utilities. -- Adapted from https://github.com/asr/apia. {-# LANGUAGE UnicodeSyntax #-} module Athena.Utils.Monad ( die , failureMsg , stdout2file ) where ------------------------------------------------------------------------------ import Athena.Utils.PrettyPrint ( Doc, prettyShow...
jonaprieto/athena
src/Athena/Utils/Monad.hs
mit
1,096
0
10
191
232
130
102
23
1
import Test.Hspec (Spec, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import SecretHandshake (handshake) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs specs :: Spec specs = do it "wink for 1" $ handshake (1 :: Int) `shouldBe` ["wink"...
c19/Exercism-Haskell
secret-handshake/test/Tests.hs
mit
1,386
0
10
342
437
240
197
31
1
-- | `MonadTimed` related helper functions. module Control.TimeWarp.Timed.Misc ( repeatForever , sleepForever ) where import Control.Concurrent.STM.TVar (newTVarIO, readTVarIO, writeTVar) import Control.Exception.Base (SomeException) import Control.M...
serokell/time-warp
src/Control/TimeWarp/Timed/Misc.hs
mit
2,086
0
16
708
439
237
202
36
2
{-# LANGUAGE OverloadedStrings #-} module Main where import Data.ByteString.Builder (string8) import Control.Concurrent (forkIO, threadDelay) import Control.Concurrent.Chan import Control.Monad import Data.Time.Clock.POSIX (getPOSIXTime) import Network.HTTP.Types (status200) import Network.Wai (Application, Middleware...
creichert/wai
wai-extra/example/Main.hs
mit
1,808
0
13
427
489
265
224
41
5
{-# htermination (notElemChar :: Char -> (List Char) -> MyBool) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Char = Char MyInt ; data MyInt = Pos Nat | Neg Nat ; data Nat = Succ Nat | Zero ; asAs :: MyBool -> MyBool -> MyBool; asAs MyFalse x = MyF...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/notElem_3.hs
mit
1,696
0
9
432
843
452
391
45
1
module Textures where import Graphics.Gloss.Rendering import Graphics.Gloss.Data.Color import Graphics.Gloss.Data.Picture import Graphics.Gloss.Juicy import qualified Data.Map as M import Control.Monad import Control.Applicative import Data.Maybe (fromJust) type Texture = Picture -- | A general map to access all text...
joom/civ
src/Textures.hs
mit
1,160
0
12
201
268
164
104
26
1
-- Project Euler Problem 11 - Largest product in a grid -- -- Greatest product of four adjacent numbers in the same direction (up, down, left, right, or diagonally) grid -- grid = [ [08, 02, 22, 97, 38, 15, 00, 40, 00, 75, 04, 05, 07, 78, 52, 12, 50, 77, 91, 08], [49, 49, 99, 40, 17, 81, 18, 57, 60, 87, 17, 40, 98, ...
yunwilliamyu/programming-exercises
project_euler/p011_grid_product.hs
cc0-1.0
2,556
43
14
583
1,746
1,093
653
32
2
module Main where concatenador :: String -> String -> String concatenador x y = x ++ " " ++ y main :: IO() main = do print(concatenador "aoi" "uu9")
llscm0202/BIGDATA2017
ATIVIDADE1/exerciciosBasicos/ex11.hs
gpl-3.0
154
0
9
34
64
33
31
6
1
{-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE LambdaCase #-} module Main where import Control.Lens import Control.Monad.State.Strict import qualified Data.Map as M import FreeGame import Shakugan.Types import Shakugan.Util import Shakugan.Load import Shakugan.CharacterControl main ∷ IO ...
Fuuzetsu/shakugan-no-haskell
src/Main.hs
gpl-3.0
1,744
0
15
689
456
234
222
-1
-1
module TestServer where import Test.HUnit import PupEventsPQueue import Events import qualified PupEventsClient as Client import qualified Server as Server import Control.Concurrent.STM import Control.Concurrent import Control.Exception.Base import Data.List import System.Environment import System.Random import qualif...
RocketPuppy/PupCollide
Test/TestServer.hs
gpl-3.0
8,522
0
12
2,341
2,087
1,020
1,067
161
2
module Tests.ADTUntypedNamed where import QFeldspar.MyPrelude import QFeldspar.Expression.ADTUntypedNamed import qualified QFeldspar.Expression.ADTValue as V import QFeldspar.Conversion import QFeldspar.Expression.Conversions.Evaluation.ADTUntypedNamed () import qualified Language.Haskell.TH.Syntax as TH import QFelds...
shayan-najd/QFeldspar
Tests/ADTUntypedNamed.hs
gpl-3.0
1,053
0
18
245
415
236
179
-1
-1
{-# LANGUAGE RecordWildCards, StandaloneDeriving, OverloadedStrings #-} {-| An 'Account' has a name, a list of subaccounts, an optional parent account, and subaccounting-excluding and -including balances. -} module Hledger.Data.Account where import Data.List import Data.Maybe import Data.Ord import qualified Data.M...
ony/hledger
hledger-lib/Hledger/Data/Account.hs
gpl-3.0
7,988
0
16
1,850
1,857
994
863
114
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Settings/SendAs/Get.hs
mpl-2.0
5,638
0
20
1,336
792
463
329
121
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Bidders/FilterSets/BidResponsesWithoutBids/List.hs
mpl-2.0
7,803
0
18
1,595
893
522
371
137
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-firestore/gen/Network/Google/Resource/FireStore/Projects/Databases/Documents/Delete.hs
mpl-2.0
6,299
0
17
1,326
869
505
364
127
1
module MedicalAdvice.Lib where import System.Random (randomRIO) pickRandom :: [a] -> IO a pickRandom l = do idx <- randomRIO (0,length l - 1) return $ l !! idx
ToJans/learninghaskell
0004AmISick/MedicalAdvice/Lib.hs
unlicense
176
0
11
44
73
38
35
6
1
module Parser (parse) where import qualified AST as AST import qualified Tokenizer as T parseScope :: [T.Token] -> ([AST.AST], [T.Token]) parseScope [] = error "parser: end of stream" parseScope (T.ScopeEnd : ts) = ([], ts) parseScope ts = (ast : asts, tsss) where (ast, tss) = parseAST ts (asts, tsss) = par...
shockkolate/shockklang2
Parser.hs
apache-2.0
1,107
0
13
215
541
293
248
27
1
{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE BangPatterns, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} module Network.Riak.Protocol.PingRequest (PingRequest(..)) where import Prelude ((+), (/)) import qualified Prelude as Prelude' import qualified Data.Typeable as Prelude' import quali...
bumptech/riak-haskell-client
protobuf/src/Network/Riak/Protocol/PingRequest.hs
apache-2.0
2,294
1
16
478
493
260
233
47
0
{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | Implementation of a transition map build on top of the "M.Map" container. module Data.DAWG.Trans.Map ( Trans (unTrans) ) where import Prelude hiding (lookup) import Data.Binary (Binary) import qualified Data.Map as M import Data.DAWG.Types import qualified Data.DAWG....
kawu/dawg
src/Data/DAWG/Trans/Map.hs
bsd-2-clause
1,093
2
12
287
285
161
124
32
0
{- | Module : Data.Graph.Analysis.Algorithms Description : Graph analysis algorithms Copyright : (c) Ivan Lazar Miljenovic 2009 License : 2-Clause BSD Maintainer : Ivan.Miljenovic@gmail.com This module exports all the algorithms found in the @Data.Graph.Analysis.Algorithms.*@ modules. ...
ivan-m/Graphalyze
Data/Graph/Analysis/Algorithms.hs
bsd-2-clause
1,056
0
5
188
78
59
19
9
0
-- | -- Module : Text.Megaparsec.Prim -- Copyright : © 2015 Megaparsec contributors -- © 2007 Paolo Martini -- © 1999–2001 Daan Leijen -- License : BSD3 -- -- Maintainer : Mark Karpov <markkarpov@opmbx.org> -- Stability : experimental -- Portability : portable -- -- The...
omefire/megaparsec
Text/Megaparsec/Prim.hs
bsd-2-clause
24,033
0
20
5,901
5,730
3,018
2,712
-1
-1
{-# LANGUAGE DeriveGeneric #-} module Dalvik.Instruction ( decodeInstructions , insnUnitCount , Reg(..) , ConstArg(..) , MoveType(..) , Move1Type(..) , AccessType(..) , AccessOp(..) , InvokeKind(..) , CType(..) , CmpOp(..) , IfOp(..) , Unop(..) , Binop(..) , Instruction(..) , DecodeError...
travitch/dalvik
src/Dalvik/Instruction.hs
bsd-3-clause
23,136
0
18
6,729
9,494
5,236
4,258
668
51
module StringUtilsSpec where import SpecHelper import System.Time main :: IO () main = hspec spec spec :: Spec spec = do describe "StringUtils" $ do context "enlarge" $ do it "enlarges a string by a given factor" $ do enlarge 5 "fo" `shouldBe` "fo " context "alignStrings" $ do it "al...
Sam-Serpoosh/WatchIt
test/StringUtilsSpec.hs
bsd-3-clause
1,050
0
20
278
285
137
148
27
1
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, ExistentialQuantification #-} module Test.HyperDex.Shared (sharedTests) where import Test.HyperDex.Space import Test.Framework import Test.Framework.Providers.HUnit import Test.HUnit hiding (Test) import Control.Monad import Test.Framework.Providers.QuickCheck2...
AaronFriel/hyhac
test/Test/HyperDex/Shared.hs
bsd-3-clause
5,575
0
23
1,696
1,444
734
710
109
3
import Control.Monad.Trans import Data.List import qualified Network.HTTP as HTTP import Network.URI as URI markup = <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>A poor-man's blog</title> <meta name="keywords" content="turbinado, has...
abuiles/turbinado-blog
App/Layouts/Default.hs
bsd-3-clause
2,337
147
82
790
804
399
405
-1
-1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[TcType]{Types used in the typechecker} This module provides the Type interface for front-end parts of the compiler. These parts * treat "source types" as opaque: newtypes, and predicates ...
sdiehl/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
94,212
0
17
24,003
14,751
7,870
6,881
-1
-1
module Main where import Control.Monad.Writer import Control.Monad.Identity import Expr import CodeGen import Optimization import X86_64 test :: [Instr] test = optimize $ assemble $ compile $ optimize (Lit 10 :+: Lit 5 :*: Lit 3) main :: IO () main = print test
faineance/minigen
src/Main.hs
bsd-3-clause
285
0
10
66
94
52
42
11
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GLU.Errors -- Copyright : (c) Sven Panne 2003 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : sven_panne@yahoo.com -- Stability : provisional ...
OS2World/DEV-UTIL-HUGS
libraries/Graphics/Rendering/OpenGL/GLU/Errors.hs
bsd-3-clause
1,861
0
12
312
203
130
73
15
2
module Parser where import Text.Parsec hiding (space) import Text.Parsec.String import Text.Parsec.Combinator import Text.Parsec.Char hiding (space) import Data.Char import Types import Control.Applicative hiding (many, (<|>)) import Test.QuickCheck square :: Parser Square square = (toSquare <$> oneOf "abcdefgh...
Saulzar/arimaa
src/Parser.hs
bsd-3-clause
2,555
0
13
634
955
490
465
69
7
{-# LANGUAGE OverloadedStrings, FlexibleContexts, FlexibleInstances, RankNTypes #-} module Web.Scotty.Route ( get, post, put, delete, patch, addroute, matchAny, notFound, capture, regex, function, literal ) where import Control.Arrow ((***)) import Control.Monad.Error import qualified Control.Monad.State...
xich/scotty
Web/Scotty/Route.hs
bsd-3-clause
7,738
0
15
1,841
2,053
1,105
948
-1
-1
{-# LANGUAGE Arrows, ScopedTypeVariables, OverloadedStrings #-} module Blankeroids.Ship where import FRP.Yampa import FRP.Yampa.Vector2 import Control.Monad.Random import Blankeroids.Polygons import Blankeroids.Types import Blankeroids.Utils import Blankeroids.Debris import Blankeroids.Missiles shipThrust :: Do...
markgrebe/Blankeroids
Blankeroids/Ship.hs
bsd-3-clause
8,812
2
18
2,989
2,275
1,245
1,030
150
14
{-# LANGUAGE NoMonomorphismRestriction #-} module Diagrams.Swimunit.Dotmatrix where import qualified Data.Map as Map import Diagrams.Prelude import Diagrams.Backend.SVG.CmdLine {-| Renders list of characters to a diagram where the characters are shown as if displayed by an old dotmatrix panel. Only the light ...
wherkendell/diagrams-contrib
src/Diagrams/Swimunit/Dotmatrix.hs
bsd-3-clause
23,603
0
13
13,379
3,170
1,967
1,203
660
4
-------------------------------------------------------------------------------- -- | Exports a datastructure for the top-level hakyll configuration module Hakyll.Core.Configuration ( Configuration (..) , shouldIgnoreFile , defaultConfiguration ) where -------------------------------------------------...
bergmark/hakyll
src/Hakyll/Core/Configuration.hs
bsd-3-clause
3,284
0
11
888
361
226
135
37
1
{-# LANGUAGE GeneralizedNewtypeDeriving, TypeFamilies #-} module Control.Monad.Code.Typed ( module Control.Monad.Code.Class.Typed , Typed.Label , Typed.return , CodeT , runCodeT ) where import Control.Applicative import Control.Monad.Code.Class.Typed hiding (Label, return) imp...
sonyandy/tnt
Control/Monad/Code/Typed.hs
bsd-3-clause
1,292
0
9
414
305
184
121
31
1
{-# language CPP #-} -- No documentation found for Chapter "StructureType" module Vulkan.Core10.Enums.StructureType (StructureType( STRUCTURE_TYPE_APPLICATION_INFO , STRUCTURE_TYPE_INSTANCE_CREATE_INFO , STR...
expipiplus1/vulkan
src/Vulkan/Core10/Enums/StructureType.hs
bsd-3-clause
343,250
1
10
62,719
13,965
8,744
5,221
-1
-1
module Compiler.Translate ( trProgram ) where import Compiler.Util import qualified Data.List as L import qualified Data.Map.Lazy as M import qualified Data.Set as S import qualified Data.Text as T import LLVM.AST import LLVM.AST.CallingConvention import qualified LLVM.AST.Constant as Const import qualified LLVM.A...
Neuromancer42/ministgwasm
src/Compiler/Translate.hs
bsd-3-clause
23,013
0
22
8,116
7,833
4,022
3,811
521
11
module Main where --import Lib main :: IO () main = someFunc someFunc :: IO () someFunc = putStrLn "someFunc2"
fsharpcorner/99-Problems-in-Haskell
app/Main.hs
bsd-3-clause
117
2
6
26
40
22
18
6
1
{-# LANGUAGE NoImplicitPrelude #-} -- | -- Module: $HEADER$ -- Description: Proxy helper functions for Functor -- Copyright: (c) 2014 Peter Trsko -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com -- Stability: experimental -- Portability: NoImplicitPrelude -- -- Proxy helper functions for 'F...
trskop/type-proxies
src/Data/Proxy/Functor.hs
bsd-3-clause
1,312
0
9
261
178
109
69
18
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} -- TODO: -- better interface -- have error messages in the right order -- have a message for plain failures as well / remove failure in recoveries -- Optimize profile inf...
siddhanathan/yi
yi-core/src/Parser/Incremental.hs
gpl-2.0
13,785
6
15
4,315
5,694
2,913
2,781
262
12
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-rds/gen/Network/AWS/RDS/DeleteDBInstance.hs
mpl-2.0
7,078
0
13
1,346
752
467
285
89
1
module Network.Haskoin.Wallet.Client (clientMain) where import System.FilePath ((</>)) import System.Directory (createDirectoryIfMissing) import System.Posix.Directory (changeWorkingDirectory) import System.Posix.Files ( setFileMode , setFileCreationMask , unionFileModes , ownerModes , groupModes ...
tphyahoo/haskoin
haskoin-wallet/Network/Haskoin/Wallet/Client.hs
unlicense
9,222
0
16
3,090
2,611
1,384
1,227
-1
-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="hi-IN"> <title>SOAP Scanner | ZAP Extension</title> <maps> <homeID>top</homeID> <mapre...
veggiespam/zap-extensions
addOns/soap/src/main/javahelp/org/zaproxy/zap/extension/soap/resources/help_hi_IN/helpset_hi_IN.hs
apache-2.0
974
80
66
160
415
210
205
-1
-1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "src/Numeric/Compat.hs" #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} module Numeric.Compat ( module Base , showFFloatAlt , showGFloatAlt ) where import Numeric as Base
phischu/fragnix
tests/packages/scotty/Numeric.Compat.hs
bsd-3-clause
258
0
4
82
26
19
7
8
0
{-# LANGUAGE MultiParamTypeClasses #-} {-| Module : Idris.ASTUtils Description : This implements just a few basic lens-like concepts to ease state updates. Similar to fclabels in approach, just without the extra dependency. Copyright : License : BSD3 Maintainer : The Idris Community. This implements just a...
Heather/Idris-dev
src/Idris/ASTUtils.hs
bsd-3-clause
5,503
0
12
1,122
1,228
681
547
75
2
module SameNameOnlyConstructorUsed where import Language.Haskell.Exts (Module (Module)) foo = Module
serokell/importify
test/test-data/haskell-src-exts@constructors/04-SameNameOnlyConstructorUsed.hs
mit
103
0
6
12
24
16
8
3
1
{-# LANGUAGE PatternGuards #-} module Distribution.Client ( -- * Command line handling validateHackageURI , validatePackageIds -- * Fetching info from source and destination servers , PkgIndexInfo(..) , downloadIndex , readNewIndex -- * HTTP utilities , HttpSession , uriHostName , httpSessio...
mpickering/hackage-server
Distribution/Client.hs
bsd-3-clause
12,323
0
21
3,194
3,710
1,897
1,813
277
6
<?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="sq-AL"> <title>AdvFuzzer Add-On</title> <maps> <homeID>top</homeID> <mapref location="m...
kingthorin/zap-extensions
addOns/fuzz/src/main/javahelp/org/zaproxy/zap/extension/fuzz/resources/help_sq_AL/helpset_sq_AL.hs
apache-2.0
961
77
67
156
411
208
203
-1
-1
module MultiOccur2 where idid = id $ id
kmate/HaRe
old/testing/introNewDef/MultiOccur2.hs
bsd-3-clause
48
0
5
16
13
8
5
2
1
-- Type inference for literals. module TiLit where import BaseSyntaxStruct --import HasBaseStruct --import TiPrelude import TI import MUtils {- instance (TypeId i,ValueId i,Fresh i, --HasBaseStruct e (EI i e' p ds t c), HasLit e, HasTypeApp i e) => TypeCheck i HsLiteral (Typed i e) where tc = t...
forste/haReFork
tools/base/TI/TiLit.hs
bsd-3-clause
849
0
9
229
185
93
92
18
4
module Main where import Build_doctests (deps) import Control.Applicative import Control.Monad import Data.List import System.Directory import System.FilePath import Test.DocTest main :: IO () main = getSources >>= \sources -> doctest $ "-isrc" : "-idist/build/autogen" : "-optP-include" : "-optP...
tonymorris/system-command
test/doctests.hs
bsd-3-clause
871
0
13
164
277
148
129
27
1
{-# LANGUAGE DatatypeContexts #-} -- Killed GHC 5.02.3 -- Confusion about whether the wrapper for a data constructor -- with a "stupid context" includes the stupid context or not -- Core lint catches it, but it seg-faults if it runs module Main where data Color = Red | Black deriving Show da...
ezyang/ghc
testsuite/tests/typecheck/should_run/tcrun029.hs
bsd-3-clause
878
0
10
418
178
107
71
19
1
{-# LANGUAGE Safe, Unsafe, Trustworthy #-} -- | Basic test to see that incompatible flags give a nice error -- message and ghc do not panic (see issue #11580). module SafeFlags30 where f :: Int f = 1
olsner/ghc
testsuite/tests/safeHaskell/flags/SafeFlags30.hs
bsd-3-clause
201
0
4
39
17
12
5
4
1
{-# LANGUAGE RankNTypes #-} -- A test for rank-3 types module ShouldCompile where data Fork a = ForkC a a mapFork :: forall a1 a2 . (a1 -> a2) -> (Fork a1 -> Fork a2) mapFork mapA (ForkC a1 a2) = ForkC (mapA a1) (mapA a2) data SequF s a = EmptyF | ZeroF (s (Fork a))...
ezyang/ghc
testsuite/tests/typecheck/should_compile/tc151.hs
bsd-3-clause
1,186
0
15
400
558
300
258
19
1
{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable #-} module Main(main,f) where import Data.List (isPrefixOf) import Data.Dynamic import Control.Exception as E data Failure = Failure deriving (Show, Typeable) instance Exception Failure test = (E.throw Failure >> return ()) `E.catch` (\(x::F...
ghc-android/ghc
testsuite/tests/simplCore/should_run/T3959.hs
bsd-3-clause
1,488
0
9
414
155
87
68
15
1
{-# LANGUAGE Trustworthy, NoImplicitPrelude #-} {-# OPTIONS_GHC -fpackage-trust #-} -- make sure importing a safe-infered module brings in the -- pkg trust requirements correctly. module Check06 ( main' ) where import safe Check06_A main' = let n = mainM 1 in n
ghc-android/ghc
testsuite/tests/safeHaskell/check/Check06.hs
bsd-3-clause
274
1
9
54
36
22
14
7
1
{-# LANGUAGE CPP #-} module Application (app) where import Prelude () import BasicPrelude import Data.Foldable (for_) import Control.Concurrent import Control.Concurrent.STM import Control.Monad.Trans.State (StateT, runStateT, get, put, modify) import Control.Error (hush, runEitherT, EitherT(..), left, note, readZ, ri...
singpolyma/txtmpp
Application.hs
isc
23,365
575
27
4,315
8,564
4,357
4,207
436
12
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.WebGLDrawBuffers (js_drawBuffersWEBGL, drawBuffersWEBGL, pattern COLOR_ATTACHMENT0_WEBGL, pattern COLOR_ATTACHMENT1_WEBGL, pattern COLOR_ATTACHMENT2_WEBGL, pattern COLOR_ATTACHMENT3_WEBGL, ...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/WebGLDrawBuffers.hs
mit
4,043
8
11
564
836
485
351
80
1