code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
module Exploration.Logic.ManyValued where -- | A Many Valued logic is an algebraic -- | structure (m, (^), not, false), satisfying: -- (^) associative, commutative -- false neutral to (^) -- not (not x) = x -- x ^ (not false) = not false -- not (not x ^ y) ^ y = not (not y ^ x) ^ x c...
SamuelSchlesinger/Exploration
Exploration/Logic/ManyValued.hs
mit
396
0
8
120
52
33
19
5
0
module Coins where import Data.Ord import Data.Set (Set) import qualified Data.Set as Set ---------------------------------------- type Coin = Integer data CoinSet = CoinSet { face :: Coin, count :: Integer } instance Show CoinSet where show (CoinSet face count) = show face ++ "x" ++ show count instance Eq C...
kirhgoff/haskell-sandbox
euler31/Coins.hs
mit
629
0
10
115
182
100
82
15
0
{-# LANGUAGE TypeOperators , FlexibleContexts , TypeFamilies , UndecidableInstances #-} module Calculus.Connectives.Linear where import Calculus.Expr import Calculus.Connectives.Simple import Auxiliary.NameSource import Data.Functor import Control.Monad.State -- Simultaneous conjunction data SimConj f = SimConj ...
wowofbob/calculus
Calculus/Connectives/Linear.hs
mit
3,367
0
13
808
1,209
635
574
-1
-1
module Jira.API.Authentication.KeyUtils where import Control.Applicative import Crypto.Types.PubKey.RSA (PrivateKey (..), PublicKey (..)) import Data.Maybe import OpenSSL.EVP.PKey (toKeyPair, toPublicKey) import OpenSSL.PEM (PemPasswordSupply (..), ...
dsmatter/jira-api
src/Jira/API/Authentication/KeyUtils.hs
mit
1,275
0
9
254
293
157
136
22
1
Config { template = " %StdinReader% } ----==|i|==---- { %battery% %cpu% %memory% %date% " , commands = [ Run StdinReader , Run Battery [ "--template" , "<acstatus>" , "--Low" , "20" , "--High" , "50" , "--normal" , "green" , "--low" , "red"...
ysmiraak/home
.xmonad/xmobar.hs
epl-1.0
888
0
9
396
177
108
69
-1
-1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.UI.GLUT.State -- Copyright : (c) Sven Panne 2002-2005 -- License : BSD-style (see the file libraries/GLUT/LICENSE) -- -- Maintainer : sven.panne@aedion.de -- Stability : stable -- Portability : ...
ducis/haAni
hs/common/Graphics/UI/GLUT/State.hs
gpl-2.0
13,668
0
17
2,117
1,777
969
808
169
3
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.IReader -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experim...
yi-editor/yi
yi-ireader/src/Yi/IReader.hs
gpl-2.0
7,186
0
15
1,738
1,296
729
567
94
2
{- Textures.hs; Mun Hon Cheong (mhch295@cse.unsw.edu.au) 2005 This module is for loading textures -} module Textures where import Graphics.UI.GLUT import TGA (readTga) import Data.Word (Word8) import Foreign.Marshal.Alloc (free) -- read a list of images and returns a list of textures -- all images ...
kvelicka/frag
src/Textures.hs
gpl-2.0
1,756
0
13
350
431
220
211
28
1
module Language.SMTLib2.Internals.Proof.Verify where import qualified Language.SMTLib2.Internals.Backend as B import Language.SMTLib2.Internals.Monad import Language.SMTLib2.Internals.Embed import Language.SMTLib2.Internals.Proof import Language.SMTLib2 import qualified Language.SMTLib2.Internals.Expression as E impo...
hguenther/smtlib2
Language/SMTLib2/Internals/Proof/Verify.hs
gpl-3.0
3,634
0
24
1,002
1,187
576
611
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE Rank2Types #-} module SNet ( runSNet , runSNetCustom , SNet , SNetIn , SNetOut , globIn , globOut , dummyIn , dummyOut , module SNet.Interfaces , Variants (..) , VariantMap (..) , Pattern (..) , RecEntry (..) , Record (Rec) , RecType (Data) , CIn...
merijn/SNet2.0
SNet.hs
gpl-3.0
1,879
3
14
457
645
346
299
82
2
{-# LANGUAGE OverloadedStrings #-} -- | -- Copyright : Herbert Valerio Riedel -- SPDX-License-Identifier: GPL-3.0-or-later module CabalEdit ( cabalEditXRev , cabalSplitAtField , PkgRev ) where import Data.ByteString (ByteString) import qualified Data.ByteString.Char...
hvr/hackage-cli
src/CabalEdit.hs
gpl-3.0
3,533
0
20
963
666
378
288
37
4
{- - Copyright (C) 2013 Alexander Berntsen <alexander@plaimi.net> - - This file is part of bweakfwu. - - bweakfwu 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 ...
plaimi/bweakfwu
src/bweakfwu/Geometry.hs
gpl-3.0
1,033
0
5
186
45
32
13
6
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} -- | Interface for the RNAcentral REST webservice. -- module Biobase.RNAlien.RNAcentralHTTP (rnaCentralHTTP, buildSequenceViaMD5Query, buildStringViaMD5Query, getRNACentralEntries, ...
eggzilla/RNAlien
Biobase/RNAlien/RNAcentralHTTP.hs
gpl-3.0
4,723
0
12
885
893
485
408
87
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Patch.hs
mpl-2.0
6,993
0
20
1,605
989
571
418
144
1
-- | This module exports shortcuts for some of JVM instructions (which are defined in JVM.Assembler). -- These functions get Constants, put them into constants pool and generate instruction using index -- of constant in the pool. module JVM.Builder.Instructions where import Data.Word import qualified Data.ByteString.L...
MateVM/hs-java
JVM/Builder/Instructions.hs
lgpl-3.0
8,558
0
12
2,295
4,424
2,134
2,290
277
1
module Data.List.Tools ( takeUntil , dropUntil , mulLists , defaultElem , isIncludedElem , setAt , modifyAt ) where takeUntil :: (a -> Bool) -> [a] -> [a] dropUntil :: (a -> Bool) -> [a] -> [a] takeUntil _ [] = [] takeUntil p (x:xs) | p x = [x] | otherwise = x : takeUntil p xs dropUntil _ []...
YoshikuniJujo/yjtools_haskell
Data/List/Tools.hs
lgpl-3.0
910
0
9
262
512
271
241
30
1
{-# LANGUAGE NamedFieldPuns,RecordWildCards #-} module StearnsWharf.XML.Common where import Data.Maybe (fromJust) import qualified Text.XML.Light as X import qualified Data.List as LU type AttValPair = (String,String) toQName :: String -> X.QName toQName s = X.QName s Nothing Nothing xmlAttr :: String -> X.Element...
baalbek/stearnswharf
src/StearnsWharf/XML/Common.hs
lgpl-3.0
1,118
0
12
230
425
224
201
26
1
module PutJson where import Data.List (intercalate) import SimpleJSON renderJValue :: JValue -> String renderJValue (JString s) = show s renderJValue (JNumber n) = show n renderJValue (JBool True) = "true" renderJValue (JBool False) = "false" renderJValue JNull = "null" renderJValue (JObject o) = "{" ...
EricYT/Haskell
src/real_haskell/chapter-5/PutJSON.hs
apache-2.0
682
0
9
164
269
133
136
18
3
module Code30_Parity where import Code30_Loopless hiding (bop,wop) data Spider' = Node' (Bool,Bool) Int [Leg'] data Leg' = Dn' Spider' | Up' Spider' decorate :: Spider -> Spider' decorate (Node a legs) = node' a (map (mapLeg decorate) legs) mapLeg :: (Spider -> Spider') -...
sampou-org/pfad
Code/Code30_Parity.hs
bsd-3-clause
1,164
0
11
324
677
361
316
25
2
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} -- | This module contains responses from Telegram Bot API module Web.Telegram.API.Bot.Responses ( -- * Types Response (..) , ResponseParameters (..) , GetMeResp...
cblp/haskell-telegram-api
src/Web/Telegram/API/Bot/Responses.hs
bsd-3-clause
3,059
0
9
587
373
229
144
55
0
module Graphics.UI.WX.Turtle.Move( -- * types Field, Coordinates(..), -- * process Field openField, closeField, waitField, topleft, center, coordinates, fieldSize, -- * draws forkField, flushField, clearLayer, clearCharacter, moveTurtle, -- * event oninputtext, onclick, onrelease, ondrag, onmo...
YoshikuniJujo/wxturtle
src/Graphics/UI/WX/Turtle/Move.hs
bsd-3-clause
4,135
76
17
816
1,906
993
913
96
3
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeOperators #-} module Data.FAlgebra.Hole ( module Data.FAlgebra.Base , HoleF(..) , HoleM(..) ) where import Data.FAlgebra.Base import Data.Functor -- |Transform a functor to allow ...
bhamrick/fixalgs
Data/FAlgebra/Hole.hs
bsd-3-clause
1,496
0
12
332
473
254
219
25
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} -- | -- Module : Travis.Meta -- Description : Travis preprocessor -- Copyright : (c) Oleg Grenrus, 2005 -- License : BSD3 -- Maintainer : Oleg Grenrus <oleg.grenrus@iki.fi> module Travis.Meta ( -- * High level preprocessIO , preproc...
phadej/travis-meta-yaml
src/Travis/Meta.hs
bsd-3-clause
7,438
0
31
1,683
2,157
1,132
1,025
-1
-1
-- | Helper for writing tests for numeric code module Test.QuickCheck.Numeric ( -- * Approximate equality eq , eqC -- * Function monotonicity , Monotonicity(..) , monotonicFunction , monotonicFunctionIEEE -- * Inverse function , checkInverse , checkInverse2 ) where import Data.Complex imp...
Shimuuar/quickcheck-numeric
Test/QuickCheck/Numeric.hs
bsd-3-clause
4,416
0
15
1,182
913
510
403
71
4
{-# LANGUAGE GADTs, RankNTypes, TupleSections #-} module QnA4 where data Q1i data Q1o data Q2i data Q2o data Q3i data Q3o data Q4i data Q4o data Graph s a s' where Graph :: (s -> a) -> (s -> a -> s') -> Graph s a s' runGraph :: Graph s a s' -> s -> (a, s') runGraph (Graph f q) s = (f s, q s (f s)) (~:>) :: Grap...
homam/fsm-conversational-ui
src/QnA4.hs
bsd-3-clause
2,065
0
12
468
973
524
449
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} ------------------------------------------------------------------- -- | -- Module : Irreverent.Bitucket.Core.Data.Pipelines.SSHKeyPair -- Copyright : (C) 2017 - 2018 Irreverent Pixel Feats -- License : BSD-style (see the file /LICENSE.md) -- Maintainer : Dom De Re -- ...
irreverent-pixel-feats/bitbucket
bitbucket-core/src/Irreverent/Bitbucket/Core/Data/Pipelines/SSHKeyPair.hs
bsd-3-clause
700
0
9
105
76
53
23
11
0
module System.IO.Jail.ByteString ( packCString , packCStringLen , useAsCString , useAsCStringLen , getLine , getContents , putStr , putStrLn , interact , readFile , writeFile , appendFile , hGetLine , hGetContents , hGet , hGetNonBlocking , hPut , hPutStr , hPutStrLn ) where import Prelude hiding (IO, getLine, getCont...
sebastiaanvisser/jail
src/System/IO/Jail/ByteString.hs
bsd-3-clause
2,293
0
11
394
860
446
414
68
1
{-# LANGUAGE FlexibleContexts, MultiParamTypeClasses, FlexibleInstances #-} module DSL.GraphDSL ( -- Types Equality (..), Implication (..), InEquality (..), Constraint, Requirement (..), Graph, CLD, graph, constraints, Sign (..), TimeFrame (..),...
GRACeFUL-project/GraphDSL
src/DSL/GraphDSL.hs
bsd-3-clause
6,207
0
17
2,032
1,846
1,054
792
147
6
-- | An algorithm for merging users' edits. Specifically, there's just one -- function – 'merge' – and it simply does a three-way diff. module Guide.Diff.Merge ( merge, ) where import Imports import Guide.Diff.Tokenize import qualified Data.Patch as PV import qualified Data.Text as T -- | An implementation of a...
aelve/guide
back/src/Guide/Diff/Merge.hs
bsd-3-clause
770
0
8
196
182
106
76
-1
-1
{-# LANGUAGE TemplateHaskell #-} module Database.Esqueleto.Join.TH where import qualified Data.List as List import Data.Maybe import Data.Monoid import Data.Tagged import qualified Database.Esqueleto as E import Language.Haskell.TH import Language.Haskell.TH.ExpandSyns import Database.Esqueleto.Join (<$$>) :: (Func...
pseudonom/dovetail
src/Database/Esqueleto/Join/TH.hs
bsd-3-clause
5,108
0
23
1,073
1,469
777
692
-1
-1
module HsenvMonadUtils (runInTmpDir) where import System.Directory import Util.IO import HsenvMonad runInTmpDir :: Hsenv a -> Hsenv a runInTmpDir m = do tmp <- liftIO getTemporaryDirectory tmpDir <- liftIO $ createTemporaryDirectory tmp "hsenv" oldCwd <- liftIO getCurrentDirectory liftIO $ setCurrentDirectory...
Paczesiowa/hsenv
src/HsenvMonadUtils.hs
bsd-3-clause
462
0
13
85
129
61
68
14
1
{-# LANGUAGE RecordWildCards #-} module Anchor.Tokens.Server ( P.version, startServer, ServerState(..), module X, ) where import Control.Concurrent import Control.Concurrent.Async import Data.Pool import qualified Data.Streaming.Network as N import ...
zerobuzz/anchor-token-server
lib/Anchor/Tokens/Server.hs
bsd-3-clause
2,912
0
16
820
658
341
317
71
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE Typ...
Garygunn94/DFS
ClientProxy/.stack-work/intero/intero7973HSQ.hs
bsd-3-clause
14,674
29
29
5,023
3,846
1,856
1,990
333
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} ...
nmattia/halytics
src/Halytics/Metric/Statistics.hs
bsd-3-clause
8,593
0
13
1,851
2,548
1,356
1,192
-1
-1
{-# LANGUAGE StandaloneDeriving, FlexibleInstances, BangPatterns #-} {-# LANGUAGE MultiParamTypeClasses, TypeFamilies #-} module Data.Array.Matryoshka.PArray.Unboxed ( U.Unbox, U, fromVector, toVector ) where import Control.DeepSeq import Data.Array.Matryoshka.PArray.Base import qualified Data.Vector.Unboxed a...
agremm/Matryoshka
Data/Array/Matryoshka/PArray/Unboxed.hs
bsd-3-clause
2,368
0
12
564
990
498
492
-1
-1
-- | for developing only -- module Paths_siberia where getDataFileName ::FilePath -> IO FilePath getDataFileName = return getDataDir::IO FilePath getDataDir = return "."
chemist/siberia
tmp/Paths_siberia.hs
bsd-3-clause
174
0
6
27
39
22
17
5
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -- | A preliminary renderer that produces `ReactJS` components when run using -- GHCJS. -- module Text.Blaze.Renderer.ReactJS ( ReactJSNode , renderHtml ) where import Control.Applicative import Control.Monad imp...
meiersi/blaze-react
src/Text/Blaze/Renderer/ReactJS.hs
mit
17,708
40
24
5,157
4,069
2,019
2,050
-1
-1
{-# LANGUAGE Arrows #-} module Main where import Data.IORef import System.IO import Text.Printf import Control.Monad.Random import Control.Monad.Reader import Control.Monad.Trans.MSF.Random import Data.Array.IArray import FRP.BearRive...
thalerjonathan/phd
thesis/code/concurrent/sir/SIR_Seq/src/Main.hs
gpl-3.0
13,828
3
24
4,355
4,000
2,086
1,914
338
4
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} import Yesod data HelloWorld = HelloWorld mkYesod "HelloWorld" [parseRoutes| / HomeR GET |] instance Yesod HelloWorld getHomeR :: Handler Html getHome...
wowofbob/scratch
app/Yesod/Basic/Main.hs
gpl-3.0
405
1
6
94
77
42
35
12
1
-- Copyright 2016 TensorFlow authors. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agree...
judah/tensorflow-haskell
tensorflow-records-conduit/src/TensorFlow/Records/Conduit.hs
apache-2.0
1,892
0
8
283
296
178
118
23
1
{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds #-} {-# LANGUAGE StandaloneDeriving, FlexibleContexts, DeriveDataTypeable , UndecidableInstances, FlexibleInstances, MultiParamTypeClasses , PatternGuards, Rank2Types, TypeSynonymInstances #-} ----------------------------------------------------------...
f1u77y/xmonad-contrib
XMonad/Layout/Groups.hs
bsd-3-clause
21,445
0
17
7,217
5,474
2,809
2,665
280
4
{-# LANGUAGE TemplateHaskell, FlexibleInstances, UndecidableInstances, DeriveDataTypeable #-} module Baum.Such.Op where import Autolib.ToDoc import Autolib.Reader import Data.Typeable import Autolib.Reporter import System.Random class ( Eq a, Ord a, Show a, ToDoc a, Reader a, Random a ) => OpC a instance (...
florianpilz/autotool
src/Baum/Such/Op.hs
gpl-2.0
794
0
11
176
292
149
143
-1
-1
module Base.Renderable.Centered where import Data.Abelian import Graphics.Qt import Utils import Base.Types import Base.Renderable.Common () centered :: Renderable r => r -> RenderableInstance centered = RenderableInstance . Centered . RenderableInstance data Centered = Centered RenderableInstance instance Re...
changlinli/nikki
src/Base/Renderable/Centered.hs
lgpl-3.0
769
0
16
164
237
122
115
18
1
module Snap.Internal.Http.Server.TimeoutManager.Tests ( tests ) where import Control.Concurrent import Data.IORef import Data.Maybe import System.PosixCompat.Time import System.Timeout import Test.Framework import Test.Framework.Providers.HUnit im...
beni55/snap-server
test/suite/Snap/Internal/Http/Server/TimeoutManager/Tests.hs
bsd-3-clause
1,964
0
11
517
621
305
316
62
1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Sandbox -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- UI for the sandboxing functionality. ----------------------------------------------------------...
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/Sandbox.hs
bsd-3-clause
41,442
0
27
11,417
6,605
3,432
3,173
619
7
module PackageTests.EmptyLib.Check where import PackageTests.PackageTester import System.FilePath import Test.Tasty.HUnit -- See https://github.com/haskell/cabal/issues/1241 emptyLib :: FilePath -> Assertion emptyLib ghcPath = do let spec = PackageSpec { directory = "PackageTests" </> "EmptyLib" </> "emp...
Helkafen/cabal
Cabal/tests/PackageTests/EmptyLib/Check.hs
bsd-3-clause
464
0
13
100
98
54
44
12
1
{- $Id: AFRPTestsDelay.hs,v 1.2 2003/11/10 21:28:58 antony Exp $ ****************************************************************************** * A F R P * * * * Module: ...
ony/Yampa-core
tests/AFRPTestsPre.hs
bsd-3-clause
6,766
0
19
2,797
2,329
1,438
891
150
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="es-ES"> <title>SVN Digger Files</title> <maps> <homeID>svndigger</homeID> <mapref locat...
kingthorin/zap-extensions
addOns/svndigger/src/main/javahelp/help_es_ES/helpset_es_ES.hs
apache-2.0
967
82
52
157
392
207
185
-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="pt-BR"> <title>Visualização de Navegador | Extensão ZAP</title> <maps> <homeID>top</homeID> ...
thc202/zap-extensions
addOns/browserView/src/main/javahelp/org/zaproxy/zap/extension/browserView/resources/help_pt_BR/helpset_pt_BR.hs
apache-2.0
994
83
52
160
407
214
193
-1
-1
{-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE UndecidableInstances #-} -- #345 module ShouldCompile where data Succ n data Zero class Plus x y z | x y -> z instance Plus Zero x x i...
sdiehl/ghc
testsuite/tests/gadt/gadt-fd.hs
bsd-3-clause
622
0
10
160
216
115
101
-1
-1
{-| Main binary for all stand-alone data collectors -} {- Copyright (C) 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 option) any la...
vladimir-ipatov/ganeti
test/hs/hpc-mon-collector.hs
gpl-2.0
1,054
0
6
168
64
39
25
6
1
module Language.HigherRank.Main (main) where import System.Console.Haskeline import Language.HigherRank.Interpret (runInterpret) import Language.HigherRank.Parse (parseExpr) import Language.HigherRank.Print (printReducedExpr, printType) import Language.HigherRank.Typecheck (runInfer) fromEither :: Either a a -> a fr...
lexi-lambda/higher-rank
library/Language/HigherRank/Main.hs
isc
736
0
14
141
269
139
130
-1
-1
module QueryHandler where import PrologParse import ArgsHandler varMatch :: PLVar -> PLVar -> Bool varMatch (PLSingletonVar n1 v1) (PLSingletonVar n2 v2) = n1 == n2 && v1 == v2 varMatch (PLSingletonVar n1 v1) (PLListVar n2 v2) = n1 == n2 && v1 `elem` v2 varMatch (PLListVar _ _) (PLSingletonVar _ _) = False varMatch (...
fredmorcos/attic
projects/hs-prolog-parser/QueryHandler.hs
isc
734
0
10
133
309
163
146
16
1
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-} -- | -- Copyright : (C) 2019 team@functionalconcepts.org -- License : MIT -- Maintainer : Helmut Merz <helmutm@cy55.de> -- Stability : experimental -- Portability : GHC only (requires STM) -- -- Access to the FCO backend using the fco-actor framework....
cyberconcepts/fco-backend
src/Fco/Backend/Actor.hs
mit
3,488
0
18
814
848
467
381
71
1
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} module Language.Erlang.Fold where import Language.Fold import Language.Erlang.Algebra import Language.Erlang.Syntax instance Fold (ErlangAlgebra pr at fn bv iop exp mat pat gua) Program pr where fold f (Program mod exs ims des fns) = programF f (fold f m...
arnihermann/timedreb2erl
src/Language/Erlang/Fold.hs
mit
3,586
0
12
919
1,877
919
958
67
0
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} module U.Util.Cache where import Prelude hiding (lookup) import Control.Monad.IO.Class (liftIO) import UnliftIO (MonadIO, newTVarIO, modifyTVar', writeTVar, atomically, readTVar, readTVarIO) import qualified Data.Map as Map import...
unisonweb/platform
codebase2/util/U/Util/Cache.hs
mit
3,354
0
21
894
1,026
512
514
69
3
{-# LANGUAGE ImplicitParams #-} -- | Based on An Introduction to Hybrid Automata by Jean-Francois Raskin -- http://www.cmi.ac.in/~madhavan/courses/acts2010/Raskin_Intro_Hybrid_Automata.pdf module WaterHeater where import Control.Applicative ((<|>)) import Zelus import CyphyUtils data TankState = T1 | T2 | T3 | T4 ...
koengit/cyphy
src/WaterHeater.hs
mit
2,723
0
13
720
993
548
445
65
4
module Database.Siege.Query where import Data.Char import Data.List data SExpr = Atom String | List [SExpr] parse :: String -> SExpr parse = undefined generate :: SExpr -> String generate (List exprs) = "(" ++ (intercalate " " $ map generate exprs) ++ ")" generate (Atom var) = if any isSpace var || elem ')'...
DanielWaterworth/siege
src/Database/Siege/Query.hs
mit
1,082
0
9
242
300
169
131
42
2
{-# LANGUAGE TypeFamilies, GADTs, TupleSections #-} module Text.Regex.Applicative.Interface where import Control.Applicative hiding (empty) import Control.Arrow import Control.Monad (guard) import qualified Data.List as List import Data.Maybe import Text.Regex.Applicative.Types import Text.Regex.Applicative.Object -- ...
feuerbach/regex-applicative
Text/Regex/Applicative/Interface.hs
mit
11,440
8
19
2,864
2,759
1,499
1,260
160
9
{-# LANGUAGE CPP #-} module GHCJS.DOM.CSSRule ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.CSSRule #else module Graphics.UI.Gtk.WebKit.DOM.CSSRule #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBK...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/CSSRule.hs
mit
420
0
5
39
33
26
7
4
0
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.MediaList (js_item, item, js_deleteMedium, deleteMedium, js_appendMedium, appendMedium, js_setMediaText, setMediaText, js_getMediaText, getMediaText, js_getLength, getLength, MediaList, cast...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/MediaList.hs
mit
3,649
44
11
558
901
508
393
59
1
-- A module with some code to explore theorems in the monadic lambda calculus module TP where import Data.List import Data.Set (Set) import qualified Data.Set as Set import Data.Maybe import Data.Map (Map) import qualified Data.Map as Map import Data.Foldable hiding (concat,any,all) import Control.Monad.State import D...
gianlucagiorgolo/glue-tp
TP.hs
mit
16,780
0
19
4,987
7,199
3,588
3,611
346
12
module PhotonMap ( PhotonMap , PhotonSurfaceInteraction , count , generatePhotonMap , getLightToViewerAtIntersection ) where import Numeric.FastMath ( ) import Control.DeepSeq ( NFData(..), force ) import Control.Monad ( replicateM, liftM ) import Data.KdMap.Static ( KdMap, buildWithDist, inRadius ) imp...
stu-smith/rendering-in-haskell
src/experiment08/PhotonMap.hs
mit
6,437
0
16
1,459
1,773
902
871
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Y2018.M04.D17.Exercise where {-- So, yesterday we had a bunch of JSON from various periodicals, but they were all in the same JSON format, which made it simple to upload them into a common database. Today, we have JSON, but in a different format, that we need to upload into ...
geophf/1HaskellADay
exercises/HAD/Y2018/M04/D17/Exercise.hs
mit
1,834
0
9
336
229
140
89
21
1
-- | Analysis and transformation of SQL queries. module Database.Selda.Transform where import Database.Selda.Column import Database.Selda.SQL import Database.Selda.Query.Type import Database.Selda.Types -- | Remove all dead columns recursively, assuming that the given list of -- column names contains all names prese...
valderman/selda
selda/src/Database/Selda/Transform.hs
mit
3,098
0
12
799
886
464
422
51
7
-- Copyright (c) 2016-present, SoundCloud Ltd. -- All rights reserved. -- -- This source code is distributed under the terms of a MIT license, -- found in the LICENSE file. {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} module Kubern...
soundcloud/haskell-kubernetes
lib/Kubernetes/Model/V1/Endpoints.hs
mit
2,506
0
14
728
351
210
141
42
1
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-} import Network.Wai.Middleware.OAuth2 as OAuth2 import Network.OAuth.OAuth2 import Keys (googleKey) import Data.ByteString import Control.Monad (unless) import System.Exit (exitFailure) import Test.QuickCheck.All (quickCheckAll) import Test.QuickCheck (Property) impo...
NerdGGuy/wai-middleware-oauth2
test/test.hs
mit
1,345
0
16
178
371
213
158
24
1
{-# LANGUAGE TypeOperators, RecursiveDo, ScopedTypeVariables, TemplateHaskell, QuasiQuotes, OverloadedStrings, ExtendedDefaultRules #-} module Main where import Graphics.UI.Gtk import Graphics.UI.Gtk.General.CssProvider import Graphics.UI.Gtk.General.StyleContext import Graphics.UI.Gtk.Abstract.Widget import Control....
george-steel/maxent-learner
maxent-learner-hw-gui/app/Main.hs
gpl-2.0
2,838
0
17
496
629
334
295
57
1
{- | Module : $Header$ Copyright : (c) C. Maeder, DFKI GmbH 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : experimental Portability : non-portable (via imports) -} module Main where import Comorphisms.HetLogicGraph import Comorphisms.LogicGraph ...
nevrenato/Hets_Fork
Comorphisms/test/sublogicGraph.hs
gpl-2.0
1,644
0
14
375
391
201
190
31
2
{-# LANGUAGE TemplateHaskell #-} module Rewriting.TRS.Raw where import Autolib.Symbol import Autolib.TES.Term import Autolib.TES.Rule import Autolib.TES.Identifier import qualified Autolib.TES import Autolib.ToDoc import Autolib.Reader import Data.Typeable -- | this is the raw type, -- needs to be processed becau...
florianpilz/autotool
src/Rewriting/TRS/Raw.hs
gpl-2.0
661
0
12
140
151
92
59
15
0
module SumAndCount where // https://stepic.org/lesson/%D0%9B%D0%BE%D0%BA%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5-%D1%81%D0%B2%D1%8F%D0%B7%D1%8B%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F-%D0%B8-%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D0%BB%D0%B0-%D0%BE%D1%82%D1%81%D1%82%D1%83%D0%BF%D0%BE%D0%B2-8414/step/8?unit=1553 sum'n'count :: Integer -> (...
devtype-blogspot-com/Haskell-Examples
SumAndCount/SumAndCount.hs
gpl-3.0
549
3
80
116
467
231
236
7
2
{-# LANGUAGE ScopedTypeVariables, NoMonomorphismRestriction, RecordWildCards #-} module Main where import Control.Applicative import Control.Monad import Control.Monad.Error import Control.Monad.Reader import Control.Monad.State import Data.Conduit import...
wavewave/lhc-analysis-collection
exe/evchainRunSimplifiedWW.hs
gpl-3.0
7,017
0
20
2,110
2,069
1,175
894
161
3
module Experimentation.P04 (p04_test) where import Test.HUnit import Data.List length_nat :: [a] -> Int length_nat all = length all length_rec :: [a] -> Int length_rec [] = 0 length_rec (_:as) = 1 + length_rec as -- Tests test_length_nat = TestCase $ do assertEqual "for (length_nat [0..100])" 101 (length_nat [0...
adarqui/99problems-hs
Experimentation/P04.hs
gpl-3.0
799
0
11
125
258
130
128
21
1
{- ============================================================================ | Copyright 2011 Matthew D. Steele <mdsteele@alum.mit.edu> | | | | This file is part of Fallback. | ...
mdsteele/fallback
src/Fallback/Scenario/Triggers.hs
gpl-3.0
5,637
0
14
1,228
810
413
397
77
2
{-# LANGUAGE ConstraintKinds ,DataKinds ,FlexibleInstances ,KindSignatures ,MultiParamTypeClasses ,TemplateHaskell ,TypeFamilies ,TypeSynonymInstances ,TypeOperators ,UndecidableInstances #-} {-| Modu...
syallop/NonZero
Data/NonZero/Nat.hs
gpl-3.0
2,256
0
8
644
496
304
192
46
1
-- Implementation of the collatz sequence in Haskell import Debug.Trace collatz :: Integer -> Integer collatz 1 = trace("N=1") 1 collatz n = if even n then trace("N="++show n++" is even") collatz (div n 2) else trace("N="++show n++" is not even") collatz (3*n+1)
situx/Misc
Haskell/collatz.hs
gpl-3.0
282
2
10
62
114
58
56
6
2
{-# LANGUAGE TemplateHaskell, TypeFamilies, TypeApplications #-} module Lamdu.Sugar.Convert.Binder.Params ( convertLamParams, convertEmptyParams , convertBinderToFunction , convertToRecordParams , StoredLam(..), slLam, slLambdaProp , NewParamPosition(..), addFieldParam , isParamAlwaysUsedWithGet...
lamdu/lamdu
src/Lamdu/Sugar/Convert/Binder/Params.hs
gpl-3.0
28,470
0
26
8,922
8,797
4,420
4,377
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Disks/Delete.hs
mpl-2.0
4,674
0
17
1,090
558
336
222
82
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-discovery/gen/Network/Google/Resource/Discovery/APIs/List.hs
mpl-2.0
2,769
0
13
670
379
227
152
56
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/Delete.hs
mpl-2.0
6,075
0
18
1,354
791
466
325
115
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-sqladmin/gen/Network/Google/Resource/SQL/BackupRuns/Get.hs
mpl-2.0
3,547
0
16
861
483
286
197
73
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/NetworkEndpointGroups/ListNetworkEndpoints.hs
mpl-2.0
10,120
0
23
2,243
992
588
404
158
1
{- | Internal module for pretty-printing showable Haskell values. -} -- -- Copyright (c) 2009-2022 Stefan Wehr - http://www.stefanwehr.de -- -- 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 Foundat...
skogsbaer/HTF
Test/Framework/PrettyHaskell.hs
lgpl-2.1
3,307
0
20
984
652
355
297
67
3
-- | -- Module : Netowork.Entity -- Copyright : (c) Alexandru Scvortov 2008 -- License : LGPL (see LICENSE file) -- Maintainer : scvalex@gmail.com -- module Network.Entity ( Entity(..) ) where -- | A network entity. -- -- e.g. a Peer, a Tracker; anything with an IP and a port, really class Ent...
scvalex/ltorrent
Network/Entity.hs
lgpl-3.0
460
0
7
124
53
35
18
5
0
-- The main module of the application. Performs GLFW-specific initialization and others. module Main ( main ) where import Control.Applicative import Control.Concurrent import Control.Exception import Control.Monad import Control.Monad.Trans import qualified Graphics.UI.GLFW as GLFW import System.Environment import S...
fujiyan/toriaezuzakki
haskell/glfw/keyboard/Rectangle.hs
bsd-2-clause
3,276
0
17
810
919
459
460
76
3
{-# LANGUAGE BangPatterns #-} {-| RPC test program. -} {- Copyright (C) 2011, 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. Redistributions of source code must retain the...
apyrgio/snf-ganeti
src/rpc-test.hs
bsd-2-clause
9,085
0
22
2,309
2,082
1,096
986
176
3
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {- | Module : Kiosk.Backend.Data.ReportTemplateSpec Description : Tests for Report Generation Copyright : Plow Technologies LLC License : MIT License Maintainer : Scott ...
plow-technologies/cobalt-kiosk-data-template
test/Kiosk/Backend/Data/ReportTemplateSpec.hs
bsd-3-clause
17,251
0
17
4,687
3,117
1,697
1,420
287
1
-- Copyright (c) 2017, Travis Bemann -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- o Redistributions of source code must retain the above copyright notice, this -- list of conditio...
tabemann/botwars
src/Main.hs
bsd-3-clause
22,547
16
39
7,414
5,188
2,585
2,603
469
24
---------------------------------------------------------------------------- -- | -- Module : Imported1 -- Copyright : (c) Sergey Vinokurov 2015 -- License : BSD3-style (see LICENSE) -- Maintainer : serg.foo@gmail.com ---------------------------------------------------------------------------- {-# LANG...
sergv/tags-server
test-data/0001module_with_imports/Imported1.hs
bsd-3-clause
482
1
8
94
91
55
36
10
1
module OpenSet where import Data.List hiding (union) import Data.Set as Set dup x = (x, x) openSets :: Ord a => [a] -> [[[a]]] openSets x = toList $ Set.map (toList.(Set.map toList)) $ Set.filter isOpen candidates where (e, u) = (fromList [], fromList x) conpact = fromList [e, u] candidat...
cutsea110/aop
src/OpenSet.hs
bsd-3-clause
790
1
13
237
388
207
181
15
1
module Rules.Eq where import Derivation import Goal import Rules.Utils import Tactic import Term -- H >> (a = b in A) = (a' = b' in A') in U(i) -- H >> A = A' in U(i) -- H >> a = a' in A -- H >> b = b' in A' -- Uses: EQ_EQ eqEQ :: PrlTactic eqEQ (Goal ctx t) = case t of Eq (Eq m1 n1 a1) (Eq m2 n2 a2...
thsutton/cha
lib/Rules/Eq.hs
bsd-3-clause
2,365
0
17
1,016
669
354
315
48
3
{-# LANGUAGE FlexibleContexts #-} module Language.Lambda.Semantics.Named.BigStep.Tests ( bigStepTests ) where import Prelude hiding (fromInteger, toInteger) import Data.Char import Bound.Unwrap as BU import Test.Tasty import qualified Test.Tasty.QuickCheck as QC import qualified Test.Tasty.SmallCheck ...
julmue/UntypedLambda
test/Language/Lambda/Semantics/Named/BigStep/Tests.hs
bsd-3-clause
11,361
0
18
3,565
3,697
1,881
1,816
273
3
-------------------------------------------------------------------------------- -- | -- Module : Sequence.Location -- Copyright : (c) [2009..2010] Trevor L. McDonell -- License : BSD -- -- Locate sequences fragments from index keys -- -------------------------------------------------------------------------------...
tmcdonell/hfx
src/haskell/Sequence/Location.hs
bsd-3-clause
1,869
0
16
383
498
275
223
22
3
module Playground01 where import Data.List simple :: t -> t simple x = x calcChange :: (Num t, Ord t) => t -> t -> t calcChange owed given = if change > 0 then change else 0 where change = given - owed doublePlusTwo :: Num t => ...
stefanocerruti/haskell-primer-alpha
src/Playground01.hs
bsd-3-clause
5,208
0
12
2,245
1,530
817
713
118
3
-- | -- Module : Network.Machine.Protocol.SMTP -- Copyright : Lodvær 2015 -- License : BSD3 -- -- Maintainer : Lodvær <lodvaer@gmail.com> -- Stability : provisional -- Portability : unknown -- -- SMTP machines. module Network.Machine.Protocol.SMTP where -- TODO
lodvaer/machines-network
src/Network/Machine/Protocol/SMTP.hs
bsd-3-clause
285
0
3
59
19
17
2
1
0
module Paths_simple ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception import Data.Version (Version(..)) import System.Environment (getEnv) import Prelude catchIO :: IO a -> (Exception.IOException -> IO a) ->...
Chuck-Aguilar/haskell-opencv-work
.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/autogen/Paths_simple.hs
bsd-3-clause
1,617
0
10
177
362
206
156
28
1
{-# LANGUAGE ForeignFunctionInterface #-} module Network.UV ( Loop , defaultLoop , createLoop , run ) where import Foreign.C import Foreign.Ptr import Network.UV.TCP import Network.UV.Internal.UV foreign import ccall unsafe "uv_loop_new" c_uv_loop_new :: IO (Ptr a) foreign...
aardvarrk/hlibuv
src/Network/UV.hs
bsd-3-clause
835
0
8
201
219
117
102
26
1
-- | Allows the abstract syntax tree to be compiled into C++ template -- metaprogram. module Compiler.Compile ( -- * Module compiling compileModule , compileTopLevel -- * Top level entities compiling , compileType , compileDataDef , compileValDef -- * Expression compiling ,...
vituscze/norri
src/Compiler/Compile.hs
bsd-3-clause
10,491
0
17
3,685
2,135
1,163
972
196
8
{-# LANGUAGE DeriveGeneric , OverloadedStrings #-} module Lib where import Control.Monad import Data.Aeson import qualified Data.ByteString.Lazy.Char8 as BL import qualified Data.Text as T import qualified Data.Text.IO as T import Data.Yaml import GHC.Generics import Network.Nats import System.Exit imp...
wayofthepie/cspawn
src/Lib.hs
bsd-3-clause
2,119
0
14
562
609
307
302
62
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE...
anchor/retcon
lib/Retcon/Network/Server.hs
bsd-3-clause
21,317
0
19
6,072
5,110
2,549
2,561
420
6