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 GADTs #-} module KernelCategory where import qualified Data.Set as DS newtype Pairwise a = Pairwise { unPairwise :: DS.Set a } deriving (Eq,Ord) instance (Monoid m, Ord m) => Monoid (Pairwise m) where mempty = Pairwise $ DS.singleton mempty ms1 `mappend` ms2 = Pairwise $ DS.fromList [ m1 `mapp...
skingo/kernel_category
kernelCategory/src/KernelCategory.hs
bsd-3-clause
2,399
0
19
626
1,013
539
474
37
1
module Utils.DependencyAnalysis(dependencyAnalysis, AnalysisTy(..)) where import Control.Monad.Reader import Data.Array ((!)) import Data.Graph import qualified Data.IntMap as IMap import Data.List (intersect, nub) import qualified Data.Map as Map import Data.Maybe (fromJust, catMaybes) import Data.Tree (flatten) imp...
rodrigogribeiro/mptc
src/Utils/DependencyAnalysis.hs
bsd-3-clause
3,971
0
18
1,400
1,321
698
623
74
2
{-# OPTIONS_GHC -Wall #-} module AST.Pattern where import AST.V0_16 import qualified Reporting.Annotation as A type Pattern = A.Located Pattern' data Pattern' = Anything | UnitPattern Comments | Literal Literal | VarPattern LowercaseIdentifier | OpPattern SymbolIdentifier | Data [Upperc...
rgrempel/frelm.org
vendor/elm-format/parser/src/AST/Pattern.hs
mit
760
0
11
174
200
120
80
23
0
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-} module Tests.Writers.Markdown (tests) where import Test.Framework import Text.Pandoc.Builder import Text.Pandoc import Tests.Helpers import Tests.Arbitrary() markdown :: (ToString a, ToPandoc a) => a -> String markdown = writeMarkdown defaultWriterOptions . toPandoc {-...
Lythimus/lptv
sites/all/modules/jgm-pandoc-8be6cc2/src/Tests/Writers/Markdown.hs
gpl-2.0
778
0
13
175
180
103
77
17
1
-- Module : Network.AWS.EC2 -- Copyright : (c) 2013-2014 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 in the LICENSE file or -- you can obt...
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2.hs
mpl-2.0
16,641
0
5
1,747
2,462
1,811
651
325
0
<?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="ru-RU"> <title>Token Generator | ZAP Extension</title> <maps> <homeID>top</homeID> <ma...
veggiespam/zap-extensions
addOns/tokengen/src/main/javahelp/org/zaproxy/zap/extension/tokengen/resources/help_ru_RU/helpset_ru_RU.hs
apache-2.0
977
80
66
160
415
210
205
-1
-1
{-# LANGUAGE OverloadedStrings, BangPatterns #-} import Blaze.ByteString.Builder (copyByteString) import Control.Concurrent (runInUnboundThread) import Data.Aeson ((.=), object, encode) import qualified Data.ByteString.Lazy as L import Data.Text (Text) import Network.HTTP.Types (status200) import Network.Wai (response...
kellabyte/FrameworkBenchmarks
frameworks/Haskell/wai/bench/wai.hs
bsd-3-clause
822
0
12
161
235
133
102
21
1
module Language.StreamIt ( module Language.StreamIt.Backend, module Language.StreamIt.Compile, module Language.StreamIt.Core, module Language.StreamIt.Filter, module Language.StreamIt.Graph, module Language.StreamIt.Runtime ) where import Language.StreamIt.Backend import Language.StreamIt.C...
adk9/haskell-streamit
Language/StreamIt.hs
bsd-3-clause
453
0
5
58
86
59
27
14
0
main = defaultMain
lucasdicioccio/distcat
Setup.hs
bsd-3-clause
20
0
4
4
6
3
3
1
1
-- Test Example for Push Notifications. -- This is a simple example of a Yesod server, where devices can register -- and play the multiplayer "Connect 4" game, and send/receive messages. {-# LANGUAGE OverloadedStrings, TypeFamilies, TemplateHaskell, QuasiQuotes, MultiParamTypeClasses #-} module Main where import Yes...
jimpeak/GSoC-Communicating-with-mobile-devices
test/Connect4/Yesod-App/Main.hs
mit
10,431
1
31
3,612
2,638
1,329
1,309
-1
-1
-- (c) The University of Glasgow 2006 {-# LANGUAGE CPP, DeriveDataTypeable #-} module TcEvidence ( -- HsWrapper HsWrapper(..), (<.>), mkWpTyApps, mkWpEvApps, mkWpEvVarApps, mkWpTyLams, mkWpLams, mkWpLet, mkWpCast, mkWpFun, idHsWrapper, isIdHsWrapper, pprHsWrapper, -- Evidence bindings TcEvBinds(..), EvB...
fmthoma/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
43,414
0
17
11,637
9,033
4,657
4,376
576
17
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE BangPatterns, NoImplicitPrelude #-} module GHC.Event.Thread ( getSystemEventManager , getSystemTimerManager , ensureIOManagerIsRunning , ioManagerCapabilitiesChanged , threadWaitRead , threadWaitWrite , threadWaitReadSTM , threadWaitWriteSTM ...
frantisekfarka/ghc-dsi
libraries/base/GHC/Event/Thread.hs
bsd-3-clause
13,594
0
24
3,074
2,993
1,528
1,465
250
5
import qualified Data.ByteString.Char8 as C import System.Time main = do getClockTime let text = "pineapple" C.putStrLn $ C.pack text
jwiegley/ghc-release
libraries/Cabal/cabal/tests/PackageTests/BuildDeps/SameDepsAllRound/pineapple.hs
gpl-3.0
147
0
9
32
46
24
22
6
1
{-# OPTIONS_GHC -Wall #-} module Chapter2.LogAnalysis2 (parseMessage, parse, insert, build, inOrder, whatWentWrong, safeParseInt, safeParseInt2, verify...
ssanj/YorgeyCourse
src/Chapter2/LogAnalysis2.hs
mit
4,787
0
13
1,254
1,558
806
752
110
5
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} module Document ( Tag, Document(..), insertDoc, parse, parseFile, ) where import Data.HashMap (Map, alter) import Data...
ErinCall/bloge
src/Document.hs
mit
2,359
0
14
745
681
373
308
64
3
{-# LANGUAGE RecordWildCards #-} import Data.Set (fromList) import Stackage.Build (build, defaultBuildSettings) import Stackage.BuildPlan (readBuildPlan, writeBuildPlan) import Stackage.CheckPlan (checkPlan) import Stackage.GhcPkg (getGhcVersion) import ...
sinelaw/stackage
app/stackage.hs
mit
5,474
0
19
1,763
1,385
728
657
112
10
{- Various helper operators for assertions -} module Codex.QuickCheck.Assertions ( testing, (?==), (==?), (?/=), (/=?), (?>), (?>=), (?<), (?<=), (<?>), absoluteEq, relativeEq, assertCond, assertAbsEq, assertRelEq ) where import Test.QuickCheck.Property infix 2 <?> infix 4 ?==, ==?, ?/=, /=?, ?>...
pbv/codex-quickcheck
src/Codex/QuickCheck/Assertions.hs
mit
2,510
0
11
603
1,001
541
460
56
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -- | -- Module : Fields -- -- Implements the fields command. -- module Fields (fields) where import Data.Csv import Data.Vector (Vector, (!), toList) import System.IO import Text.Printf (printf) import ...
blancas/trex
src/Fields.hs
mit
2,405
0
11
624
834
439
395
56
2
module Hogldev.ShadowMapFBO ( ShadowMapFBO(..) , initializeShadowMapFBO , bindForWriting , bindForReading ) where import Control.Monad (when) import GHC.Ptr (nullPtr) import Graphics.Rendering.OpenGL data ShadowMapFBO = ShadowMapFBO FramebufferObject TextureObject deriving (Show, Eq) initializeShadowM...
triplepointfive/hogldev
common/Hogldev/ShadowMapFBO.hs
mit
1,700
0
11
309
423
209
214
36
1
module Development.Duplo.Server where import Control.Monad.Trans (liftIO) import Data.List (intercalate) import Data.Text (Text) import qualified Data.Text as T import Data.Text.Lazy (Text) import qualified Data.Text.La...
pixbi/duplo
src/Development/Duplo/Server.hs
mit
2,698
0
14
982
536
278
258
59
13
module Crackers.Gmail ( gmailCreds ) where import Crackers.Smtp gmailCreds :: String -> String -> IO (String, Bool) gmailCreds = creds "smtp.gmail.com"
mom0/crackers
Crackers/Gmail.hs
mit
159
0
8
28
46
26
20
5
1
import System.Random import Control.Monad.State rand :: IO Int rand = getStdRandom (randomR (0, maxBound)) twoBadRandoms :: RandomGen g => g -> (Int, Int) twoBadRandoms gen = (fst $ random gen, fst $ random gen) twoGoodRandoms :: RandomGen g => g -> ((Int, Int), g, g, g) twoGoodRandoms gen = let (a, gen') = random ...
zhangjiji/real-world-haskell
ch14/Random.hs
mit
1,526
0
12
363
630
325
305
49
1
module Ch24.Practice where import Text.Trifecta one :: Parser Char one = char '1' oneTwo :: Parser Char oneTwo = one >> char '2' oneTwoStop :: Parser () oneTwoStop = oneTwo >> eof allThree :: Parser String allThree = do n <- (show <$> integer) _ <- eof return n string' :: String -> Parser String string' st...
andrewMacmurray/haskell-book-solutions
src/ch24/Practice.hs
mit
749
0
13
167
300
146
154
25
2
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE QuasiQuotes #-} module Test.GBA.Thumb.T4 (tests) where import Control.Applicative import Data.Bits import Data.Word import Language.Literals.Binary import Test.HUnit import Test.QuickCheck hiding ((.&.)) import Test.QuickCheck.Modifiers import Test.Tasty (TestTree...
jhance/gba-hs
test/Test/GBA/Thumb/T4.hs
mit
28,063
0
18
8,044
8,477
4,162
4,315
748
1
{-- - Problem 61 Count the leaves of a binary tree A leaf is a node with no successors. Write a predicate count_leaves/2 to count them. Example: % count_leaves(T,N) :‐ the binary tree T has N leaves Example in Haskell: > countLeaves tree4 2 --} data Tree a = Empty | Branc...
sighingnow/Functional-99-Problems
Haskell/61.hs
mit
603
0
9
161
150
76
74
6
1
{-# htermination elem :: Int -> [Int] -> Bool #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_elem_5.hs
mit
50
0
2
10
3
2
1
1
0
module Paths_jsonparser ( 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...
gitrookie/functionalcode
code/Haskell/stackjsonparser/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/autogen/Paths_jsonparser.hs
mit
1,769
0
10
177
362
206
156
28
1
module Main where import Data.Foldable (traverse_) countGT :: [Int] -> [Int] -> Int countGT xs = length . filter id . zipWith (<) xs part1 :: [Int] -> Int part1 = countGT <*> tail part2 :: [Int] -> Int part2 = countGT <*> drop 3 main :: IO () main = do depths <- fmap read . lines <$> readFile "input.txt" trave...
genos/online_problems
advent_of_code_2021/day01/Main.hs
mit
361
0
10
77
165
89
76
12
1
module Language where import Types recursive, nonRecursive :: IsRec recursive = True nonRecursive = False rhssOf :: [(a, b)] -> [b] rhssOf defns = [rhs | (_, rhs) <- defns] bindersOf :: [(a, b)] -> [a] bindersOf defns = [name | (name, _) <- defns] isAtomicExpr :: Expr a -> Bool isAtomicExpr (EVar _) = True is...
typedvar/hLand
hcore/Language.hs
mit
1,005
0
11
245
467
264
203
25
1
{-# LANGUAGE OverloadedStrings #-} module LLVM.Examples.Structs (structs) where import qualified LLVM.General.AST as AST import Control.Monad import Control.Lens ((.=)) import LLVM.Gen import LLVM.General.AST.Type (double) import LLVM.General.AST.AddrSpace (AddrSpace(..)) import qualified LLVM.General.AST.Type as T...
AKST/scheme.llvm
src/LLVM/Examples/Structs.hs
mit
978
0
14
199
295
157
138
21
1
{-# LANGUAGE OverloadedStrings #-} -- | Rendering Graphviz code from Haphviz graphs module Text.Dot.Render ( renderGraph , renderToFile , renderToStdOut ) where import Control.Monad (unless) import Data.Monoid import Data.Text (Text) import quali...
NorfairKing/haphviz
src/Text/Dot/Render.hs
mit
4,235
0
12
1,192
1,385
667
718
150
3
{-# LANGUAGE OverloadedStrings #-} module Lexer ( lexer ) where import Core import Lexer.Literal import Lexer.Type lexer :: SpecWith () lexer = describe "Lexer" $ do testDecimalLiteral testOctalLiteral testHexLiteral testIntLiteral testFloatLiteral testEscapeCode testRuneLiteral te...
djeik/goto
test/Lexer.hs
mit
389
0
7
86
78
37
41
20
1
{-# LANGUAGE ScopedTypeVariables, OverloadedStrings, CPP #-} {-| Module : Madl.Islands Description : Extract transfer islands from a madl network. Copyright : (c) Sanne Wouda 2015-2016, Tessa Belder 2015-2016 Provides a data type for transfer islands. Provides a function to extract these islands from a madl ne...
julienschmaltz/madl
src/Madl/Islands.hs
mit
16,924
0
17
3,862
5,739
3,045
2,694
235
23
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.HTMLUListElement (js_setCompact, setCompact, js_getCompact, getCompact, js_setType, setType, js_getType, getType, HTMLUListElement, castToHTMLUListElement, gTypeHTMLUListElement) wher...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/HTMLUListElement.hs
mit
2,642
28
11
351
640
374
266
40
1
{-# LANGUAGE OverloadedStrings, MultiParamTypeClasses #-} module Data.API.Twitter.UserSearch ( UserSearchQuery(..) , UserSearchPage(..) ) where import Data.Text (Text, unpack) import Data.Default (Default(..)) import Data.Aeson import qualified Data.Vector as V import Data.API.Twitter.Query impor...
whittle/twitter-api
Data/API/Twitter/UserSearch.hs
mit
1,335
0
10
429
297
177
120
31
0
elementAt :: [a] -> Int -> a elementAt xs i = last $ take i xs
tamasgal/haskell_exercises
99questions/Problem03.hs
mit
63
0
6
16
36
18
18
2
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancegroupconfig-metricdimension.html module Stratosphere.ResourceProperties.EMRInstanceG...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EMRInstanceGroupConfigMetricDimension.hs
mit
2,347
0
13
221
266
152
114
29
1
{- module SolidTexture (square_wave, triangle_wave, sine_wave, stripe, noise, turbulence ) where -} module Data.Glome.Texture where import Data.Glome.Vec import Data.Array.IArray -- INTERPOLATION FUNCTIONS -- square_wave :: Flt -> Flt square_wave x = let offset = x - (fromIn...
jimsnow/glome
GlomeVec/Data/Glome/Texture.hs
gpl-2.0
3,243
0
18
1,016
1,649
869
780
89
3
module Gt where import Git ( Commit ) import Git.Libgit2 ( LgRepo ) type GtCommit = Commit LgRepo
cblp/gt
Gt.hs
gpl-2.0
111
0
5
31
31
19
12
4
0
{- Copyright (C) 2017 WATANABE Yuki <magicant@wonderwand.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 2 of the License, or (at your option) any later version. This program is ...
magicant/flesh
hspec-src/Flesh/Language/Parser/ClassSpec.hs
gpl-2.0
2,218
0
20
470
509
267
242
39
1
module Problem019 (answer) where -- I could compute manually the answer in a pure fashion but this will -- be an exercise in using the date/time facilities of haskell instead import Data.Time.Calendar (fromGregorian) import Data.Time.Calendar.WeekDate (toWeekDate) answer :: Int answer = length [1 | y <- [1901..2000]...
geekingfrog/project-euler
Problem019.hs
gpl-3.0
561
0
9
107
163
91
72
10
1
module Test.Chords where import Data.Music.Chords import Test.QuickCheck import Test.Scales instance Arbitrary Chord where arbitrary = do noteCount <- choose (1,12) scale <- arbitrary degrees <- vectorOf noteCount arbitrary slash <- arbitrary return $ mkChord scale degrees...
talanis85/rechord
haScales/src/Test/Chords.hs
gpl-3.0
518
0
10
95
97
51
46
11
0
module Generator (generate) where import qualified Data.Matrix as M import Field import Dictionary generate :: Dictionary -> Field -> [Field] generate d f = generate' (extractAllPatterns f) d f generate' :: [Placement] -> Dictionary -> Field -> [Field] generate' [] d f = [f] generate' (p:pls) d f = concat $ map (ge...
IUdalov/crossword-sketch
src/Generator.hs
gpl-3.0
471
0
9
106
178
96
82
12
1
module Fizz.Utils where import Data.Time import Data.Time.Calendar.WeekDate import Data.Fixed import Text.Printf data WeekDate = WeekDate { getWeekDateYear :: Integer , getWeekDateWeek :: Int , getWeekDateDow :: Int } deriving(Show, Read) data MonthDate = MonthDate { g...
josuf107/Fizzckle
src/Fizz/Utils.hs
gpl-3.0
2,046
0
10
500
676
357
319
68
2
module ADT.Tree ( Tree(..) , leaf , left , right , height , balanced , preorder , inorder , postorder , levelorder , printT ) where data Tree a = Nil | Node (Tree a) a (Tree a) deriving (Show, Eq) empty :: Tree a -> Bool empty Nil = True empty _ = False val :: Tree a -> a val Nil = undefined val (Node _ x _) = x le...
zcesur/h99
src/ADT/Tree.hs
gpl-3.0
1,567
0
11
457
856
430
426
59
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/GroupItems/Delete.hs
mpl-2.0
4,021
0
14
888
409
248
161
63
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Datafeedstatuses/Custombatch.hs
mpl-2.0
3,131
0
13
651
305
186
119
51
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-commentanalyzer/gen/Network/Google/Resource/CommentAnalyzer/Comments/Suggestscore.hs
mpl-2.0
4,771
0
16
1,077
703
410
293
103
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-ecs/gen/Network/AWS/ECS/ListTasks.hs
mpl-2.0
6,565
0
12
1,473
827
498
329
85
1
{-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE UnicodeSyntax #-} import Data.List (tails) pattern Three x y z ← x:y:z:_ localMaxima :: [Integer] → [Integer] localMaxima xs = [ mid | Three left mid right ← tails xs, left < mid, mid > right ]
spanners/cis194
03-rec-poly/ex2.hs
unlicense
249
0
8
46
100
52
48
6
1
renderJValue :: JValue -> Doc renderJValue (JBool True) = text "true" renderJValue (JBool False) = text "false" renderJValue JNull = text "null" renderJValue (JNumber num) = double num renderJValue (JString str) = string str
caiorss/Functional-Programming
haskell/rwh/ch05/PrettyJSON.hs
unlicense
235
0
7
44
89
42
47
6
1
module ParserSupport(range, contents) where import Text.Parsec import Text.Parsec.String (Parser) import qualified Text.Parsec.Char as Ch import Lexer import Syntax -- |Returns a parser that skips initial whitespace and then parses -- the entire input, expecting @<EOF>@ when it is done parsing contents :: Parser a...
eigengo/hwsexp
core/main/ParserSupport.hs
apache-2.0
856
0
11
203
209
108
101
25
2
#!/usr/bin/env stack {- stack --resolver lts-11.10 --install-ghc runghc --package base --package containers -- -hide-all-packages -} -- Copyright 2018 Google LLC. All Rights Reserved. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance...
polux/snippets
AbstractInterpreter.hs
apache-2.0
4,639
0
14
1,249
1,739
889
850
123
15
module Data.Kibr.Message where import Preamble import Data.Kibr.Language data Message = LojbanDictionary deriving (Eq, Show) message :: Language -> Message -> Text message English m = case m of LojbanDictionary -> "Lojban Dictionary" message Lojban m = case m of LojbanDictionary -> "vlaste fu la lojban"
dag/kibr
src/Data/Kibr/Message.hs
bsd-2-clause
319
0
7
59
87
48
39
11
1
{-| Implementation of the RAPI client interface. -} {- Copyright (C) 2009, 2010, 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 re...
leshchevds/ganeti
src/Ganeti/HTools/Backend/Rapi.hs
bsd-2-clause
10,279
0
15
2,083
2,494
1,232
1,262
188
3
module Instances.ListGraphs.DslInterpreter ( interpretAsNewDiGEdges , interpretAsDiGEdgesModification ) where import PolyGraph.Common (OPair(..)) import qualified FreeDSL.GraphBuilder as DSL import qualified Instances.ListGraphs as ListGraphs interpretAsNewDiGEdges :: forall v edata . (Eq v) => DSL.GraphDSL v ed...
rpeszek/GraphPlay
src/Instances/ListGraphs/DslInterpreter.hs
bsd-3-clause
927
0
13
183
252
139
113
-1
-1
import System.Environment import Test.DocTest main = doctest ["yak", "YakCli", "Yak/Org"]
mostalive/yak-o-matic
yak-test.hs
bsd-3-clause
91
0
6
11
28
16
12
3
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- -- RNG/Regs.hs --- Random Number Generator registers -- -- Copyright (C) 2015, Galois, Inc. -- All Rights Reserved. -- module Ivory.BSP.STM32.Peripheral.RNG.Regs where import Ivory.Lang...
GaloisInc/ivory-tower-stm32
ivory-bsp-stm32/src/Ivory/BSP/STM32/Peripheral/RNG/Regs.hs
bsd-3-clause
806
0
4
234
46
36
10
9
0
import qualified Test main :: IO () main = Test.printAllTests
garethrowlands/marsrover
test/TestMain.hs
bsd-3-clause
63
0
6
11
22
12
10
3
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} module Data.Kontiki.MemLog ( Log , MemLog , runMemLog , IntMap.empty , IntMap.insert ) where import Data.IntMap (IntMap) import qualified Dat...
abailly/kontiki
src/Data/Kontiki/MemLog.hs
bsd-3-clause
1,044
0
12
340
279
159
120
28
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_HADDOCK show-extensions #-} {-| Module : $Header$ Copyright : (c) 2015 Swinburne Software Innovation Lab License : BSD3 Maintainer : Rhys Adams <rhysadams@swin.edu.au> Stability : unstable Portability...
futufeld/eclogues
eclogues-mock/src/Eclogues/State/Types.hs
bsd-3-clause
1,023
0
8
274
154
93
61
18
0
-- This module is copied from the Elm compiler with small changes -- https://github.com/elm/compiler/blob/94715a520f499591ac6901c8c822bc87cd1af24f/compiler/src/Reporting/Annotation.hs {-# OPTIONS_GHC -Wall #-} module Reporting.Annotation ( Located(..) , Position(..) , Region(..) , toValue , merge , at , ...
avh4/elm-format
elm-format-lib/src/Reporting/Annotation.hs
bsd-3-clause
2,498
0
10
677
894
463
431
80
1
module AdventOfCode ( loadDay , runDay , Day(..) , module P , module S ) where import Text.Parsec as P hiding (State) import Text.Parsec.String as P import Search as S import System.Environment (getArgs) import Control.Monad (when) data Day i = Day { dayNum :: Int , dayParser :: Parser i , dayPartA ...
purcell/adventofcode2016
lib/AdventOfCode.hs
bsd-3-clause
956
0
14
254
399
206
193
34
2
{-# LANGUAGE ScopedTypeVariables #-} -- Part of a hypothetical test module for the semigroups package. module HypotheticalSemigroupsSpec where import qualified Data.List.NonEmpty as NonEmpty import Data.Semigroup ((<>)) import Test.Hspec (Spec, hspec, describe, it, shouldBe, shouldSatisfy) import Test.Hspec.QuickChe...
FranklinChen/twenty-four-days2015-of-hackage
test/HypotheticalSemigroupsSpec.hs
bsd-3-clause
1,353
0
23
307
363
195
168
28
1
-- Top-level module for re-exports module Calypso ( module Calypso.Core, module Calypso.Instance.PsoVect, module Calypso.Instance.Grade ) where import Calypso.Core import Calypso.Instance.PsoVect import Calypso.Instance.Grade
brianshourd/haskell-Calypso
Calypso.hs
bsd-3-clause
247
0
5
43
44
30
14
8
0
{-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} module Control.Category1 ( Functor1 , map1 , Expo(Expo) , runExpo , Apply1 , ap1 , lift2_1 , lift3_1 , Applicative1 , pure...
aaronvargo/htut
src/Control/Category1.hs
bsd-3-clause
3,926
0
16
1,077
1,899
990
909
142
1
{-# LANGUAGE CPP, NondecreasingIndentation, ScopedTypeVariables #-} -- ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow, 2005-2012 -- -- The GHC API -- -- ----------------------------------------------------------------------------- module ETA.Main.GHC ...
AlexeyRaga/eta
compiler/ETA/Main/GHC.hs
bsd-3-clause
55,097
4
28
14,852
9,844
5,344
4,500
-1
-1
{-| Module : Game.Werewolf.Variant.Standard.Engine Description : Suite of engine messages used throughout the game. Copyright : (c) Henry J. Wylde, 2016 License : BSD3 Maintainer : public@hjwylde.com A 'Message' is used to relay information back to either all players or a single player. This module define...
hjwylde/werewolf
app/Game/Werewolf/Variant/Standard/Engine.hs
bsd-3-clause
11,911
0
11
1,481
1,795
1,141
654
-1
-1
module Graphics.BlankSlate.Prim.Buffer where import Foreign (allocaArray,withArrayLen,peekArray) import Graphics.Rendering.OpenGL.Raw.Core31 -- Data Buffers ---------------------------------------------------------------- newtype Buffer = Buffer { getBuffer :: GLuint } deriving (Show) -- | Generate a single bu...
elliottt/blank-slate
src/Graphics/BlankSlate/Prim/Buffer.hs
bsd-3-clause
1,095
0
11
195
323
169
154
24
2
module BodeShooting where import qualified Data.Matrix as M import qualified Data.Vector as V import Function import Library import SodeRungeKutta compute :: (Vector, FMatrix, Matrix) -> Either ComputeError Matrix compute (domain, equations, bounds) = do eta3' <- eta3 integrat...
hrsrashid/nummet
lib/BodeShooting.hs
bsd-3-clause
1,314
0
15
405
557
292
265
33
1
{-# LANGUAGE EmptyCase #-} module Language.BCoPL.DataLevel.ML1 ( -- * Types Val(..) , Exp(..) -- * Utilities -- , operator -- , loperand -- , roperand ) where import Data.Char (isDigit,toLower,digitToInt) import Text.ParserCombinators.ReadP data Val = Int Int | Bool Bool derivi...
nobsun/hs-bcopl
src/Language/BCoPL/DataLevel/ML1.hs
bsd-3-clause
3,721
0
14
1,315
1,259
647
612
110
2
{-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} -------------------------------------------------------------...
ekmett/tasks
src/Control/Task/Monad.hs
bsd-3-clause
6,136
0
17
1,397
2,140
1,139
1,001
166
4
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE TemplateHaskell #-} {-# L...
bergmark/instant-generics
examples/Test.hs
bsd-3-clause
5,347
0
14
1,255
1,511
801
710
-1
-1
module State.Reactions ( asyncFetchReactionsForPost , addReactions , removeReaction ) where import Prelude () import Prelude.MH import qualified Data.Map.Strict as Map import Lens.Micro.Platform import Network.Mattermost.Endpoints import Network.Mattermost.Le...
aisamanra/matterhorn
src/State/Reactions.hs
bsd-3-clause
1,403
0
15
345
456
237
219
-1
-1
import Network.UDP.Pal import Shared main :: IO () main = do echoServer serverName serverPort 4096 threadDelaySec 1000000
lukexi/udp-pal
exec/Server.hs
bsd-3-clause
147
0
7
42
41
20
21
6
1
module Lang.LF.ChangeT where data ChangeT m a = Unchanged a | Changed (m a) instance Functor m => Functor (ChangeT m) where fmap f (Unchanged a) = Unchanged (f a) fmap f (Changed x) = Changed (fmap f x) instance Applicative m => Applicative (ChangeT m) where pure = Unchanged (Unchanged f) <*> (Unchanged ...
robdockins/canonical-lf
src/Lang/LF/ChangeT.hs
bsd-3-clause
1,043
0
10
252
558
271
287
25
1
{-# LANGUAGE DeriveDataTypeable #-} {- | Module : ./Maude/AS_Maude.hs Description : Abstract Maude Syntax Copyright : (c) DFKI GmbH 2009 License : GPLv2 or higher, see LICENSE.txt Maintainer : ariesco@fdi.ucm.es Stability : experimental Portability : portable The abstract syntax of maude. Basic s...
spechub/Hets
Maude/AS_Maude.hs
gpl-2.0
6,447
0
8
2,003
1,816
993
823
151
3
<?xml version='1.0' encoding='ISO-8859-1' ?> <!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"> <title>jDip Help</title> <maps> <homeID>Welcome</homeID> <mapref location="appl...
rgo/jDip
src/resource/help/applicationhelp.hs
gpl-2.0
1,158
84
67
159
462
230
232
-1
-1
{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, ViewPatterns#-} {- Copyright (C) 2006-2015 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; ...
mwahab1/pandoc
src/Text/Pandoc/Readers/HTML.hs
gpl-2.0
36,633
0
20
10,724
11,345
5,777
5,568
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/DeregisterRdsDbInstance.hs
mpl-2.0
3,646
0
9
688
360
221
139
49
1
-- test the representation of unboxed literals {-# LANGUAGE TemplateHaskell #-} module Main where $( [d| foo :: Int -> Int foo x | x == 5 = 6 foo x = 7 |] ) $( [d| bar :: Maybe Int -> Int bar x | Just y <- x = y bar _ = 9 |] ) ma...
rahulmutt/ghcvm
tests/suite/templateHaskell/run/TH_repGuardOutput.hs
bsd-3-clause
481
0
10
211
105
54
51
19
1
-- | This module defines a generator for @getopt@ based command -- line argument parsing. Each option is associated with arbitrary -- Python code that will perform side effects, usually by setting some -- global variables. module Futhark.CodeGen.Backends.GenericPython.Options ( Option (..) , OptionArgume...
CulpaBS/wbBach
src/Futhark/CodeGen/Backends/GenericPython/Options.hs
bsd-3-clause
2,823
0
15
874
517
279
238
45
4
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ViewPatterns #-} {-# OPTIONS_GHC -fno-warn-missing-methods #-} ----------------------------------------------------------------------------- -- | -- Module : Diagrams.TwoD.Ap...
diagrams/diagrams-contrib
src/Diagrams/TwoD/Apollonian.hs
bsd-3-clause
14,924
0
14
3,358
2,086
1,162
924
106
1
{-# OPTIONS_HADDOCK hide #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.IOState -- Copyright : (c) Sven Panne 2002-2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- P...
mfpi/OpenGL
Graphics/Rendering/OpenGL/GL/IOState.hs
bsd-3-clause
1,876
0
12
365
615
328
287
29
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-cloudfront/gen/Network/AWS/CloudFront/ListDistributions.hs
mpl-2.0
4,495
0
12
953
582
343
239
-1
-1
{-# LANGUAGE RecordWildCards #-} module GameEngine.Graphics.Culling ( cullSurfaces ) where import Control.Monad import Data.Bits import Data.Vect.Float import Data.Vect.Float.Instances import qualified Data.Vector as V import LambdaCube.GL import GameEngine.Data.BSP import GameEngine.Graphics.Frustum import GameE...
csabahruska/quake3
game-engine/GameEngine/Graphics/Culling.hs
bsd-3-clause
2,012
0
16
461
694
356
338
42
2
----------------------------------------------------------------------------- -- Mutable arrays in the IO monad: -- -- Suitable for use with Hugs 98. ----------------------------------------------------------------------------- module Hugs.IOArray ( IOArray -- instance of: Eq, Typeable , newIOArray , boundsIOArra...
kaoskorobase/mescaline
resources/hugs/packages/hugsbase/Hugs/IOArray.hs
gpl-3.0
2,557
23
11
659
756
387
369
-1
-1
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="hi-IN"> <title>Plug-n-Hack | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref ...
thc202/zap-extensions
addOns/plugnhack/src/main/javahelp/org/zaproxy/zap/extension/plugnhack/resources/help_hi_IN/helpset_hi_IN.hs
apache-2.0
972
91
29
158
402
215
187
-1
-1
{-# LANGUAGE RoleAnnotations #-} module T14101 where type role Array representational data Array a type Arr = Array data Foo a = Foo (Arr a) type role Foo representational
ezyang/ghc
testsuite/tests/roles/should_compile/T14101.hs
bsd-3-clause
175
0
8
32
43
28
15
-1
-1
{-# LANGUAGE OverloadedStrings, PatternGuards #-} {- Copyright (C) 2006-2015 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; either version 2 of the License, or (at...
gbataille/pandoc
src/Text/Pandoc/Writers/Docbook.hs
gpl-2.0
15,916
0
21
4,513
4,141
2,120
2,021
284
15
import Data.Bits import Data.Word import Debug.Trace fl :: Word64 -> Word64 -> Word64 fl fin sk = let (x1, x2) = w64tow32 fin in let (k1, k2) = w64tow32 sk in let y2 = x2 `xor` ((x1 .&. k1) `rotateL` 1) in let y1 = x1 `xor` (y2 .|. k2) in trace (show fin ++ " " ++ show sk ++ " -> " ++ show (w32tow64 (y1, y2))) $ ...
urbanslug/ghc
testsuite/tests/codeGen/should_run/T5900.hs
bsd-3-clause
731
10
20
159
382
204
178
20
1
-- !!! testing hGetLine on a file without a final '\n'. -- According to the Haskell 98 report, getLine should discard a line without a -- closing newline character (see implementation of getLine). -- -- However, we don't believe that this is the right behaviour. import System.IO import System.IO.Error main = catchI...
wxwxwwxxx/ghc
libraries/base/tests/IO/hGetLine002.hs
bsd-3-clause
438
0
8
84
70
36
34
8
1
-- test 'lookupTypeName' and 'lookupValueName' import Language.Haskell.TH import qualified TH_lookupName_Lib import qualified TH_lookupName_Lib as TheLib f :: String f = "TH_lookupName.f" data D = D $(return []) main = mapM_ print [ -- looking up values $(do { Just n <- lookupValueName "f" ; varE n }), $(do...
siddhanathan/ghc
testsuite/tests/th/TH_lookupName.hs
bsd-3-clause
1,135
0
13
248
410
224
186
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} -- | Request sending and Response parsing module Lastfm.Response ( -- * Compute request signature -- $sign Secre...
supki/liblastfm
src/Lastfm/Response.hs
mit
8,682
0
18
1,917
2,346
1,247
1,099
163
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DeriveGeneric #-} module Connector(http) where import Network.Wai import Network.Wai.Handler.WebSockets import Network.HTTP.Types import Network.WebSockets import GHC.Generics im...
gip/cinq-cloches-ledger
src/Connector.hs
mit
1,437
0
13
284
396
224
172
44
2
module PA1Helper(runProgram,Lexp(..)) where import Text.Parsec import Text.Parsec.String import Text.Parsec.Expr import Text.Parsec.Token import Text.Parsec.Language import Text.Parsec.Char -- Use previously defined parser to parse a given String parseLExpr :: String -> Either ParseError Lexp pars...
Yelmogus/Lambda_Interpreter
main.hs
mit
4,173
13
21
1,159
976
514
462
-1
-1
module HAD.Y2014.M02.D24.Exercise where -- | Filter a list, keeping an element only if it is equal to the next one. -- -- Examples: -- >>> filterByPair [] -- [] -- >>> filterByPair [1 .. 10] -- [] -- >>> filterByPair [1, 2, 2, 2, 3, 3, 4] -- [2,2,3] filter' :: (Eq a) => a -> ([a], Maybe a) -> ([a], Maybe a) filter' c...
espencer/1HAD
exercises/HAD/Y2014/M02/D24/Exercise.hs
mit
575
0
9
130
238
137
101
9
1
data Lista a = Nill | Cost a (Lista a) deriving (Show, Eq, Ord) veces :: (Eq a) a -> [a] -> Int veces x [] = 0 vecces x (h:t) = if x == h then 1 + (veces x t) else veces x t
josegury/HaskellFuntions
Listas/Int-NumElementRepetido.hs
mit
178
0
8
50
127
64
63
4
2
-- | -- Module : HGE2D.Datas -- Copyright : (c) 2016 Martin Buck -- License : see LICENSE -- -- Containing data definitions used within HGE2D module HGE2D.Datas where import HGE2D.Types import qualified Graphics.Rendering.OpenGL as GL -- | A physical object with position, sizes, velocities, accelerati...
I3ck/HGE2D
src/HGE2D/Datas.hs
mit
5,133
0
12
1,978
587
368
219
57
0
{-# LANGUAGE OverloadedStrings #-} module MonadBot.Plugins.Auth where import Data.List import qualified Data.Text as T import qualified Data.Map.Strict as M import qualified Data.Set as S import MonadBot.Plugin.Development -- data AuthState = AuthState (Maybe (Text, Text)) -- addGroup :: Pl...
saevarb/Monadbot
lib/MonadBot/Plugins/Auth.hs
mit
2,246
0
4
558
97
85
12
7
0