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
-- | vom Automaten zum regulären Ausdruck {-# language TypeSynonymInstances #-} {-# language MultiParamTypeClasses #-} {-# language DeriveDataTypeable #-} module NFA.Analyse ( module NFA.Analyse , module NFA.AI ) where import NFA.AI import Autolib.Exp import Autolib.Exp.Inter import Autolib.NFA.Type import Aut...
marcellussiegburg/autotool
collection/src/NFA/Analyse.hs
gpl-2.0
1,394
6
17
336
394
210
184
41
1
import Control.Wire (clockSession_) import Game.Folivora.GLFWbWire import Game.Folivora.Render import Game import PlatformerRender main :: IO () main = do (window, graphics) <- initGL texs <- (load :: IO PlatformerTextures) glGo texs (window, graphics) clockSession_ game
caryoscelus/folivora-ge
demos/platformer/Main.hs
gpl-3.0
297
0
9
59
91
50
41
10
1
module HEP.Automation.MadGraph.Dataset.Set20110303set2 where import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.Cluster import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Dataset.Common my_ssetup :: S...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110303set2.hs
gpl-3.0
1,545
0
8
368
318
196
122
39
1
{-# LANGUAGE UnicodeSyntax #-} module Newton (getNewtonColor, newtonPicSize) where import Graphics.Rendering.Chart.Easy import Graphics.Rendering.Chart.Backend.Cairo import Data.Complex import Data.Maybe import Data.List type Cex = Complex Double φ, φ' :: Cex → Cex φ z = z**3 - 1 φ' z = 3 * z**2 next z = z - φ z ...
flyingleafe/newton-iterations-homework
src/Newton.hs
gpl-3.0
1,119
0
12
239
502
271
231
32
1
{- Copyright (C) 2014 Richard Larocque <richard.larocque@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This progr...
richardlarocque/latin-db-builder
main.hs
gpl-3.0
1,466
0
12
244
227
108
119
26
1
{-# LANGUAGE TemplateHaskell, TypeFamilies, RecordWildCards, DeriveDataTypeable, DeriveGeneric #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Hive.Master.Persistent where ------------------------------------------------------------------------------- import qualified Control.Monad.Reader as R (ask) import quali...
chrisbloecker/Hive
src/Hive/Master/Persistent.hs
gpl-3.0
2,943
0
13
717
797
425
372
64
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Get.hs
mpl-2.0
5,361
0
18
1,356
862
503
359
118
1
module IO.Colors where import Data.Define import Data.ID import UI.HSCurses.Curses import Data.Maybe (catMaybes) import Data.Functor ((<$>)) -- | constants with handles of foreground colors backMult, defaultc, defaultBack, red, green, yellow, blue, magenta, cyan, redInverse :: Int backMult = 8 defaultc = 1 def...
green-orange/trapHack
src/IO/Colors.hs
unlicense
3,124
0
12
746
1,239
657
582
90
1
{-# LANGUAGE RecordWildCards, RankNTypes, GADTs, KindSignatures #-} module Types where import Data.Aeson import Data.Aeson.Types (typeMismatch) import Data.Attoparsec.ByteString.Char8 import Data.ByteString.Char8 (ByteString, unpack) import Data.Maybe (fromMaybe) import Data.Monoid ((<>)) imp...
centromere/cacophony
tests/vectors/Types.hs
unlicense
9,252
0
14
2,019
2,273
1,301
972
287
1
{-# LANGUAGE OverloadedStrings #-} module DBusTests.Generation where import DBus.Client import qualified DBus.Internal.Types as T import qualified DBus.Introspection.Types as I import Data.Int import Data.Map as M sampleMethod1 :: String -> Int32 -> IO (M.Map String Int32) sampleMethod1...
rblaze/haskell-dbus
tests/DBusTests/Generation.hs
apache-2.0
1,369
0
12
491
269
157
112
27
1
{-# LANGUAGE Rank2Types #-} module Data.Attoparsec.Machine where import Data.Attoparsec.Internal.Types (IResult (..)) import Data.Machine (Is (Refl), MachineT (..), ProcessT, Step (Await, Yield), stopped) streamParserWith :: (Monoid i, Monad m) => (i -> IResult i a) -> ProcessT m i (Either String a) streamParserWith...
aloiscochard/sarsi
src/Data/Attoparsec/Machine.hs
apache-2.0
1,042
0
12
226
482
252
230
17
3
module Data.CRF.Chain2.Generic.DP ( table , flexible2 , flexible3 ) where import qualified Data.Array as A import Data.Array ((!)) import Data.Ix (range) table :: A.Ix i => (i, i) -> ((i -> e) -> i -> e) -> A.Array i e table bounds f = table' where table' = A.listArray bounds $ map (f (table' !)) ...
kawu/crf-chain2-generic
Data/CRF/Chain2/Generic/DP.hs
bsd-2-clause
1,341
0
15
430
730
393
337
36
1
-- | -- Weather broadcast server in Haskell -- Binds SUB socket to tcp://localhost:5556 -- Collects weather updates and finds avg temp in zipcode -- -- Translated to Haskell by ERDI Gergo http://gergo.erdi.hu/ module Main where import System.ZMQ import Control.Monad (replicateM) import Data.ByteString.Char8 (unpack)...
krattai/noo-ebs
docs/zeroMQ-guide2/examples/Haskell/wuclient.hs
bsd-2-clause
1,099
0
24
256
278
141
137
22
2
{-# LANGUAGE ScopedTypeVariables, FlexibleContexts, RankNTypes, ExistentialQuantification, GADTs, TypeOperators, KindSignatures, MultiParamTypeClasses, ConstraintKinds #-} import Data.Array.MArray import Data.Array.Unboxed import Data.Array.ST import Control.Monad.ST import Data.Constraint (Constraint, (:-), (\\)) im...
dorchard/array-memoize
ArrayMemoGeneral.hs
bsd-2-clause
1,950
2
23
540
654
357
297
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE CPP #-} module Data.Enumerator.Exception ( catch , try , finally , throwIO , bracket ) where #if MC03 import Control.Monad.Trans.Control (MonadBaseControl) import qualified Control.Exception.Lifted as E #define MBCIO MonadBaseControl IO #else impor...
snoyberg/enumerator-exception
Data/Enumerator/Exception.hs
bsd-2-clause
1,656
0
16
464
612
316
296
52
3
{-# Language GADTs, NoMonomorphismRestriction, NoMonoLocalBinds, RankNTypes, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-} module Grin ( module Grin, module Syntax, module VarArgs ) where import Control.Applicative ( (<$>) ) import Control.Monad im...
farre/grin
Grin.hs
bsd-3-clause
4,212
0
16
1,098
1,843
947
896
101
7
{-# LANGUAGE OverloadedStrings #-} import Network.WebSockets import Data.Aeson main :: IO () main = runServer "127.0.0.1" 8080 handleConnection handleConnection pending = do print "Server listening on port 8080" connection <- acceptRequest pending print "Connected!" let loop = do cmdMsg <...
jhoxray/muon
src/server/server.hs
bsd-3-clause
745
0
15
202
182
82
100
21
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-...
xicesky/sky-haskell-playground
src/Sky/Ideas/ExtensibleADT.hs
bsd-3-clause
6,746
0
10
1,329
1,492
791
701
93
1
module MatrixSpec(main, spec) where import Test.Hspec import qualified Matrix as M import Complex import Control.Exception spec::Spec spec = do describe "Complex Matrix operations:" $ do describe "Matrix.add:" $ do it "should add two matrices element by element" $ do let m1 = (M.matrix [[ Cartesia...
balopat/quantum-computing
test/MatrixSpec.hs
bsd-3-clause
7,137
1
25
2,295
2,829
1,460
1,369
104
1
module RW.Chap5.SimpleJSON ( JValue(..), getString, getBool, getDouble, getInt, getObject, getArray, isNull ) where type AssocList a = [(String, a)] data JValue = JString String | JNumber Double | JBool Bool | JNull | JObject (AssocList JValue) ...
ChrisCoffey/rwh
src/RW/Chap5/SimpleJSON.hs
bsd-3-clause
859
0
8
235
325
173
152
34
1
{-# LANGUAGE ExistentialQuantification #-} module Utils where import Control.Applicative import Control.Monad (replicateM) import Data.Char import Data.Word import Data.List import Data.ByteString (ByteString) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as L import Crypto.Random import ...
nomeata/cryptonite
tests/Utils.hs
bsd-3-clause
4,659
0
16
1,274
1,662
877
785
109
3
module Main where import Lib import System.Random.Mersenne.Pure64 (newPureMT, randomWord64, randomDouble) import Data.Word (Word64) import qualified Data.Map.Lazy as Map import qualified Data.Vector as Vec import Data.Time (getCurrentTime, diffUTCTime) main :: IO () main = do putStrLn "This is RL005mbyn." pri...
reouno/RL_m_by_n_field
app/Main.hs
bsd-3-clause
4,202
0
19
1,392
1,562
833
729
82
3
-- ------------------------------------------------------------ {- | Module : Yuuko.Control.Arrow.ArrowIO Copyright : Copyright (C) 2005 Uwe Schmidt License : MIT Maintainer : Uwe Schmidt (uwe\@fh-wedel.de) Stability : experimental Portability: portable Version : $Id: ArrowIO.hs,v 1.6...
nfjinjing/yuuko
src/Yuuko/Control/Arrow/ArrowIO.hs
bsd-3-clause
2,045
18
15
534
439
245
194
16
0
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.TwoPanePersistent -- Description : "XMonad.Layout.TwoPane" with a persistent stack window. -- Copyright : (c) Chayanon Wichitrnithed -- License...
xmonad/xmonad-contrib
XMonad/Layout/TwoPanePersistent.hs
bsd-3-clause
3,715
0
19
1,000
768
428
340
43
4
import Data.Aeson import Data.ByteString.Lazy.Char8 as L8 import System.Environment main :: IO () main = L8.putStrLn . encode =<< getArgs
np/json-tools
json-quote.hs
bsd-3-clause
139
0
7
20
45
26
19
5
1
{-# LANGUAGE BangPatterns #-} -- | Comparing how to create new turtles. Insert one-by-one or union the old with new module Main where import qualified Data.IntMap.Strict as IM import Criterion.Main import Criterion.Types initialMap = IM.fromDistinctAscList [(k,()) | k <- [0..10000] ] -- faster to union intmapUnion m...
bezirg/hlogo
bench/impl/createTurtles.hs
bsd-3-clause
827
0
10
227
236
126
110
16
2
{- Primes.hs by Russell Bentley An lazily evaluated list of primes, based on "The Genuine Sieve of Eratosthenes" by Melissa O'Neil -} module Primes (primes) where import Util import SkewHeap --------------------------------------------------------------------------------------- -- Sieve of Eratosthen...
ThermalSpan/haskell-euler
src/Primes.hs
bsd-3-clause
2,649
0
52
555
740
390
350
23
1
{-# LANGUAGE ViewPatterns #-} module Edge where import Codec.Image.DevIL import Data.Array.Unboxed import Math.Probably.MCMC import Math.Probably.Sampler import Math.Probably.FoldingStats import Control.Monad.State.Strict import System.Cmd import System.Environment import Data.Array.IO import System.IO import Data....
glutamate/cvutils
Edge.hs
bsd-3-clause
3,820
0
20
808
1,662
899
763
92
1
{-# LANGUAGE RecordWildCards #-} ----------------------------------------------------------------------------- -- | -- Module : Blip.Compiler.Utils -- Copyright : (c) 2012, 2013 Bernie Pope -- License : BSD-style -- Maintainer : florbitous@gmail.com -- Stability : experimental -- Portability : ghc -- -- U...
bjpop/blip
blipcompiler/src/Blip/Compiler/Utils.hs
bsd-3-clause
8,014
0
9
1,286
1,868
1,050
818
134
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} module Database.Sqroll.Tests ( tests ) where import Control.Applicative import Control.Arrow import Data.ByteString.Char8 () import qualified Data.Text as T import Foreign.For...
pacak/sqroll
tests/Database/Sqroll/Tests.hs
bsd-3-clause
8,557
0
19
1,857
2,374
1,185
1,189
186
1
module TestExpectations(test_group) where import qualified Wigner.Symbols as S import qualified Wigner.DefineExpression as D import qualified Wigner.Expectations as E import Wigner.Expression import Wigner.Complex import Wigner.Texable import Data.Ratio import Test.Framework (testGroup) import Test.Framework.Provide...
fjarri/wigner
test/TestExpectations.hs
bsd-3-clause
3,142
0
27
680
1,077
561
516
67
1
--------------------------------------------------------------------------- -- | -- Module : Control.Monad.Trans.Demarcate -- Copyright : (c) 2013 Nickolay Kudasov -- License : BSD-style (see the file LICENSE) -- -- Maintainer : nickolay.kudasov@gmail.com -- Stability : experimental -- Portability ...
fizruk/demarcate
src/Control/Monad/Trans/Demarcate.hs
bsd-3-clause
691
0
4
105
55
42
13
8
0
module Main where import Paillier import Control.Monad.Except main :: IO () main = do Right(pub,prv) <- runExceptT $ genKeys 64 ct <- encrypt (PlainText 10) pub ct' <- encrypt (PlainText 5) pub let ct'' = ct * ct' let p = decrypt ct'' prv pub putStrLn $ "Encrypting 10 :" ++ show ct putStr...
IlyasRidhuan/HaskellPaillier
app/Main.hs
bsd-3-clause
516
0
10
128
178
83
95
15
1
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-} module DataType where import Data.Typeable import Data.IORef import Graphics.QML import Graphics.QML.Types.Classes import Graphics.QML.Types.Intrinsics data GraphNode = GraphNode { nodeName :: IORef Int , nodePtr :: QPointer ...
travitch/hsqml
examples/simple/DataType.hs
bsd-3-clause
979
0
11
235
266
147
119
28
1
module Main ( main ) where import Control.Exception import Data.List ( permutations, sort ) import Test.Framework ( defaultMain, testGroup, Test ) import Test.Framework.Providers.HUnit import Test.HUnit hiding ( Test ) import Constraints.Set.Solver tests :: [Test] tests = [ testGroup "Simple" [ testCase "tc1"...
travitch/ifscs
tests/ConstraintTests.hs
bsd-3-clause
8,716
0
13
2,500
2,722
1,382
1,340
174
1
{-# LANGUAGE FlexibleInstances #-} module MockedProcess where import MockedEnv import Control.Monad.IO.Class import Control.Monad.Trans.Reader import Tinc.Process type ReadProcess = FilePath -> [String] -> String -> IO String type CallProcess = FilePath -> [String] -> IO () data Env = Env { envReadProcess :: Rea...
beni55/tinc
test/MockedProcess.hs
bsd-3-clause
655
0
11
110
207
118
89
16
1
module PrimeSieve ( getInputAndGenerate ,sieve ,generatePrimes ,generateTable ,generateField ,generateFields ,constructLine ) where import Data.List sieve :: [Integer] sieve = 2:3:sieveOfErastothenes (tail sieve) [5,7..] where sieveOfErastothenes (p:ps) ds = lesser ++ sieveOfErastothen...
apolishch/prime_table
src/PrimeSieve.hs
bsd-3-clause
1,985
0
12
429
690
359
331
39
1
{-# LANGUAGE QuasiQuotes #-} module Web.HCheat where import Prelude hiding ((.)) import MPS.TH -- google analytics analytics x = [here| <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHos...
nfjinjing/hcheat
src/Web/HCheat.hs
bsd-3-clause
1,249
0
8
158
70
47
23
8
1
{-# LANGUAGE OverloadedStrings #-} module Main where import System.Environment import Text.Grammarkov main :: IO () main = do args <- getArgs case args of ["--all"] -> mapM_ printText (generateAll start) ["--random"] -> generateRandom start >>= printText _ -> printUsage printUsage :: IO () printUsag...
Toxaris/Grammarkov
src/grammarkov.hs
bsd-3-clause
1,630
0
13
447
559
287
272
61
4
{- This code was authored by: Stephen Diehl Kwang Yul Seo <kwangyul.seo@gmail.com> It was made available under the MIT license. See the src/Nix/Type directory for more details. -} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiWayIf ...
jwiegley/hnix
main/Repl.hs
bsd-3-clause
6,781
0
18
1,981
1,706
909
797
144
3
{-# LANGUAGE OverloadedStrings #-} module Basic where import Antigen bundles = [ bundle "Tarrasch/zsh-bd" , bundle "Tarrasch/zsh-mcd" ] config = defaultConfig { plugins = bundles } main :: IO () main = antigen config
Pitometsu/antigen-hs
tests/configs/Basic.hs
mit
227
0
6
44
56
32
24
9
1
{- SkateParser: The Skate file parser Part of Skate: a Schema specification languge Copyright (c) 2017, ETH Zurich. All rights reserved. This file is distributed under the terms in the attached LICENSE file. If you do not find this file, copies can be found by writing to: ETH Zurich D-INFK, Universit\"...
BarrelfishOS/barrelfish
tools/skate/SkateParser.hs
mit
12,702
0
15
2,673
3,113
1,605
1,508
232
1
module PPDiff ( ColorEnable(..) , ppDiff ) where import Data.Algorithm.Diff (Diff, PolyDiff(..)) import System.Console.ANSI data ColorEnable = EnableColor | DisableColor wrap :: ColorEnable -> Color -> String -> String wrap DisableColor _ str = str wrap EnableColor color str = setSGRCode [SetColor Foreground V...
Peaker/resolve-trivial-conflicts
src/PPDiff.hs
gpl-2.0
538
0
9
114
214
114
100
13
1
{-# LANGUAGE OverloadedStrings, PostfixOperators #-} {-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-partial-type-signatures #-} {-# OPTIONS_GHC -O0 -fno-cse -fno-full-laziness #-} -- preserve "lexical" sharing for observed sharing module Commands.Plugins.Spiros.Chrome.Gmail where import Commands.Plugins.Spiro...
sboosali/commands-spiros
config/Commands/Plugins/Spiros/Chrome/Gmail.hs
gpl-2.0
9,747
0
7
1,876
295
177
118
43
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/DescribeWorkingStorage.hs
mpl-2.0
6,945
0
15
1,408
852
511
341
102
1
{-# OPTIONS_GHC -fglasgow-exts #-} module Properties where {- This file is part of funsat. funsat is free software: it is released under the BSD3 open source license. You can find details of this license in the file LICENSE at the root of the source tree. Copyright 2008 Denis Bueno -} import Fun...
rbonifacio/hephaestus-pl
src/funsat-0.6.2/tests/Properties.hs
lgpl-3.0
15,185
0
20
4,021
4,539
2,379
2,160
-1
-1
{-#LANGUAGE NoImplicitPrelude #-} {-#LANGUAGE OverloadedStrings #-} {-#LANGUAGE TypeFamilies #-} {-#LANGUAGE MultiParamTypeClasses #-} {-#LANGUAGE FlexibleInstances #-} {-#LANGUAGE FlexibleContexts #-} {-#LANGUAGE LambdaCase #-} -- | Subprocess backend loader module Web.Sprinkles.Backends.Loader.SubprocessLoader ( sub...
tdammers/templar
src/Web/Sprinkles/Backends/Loader/SubprocessLoader.hs
bsd-3-clause
1,437
0
13
358
327
193
134
36
1
{-# LANGUAGE BangPatterns #-} module RegAlloc.Graph.TrivColorable ( trivColorable, ) where #include "HsVersions.h" import RegClass import Reg import GraphBase import UniqFM import FastTypes import Platform import Panic -- trivColorable --------------------------------------------------------------- -- ...
mcmaniac/ghc
compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
bsd-3-clause
10,421
0
16
3,822
883
448
435
93
25
{-# language ViewPatterns, NamedFieldPuns, ScopedTypeVariables, MultiParamTypeClasses, DeriveDataTypeable #-} module Sorts.Robots.Jetpack (sorts) where import Data.Abelian import Data.Data import Data.Directions import System.FilePath import Graphics.Qt as Qt import Physics.Chipmunk as CM import Utils impor...
changlinli/nikki
src/Sorts/Robots/Jetpack.hs
lgpl-3.0
8,742
0
17
2,196
2,336
1,211
1,125
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -------------------...
facebook/fbthrift
thrift/compiler/test/fixtures/includes/gen-hs/MyService_Fuzzer.hs
apache-2.0
6,109
0
12
993
1,698
989
709
112
2
module Data.String.Extra where import Data.Char trim :: String -> String trim = dropWhile isSpace . reverse . dropWhile isSpace . reverse limitLen :: Int -> [Char] -> [Char] limitLen n xs | length xs > n = take (max 1 (n-2)) xs ++ "…" | otherwise = xs
plow-technologies/ircbrowse
src/Data/String/Extra.hs
bsd-3-clause
275
0
11
69
119
61
58
7
1
-- The code is mostly ripped from -- https://github.com/ekmett/lens/blob/d1d97469f0e93c1d3535308954a060e8a04e37aa/tests/doctests.hsc import BasePrelude import System.Directory import System.FilePath import Test.DocTest import Build_doctest (deps) main :: IO () main = do sources <- getSources doctest $ dfltParams +...
mikeplus64/hasql-postgres
doctest/Main.hs
mit
1,961
0
12
497
372
211
161
58
1
module D where import Foreign.StablePtr id4 :: Int id4 = 4 createHeapObjectD :: IO (StablePtr [Int]) createHeapObjectD = do newStablePtr [2+id4] freeHeapObjectD :: StablePtr [Int] -> IO () freeHeapObjectD obj = freeStablePtr obj foreign export ccall createHeapObjectD :: IO (StablePtr [Int]) foreign export ccall ...
sdiehl/ghc
testsuite/tests/rts/linker/unload_multiple_objs/D.hs
bsd-3-clause
366
0
9
60
132
70
62
11
1
module A2 where import Test1 g :: Int -> Int g x = 56
kmate/HaRe
old/testing/removeCon/A2.hs
bsd-3-clause
57
0
5
17
24
14
10
4
1
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts #-} {-| This module provides a less verbose API for accessing the options of the various descriptor messages types. There are seven different option types. The EnumValueOptions are not currently settable in the...
timjb/protocol-buffers
descriptor/src-hand-written/Text/DescriptorProtos/Options.hs
apache-2.0
10,991
0
10
1,633
2,183
1,248
935
136
1
{-# LANGUAGE TemplateHaskell, FlexibleInstances, ScopedTypeVariables, ScopedTypeVariables, GADTs, RankNTypes, FlexibleContexts, MultiParamTypeClasses, GeneralizedNewtypeDeriving, DeriveDataTypeable, OverlappingInstances, UndecidableInstances, CPP #-} module Mai...
siddhanathan/ghc
testsuite/tests/typecheck/should_run/T1735.hs
bsd-3-clause
2,110
0
11
626
654
337
317
47
1
{-# Language TemplateHaskell #-} module AesonTH where import Data.Aeson import Data.Aeson.TH import qualified Data.ByteString as B import Language.Haskell.TH import Language.Haskell.TH.Syntax loadAeson :: FromJSON a => FilePath -> Q a loadAeson path = do addDependentFile path...
glguy/CookieCalculator
src/AesonTH.hs
isc
869
0
14
261
262
133
129
23
2
{-# LANGUAGE NamedFieldPuns #-} module Codec.Game.Puz (Style (Plain,Circle), Square (Black,Letter,Rebus), Dir (Across,Down), Puzzle (Puzzle), Index, width,height,grid,solution,title,author,notes, copyright,timer,clues,locked, numberGrid,unlockPuz,bruteForceUnlockPuz, loa...
ccasin/hpuz
Codec/Game/Puz.hs
mit
18,855
0
23
6,434
5,553
2,952
2,601
385
11
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} module Database.Persist ( module Database.Persist.Class , module Database.Persist.Types -- * query combinators , (=.), (+=.), (-=.), (*=.), (/=.) , (==.), (!=.), (<.), (>.), (<=.), (>=.) ...
gbwey/persistentold
persistent/Database/Persist.hs
mit
2,415
0
9
535
979
570
409
55
3
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} module Arion.Runner( run ) where import Paths_arion (version) import Arion.EventProcessor import Arion.Help import Arion.Types import Arion.Utilities import Control.A...
karun012/arion
src/Arion/Runner.hs
mit
3,981
0
23
1,315
1,036
530
506
79
3
-- The thesis version. {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UnicodeSyntax #-} module ABPThesis where import Data.Stream.Infinite ( Stream((:>)) ) type Bit = Bool -- Data type used to model possible corrupted messages. data Err a = Error | Ok a -- The mutual sender functions. sendH ∷ Bit → Strea...
asr/fotc
notes/FOT/FOTC/Program/ABP/ABPThesis.hs
mit
1,933
0
10
445
793
419
374
34
2
module Graphics.Rendering.WebGL.Misc where import GHCJS.Types import Data.Word import Data.Int import GHCJS.TypedArray (TypedArray, ArrayBufferView) import Graphics.Rendering.WebGL.Types -- supposedly WebGLShaderPrecisionFormat's fields are all read-only so I think this can be pure foreign import javascript unsafe "...
isomorphism/webgl
src/Graphics/Rendering/WebGL/Misc.hs
mit
657
8
6
62
102
59
43
9
0
module Handler.ImportContent where import Import import qualified Network.URI form :: Entity Holder -> Form (Text, (TcontentId, HolderId, TmemberId)) form (Entity holderid holder) = renderDivs $ areq (checkMMap parse render urlField) "Content URL" Nothing where render = fst parse url = case Netw...
fpco/schoolofhaskell.com
src/Handler/ImportContent.hs
mit
5,703
16
41
2,595
1,376
707
669
-1
-1
{-# LANGUAGE CPP, DataKinds, FlexibleContexts, ScopedTypeVariables, TypeApplications, TypeOperators #-} {-# OPTIONS_GHC -fdefer-type-errors #-} module CoRecSpec (spec) where import Control.Monad ((>=>)) import Data.Proxy import Data.Vinyl import Data.Vinyl.CoRec import Data.Vinyl.Functor (Identity(..)) im...
VinylRecords/Vinyl
tests/CoRecSpec.hs
mit
1,845
0
24
490
724
377
347
42
2
{-# htermination readsPrec :: Int -> String -> [(Char,String)] #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_readsPrec_3.hs
mit
67
0
2
10
3
2
1
1
0
{-| Module: Flaw.Editor.Entity.Tag.Basic Description: Basic entity tags. License: MIT -} {-# LANGUAGE DeriveGeneric, GeneralizedNewtypeDeriving, OverloadedStrings, TemplateHaskell, TypeFamilies #-} module Flaw.Editor.Entity.Tag.Basic ( NameEntityTag(..) , nameEntityTagId , nameEntityTagEntityId , DescriptionE...
quyse/flaw
flaw-editor/Flaw/Editor/Entity/Tag/Basic.hs
mit
1,879
0
8
202
323
187
136
37
1
module Graphics.Texture ( acquireImage , withAcquiredImage , loadImage , loadImageR8 , loadHeightmap , withLoadedImage , saveDepthTexture , saveTexture ) where import Codec.Picture import Codec.Picture.Types import Control.Arrow import Control.Monad import Data.Maybe import qualifie...
Chatanga/kage
src/Graphics/Texture.hs
mit
8,740
0
27
2,621
2,488
1,234
1,254
161
13
data Fig = W | WD | B | BD | E
RAFIRAF/HASKELL
wartzaby.hs
mit
31
0
5
12
20
12
8
1
0
-- #hide -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.Texturing.TextureUnit -- Copyright : (c) Sven Panne 2002-2009 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : sven.panne@aedion.de --...
ducis/haAni
hs/common/Graphics/Rendering/OpenGL/GL/Texturing/TextureUnit.hs
gpl-2.0
1,189
0
9
152
136
86
50
9
1
{-| Module : Sivi.Interface Description : Provides a text mode interface to send programs to GRBL Copyright : (c) Maxime ANDRE, 2015 License : GPL-2 Maintainer : iemxblog@gmail.com Stability : experimental Portability : POSIX -} module Sivi.Interface ( interface ) where...
iemxblog/sivi-haskell
src/Sivi/Interface.hs
gpl-2.0
3,320
0
12
1,129
855
405
450
78
11
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} module Brnfckr.Parse where import GHC.Generics (Generic) import Control.Applicative import Control.DeepSeq import Data.Word data BrainFuckError = UnbalancedBracket String | ParseFailure String ...
johntyree/brnfckr
src/Brnfckr/Parse.hs
gpl-3.0
3,977
0
18
1,319
1,621
812
809
118
13
{-# LANGUAGE TemplateHaskell, FlexibleInstances, IncoherentInstances#-} module CRL where import Test.QuickCheck --import Test.QuickCheck.Instances import DeriveArbitrary import Data.X509 import Data.ASN1.Types import Data.ASN1.Encoding import Data.ASN1.BinaryEncoding --import Time --import qualified Data.ByteString...
fcostantini/QuickFuzz
src/CRL.hs
gpl-3.0
533
0
9
62
108
65
43
13
1
module Amoeba.GameLogic.Data.Player where data Player = Human | AI1 deriving (Show, Read, Eq) humanPlayer = Human ai1Player = AI1
graninas/The-Amoeba-World
src/Amoeba/GameLogic/Data/Player.hs
gpl-3.0
147
0
6
36
43
26
17
6
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module PetaVision.Utility.DFT.Base ( module PetaVision.Utility.DFT.Base, module PetaVision.Utility.DFT.FFI, ) where import PetaVision.Utility.DFT.FFI import qualified Foreign.C.Types as C import Foreign.C.String (withCString, peekCString) import Foreign.Ptr (nullP...
XinhuaZhang/PetaVisionHaskell
PetaVision/Utility/DFT/Base.hs
gpl-3.0
6,407
0
9
1,335
801
477
324
79
11
{- Drop in replacement for Data.Maybe -- It was easier to just use this than messing around with seq -} module Network.Tremulous.StrictMaybe where import Prelude hiding(Maybe(..), maybe) data Maybe a = Nothing | Just !a deriving (Eq, Ord, Show, Read) instance Functor Maybe where fmap _ Nothing = Nothing ...
Cadynum/tremulous-query
Network/Tremulous/StrictMaybe.hs
gpl-3.0
1,234
0
12
383
529
264
265
37
2
{-# 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/FilteredBids/List.hs
mpl-2.0
7,089
0
18
1,502
890
519
371
133
1
{- passman Copyright (C) 2018-2021 Jonathan Lamothe <jonathan@jlamothe.net> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
jlamothe/passman
test/Spec/ValidatePWData.hs
lgpl-3.0
1,469
0
8
272
263
155
108
22
1
module Algo.LCA ( ) where -- lowest common ancestor -- <O(n), O(sqrt(n))> -- <O(n), O(logn)>
seckcoder/lang-learn
haskell/algo/src/Algo/LCA.hs
unlicense
112
0
3
34
12
9
3
1
0
-- | -- Module: Network.Riak.Types -- Copyright: (c) 2011 MailRank, Inc. -- License: Apache -- Maintainer: Nathan Hunter <nhunter@janrain.com> -- Stability: experimental -- Portability: portable -- -- Basic types. module Network.Riak.Types ( -- * Client management ClientID , Client(..) ...
janrain/riak-haskell-client
src/Network/Riak/Types.hs
apache-2.0
776
0
5
224
124
92
32
26
0
{-# LANGUAGE RecursiveDo #-} module Layout00024 where -- https://downloads.haskell.org/~ghc/7.2.2/docs/html/users_guide/syntax-extns.html justOnes = do { rec { xs <- Just (1:xs) } ; return (map negate xs) } -- Indentation-based variant of above. justOnes' = do rec xs <- Just (1:xs) return (map n...
carymrobbins/intellij-haskforce
tests/gold/parser/Layout00024.hs
apache-2.0
1,077
0
21
351
262
132
130
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Form where import Prelude import Data.Monoid ((<>)) import FormEngine.JQuery as JQ import FormEngine.FormItem import FormEngine.FormElement.FormElement as E import FormEngine.FormElement.Rendering import F...
DataStewardshipPortal/ds-elixir-cz
src/Form.hs
apache-2.0
4,972
0
23
1,464
793
412
381
88
1
-- | QuickCheck properties for the text library. {-# LANGUAGE CPP #-} {-# LANGUAGE BangPatterns, FlexibleInstances, OverloadedStrings, ScopedTypeVariables, TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-enable-rewrite-rules -fno-warn-missing-signatures #-} module Tests.Properties ( tests ) wh...
bgamari/text
tests/Tests/Properties.hs
bsd-2-clause
64,168
0
27
16,857
22,334
11,672
10,662
-1
-1
module Calculus.Opra1.ToFlipFlop where --fixme: fix the whole module! and move it to Convert/ -- standard modules import qualified Data.Map as Map import qualified Data.Set as Set -- local modules import Basics import Calculus.Opra1 import Calculus.FlipFlop opra1ToFlipFlopRel :: [String] -> Opra1 -> [([String], Fli...
spatial-reasoning/zeno
src/Calculus/Opra1/ToFlipFlop.hs
bsd-2-clause
1,693
0
17
550
630
356
274
45
5
import Prelude (IO) import Yesod.Default.Config (fromArgs) import Yesod.Default.Main (defaultMain) import Settings (parseNothing) import Application (makeApplication) main :: IO () main = defaultMain (fromArgs parseNothing) makeApplication
pbrisbin/devsite
app/main.hs
bsd-2-clause
277
0
7
62
73
42
31
7
1
{-# LANGUAGE CPP #-} module Signal.Wavelet.C1 where import Control.Monad (liftM) import Data.Vector.Storable (Vector, unsafeToForeignPtr, unsafeFromForeignPtr0) #if __GLASGOW_HASKELL__ > 706 import Foreign #else import Foreign hiding (unsafePerformIO) #endif import Foreign.C import System.IO.Unsafe (unsafeP...
jstolarek/lattice-structure-hs
src/Signal/Wavelet/C1.hs
bsd-3-clause
2,081
0
15
528
650
322
328
-1
-1
module Control.Monad.Short ( MonadShortable , MonadErrorShortable , short , unShort , MonadShort(..) ) where import Control.Monad.Abort import Control.Monad.Trans.Class type MonadShortable r m a = AbortT r m a type MonadErrorShortable m a = MonadShortable String m a short :: (Monad m) => m a ...
bairyn/monad-state
src/Control/Monad/Short.hs
bsd-3-clause
884
0
9
217
281
151
130
22
1
{-# LANGUAGE ConstraintKinds #-} module Database.HaskellDB.HDBRec.SelectType ( RelationSelect, RecordSelect ) where import Database.HaskellDB (Select, Attr, Expr, Record, Rel) type RelationSelect fld val rec = Select (Attr fld val) (Rel rec) (Expr val) type RecordSelect fld val rec = Select (Attr fld val) (Recor...
khibino/haskelldb-genschema
src/Database/HaskellDB/HDBRec/SelectType.hs
bsd-3-clause
331
0
7
52
105
63
42
6
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module Tonque.Type where import Data.Map (Map) import Data.Text.Lazy (Text) import Foreign.C.Types (CTime) type EpochTime = CTime class Cacheable live cache where toCache :: live -> cache from...
daimatz/Tonque
src/Tonque/Type.hs
bsd-3-clause
1,338
0
9
402
390
228
162
43
0
{-# OPTIONS -Wall #-} module Data.Tensor ( Tensor , PrimBool , fromList , toList , shape , order , const , iota , unary , inner , outer , rotate , foldl1 , contract , sEqu , sNeq , sLeq , sLess , bNeg , bAnd , bOr , bAdd , bEqu , bImp ) where import Prelude hiding (const, foldl1) import quali...
mmaroti/tensor.hs
src/Data/Tensor.hs
bsd-3-clause
3,686
40
18
860
1,785
930
855
119
3
module Blog.FrontEnd.CommentEntry where import qualified Blog.Model.Entry as B import qualified Blog.Model.CommentForm as CF import Blog.FrontEnd.ContentAtoms import Text.XHtml.Strict {- Design for comments: - Unique comment submission URIs: Open a new page for the form to submit a comment, create a submission U...
prb/perpubplat
src/Blog/FrontEnd/CommentEntry.hs
bsd-3-clause
8,172
0
17
4,065
1,254
658
596
110
6
{-# LANGUAGE UnicodeSyntax, OverloadedStrings, FlexibleContexts #-} ----------------------------------------------------------------------------------------------------------------------- -- | -- Module : Massive.Database.MongoDB.FilterOps -- Copyright : (C) 2012...
HalfWayMan/mt-mongodb
src/Massive/Database/MongoDB/FilterOps.hs
bsd-3-clause
4,257
0
14
1,239
1,240
653
587
51
1
module TypedPerl.Types ( PerlTypeVars (..), RecsVar, PerlRecs (..), PerlTypeBuiltins (..), PerlType (..), PerlNamespace (..), PerlVars (..), PerlBinOp (..), PerlAST (..), showPerlVars, showPerlAST, showPerlTypeVars, showPerlType, showPerlRecs ) where import Data.List import qualified Data.Map as...
hiratara/TypedPerl
src/TypedPerl/Types.hs
bsd-3-clause
4,355
0
13
1,071
1,480
780
700
113
1
{-# LANGUAGE PatternGuards #-} module Idris.ProofSearch(trivial, trivialHoles, proofSearch) where import Idris.Core.Elaborate hiding (Tactic(..)) import Idris.Core.TT import Idris.Core.Evaluate import Idris.Core.CaseTree import Idris.Core.Typecheck import Idris.AbsSyntax import Idris.Delaborate import Idris.Error i...
raichoo/Idris-dev
src/Idris/ProofSearch.hs
bsd-3-clause
12,055
33
24
5,182
3,460
1,727
1,733
215
28
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GLU.NURBS -- Copyright : (c) Sven Panne 2002-2005 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : sven.panne@aedion.de -- Stability : provisio...
FranklinChen/hugs98-plus-Sep2006
packages/OpenGL/Graphics/Rendering/OpenGL/GLU/NURBS.hs
bsd-3-clause
15,480
280
12
2,741
3,341
1,783
1,558
-1
-1
{-# OPTIONS_GHC -fno-warn-orphans #-} -- For the Hashable IntSet instance. {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TupleSections, TypeSynonymInstances, FlexibleInstances, DeriveGeneric, CPP #-} module Nets where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative ( (<$>) ) #endif import Control.Monad ...
owst/Penrose
src/Nets.hs
bsd-3-clause
22,954
152
16
7,358
5,568
3,039
2,529
-1
-1
module Zero.Sjcl.Hmac ( Hmac(..) , sign , create , update , digest ) where import GHCJS.Types (JSVal, IsJSVal) import Zero.Sjcl.BitArray (BitArray) import Data.Typeable ------------------------------------------------------------------------------ newtype Hmac = Hmac JS...
et4te/zero
src/Zero/Sjcl/Hmac.hs
bsd-3-clause
1,196
9
9
206
261
142
119
30
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.EXT.IndexMaterial -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/EXT/IndexMaterial.hs
bsd-3-clause
805
0
4
94
55
44
11
7
0
module Codegen.Util where import Data.Foldable (toList) import Control.Comonad.Cofree import Control.Lens hiding ((:<), op) import Data.Expr (freeVariables) import Data.Map (Map) import qualified Data.Map as M import Data.Maybe (fromMaybe) import Ty...
letsbreelhere/egg
src/Codegen/Util.hs
bsd-3-clause
3,815
1
17
1,071
1,309
659
650
100
6
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeSynonymInstances #-} module Reflex.Dom.Xhr.Foreign ( module Reflex.Dom.Xhr.Foreign , XhrResponseType ) where import Control.Concurrent.MVar imp...
manyoo/reflex-dom
src-ghc/Reflex/Dom/Xhr/Foreign.hs
bsd-3-clause
9,924
0
26
1,883
2,510
1,195
1,315
189
6
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.SGIX.FogOffset -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability :...
haskell-opengl/OpenGLRaw
src/Graphics/GL/SGIX/FogOffset.hs
bsd-3-clause
673
0
5
95
52
39
13
8
0