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 : $Header$ Description : Signatures for DL logics, as extension of CASL signatures Copyright : (c) Klaus Luettich, Uni Bremen 2004 License : GPLv2 or higher, see LICENSE.txt Maintainer : luecke@informatik.uni-bremen.de Stability : provisional Portability : portable Signatures for DL l...
nevrenato/Hets_Fork
CASL_DL/Sign.hs
gpl-2.0
3,976
0
18
1,404
925
479
446
80
2
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, PatternGuards #-} {- Copyright (C) 2006-2014 John MacFarlane <jgm@berkeley.edu> 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; eithe...
sapek/pandoc
src/Text/Pandoc/Writers/LaTeX.hs
gpl-2.0
42,870
0
36
15,059
11,507
5,770
5,737
840
33
{-# LANGUAGE PatternGuards #-} {- Copyright (C) 2014 Jesse Rosenthal <jrosenthal@jhu.edu> 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 lat...
timtylin/scholdoc-texmath
src/Text/TeXMath/Readers/OMML.hs
gpl-2.0
18,428
0
20
5,230
5,522
2,666
2,856
393
16
{-# LANGUAGE NoImplicitPrelude, RankNTypes #-} module Lamdu.GUI.RedundantAnnotations ( markAnnotationsToDisplay ) where import Control.Lens (Lens') import qualified Control.Lens as Lens import Control.Lens.Operators import qualified Lamdu.GUI.ExpressionGui.Types as T import qualified Lamdu....
da-x/lamdu
Lamdu/GUI/RedundantAnnotations.hs
gpl-3.0
3,484
0
18
892
892
452
440
-1
-1
{-# LANGUAGE NoImplicitPrelude, FlexibleInstances, UndecidableInstances #-} module Control.MonadA(MonadA) where import Prelude.Compat class (Monad m, Applicative m) => MonadA m instance (Monad m, Applicative m) => MonadA m
rvion/lamdu
bottlelib/Control/MonadA.hs
gpl-3.0
225
0
6
29
61
33
28
-1
-1
module Main where import Control.Monad import Data.Vector.Storable (fromList) import Numeric.Units.Dimensional.Prelude (nano, meter, (*~)) -- import Pipes -- import qualified Pipes.Prelude as P import Hkl import Prelude hiding (lookup) main :: IO () main = do let sample =...
picca/hkl
contrib/haskell/src/ghkl.hs
gpl-3.0
2,043
0
18
743
525
280
245
31
1
{-# LANGUAGE ExistentialQuantification #-} -- Module : Network.Metric.Internal -- Copyright : (c) 2012-2015 Brendan Hay <brendan.g.hay@gmail.com> -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- A copy of the MPL can be found...
brendanhay/network-metrics
src/Network/Metric/Internal.hs
mpl-2.0
4,392
0
12
1,184
1,063
583
480
85
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProFiles/Patch.hs
mpl-2.0
4,399
0
18
1,005
547
325
222
90
1
module MakeUpper where import Data.Char makeUpperCase :: [Char] -> [Char] makeUpperCase = map toUpper
ice1000/OI-codes
codewars/101-200/makeuppercase.hs
agpl-3.0
104
0
6
16
32
19
13
4
1
lucky :: Int -> String lucky 7 = "Lucky number seven!" lucky x = "Sorry, you're out of luck, pal!" factorial :: Int -> Int factorial 0 = 1 factorial n = n * factorial (n - 1) addVectors :: (Double, Double) -> (Double, Double) -> (Double, Double) addVectors (x1, y1) (x2, y2) = (x1 + x2, y1 + y2) first :: (a, b, c) ...
alexliew/learn_you_a_haskell
code/syntax.hs
unlicense
3,124
0
11
765
1,416
758
658
88
3
-- Exercises: Some Instances -- Copied from: https://github.com/johnchandlerburnham/haskellbook/blob/master/26/MaybeT.hs -- StateT import Control.Monad.Trans newtype MaybeT m a = MaybeT { runMaybeT :: m (Maybe a) } instance (Functor m) => Functor (MaybeT m) where fmap f (MaybeT ma) = MaybeT $ (fmap . fmap) f ma i...
dmp1ce/Haskell-Programming-Exercises
Chapter 26/Exercises: Some Instances.hs
unlicense
811
0
13
179
310
158
152
18
0
-- |Utility functions for STM. module System.IO.FileSync.STM.Utils where import Control.Concurrent (forkIO) import Control.Concurrent.STM.TMVar import Control.Concurrent.STM.TVar import Control.Concurrent.STM.TQueue import Data.Foldable (traverse_) import Control.Monad.IO.Class (MonadIO(..)) import Control.Monad.Loops...
jtapolczai/FileSync
System/IO/FileSync/STM/Utils.hs
apache-2.0
2,663
0
16
683
561
296
265
38
3
{-# LANGUAGE OverloadedStrings #-} module ID.Opts ( IDOpts(..) , options , execParser ) where import Options.Applicative data IDOpts = IDOpts { optConfig :: FilePath } deriving (Show) idOpts :: Parser IDOpts idOpts = IDOpts <$> strOption ( short 'c' <>...
erochest/intelligent-design
src/ID/Opts.hs
apache-2.0
683
0
11
220
138
74
64
18
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module PopVox.Types.Contrib ( Amount , ContribInfo , ContribEntry(..) , ContribIndex , ContribIndex' ) where import Control.Applicative import Data.Aeson import ...
erochest/popvox-scrape
src/PopVox/Types/Contrib.hs
apache-2.0
4,069
0
14
1,719
1,013
565
448
95
1
-- 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/SNumberLiterals.hs
apache-2.0
1,193
0
9
217
304
168
136
-1
-1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} -- ^ Common API definitions module Api.Common where import Data.Text (Text, unpack) import Servant import Types.Common typ...
gabesoft/kapi
src/Api/Common.hs
bsd-3-clause
3,690
0
29
997
1,310
667
643
79
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeOperators #-} module Ivory.OS.Posix.Tower.Signal where import Ivory.Language import Ivory.Tower import Ivory.OS.Posix.Tower.EventLoop data Watcher = Watcher { watcherName :: String , watcherDefs :: (forall s. Ivory (AllocEffects s) ()) -> Mo...
GaloisInc/ivory-tower-posix
src/Ivory/OS/Posix/Tower/Signal.hs
bsd-3-clause
1,932
0
16
454
650
327
323
53
3
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE LambdaCase #-} module River.Core.Evaluate ( evaluateProgram , Value(..) , RuntimeError(..) ) where import Control.Spoon (spoon) import Data.Int (Int64) import Data.Map (Map) import qualified Data.Map as Map import River.Bif...
jystic/river
src/River/Core/Evaluate.hs
bsd-3-clause
4,710
0
18
1,571
1,957
967
990
218
13
{-# LANGUAGE DeriveDataTypeable, DeriveGeneric, MultiParamTypeClasses, FlexibleInstances #-} module FOmega.Syntax where import Data.Typeable (Typeable) import GHC.Generics (Generic) import Insomnia.Common.Literal import Insomnia.Common.SampleParameters import Unbound.Generics.LocallyNameless import {-# SOURC...
lambdageek/insomnia
src/FOmega/Syntax.hs
bsd-3-clause
10,942
0
15
2,803
4,262
2,244
2,018
416
3
{-# LANGUAGE FlexibleContexts #-} module Main where import Build import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.List.NonEmpty as NE import Data.Tree (Tree (..)) import Data.Trie.List as L import Data.Trie.Map as M import Data.Trie.HashMap as HM im...
athanclark/tries
bench/Main.hs
bsd-3-clause
1,576
0
12
443
517
283
234
42
1
----------------------------------------------------------------------------- -- | -- Module : Application.DevAdmin.Job -- Copyright : (c) 2011-2013 Ian-Woo Kim -- -- License : BSD3 -- Maintainer : Ian-Woo Kim <ianwookim@gmail.com> -- Stability : experimental -- Portability : GHC -- --------------------...
wavewave/devadmin
lib/Application/DevAdmin/Job.hs
bsd-3-clause
9,696
0
19
2,416
1,554
755
799
136
4
{-| This modules defines the 'QueryArr' arrow, which is an arrow that represents selecting data from a database, and composing multiple queries together. -} module Opaleye.QueryArr where import Prelude hiding (id) import qualified Opaleye.Internal.Unpackspec as U import qualified Opaleye.Internal.Tag as T...
k0001/haskell-opaleye
Opaleye/QueryArr.hs
bsd-3-clause
2,429
0
11
520
930
540
390
51
1
{-# LANGUAGE NoImplicitPrelude #-} -- | -- Module: $HEADER$ -- Description: TODO -- Copyright: (c) 2016, Peter Trško -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com -- Stability: experimental -- Portability: NoImplicitPrelude -- -- TODO module DataAnalysis.Encode ( module DataAnalysis....
trskop/data-analysis
src/DataAnalysis/Encode.hs
bsd-3-clause
875
0
11
184
170
104
66
21
1
-- |JavaScript's syntax. module BrownPLT.JavaScript.Syntax(Expression(..),CaseClause(..),Statement(..), InfixOp(..),CatchClause(..),VarDecl(..),JavaScript(..), AssignOp(..),Id(..),PrefixOp(..),Prop(..), ForInit(..),ForInInit(..),unId , UnaryAssignOp (..) , LValue (..) , unJavaScript ,...
brownplt/webbits
src/BrownPLT/JavaScript/Syntax.hs
bsd-3-clause
5,469
0
10
1,106
2,078
1,146
932
125
5
module Rules.Unit where import Derivation import Goal import Rules.Utils import Tactic import Term -- H >> unit = unit in U(i) -- Uses: UNIT_EQ unitEQ :: PrlTactic unitEQ (Goal ctx t) = case t of Eq Unit Unit (Uni i) -> return $ Result { resultGoals = [] , resultEvidence = \d -> ca...
thsutton/cha
lib/Rules/Unit.hs
bsd-3-clause
1,196
0
15
452
307
165
142
33
3
module Main where import Codec.Picture (writePng, generateImage) import Codec.Picture.Types (PixelRGB8(..)) import Data.Bits ((.|.)) import Data.Char (toLower) import Data.Fixed (mod') import Data.List (splitAt, length, intersect) import Data.Vector ((!), Vector, fromList) import Numeric (readHex) import Options.Appli...
sgillis/hidenticon
src/Main.hs
bsd-3-clause
3,988
0
17
1,225
1,564
831
733
133
3
module Entity.Id where import qualified GameData.Entity as E invalidId :: Int invalidId = -1 entityId :: E.Entity -> Int entityId E.Player {E.playerId = id} = id entityId E.Enemy {E.enemyId = id} = id entityId E.Star {E.starId = id} = id entityId E.Platform {E.platformId = id} = id setEntityId :...
dan-t/layers
src/Entity/Id.hs
bsd-3-clause
570
0
8
132
254
140
114
14
1
{-# LANGUAGE FlexibleInstances , BangPatterns , MagicHash , ScopedTypeVariables , TypeFamilies , UndecidableInstances , OverlappingInstances , DeriveDataTypeable , MultiParamTypeClasses , NamedFieldPuns , RankNTypes #-} {-# OPTIONS_HADDOCK prune #-} #define MODNAME Intel.Cnc -- This file is s...
rrnewton/Haskell-CnC
Intel/Cnc.hs
bsd-3-clause
1,075
0
2
170
14
13
1
12
0
{-# LANGUAGE OverloadedStrings #-} module Handlers.Subscriber where import Control.Monad.IO.Class import Data.Aeson (decode) import Data.Text.Lazy (Text) import qualified Database.MySQL.Base as Mysql import Database.Subscriber import Network.HTTP.Types.Status import Types.Subscriber import Web.Scotty import Web.Scott...
ArekCzarnik/Uthenga
src/Handlers/Subscriber.hs
bsd-3-clause
1,383
0
11
196
392
195
197
36
1
-- http://adventofcode.com/2016/day/19 module Day_19 where import Data.Sequence as S type Elfs = S.Seq Int main :: IO () main = do print ("Part 1", part 1) -- 1830117 print ("Part 2", part 2) -- 1417887 part :: Int -> Elfs part n = until ((1==) . S.length) (rotate . (if n == 1 then popNext ...
MaxwellBo/Advent_Of_Code_2016
Day_19.hs
bsd-3-clause
642
0
11
181
247
133
114
19
2
{-# LANGUAGE KindSignatures #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} import GHC.TypeLits import Data.Type.Bool infixl 8 & x & ...
sleexyz/haskell-fun
TypeSafeComposableConstructors.hs
bsd-3-clause
2,457
0
9
523
644
355
289
62
1
{-# LANGUAGE DeriveGeneric #-} module TPar.Server.Types where import Control.Distributed.Process import Data.Binary import Data.Time.Clock import System.Exit import GHC.Generics import TPar.Rpc import TPar.JobMatch import TPar.Types import TPar.SubPubStream import TPar.ProcessPipe -- | A channel which should be use...
bgamari/tpar
TPar/Server/Types.hs
bsd-3-clause
2,774
0
11
564
236
141
95
27
1
{-# LANGUAGE CPP, NondecreasingIndentation, TupleSections, RecordWildCards #-} {-# OPTIONS_GHC -fno-cse #-} -- -- (c) The University of Glasgow 2002-2006 -- -- -fno-cse is needed for GLOBAL_VAR's to behave properly -- | The dynamic linker for GHCi. -- -- This module deals with the top-level issues of dynamic linking...
GaloisInc/halvm-ghc
compiler/ghci/Linker.hs
bsd-3-clause
57,881
6
24
17,672
10,576
5,399
5,177
-1
-1
module Parlindromize (simple, kmp) where isPalindrome :: String -> Bool isPalindrome s = s == (reverse s) simple :: String -> Int simple [] = 0 simple xxs@(x:xs) | isPalindrome xxs = length xxs | otherwise = 2 + simple xs matches :: Eq a => [a] -> [a] -> [Int] matches ws = map length . filter (endswith ws) . in...
everyevery/programming_study
algospot/palindromize/palindromize.hs
mit
594
0
9
130
322
171
151
20
1
module Network.Types where ----------------------------------------------------------------------------- -- | -- Module : Network.Types -- Copyright : (c) Commiters -- License : The same as `nmcli` - http://manpages.ubuntu.com/manpages/maverick/man1/nmcli.1.html -- -- Maintainer : massyl, ardumont -- S...
ardumont/hWifi
Network/Types.hs
gpl-2.0
2,411
0
10
636
407
235
172
40
0
module Foo where class Monad a => <resolved>Foo a where baz :: a -> String
carymrobbins/intellij-haskforce
tests/gold/resolve/Class00002/Foo.hs
apache-2.0
78
2
7
18
36
18
18
-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="da-DK"> <title>&gt;Run Applications | ZAP Extensions</title> <maps> <homeID>top</homeID> ...
veggiespam/zap-extensions
addOns/invoke/src/main/javahelp/org/zaproxy/zap/extension/invoke/resources/help_da_DK/helpset_da_DK.hs
apache-2.0
981
78
55
160
424
213
211
-1
-1
module ImportsSemi where { ; ; ; ; ; ; import Data.List ;;; }
mpickering/ghc-exactprint
tests/examples/ghc710/ImportsSemi.hs
bsd-3-clause
62
2
4
14
22
17
5
2
0
module Language.Haskell.GhcMod.Info ( info , types ) where import Control.Applicative ((<$>)) import Data.Function (on) import Data.List (sortBy) import Data.Maybe (catMaybes) import Exception (ghandle, SomeException(..)) import GHC (GhcMonad, LHsBind, LHsExpr, LPat, Id, TypecheckedModule(..), SrcSpan, Type) i...
cabrera/ghc-mod
Language/Haskell/GhcMod/Info.hs
bsd-3-clause
2,410
0
15
509
715
386
329
52
1
module Language.Lukas -- -- $Id$ ( lukas , nolukas , dyck , nodyck ) where -- Sprachen von Lukasiewicz, Dyck import Autolib.Set import Data.List ( mapAccumL, nub ) import Autolib.Util.Zufall import Language.Type lukas :: Language lukas = Language { nametag = "Lukas" , abbreviation = "Lukasi...
Erdwolf/autotool-bonn
src/Language/Lukas.hs
gpl-2.0
2,674
20
16
819
878
458
420
78
2
-- For all type variables a, we require (CNode a) -- If we have a data constructor -- X a_1 .. a_n, and exactly one a_k is a Language.C.Data.NodeInfo, then return that a_k data Test1 = X Int NodeInfo | Y NodeInfo String | Z Int NodeInfo Integer deriving (Show {-! ,CNode !-}) -- If we have a data constructor -- X...
vincenthz/language-c
src/derive/DeriveTest2.hs
bsd-3-clause
744
0
8
156
152
89
63
4
0
{-# LANGUAGE GADTs, Rank2Types, CPP #-} ----------------------------------------------------------------------------------------- -- | -- Module : FRP.Yampa.Hybrid -- Copyright : (c) Antony Courtney and Henrik Nilsson, Yale University, 2003 -- License : BSD-style (see the LICENSE file in the distribution)...
ony/Yampa-core
src/FRP/Yampa/Hybrid.hs
bsd-3-clause
8,145
0
11
2,276
922
526
396
51
2
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="fr-FR"> <title>GraphQL Support Add-on</title> <maps> <homeID>graphql</homeID> <mapref l...
thc202/zap-extensions
addOns/graphql/src/main/javahelp/org/zaproxy/addon/graphql/resources/help_fr_FR/helpset_fr_FR.hs
apache-2.0
971
77
67
157
413
209
204
-1
-1
{-| Module : Idris.Options Description : Compiler options for Idris. License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveGeneric, PatternGuards #-} module Idris.Options (Codegen(..), ConsoleWidth(..), HowMuchDocs(..), IRFormat(..), ...
kojiromike/Idris-dev
src/Idris/Options.hs
bsd-3-clause
8,378
0
8
2,322
2,169
1,193
976
226
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="en-GB"> <title>Plug-n-Hack | ZAP Extension</title> <maps> <homeID>top</homeID> ...
veggiespam/zap-extensions
addOns/plugnhack/src/main/javahelp/org/zaproxy/zap/extension/plugnhack/resources/help/helpset.hs
apache-2.0
985
82
69
171
429
219
210
-1
-1
{-# LANGUAGE TemplateHaskell #-} module T3395 where import Language.Haskell.TH foo = $(return $ CompE [NoBindS (VarE $ mkName "undefined") ,BindS (VarP $ mkName "r1") (VarE $ mkName "undefined") ])
ezyang/ghc
testsuite/tests/th/T3395.hs
bsd-3-clause
223
0
13
54
71
38
33
7
1
module System.Apotiki.Debian.Package where import System.Apotiki.Ar import System.Apotiki.Tar import System.Apotiki.FileInfo import System.Apotiki.Utils import System.Apotiki.Config import System.Apotiki.Logger import System.Apotiki.Debian.Control import Data.List import System.Directory import Data.ByteString.Char8 (p...
pyr/apotiki
System/Apotiki/Debian/Package.hs
isc
1,535
0
13
278
510
269
241
37
3
module Frontend.Elaborate (elaborate) where import Control.Applicative import Control.Monad.Error import Control.Monad.Reader import Control.Monad.State import Data.List import Data.Maybe import Data.Map (Map) import qualified Data.Map as M import qualified Data.Set as S import Data.Bifunctor import Frontend.AST impo...
alpicola/mel
src/Frontend/Elaborate.hs
mit
8,371
0
20
2,122
4,042
1,975
2,067
242
10
import Data.Char findDigit :: String -> Maybe Int findDigit (x: xs) | isDigit x = Just (digitToInt x) | otherwise = findDigit xs findDigit [] = Nothing findDigitAndIndex :: String -> Maybe (Int, Int) findDigitAndIndex = findRec 0 where findRec n [] = Nothing findRec n (x:xs) | isDigit...
SergeyKrivohatskiy/fp_haskell
class/class3.hs
mit
1,940
0
10
623
858
428
430
40
2
module Main ( main ) where import Hpcb import Data.Monoid -- | Makes a vertical line on layers FCu and FMask vline :: Float -- ^ Length -> Circuit vline l = ( line (V2 0 0) (V2 0 (-l)) # layer FCu <> line (V2 0 0) (V2 0 (-l)) # layer FMask ) # width 0.15 -- | Draws a tree tree :: Int...
iemxblog/hpcb
examples/tree.hs
mit
931
0
14
319
381
196
185
28
1
module Context ( Context, create, nextKey ) where data Context = Context Int deriving Show create :: Int -> Context create k = Context k nextKey :: Context -> (Int, Context) nextKey (Context k) = (k, Context (k + 1))
rcook/hqdsl
src/lib/Context.hs
mit
231
0
8
54
92
52
40
12
1
-- | Benchmark for the field of view algorithm in the pathological case -- (nothing obstructing anything) -- {-# LANGUAGE BangPatterns #-} module Main ( main ) where import Control.Lens import Control.Monad.Trans.State.Strict import Criterion import Criterion.Main import Linear.V2 import RWPAS.Control import RWPAS.L...
Noeda/rwpas
fov-calculation-benchmark/Main.hs
mit
843
0
15
260
214
121
93
20
1
module Core.ZArray ( ZArray (..) , unZArray ) where import Control.Comonad import Control.Monad import Data.Array import Data.Array.ST data ZArray i e = ZArray i (Array i e) unZArray :: ZArray i e -> Array i e unZArray (ZArray _ arr) = arr instance Ix i => Functor (ZArray i) where fmap f (ZArray i arr...
jameshsmith/HRL
Server/Core/ZArray.hs
mit
603
0
15
145
281
142
139
18
1
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module Vty where import qualified Data.Text as T import Graphics.Vty.Widgets.All import Graphics.Vty.Input.Events import Data.IORef import Data.List import Data.Maybe import System.Exit import Control.Concurrent import Control.Lens type ...
sordina/Deadpan-DDP
test/client/Vty.hs
mit
2,353
0
14
571
836
412
424
57
5
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE Arrows #-} module Yage.Rendering....
MaxDaten/yage
src/Yage/Rendering/Pipeline/Deferred/Downsampling.hs
mit
4,457
1
15
797
1,130
586
544
-1
-1
letterCase :: Char -> String letterCase c = if c >= 'a' && c <= 'z' then "Lower Case" else if c >= 'A' && c <= 'Z' then "Upper Case" else "Not an ascii letter" main = putStrLn (letterCase 'A')
creativcoder/recurse
check_case.hs
mit
206
10
9
54
82
43
39
8
3
{-# LANGUAGE OverloadedStrings #-} import Control.Applicative import Pladen.Beets.Persist import Database.Persist.Sqlite (createSqlitePool) import Data.List (groupBy) import qualified Data.Function as F import Database.Esqueleto hiding (groupBy) import Database.Persist.Sql ( ConnectionPool ...
geigerzaehler/pladen
Pladen/Test.hs
mit
538
0
9
122
121
69
52
15
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- -- Module : IDE...
cessationoftime/leksah
src/IDE/TextEditor/CodeMirror.hs
gpl-2.0
21,407
0
21
6,473
7,088
3,552
3,536
28
0
{- Copyright (C) 2014 Matthew Pickering <matthewtpickering@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 pro...
timtylin/scholdoc-texmath
src/Text/TeXMath/Unicode/ToASCII.hs
gpl-2.0
166,341
0
9
54,163
80,410
53,598
26,812
8,931
1
module Lamdu.GUI.DefinitionEdit ( make ) where import qualified Control.Lens as Lens import Control.Monad.Unit (Unit) import qualified GUI.Momentu as M import qualified GUI.Momentu.EventMap as E import GUI.Momentu.Responsive (Responsive) import qualified GUI.Momentu.Responsive as Responsive...
lamdu/lamdu
src/Lamdu/GUI/DefinitionEdit.hs
gpl-3.0
3,406
0
17
763
881
486
395
-1
-1
{-# language DeriveDataTypeable, TemplateHaskell #-} {-# language TypeFamilies #-} module Chart where import qualified Bank import qualified Spieler import Data.Time import Data.Time.LocalTime import Data.SafeCopy import Data.Typeable import Data.Acid import Control.Monad.State import Control.Monad.Reader ( ask ) ...
jwaldmann/mex
src/Chart.hs
gpl-3.0
2,364
1
23
674
793
412
381
67
1
#!/usr/bin/env runhaskell -- You need the 'json' package: cabal install json -- Test from the command line: -- runhaskell Shrdlite.hs < ../examples/medium.json module Main where import CombinatorParser import Control.Monad (foldM, liftM) import Data.List (findIndex, intersper...
carlostome/shrdlite
haskell/Shrdlite.hs
gpl-3.0
6,148
2
14
2,513
1,608
826
782
113
18
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} -- | Server implementation for mintette module RSCoin.Mintette.Server ( serve , handlePeriodFinished , handleNewPeriod , handleCheckTx , handleCheckTxBatch , handleCommitTx , handleGetMintettePe...
input-output-hk/rscoin-haskell
src/RSCoin/Mintette/Server.hs
gpl-3.0
12,489
0
17
4,078
3,405
1,679
1,726
311
1
{-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} module Table where import Data.Text import qualified Data.Map.Strict as Map -- Derived from unimathsymbols.hs latexToUnicode :: Map.Map Text Char latexToUnicode = [ ("!", '!') , ("\\#", '#') , ("\\$", '$') , ("\\%", '%') , ("\\&", '&') ,...
siddharthist/reed-thesis
thesis/unicode/Table.hs
mpl-2.0
67,689
0
6
12,053
21,764
14,509
7,255
2,403
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-dynamodb/gen/Network/AWS/DynamoDB/Scan.hs
mpl-2.0
23,573
0
19
4,714
2,123
1,319
804
184
1
{-# LANGUAGE OverloadedStrings #-} {- | Module : $Header$ Description : Property tests for timespans. Copyright : (c) plaimi 2014 License : AGPL-3 Maintainer : tempuhs@plaimi.net -} module Tempuhs.Props.Timespan.Props where import Data.Maybe ( isJust, ) import Test.QuickCheck ( NonNegative...
plaimi/tempuhs-server
prop/Tempuhs/Props/Timespan/Props.hs
agpl-3.0
1,492
0
10
279
421
223
198
42
1
{-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-} module Cortex.G23.Alive (runAlive) where import Control.Concurrent.Lifted (fork, threadDelay) import Control.Monad (forM_, when) import Control.Monad.State (evalStateT, get) import Control.Monad.Error (catchError, throwError) import qualified Data.ByteString.Laz...
maarons/Cortex
G23/Alive.hs
agpl-3.0
2,852
0
14
623
847
445
402
71
1
----------------------------------------------------------------------------- -- | -- Module : Text.ParserCombinators.HuttonMeijer -- Copyright : Graham Hutton (University of Nottingham), Erik Meijer (University of Utrecht) -- Licence : BSD -- -- Maintainer : Malcolm Wallace <Malcolm.Wallace@cs.york.ac...
Kludgy/polyparse-fork
src/Text/ParserCombinators/HuttonMeijer.hs
lgpl-2.1
7,849
0
13
2,751
2,240
1,200
1,040
109
2
module Types.AST where import Types.Token (Token) data AST = Function Integer AST | NamedFunction String | Call AST [AST] | Literal Integer | Dummy [AST] deriving Show
shockkolate/shockklang3
src/Types/AST.hs
apache-2.0
217
0
7
76
58
35
23
8
0
{-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {- | Module: Util.Hexadecimal Description: This module contains functions for parsing and representing raw numbers and strings as hexadecimal characters. -} module Util.Hexadecimal ( ToHexadecimal(..), maybe...
stallmanifold/matasano-crypto-challenges
src/Util/Hexadecimal.hs
apache-2.0
6,540
0
13
2,358
1,827
945
882
184
16
{-# LANGUAGE OverloadedStrings #-} module Persistence.Plan ( addPlan , getOpenPlanOfUser , getPlansOfUser , updateModified , setPlanName , setPlanDescription , deletePlan ) where import Data.Text.Lazy (Text) import qualified Database.PostgreSQL.Simple as PG import Model.User import Model.Plan {-# AN...
DataStewardshipPortal/ds-wizard
DSServer/app/Persistence/Plan.hs
apache-2.0
2,139
0
14
449
640
319
321
51
2
{-# LANGUAGE TypeOperators , MultiParamTypeClasses , FlexibleInstances , FlexibleContexts , UndecidableInstances #-} module Network.Tragencap.IP.Ethernet where import qualified Data.ByteString.Lazy as BS import Data.Binary.Bits.Get import Data.Binary.Get import ...
kelemzol/tragencap
src/Network/Tragencap/IP/Ethernet.hs
apache-2.0
2,502
0
13
470
565
315
250
63
1
module NextClosure.AttributeExploration where import FormalContext.FormalContext2 import NextClosure.NextClosure import NextClosure.FormalConcepts import NextClosure.FormalImplications import Util import Data.Time data AE g m = AE { implications :: [FormalImplication m] , concepts :: [FormalConcept g ...
francesco-kriegel/conexp-hs
src/NextClosure/AttributeExploration.hs
apache-2.0
3,638
0
13
978
1,668
834
834
78
2
{-| Module : Text.ABNF.ABNF.PrettyPrinter Description : Pretty printer for ABNF rules Copyright : (c) Martin Zeller, 2016 License : BSD2 Maintainer : Martin Zeller <mz.bremerhaven@gmail.com> Stability : experimental Portability : portable -} module Text.ABNF.PrettyPrinter where import Data.List (intersp...
Xandaros/abnf
src/Text/ABNF/PrettyPrinter.hs
bsd-2-clause
2,313
0
11
645
642
317
325
45
0
module Text.Kibr.Css where import Preamble import Language.CSS import Language.CSS.Extra import Language.CSS.YUI master :: CSS Rule master = do typography layout skin typography :: CSS Rule typography = do "*" `rule` do lineHeight . pxToPercent $ 20 "body" `rule` do fontFamily "'Ubuntu', sans-seri...
dag/kibr
src/Text/Kibr/Css.hs
bsd-2-clause
957
0
11
234
310
149
161
45
1
{-# LANGUAGE OverloadedStrings #-} module CommandParserSpec where import CommandParser import Commands import Text.Parsec.Prim (parse) import Test.Hspec ( Spec , describe , it , shouldBe , shouldNotBe , context ...
jecxjo/hed
test/CommandParserSpec.hs
bsd-3-clause
15,798
0
27
3,776
4,492
2,086
2,406
212
1
----------------------------------------------------------------------------- -- | -- Module : System.Win32 -- Copyright : (c) Alastair Reid, 1999-2003 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : Esa Ilari Vuokko <ei@vuokko.info> -- Stability : provisional -- Porta...
FranklinChen/hugs98-plus-Sep2006
packages/Win32/System/Win32.hs
bsd-3-clause
1,498
4
5
265
207
146
61
26
0
{-# LANGUAGE OverloadedStrings , ScopedTypeVariables , FlexibleContexts #-} module Templates.Master where import Application.Types import Templates.MainStyles import Templates.MainScripts import Data.Url import Web.Page.Lucid import Web.Routes.Nested hiding (FileExt (..), p_) import qualified Network.Wai.M...
athanclark/clark-mining-tech
src/Templates/Master.hs
bsd-3-clause
7,812
0
26
2,535
2,293
1,096
1,197
180
1
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} -- | A renderer that produces pretty SVG, mostly meant for debugging purposes. -- module Text.Blaze.Svg.Renderer.Pretty ( renderSvg ) where import Text.Blaze.Renderer.Pretty (renderMarkup) renderSvg = renderMarkup
deepakjois/blaze-svg
src/Text/Blaze/Svg/Renderer/Pretty.hs
bsd-3-clause
272
0
5
39
34
24
10
5
1
-- !!! Re-exporting qualified import. module M (module List) where import List as Char
FranklinChen/Hugs
tests/static/mod135.hs
bsd-3-clause
91
0
4
18
16
12
4
2
0
module Lfu ( Lfu(..) ) where import qualified Cache as C import qualified Data.HashPSQ as H (HashPSQ, alter, alterMin, empty, insert) import Data.Maybe (isJust) import Request import SimpleCaches (readFromCache') type FilePrio = Int data Lfu = Lfu { files :: H.Has...
wochinge/CacheSimulator
src/Lfu.hs
bsd-3-clause
2,105
0
14
545
740
413
327
46
2
{-# LANGUAGE CPP #-} #if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703 {-# LANGUAGE Trustworthy #-} #endif #include "containers.h" ----------------------------------------------------------------------------- -- | -- Module : Data.Map.Strict -- Copyright : (c) Daan Leijen 2002 -- (c) Andriy ...
DavidAlphaFox/ghc
libraries/containers/Data/Map/Strict.hs
bsd-3-clause
45,335
0
17
11,360
8,301
4,535
3,766
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} -- | @travis.yaml@ structure. module HaskellCI.Travis.Yaml where import HaskellCI.Prelude import qualified Data.Aeson as Aeson import qualified Data.List.NonEmpty as NE import HaskellCI.Config.Ubuntu impo...
hvr/multi-ghc-travis
src/HaskellCI/Travis/Yaml.hs
bsd-3-clause
7,607
0
13
2,050
1,924
1,026
898
188
5
module Data.Time.Generators where import Test.QuickCheck import Data.Time import Control.Monad day :: Gen Day day = fmap ModifiedJulianDay arbitrarySizedIntegral diffTime :: Gen DiffTime diffTime = fmap (picosecondsToDiffTime . abs) arbitrary uTCTime :: Gen UTCTime uTCTime = liftM2 UTCTime day diffTime
massysett/barecheck
lib/Data/Time/Generators.hs
bsd-3-clause
308
0
7
43
85
46
39
10
1
{-# LANGUAGE DeriveFunctor, FlexibleInstances, DeriveDataTypeable #-} module Types where import Control.Comonad.Cofree import Data.Data import Data.List (intercalate) import qualified Data.Text as T import Data.Typeable type Namespace = T.Text type Var = T.Text data SourceFile = SourceFi...
ethercrow/unused-defns
Types.hs
bsd-3-clause
2,064
0
11
693
480
278
202
57
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} import qualified System.Console.CmdArgs as A import System.Console.CmdArgs ((&=)) import System.IO import Search.Common import Search.Util import qualified Search.Collection as C import qualified Search.Cluster as Cl import qualified Search.SearchInde...
jdimond/diplomarbeit
tools/Compression.hs
bsd-3-clause
6,100
0
18
1,953
1,913
980
933
135
2
{-# LANGUAGE GADTs , FlexibleContexts #-} module Data.Build where import Data.Tree.Rose import Control.Monad.State newNode :: ( MonadState Int m , RoseTree t , Head (t Int) ~ Int ) => Tail (t Int) -> m (t Int) newNode xs = do x <- get modify (+1) return $ ...
athanclark/rose-trees
bench/Data/Build.hs
bsd-3-clause
878
0
15
374
321
160
161
31
1
{- This file is part of the Haskell package distinfo. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at git://pmade.com/distinfo/LICENSE. No part of the distinfo package, including this file, may be copied, modified, propagated, or distributed except ac...
devalot/distinfo
src/DistInfo/Messages.hs
bsd-3-clause
1,087
0
6
141
109
66
43
11
0
module Yhc.Core.Firstify.Mitchell.Template where import Control.Monad.State import Data.List import Data.Maybe import Debug.Trace import Yhc.Core hiding (uniqueBoundVarsCore, uniqueBoundVars) import Yhc.Core.FreeVar3 import Yhc.Core.UniqueId import Yhc.Core.Util -- all templates must be at least: CoreApp (CoreFun _...
ndmitchell/firstify
Yhc/Core/Firstify/Mitchell/Template.hs
bsd-3-clause
4,511
0
13
1,220
1,478
729
749
80
6
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.TopHandler -- Copyright : (c) The University of Glasgow, 2001-2002 -- License : see libraries/base/LICENSE -- -- ...
pparkkin/eta
libraries/base/GHC/TopHandler.hs
bsd-3-clause
2,153
0
10
360
266
163
103
30
1
module ArpSpoof (spoofSwitchArp, main) where import Control.Concurrent import Data.ByteString.Lazy (ByteString) import Frenetic.NetCore import Frenetic.NetworkFrames (arpReply) -- Heartbeat -- -- Give the server an Ip address by monitoring ARP requests and -- spoofing replies. isArp = DlTyp 0x806 isQuery = isArp <&...
frenetic-lang/netcore-1.0
examples/ArpSpoof.hs
bsd-3-clause
1,917
0
17
470
437
218
219
-1
-1
{-# LANGUAGE GADTs #-} {-# LANGUAGE CPP #-} module Main ( main ) where -- #define BENCH_SMALL -- #define BENCH_ESSENTIALS -------------------------------------------------------------------------------- import Control.DeepSeq (NFData(..)) import Control.Exception.Base (evaluate) import ...
Palmik/data-store
benchmarks/src/01.hs
bsd-3-clause
11,942
0
16
2,626
3,428
1,814
1,614
97
2
module Test.Euler.EulerHelper where import Prelude hiding ((.)) import MPS -- helper read_data n = ("data/" ++ n ++ ".txt").read_pure input_data n = ("data/" ++ n ++ ".in").read_pure output_data n = ("data/" ++ n ++ ".out").write_pure process_data n f = f (input_data n) .output_data n
nfjinjing/bench-euler
src/Test/Euler/EulerHelper.hs
bsd-3-clause
289
1
8
47
110
61
49
7
1
module Main where import Api (apiServer) import Network.Wai.Handler.Warp (run) main :: IO () main = putStrLn "Server started" >> run 8081 apiServer
thiagorp/deployments-web
app/Main.hs
bsd-3-clause
150
0
6
24
51
29
22
5
1
{-# LANGUAGE OverloadedStrings , ExtendedDefaultRules , FlexibleContexts #-} module Pages.Home where import Application.Types import Data.Url import Path.Extended import Lucid import Control.Monad.Trans homePage :: ( MonadApp m ) => HtmlT m () homePage = do contactsLoc <- lift $ toLocation...
athanclark/contact-logger
src/Pages/Home.hs
bsd-3-clause
388
0
9
84
95
50
45
16
1
{-# LANGUAGE OverloadedStrings, FlexibleContexts, GADTs, ScopedTypeVariables #-} {-| Description: Helpers for enabling graph interactitivy. This module takes the raw data parsed from the SVG files and computes prerequisite relationships based on the geometry. This is currently done after the data is first inserted, ...
ryanfan/courseography
app/Svg/Builder.hs
gpl-3.0
6,161
0
18
2,179
1,189
636
553
111
2
import Test.HUnit import TransformationTests.Common --import AnalsisTests.Stencils.TwoDimensional main :: IO () main = do -- Common blcock tests runTestTT (TestList [test toArgsIntegration, test toArgsIntegration2, test (assertEqual "FALSE" 0 1)]) -- Stencil spec tests --runTestTT twoDim...
dorchard/camfort
tests/TestSuite.hs
apache-2.0
361
0
13
85
78
40
38
6
1
------------------------------------------------------------------------------- -- | -- Module : System.Hardware.Haskino.SamplePrograms.Deep.semExample -- Copyright : (c) University of Kansas -- License : BSD3 -- Stability : experimental -- -- This is an example of using semaphores to communicate betwe...
ku-fpg/kansas-amber
legacy/Deep/SemExample.hs
bsd-3-clause
2,402
0
16
573
557
273
284
59
1
{-# OPTIONS -fno-warn-tabs #-} -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and -- detab the module (please do the detabbing in a separate patch). See -- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces -- fo...
nomeata/ghc
compiler/nativeGen/SPARC/AddrMode.hs
bsd-3-clause
1,385
10
15
325
302
155
147
25
4
{- (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1996-1998 TcTyClsDecls: Typecheck type and class declarations -} {-# LANGUAGE CPP, TupleSections #-} module TcTyClsDecls ( tcTyAndClassDecls, tcAddImplicits, -- Functions used by TcInstDcls to check -- data/type...
fmthoma/ghc
compiler/typecheck/TcTyClsDecls.hs
bsd-3-clause
100,406
47
23
29,627
17,735
9,108
8,627
-1
-1