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 TypeFamilies #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} {-| Module : Numeric.AERN.RmToRn.Plot.FnView.State Description : internal state of a FnView widget Copyright : (c) Michal Konecny License : BSD3 M...
michalkonecny/aern
aern-realfn-plot-gtk/src/Numeric/AERN/RmToRn/Plot/FnView/State.hs
bsd-3-clause
9,417
0
14
2,945
2,123
1,155
968
218
3
module Sesyrel.FaultTree.Elimination (findOrdering, pretend, Algorithm(..)) where import Sesyrel.FaultTree.Base (Variable) import Data.Function (on) import Data.Foldable import Data.Maybe (fromMaybe) import Data.List (partition) import Data.Map.Strict (Map) import qualified Data.Map.Strict as M import Data.Set (Set...
balodja/sesyrel
src/Sesyrel/FaultTree/Elimination.hs
bsd-3-clause
3,159
0
16
665
1,318
701
617
61
2
import TCPServer(setupSocket) import Prelude hiding (lookup) import Network.Socket import NaiveHttpRequestParser(naiveHttpRequestParser, Request(..), RequestType(..)) import Control.Concurrent(forkIO, threadDelay, MVar, newMVar, takeMVar, putMVar) import Control.Monad(forM_, forever) import Data.Map.Strict(Map, empty, ...
jvans1/haskell_servers
src/ThreadPool.hs
bsd-3-clause
1,758
0
16
361
631
316
315
46
3
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.Provers.SExpr -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Parsing of S-expressions (mainly used for parsing SMT-Lib get-valu...
TomMD/cryptol
sbv/Data/SBV/Provers/SExpr.hs
bsd-3-clause
7,211
0
15
3,102
2,369
1,219
1,150
100
49
module Arhelk.Russian.Lemma.Adverb( adverb ) where import Arhelk.Core.Rule import Arhelk.Russian.Lemma.Common import Arhelk.Russian.Lemma.Data import Control.Monad import Data.Text as T adverb :: Text -> Rule AdverbProperties adverb w = do when (w `endsWith` ["о"]) $ imply adverbDegree PositiveDegree when...
Teaspot-Studio/arhelk-russian
src/Arhelk/Russian/Lemma/Adverb.hs
bsd-3-clause
382
0
11
56
119
69
50
11
1
{-# LANGUAGE ScopedTypeVariables, RecursiveDo #-} import Data.Char import System.Environment import Control.Applicative import Text.Earley data Expr = Expr :+: Expr | Expr :*: Expr | Var String | Lit Int deriving (Show) grammar :: forall r. Grammar r String (Prod r String Char Expr) grammar = mdo whitesp...
Axure/Earley
examples/Expr2.hs
bsd-3-clause
1,013
0
16
275
396
199
197
34
1
{- SkewHeap.hs by Russell Bentley A Haskell Implementation of a skew heap. -} module SkewHeap (Heap, emptyHeap, merge, insert, delete, minKey, minKeyValue, deleteMin ) where -- | A binary tree data type. data Heap k v = Nil | Node (k, v) (Heap k v) (Heap k v) -- | Blank emptyHeap :: Heap ...
ThermalSpan/haskell-euler
src/SkewHeap.hs
bsd-3-clause
1,914
0
13
755
685
367
318
26
3
-- | A module to contain the magnitude of s-expression parsing. module Data.AttoLisp.Easy (fromLispString ,module L) where import qualified Data.AttoLisp as L import qualified Data.Attoparsec as P import qualified Data.ByteString as B -- | Parse a single s-expr followed by optional whi...
kini/ghc-server
src/Data/AttoLisp/Easy.hs
bsd-3-clause
725
0
10
165
168
92
76
14
2
main = print (foldl lcm 1 [1 .. 20])
foreverbell/project-euler-solutions
src/5.hs
bsd-3-clause
36
0
8
8
25
13
12
1
1
-- | This module performs the translation of a parsed XML DTD into the -- internal representation of corresponding Haskell data\/newtypes. module Text.XML.HaXml.DtdToHaskell.Convert ( dtd2TypeDef ) where import List (intersperse) import Text.XML.HaXml.Types hiding (Name) import Text.XML.HaXml.DtdToHaskell.Type...
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/src/Text/XML/HaXml/DtdToHaskell/Convert.hs
bsd-3-clause
5,118
4
19
1,492
1,971
1,008
963
92
15
{-# LANGUAGE OverloadedStrings #-} module Templates.Home where import Core import Templates import Templates.CoreForm import Data.Int import Text.Blaze ((!)) import qualified Text.Blaze.Html4.Strict as H import qualified Text.Blaze.Html4.Strict.Attributes as A homeHtml :: CoreId -> H.Html homeHtml nbCor...
alpmestan/core-online
src/Templates/Home.hs
bsd-3-clause
941
0
14
404
169
97
72
22
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {- | The replay monad, for computations that can be replayed using traces Example usage: > running :: Replay Question Answer a -> IO a > running prog = play emptyTrace > where > pla...
co-dan/warm_fuzzy_things
src/Control/Monad/Replay.hs
bsd-3-clause
4,350
0
16
1,257
1,148
584
564
81
3
{- OnYourOwn1.hs (adapted from OpenGLApplication which is (c) 2004 Astle/Hawkins) Copyright (c) Sven Panne 2004-2005 <sven.panne@aedion.de> This file is part of HOpenGL and distributed under a BSD-style license See the file libraries/GLUT/LICENSE -} import Control.Monad ( when, unless ) import Data.IORef (...
FranklinChen/hugs98-plus-Sep2006
packages/GLUT/examples/BOGLGP/Chapter02/OnYourOwn1.hs
bsd-3-clause
8,277
0
17
1,775
1,892
966
926
148
2
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} module ETA.Iface.BuildTyCl ( buildSynonymTyCon, buildFamilyTyCon, buildAlgTyCon, buildDataCon, buildPatSyn, TcMethInfo, buildClass, distinctAbstractTyConRhs, totall...
alexander-at-github/eta
compiler/ETA/Iface/BuildTyCl.hs
bsd-3-clause
14,445
0
17
5,113
2,224
1,235
989
190
4
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeSynonymInstances #-} {-...
duairc/symbols
types/src/GHC/Generics/Compat.hs
bsd-3-clause
8,221
13
11
1,673
1,611
973
638
-1
-1
{-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE StandaloneDeriving #-} module GRIN.GrinCase where import GRIN.GrinIdentifiers import GRIN.GrinLiteral import G...
spacekitteh/libgrin
src/GRIN/GrinCase.hs
bsd-3-clause
1,288
0
8
187
324
177
147
-1
-1
module Nut.Color.Spectrum.XYZ ( XYZ(..) ) where import Control.Applicative import Data.Foldable import Data.Traversable import Data.Monoid import Nut.Numeric.Double import Nut.Numeric.Float data XYZ a = XYZ a a a deriving (Eq,Ord,Show,Read) instance Functor XYZ where fmap f (XYZ x y z) = XYZ (f x) (f y) (f z) ...
ekmett/colorimetry
Colorimetry/Spectrum/XYZ.hs
bsd-3-clause
1,454
0
9
356
667
348
319
52
0
----------------------------------------------------------------------- -- -- Haskell: The Craft of Functional Programming, 3e -- Simon Thompson -- (c) Addison-Wesley, 1996-2011. -- -- Chapter 14, part 1 -- Also covers the properties in Section 14.7 -- ---------------------------------------------------------...
Numberartificial/workflow
snipets/src/Craft/Chapter14_1.hs
mit
5,523
0
9
1,550
1,602
853
749
111
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module LambdaCms.Core.Classes ( PageHeadProperties (..) ) where import LambdaCms.Core.Import import Data.Text (intercalate) type Follow = Bool type Index = Bool class PageHeadProperties res where ...
lambdacms/lambdacms
lambdacms-core/LambdaCms/Core/Classes.hs
mit
1,358
0
16
446
407
224
183
36
0
{-# LANGUAGE LambdaCase #-} module Cardano.Wallet.Kernel.Addresses ( createAddress , newHdAddress , importAddresses -- * Errors , CreateAddressError(..) , ImportAddressError(..) ) where import qualified Prelude import Universum import Control.Lens (to) import ...
input-output-hk/pos-haskell-prototype
wallet/src/Cardano/Wallet/Kernel/Addresses.hs
mit
11,037
0
20
3,282
1,808
985
823
-1
-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-cloudtrail/gen/Network/AWS/CloudTrail/CreateTrail.hs
mpl-2.0
10,093
0
18
2,272
1,571
933
638
180
1
{-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Main -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- module Main (main)...
olorin/amazonka
amazonka-elasticache/test/Main.hs
mpl-2.0
546
0
8
103
76
47
29
9
1
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} -- | Primitive Feldspar expressions module Feldspar.Primitive.Representation where import Data.Array import Data.Bits import Data.Complex import Data.Int import Data.Typeable import Data.Word import Data.Constraint (Dict (..)) impor...
kmate/raw-feldspar
src/Feldspar/Primitive/Representation.hs
bsd-3-clause
17,478
0
13
4,680
5,101
2,635
2,466
-1
-1
-- A simple let statement, to ensure the layout is detected module Layout.LetStmt where foo = do {- ffo -}let x = 1 y = 2 -- baz x+y
mpickering/ghc-exactprint
tests/examples/ghc710/LetStmt.hs
bsd-3-clause
158
0
9
54
35
20
15
5
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} {- | Module : Verifier.SAW.Change Copyright : Galois, Inc. 2012-2015 License : BSD3 Maintainer : jhendrix@galois.com Stability : experimental...
GaloisInc/saw-script
saw-core/src/Verifier/SAW/Change.hs
bsd-3-clause
4,832
0
11
1,057
1,438
726
712
85
2
{-# LANGUAGE CPP #-} module Test(main) where import Development.Shake.Command import System.Directory.Extra import System.IO.Extra import System.Time.Extra import System.Environment.Extra import System.FilePath import Control.Monad.Extra import Control.Exception.Extra import Control.Concurrent import System.Process i...
Pitometsu/bake
src/Test.hs
bsd-3-clause
6,242
0
22
1,904
1,545
716
829
129
2
module PCP.Solutions where import PCP.Type sol_001 = ( [ 1 % 1, 2 % 1, 1 % 1 ] , [ [ 0, 0 ] , [ 1, 1, 2, 0 ] , [ 2, 2, 0, 1, 2, 0 ] , [ 2, 0, 0, 1, 0, 1, 2, 0 ] , [ 2, 0, 0, 2, 2, 0, 0, 1, 2, 0 ] ] , [ [ 0, 2, 2, 0, 0, 1, 2, 0, 1, 2 ] , [ 0, 2, 2, 2, 2, 0, 1, 2 ] ...
Erdwolf/autotool-bonn
src/PCP/Solutions.hs
gpl-2.0
2,970
0
7
1,322
2,347
1,559
788
62
1
{- Copyright 2015 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
Ye-Yong-Chi/codeworld
codeworld-base/src/GHC/IO/Handle/FD.hs
apache-2.0
747
0
4
136
27
21
6
4
0
{-# LANGUAGE CPP #-} module TcInteract ( solveSimpleGivens, -- Solves [EvVar],GivenLoc solveSimpleWanteds -- Solves Cts ) where #include "HsVersions.h" import BasicTypes ( infinity, IntWithInf, intGtLimit ) import HsTypes ( hsIPNameFS ) import FastString import TcCanonical import TcFlatten import Var...
ml9951/ghc
compiler/typecheck/TcInteract.hs
bsd-3-clause
83,885
29
22
24,666
12,484
6,440
6,044
-1
-1
{-# OPTIONS_GHC -Wall -fno-warn-unused-do-bind #-} module Parse.Type where import Control.Applicative ((<$>),(<*>),(<*)) import Data.List (intercalate) import Text.Parsec ((<|>), (<?>), char, many, optionMaybe, string, try) import qualified AST.Type as T import qualified AST.Variable as Var import Parse.Helpers tva...
avh4/elm-compiler
src/Parse/Type.hs
bsd-3-clause
2,080
0
16
546
755
383
372
66
3
module KeepCafs2 where import KeepCafsBase foreign export ccall "getX" getX :: IO Int getX :: IO Int getX = return (x + 1)
sdiehl/ghc
testsuite/tests/rts/KeepCafs2.hs
bsd-3-clause
128
0
7
28
45
25
20
6
1
{-# LANGUAGE ForeignFunctionInterface #-} {-@ LIQUID "--c-files=../ffi-include/foo.c" @-} {-@ LIQUID "-i../ffi-include" @-} module Main where import Foreign.C.Types {-@ embed CInt as int @-} {-@ embed Integer as int @-} {-@ assume c_foo :: x:{CInt | x > 0} -> IO {v:CInt | v = x} @-} foreign import ccall unsafe "foo....
mightymoose/liquidhaskell
tests/pos/FFI.hs
bsd-3-clause
409
0
7
76
63
37
26
7
1
{-# LANGUAGE DataKinds, PolyKinds #-} module T14209 where data MyProxy k (a :: k) = MyProxy data Foo (z :: MyProxy k (a :: k))
sdiehl/ghc
testsuite/tests/polykinds/T14209.hs
bsd-3-clause
128
0
8
26
41
27
14
-1
-1
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE RankNTypes #-} module ShouldSucceed where data Empty q = Empty (forall a. Ord a => q a) q :: (Ord a) => [a] q = [] e0, e1, e2 :: Empty [] e0 ...
olsner/ghc
testsuite/tests/typecheck/should_compile/tc092.hs
bsd-3-clause
458
0
10
249
118
68
50
10
1
----------------------------------------------------------------------------- -- | -- Module : GHC.ExecutionStack -- Copyright : (c) The University of Glasgow 2013-2015 -- License : see libraries/base/LICENSE -- -- Maintainer : cvs-ghc@haskell.org -- Stability : internal -- Portability : non-portabl...
tolysz/prepare-ghcjs
spec-lts8/base/GHC/ExecutionStack.hs
bsd-3-clause
1,463
0
9
243
157
106
51
11
1
{-# LANGUAGE TypeFamilies #-} module T11408 where type family UL a type family UR a type family MT a b mkMerge :: a -> UL a -> UR a -> Int mkMerge = undefined merger :: a -> b -> MT a b merger = undefined {- merge :: forall a b. (UL (MT a b) ~ a, UR (MT a b) ~ b) => a -> b -> Int or forall t. (MT (UL t) (UR t) ~ ...
ezyang/ghc
testsuite/tests/indexed-types/should_compile/T11408.hs
bsd-3-clause
502
0
8
127
101
56
45
10
1
module T7312 where -- this works mac :: Double -> (Double->Double) -> (Double-> Double) mac ac m = \ x -> ac + x * m x -- this doesn't mac2 :: Double -> (->) Double Double -> (->) Double Double mac2 ac m = \ x -> ac + x * m x
wxwxwwxxx/ghc
testsuite/tests/typecheck/should_compile/T7312.hs
bsd-3-clause
228
0
8
56
114
61
53
5
1
module Main where import GHC.Conc -- Create a new TVar, update it and check that it contains the expected value after the -- transaction main = do putStr "Before\n" t <- atomically ( newTVar 42 ) atomically ( writeTVar t 17 ) r <- atomically ( readTVar t ) putStr ("After " ++ (show r) ++ "\n")
wxwxwwxxx/ghc
testsuite/tests/concurrent/should_run/conc043.hs
bsd-3-clause
318
0
12
80
91
44
47
8
1
{-# LANGUAGE CPP, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module System.Process.Text.Lazy where #if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<$>)) #endif import Control.DeepSeq (force) import qualified Control.Exception as C (evaluate) import Data.ListLike.IO (hGetContents) import ...
seereason/process-extras
src/System/Process/Text/Lazy.hs
mit
1,392
0
9
275
244
150
94
27
1
module Exercises where tensDigit :: Integral a => a -> a tensDigit x = d where (xLast, _) = x `divMod` 10 d = xLast `mod` 10 foldBool :: a -> a -> Bool -> a foldBool x y z = case z of True -> x False -> y foldBool2 :: a -> a -> Bool -> a foldBool2 x y z | z == True = x | otherwise ...
andrewMacmurray/haskell-book-solutions
src/ch7/exercises.hs
mit
388
0
8
132
209
113
96
16
2
{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-missing-signatures #-} module Main where import System.Random.TF.Init import Types import Encode import Mix import Melody.GameOfThrones import Generator.Sin import Generator.Rand import Generator.KarplusStrong import Envelope.ADSR settings :: MixSettings settings = M...
feuerbach/music
Main.hs
mit
556
0
9
84
122
71
51
20
1
scoreToLetter :: Int -> Char scoreToLetter n | n > 90 = 'A' | n > 80 = 'B' | n > 70 = 'C' | otherwise = 'F' len [] = 0 len (x:s) = 1 + len s listCopy [] = [] listCopy (x:s) = x : listCopy s ones = 1 : ones twos = 2 : twos lists = [ones, twos] front :: Int -> [a] -> [a] front _ [] = [] front 0 (x:s)...
hectoregm/lenguajes
class-notes/class-notes-30-september.hs
mit
1,452
0
9
426
828
438
390
49
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Gaia.SearchEngine ( runQuery2, runQuery3 ) where import qualified Data.ByteString.Lazy.Char8 as Char8 import qualified Data.List as D import qualified Gaia.AesonValuesFileSystemCorrespondance as XP1 import qualified Gaia.AesonValuesA...
shtukas/Gaia
src/Gaia/SearchEngine.hs
mit
9,015
15
34
1,910
1,201
611
590
89
4
main = putStrLn "Hello World" //added some comments //showing how to do stuff
Yelmogus/Lambda_Interpreter
HW1.hs
mit
78
5
7
13
38
14
24
1
1
{- Copyright (C) 2015 Calvin Beck Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
Chobbes/mathform
src/Text/MathForm/Readers/Sage.hs
mit
2,207
0
9
422
322
173
149
23
1
module HaskellBook.Case where funcZ x = case x + 1 == 1 of True -> "AWESOME" False -> "wut" pal xs = case xs == reverse xs of True -> "yes" False -> "no" pal' xs = case y of True -> "yes" False -> "no" where y = xs == reverse xs
brodyberg/Notes
ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/Case.hs
mit
278
0
8
102
107
54
53
14
2
module Reader (reader, toPandoc) where import qualified Data.Text as T import Text.Pandoc.Class (runIOorExplode) import Text.Pandoc.Definition (Pandoc) import Text.Pandoc.Options import Text.Pandoc.Readers.Markdown (readMarkdown) reader :: ReaderOptions reader = def { readerStandalone = True , readerExtensions = ...
Thhethssmuz/ppp
src/Reader.hs
mit
617
0
10
131
135
79
56
15
1
-- | http://www2.stetson.edu/~efriedma/mathmagic/0916.html -- On an N×N chessboard, when we place Q queens, -- what is the maximum number of squares -- that can be attacked exactly A times? {-# language LambdaCase #-} import Prelude hiding ((&&),(||),not,and,or) import qualified Prelude as P import OBDD import OB...
jwaldmann/haskell-obdd
examples/MM0916.hs
gpl-2.0
2,962
24
18
892
1,453
752
701
-1
-1
module Matrizer.Util ( optimizeStr, doParse, doOptimize, parseFile, runDebug, equivCheck ) where import qualified Data.Map as Map import Matrizer.MTypes import Matrizer.Parsing import Matrizer.Optimization import Matrizer.RewriteRules import Matrizer.Analysis import Matrizer.Preprocess import Matrizer.Cod...
davmre/matrizer
src/Matrizer/Util.hs
gpl-2.0
4,772
0
29
1,428
1,481
744
737
77
2
{-# OPTIONS -Wall #-} -- | Options parsing module Opts ( Opts(..), parseOpts ) where import Data.List (intercalate) import Data.Maybe (fromMaybe) import Data.Time.Clock (NominalDiffTime) import qualified Git.CLI as Git import Options.Applicative data Opts = Opts { o...
Peaker/git-pushq
Opts.hs
gpl-2.0
1,279
0
13
301
356
191
165
37
1
{-| Implementation of the Ganeti configuration database. -} {- Copyright (C) 2011, 2012 Google Inc. 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 opt...
ribag/ganeti-experiments
src/Ganeti/Config.hs
gpl-2.0
20,620
0
20
4,748
4,610
2,409
2,201
356
4
{-# LANGUAGE CPP, ViewPatterns, MultiWayIf, TupleSections, NamedFieldPuns #-} module Schafkopf where import Utility import Utility.Choice import Utility.Cond import Cards import qualified Cards.Parse as Parse import Cards.Shuffle import Trick.Rules import Schafkopf.GameTypes import Schafkopf.Score import Schafkopf...
Bolpat/CardGames
src/Schafkopf.hs
gpl-3.0
12,973
131
54
4,823
3,805
1,998
1,807
239
28
{-# LANGUAGE ScopedTypeVariables, Arrows #-} -- | A Netwire FRP executable model for the Netrobots game. module Game.Netrobots.FRP.Robot where import System.ZMQ4.Monadic import Control.Monad (forever) import Data.ByteString.Char8 (pack, unpack) import Control.Concurrent (threadDelay) import qualified Text.ProtocolBuf...
massimo-zaniboni/hrobots
src/Game/Netrobots/FRP/Robot.hs
gpl-3.0
12,417
18
20
3,002
3,196
1,703
1,493
244
6
{-# LANGUAGE BangPatterns #-} module Rabin where import System.IO import Primes import Data.Word import Data.Bits import Data.List import qualified Data.ByteString.Lazy as BS import System.Directory import Numeric (showHex) getKeys :: IO (Integer,Integer) getKeys = do exists <- doesFileExist "keys.txt" ...
igraves/rabin-haskell
Rabin.hs
gpl-3.0
5,415
0
16
2,293
1,893
1,025
868
111
5
{- Copyright (C) 2017-2018 defanor <defanor@uberspace.net> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is dis...
defanor/pancake
Text/Pandoc/Readers/Gopher.hs
gpl-3.0
3,841
0
17
835
816
424
392
66
11
-- -*- coding: utf-8 -*- {-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} import TMM.Types import TMM.Selector import qualified TMM.Workers as S import TMM.Downloader import ZhiHu.ZSession import Data.Text(Text) import qualified Dat...
stone-guru/tmmha
src/ZTopic.hs
gpl-3.0
2,305
1
12
548
630
343
287
55
1
{- This file is part of Deutsche Nummers. Deutsche Nummers is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Deutsche Nu...
mgmillani/deutsche-helfer
deutscheNummers/Main.hs
gpl-3.0
6,076
26
18
1,431
2,322
1,077
1,245
170
3
{-# LANGUAGE OverloadedStrings #-} module Scotty where import Web.Scotty import Data.Monoid (mconcat) import Web.Scotty.Internal.Types (ActionT(..)) import Control.Monad.IO.Class import Control.Monad.Trans.State.Lazy hiding (get) main = scotty 3000 $ get "/:word" $ do beam <- param "word" liftIO (putStrLn...
maruks/haskell-book
src/scotty.hs
gpl-3.0
388
0
10
64
117
67
50
13
1
import QFeldspar.QDSL import qualified QFeldspar.Environment.Typed as ET import qualified QFeldspar.Environment.Scoped as ES import qualified QFeldspar.Type.GADT as TG import qualified QFeldspar.Nat.GADT as NG import QFeldspar.Expression.Utils.TemplateHaskell as TH iff :: Bool -> a -> a -> a iff l m n = if l then m el...
shayan-najd/QFeldspar
Tests/PolyMorphism.hs
gpl-3.0
1,673
9
14
361
316
173
143
-1
-1
module Main where import Web.Fjord import Web.Fjord.Types import Web.Fjord.KeyBinds import Web.Fjord.Modifier import qualified Data.Map as Map defaultConfig = FjordConfig { _keybinds = Map.fromList [ createKeyBind [] (Just 'k') scrollUp , createKeyBind [] (Just 'j') scrollDown ...
arjuncomar/fjord
Main.hs
gpl-3.0
413
0
11
106
116
66
50
11
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Accounts/Returncarrier/List.hs
mpl-2.0
5,082
0
18
1,177
728
423
305
107
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-books/gen/Network/Google/Resource/Books/MyConfig/UpdateUserSettings.hs
mpl-2.0
3,355
0
13
700
312
193
119
50
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.CustomSearch -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla...
rueshyna/gogol
gogol-customsearch/gen/Network/Google/CustomSearch.hs
mpl-2.0
4,482
0
5
1,293
557
393
164
154
0
module TesML.Data where import TesML.Data.Types import qualified TesML.Data.Plugin as PL import qualified TesML.Data.RecordData as RD import qualified TesML.Data.RecordHeader as RH import Control.Monad.Trans.Except (ExceptT (ExceptT), runExceptT) import qualified Data.ByteString.Lazy as BSL import Data.Binary.Get ...
Kromgart/tesML
lib/TesML/Data.hs
agpl-3.0
1,582
0
15
400
510
271
239
27
2
-- | Parsing of structs. module Data.GI.GIR.Struct ( Struct(..) , parseStruct ) where import Data.Text (Text) import Data.GI.GIR.Allocation (AllocationInfo(..), unknownAllocationInfo) import Data.GI.GIR.Field (Field, parseFields) import Data.GI.GIR.Method (Method, MethodType(..), parseMethod) import Data....
ford-prefect/haskell-gi
lib/Data/GI/GIR/Struct.hs
lgpl-2.1
2,150
0
15
472
500
282
218
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} module MedianOfTwoSortedArrays ( findMedian, sample ) where import Data.Vector (fromList, (!), Vector) import Data.Vector as Vec import Debug.Trace data Median a = Pair a a | Single a deriving (Show) -- After using s...
seckcoder/lang-learn
haskell/algo/src/Leetcode/MedianOfTwoSortedArrays.hs
unlicense
2,799
0
14
1,516
818
438
380
39
2
-- Copyright 2020-2021 Google LLC -- -- 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 agreed t...
google/hs-dependent-literals
dependent-literals-plugin/tests/DoubleNegation.hs
apache-2.0
1,424
5
8
291
246
143
103
-1
-1
-- layout can still have explicit semicolons f x = let a = 1 ; b = 2 c = 3 in x
metaborg/jsglr
org.spoofax.jsglr/tests-offside/terms/doaitse/layout5.hs
apache-2.0
106
2
8
49
36
17
19
4
1
{-| Implementation of the job queue. -} {- Copyright (C) 2010, 2012 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. Redistributions of source code must retain the above copyright notic...
mbakke/ganeti
src/Ganeti/JQueue.hs
bsd-2-clause
30,285
0
26
7,671
6,612
3,482
3,130
549
8
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QGraphicsEllipseItem_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:27 Warning : this file is machine gener...
uduki/hsQt
Qtc/Gui/QGraphicsEllipseItem_h.hs
bsd-2-clause
100,132
0
18
20,810
30,658
14,667
15,991
-1
-1
-- | This module provides the type of an (abstract) object. module Jat.PState.Object ( Object (..) , className , fieldTable , isInstance , mapValuesO , referencesO , FieldTable , elemsFT , updateFT , emptyFT , lookupFT , assocsFT ) where import Jat.PState.AbstrValue import Jat.Utils.Pre...
ComputationWithBoundedResources/jat
src/Jat/PState/Object.hs
bsd-3-clause
2,779
0
12
582
808
432
376
56
1
{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module BitBasket where import Data.Maybe import Data.Word import Data.Bits import Control.Monad -- Right-to-Left bit basket data BitBasket a = BitBasket Int a deriving(Eq,Show) unsafeUnBasket :: (Bi...
ierton/yteratee
src/BitBasket.hs
bsd-3-clause
2,497
0
14
569
1,230
640
590
59
2
{-# LANGUAGE DeriveDataTypeable, NoMonomorphismRestriction #-} ----------------------------------------------------------------------------- -- | -- Module : Diagrams.Backend.Pdf.CmdLine -- Copyright : (c) 2013 alpheccar.org (see LICENSE) -- License : BSD-style (see LICENSE) -- -- Convenient creation of c...
alpheccar/diagrams-pdf
src/Diagrams/Backend/Pdf/CmdLine.hs
bsd-3-clause
5,541
0
16
1,662
1,151
610
541
86
4
{-# LANGUAGE ForeignFunctionInterface, TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances, FlexibleContexts, ScopedTypeVariables, CPP #-} ----------------------------------------------------------------------------- -- | -- Licence : BSD-style (see LICENSE) -- -- Exports data types and functions required by th...
tim-m89/Salsa
Foreign/Salsa/Binding.hs
bsd-3-clause
3,595
0
10
469
490
280
210
44
1
{-# LANGUAGE GADTs, DataKinds, KindSignatures, PolyKinds, ConstraintKinds, TypeOperators #-} module Tests.Util.TypeEquality where import GHC.Exts data (:==:) :: k -> k -> * where Refl :: a :==: a cong :: (a :==: b) -> (f a :==: f b) cong Refl = Refl data Exists :: (a -> *) -> * where ExI :: f a -> Exists f d...
liamoc/geordi
Tests/Util/TypeEquality.hs
bsd-3-clause
443
0
8
110
184
101
83
13
1
-- | -- Copyright : (C) 2014 Seagate Technology Limited. -- License : BSD3 import Control.Applicative import Control.Alternative.Freer import qualified Options.Applicative as CL import qualified Options.Applicative.Help.Core as CL data Foo x = Foo { name :: String , reader :: String -> x } instance Functor ...
seagate-ssg/options-schema
test/Applicative.hs
bsd-3-clause
736
4
9
160
302
156
146
21
1
module SSH.Supported where import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as LBS import qualified Data.Serialize as S import Crypto.HMAC (MacKey(..), hmac) import Crypto.Hash.CryptoAPI (MD5, SHA1) import SSH.Crypto import SSH.Internal.Util version :: String version = "SSH-2.0-DarcsDen"...
cdepillabout/ssh
src/SSH/Supported.hs
bsd-3-clause
2,090
0
19
351
462
275
187
35
1
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} module RevealHs.TH where import Control.Monad import Data.HashMap.Strict as HM import Data.IORef import Data.Maybe import Data.String.Interpolate import Language.Haskell.TH import ...
KenetJervet/reveal-hs
src/RevealHs/TH.hs
bsd-3-clause
1,923
0
15
481
550
285
265
53
2
{-# LANGUAGE FlexibleContexts #-} module EFA.Data.Axis.Mono where import EFA.Utility(Caller,merror, ModuleName(..),FunctionName, genCaller) import qualified EFA.Data.Vector as DV -- | TODO -- how many points are allowed to have the same time, only two or more ? m :: ModuleName m = ModuleName "Axis.Mono" nc :: Func...
energyflowanalysis/efa-2.1
src/EFA/Data/Axis/Mono.hs
bsd-3-clause
2,684
0
13
610
1,039
547
492
65
3
module Expectation where import Test.Hspec import System.Directory import Control.Exception as E shouldContain :: Eq a => [a] -> a -> Expectation shouldContain containers element = do let res = element `elem` containers res `shouldBe` True withDirectory_ :: FilePath -> IO a -> IO a withDirectory_ dir action ...
eagletmt/ghc-mod
test/Expectation.hs
bsd-3-clause
730
0
10
236
190
99
91
16
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Graphics.Tooty ( module Graphics.Tooty.Image, module Graphics.Tooty.Matrix, module Graphics.Tooty.Geometry, module Graphics.Tooty.Text, -- * OpenGL context preparation setup2D, positionViewport, ) where import Graphics.Rendering.OpenGL (...
cdxr/haskell-tooty
Graphics/Tooty.hs
bsd-3-clause
1,217
0
10
245
379
202
177
34
1
-- | -- Module : Text.PrettyPrint.Mainland -- Copyright : (c) Harvard University 2006-2011 -- (c) Geoffrey Mainland 2011-2012 -- License : BSD-style -- Maintainer : mainland@eecs.harvard.edu -- -- Stability : provisional -- Portability : portable -- -- This module is based on /A Prett...
flowbox-public/mainland-pretty
Text/PrettyPrint/Mainland.hs
bsd-3-clause
27,921
0
18
8,379
9,224
4,927
4,297
548
20
----------------------------------------------------------------------------- -- | -- Module : TestSuite.Optimization.Quantified -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Test suite for optimization iwth quantifiers ----------...
josefs/sbv
SBVTestSuite/TestSuite/Optimization/Quantified.hs
bsd-3-clause
2,532
0
14
742
874
438
436
58
1
{-# LANGUAGE NoImplicitPrelude #-} -- | -- Module: $HEADER$ -- Description: Tray icon with configurable popup menu that uses wxWidgets as -- a backend. -- Copyright: (c) 2015 Peter Trško -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com -- Stability: experimental -- Portability:...
trskop/toolbox-tray-icon
src/WxMain.hs
bsd-3-clause
4,019
0
20
899
1,049
594
455
91
2
{-# OPTIONS -fglasgow-exts #-} -- -- Copyright (C) 2004-5 Don Stewart - http://www.cse.unsw.edu.au/~dons -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 of th...
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/src/System/Plugins/Load.hs
bsd-3-clause
25,431
1
22
7,137
4,387
2,336
2,051
-1
-1
-- | Definitions of kinds of factions present in a game, both human -- and computer-controlled. module Content.FactionKind ( -- * Group name patterns pattern EXPLORER_REPRESENTATIVE, pattern EXPLORER_SHORT, pattern EXPLORER_NO_ESCAPE, pattern EXPLORER_MEDIUM, pattern EXPLORER_TRAPPED, pattern EXPLORER_AUTOMATED, ...
LambdaHack/LambdaHack
GameDefinition/Content/FactionKind.hs
bsd-3-clause
15,238
63
9
2,309
3,066
1,934
1,132
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} -- | -- Module: $HEADER$ -- Description: Test cases for Data.DHT.Type.Result module. -- Copyright: (c) 2015 Jan Šipr, Matej Kollár; 2015-2016 Peter Trško -- License: BSD3 -- -- Stability: stable -- Porta...
FPBrno/dht-api
test/TestCase/Data/DHT/Type/Result.hs
bsd-3-clause
2,153
0
13
449
443
259
184
48
2
{-# LANGUAGE CPP #-} module Main where import System.Posix.Internals (c_read, c_open, c_close, c_write, o_RDWR, o_CREAT, o_NONBLOCK) import Foreign.C.String import Foreign.Marshal.Alloc import Control.Monad import Control.Concurrent.Async (forConcurrently_) import System.Environment import Data.Bits #if defined(mingw3...
winterland1989/stdio
bench/diskIO/UnSafeFFI.hs
bsd-3-clause
1,537
0
23
498
467
237
230
36
5
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE InstanceSigs #-} -- NonZero4aryRandomAccessList module PFDS.Sec9.Ex18 where import Data.Vector (Vector, (!?), (//)) import qualified Data.Vector as V import PFDS.Commons.RandomAccessList import Prelude ...
matonix/pfds
src/PFDS/Sec9/Ex18.hs
bsd-3-clause
2,474
0
13
625
1,194
613
581
-1
-1
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : -- Copyright : (c) 2012 Boyun Tang -- License : BSD-style -- Maintainer : tangboyun@hotmail.com -- Stability : experimental -- Portability : ghc -- -- -- ----------------------------------...
tangboyun/bio-seq-gb
Bio/Sequence/GB/Types.hs
bsd-3-clause
8,871
1
26
3,211
2,306
1,270
1,036
246
1
{-# LANGUAGE PatternGuards, TypeSynonymInstances, CPP #-} module IRTS.Compiler where import IRTS.Lang import IRTS.Defunctionalise import IRTS.Simplified import IRTS.CodegenCommon import IRTS.CodegenC import IRTS.CodegenJava import IRTS.DumpBC import IRTS.CodegenJavaScript #ifdef IDRIS_LLVM import IRTS.CodegenLLVM #el...
ctford/Idris-Elba-dev
src/IRTS/Compiler.hs
bsd-3-clause
16,544
0
24
6,979
5,743
2,779
2,964
345
11
{-# LANGUAGE OverloadedStrings #-} import EditRope import Criterion.Main import TestHelper main :: IO () main = do let toTest = renderTokensForLine attrMap defaultMain [ bgroup "renderTokensForLine" [ bench "original line" $ whnf (toTest []) lineABC , bench "l...
clojj/hsedit
test/Criterion.hs
bsd-3-clause
568
1
16
175
144
68
76
13
1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Numeric.Natural.QuickCheck where import Numeric.Natural import Test.QuickCheck (Arbitrary, arbitrary, CoArbitrary, coarbitrary, suchThat, variant) import Control.Applicative ((<$>)) instance Arbitrary Natural where arbitrary = fromInteger <$> (arbitrary `suchThat` (0 <...
kmyk/proof-haskell
Numeric/Natural/QuickCheck.hs
mit
386
0
9
50
93
58
35
9
0
module API.RequestSpec (spec) where import Universum import Data.Either (isLeft) import Formatting (build, sformat) import Test.Hspec import Cardano.Wallet.API.Request.Filter import Cardano.Wallet.API.Request.Sort import Cardano.Wallet.API.V1.Type...
input-output-hk/pos-haskell-prototype
wallet/test/unit/API/RequestSpec.hs
mit
4,025
0
23
1,715
909
460
449
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Search -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com --...
siddhanathan/yi
yi-core/src/Yi/Search.hs
gpl-2.0
16,120
0
21
4,173
3,612
1,873
1,739
293
5
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} {- | Module : Neovim.RPC.SocketReader Description : The component which reads RPC messages from the neovim instance Copyright : (c) Se...
lslah/nvim-hs
library/Neovim/RPC/SocketReader.hs
apache-2.0
9,448
0
23
3,063
2,121
1,114
1,007
151
15
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TupleSections #-} -- | Ge...
juhp/stack
src/Stack/Coverage.hs
bsd-3-clause
24,184
0
30
7,727
5,337
2,656
2,681
411
8
-- -- Copyright © 2013-2014 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. -- -- | client interface for sendi...
anchor/marquise
lib/Marquise/Client/Core.hs
bsd-3-clause
10,352
0
16
2,828
2,057
1,013
1,044
219
4
{-# OPTIONS_GHC -Wall #-} module Optimize.Inline (inline) where import Control.Arrow (second, (***)) import Control.Monad (foldM) import qualified Data.List as List import qualified Data.Map as Map import AST.Expression.Optimized (Expr(..), Decider(..), Choice(..)) import qualified AST.Expression.Optimized as Opt imp...
mgold/Elm
src/Optimize/Inline.hs
bsd-3-clause
7,028
0
23
2,463
2,343
1,150
1,193
203
30
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-} module Text.Parsec.Indentation.Char where import Text.Parsec.Prim (ParsecT, mkPT, runParsecT, Stream(..), Consumed(..), Reply(..), State(..)) import Text.Parsec.Pos (so...
lambdageek/indentation
indentation-parsec/src/Text/Parsec/Indentation/Char.hs
bsd-3-clause
1,980
0
20
453
677
365
312
37
2