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
{- This module contains the splitting part of the HaCoTeB project. -} module HaCoTeB.Splitter where {- Split one text file in sections. Each section is separated by an empty line. -} split :: String -> [[String]] split = span' . lines where span' text = let (s, ss) = span (/= "") text in if ss ...
mihaimaruseac/HaCoTeB
src/HaCoTeB/Splitter.hs
bsd-3-clause
361
0
13
92
99
55
44
5
2
{-# LANGUAGE OverloadedStrings #-} module Views.MemberList (memberListT) where import Data.Text.Lazy (Text) import Data.Monoid import Text.Blaze.Html5 import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A import Views.Common memberListT :: ...
alpmestan/spw
src/Views/MemberList.hs
bsd-3-clause
2,104
0
21
819
516
245
271
45
1
import Math.Topology.CubeCmplx.DirCubeCmplx import Math.Topology.CubeCmplx.CornerReduce import Control.DeepSeq main = print $ torus3d `deepseq` uncurry cmplxReduce $ torus3d
mmisamore/directed-cubical
Examples/torus3d.hs
bsd-3-clause
177
0
7
19
42
25
17
4
1
{-# LANGUAGE OverlappingInstances, ParallelListComp, TypeSynonymInstances, FlexibleInstances, FlexibleContexts #-} -- -- Circuit compiler for the Faerieplay hardware-assisted secure -- computation project at Dartmouth College. -- -- Copyright (C) 2003-2007, Alexander Iliev <sasho@cs.dartmouth.edu> and -- Sean W...
ailiev/faerieplay-compiler
Faerieplay/CircGen.hs
bsd-3-clause
97,746
7
29
50,229
14,524
7,837
6,687
1,111
14
{-# LANGUAGE FlexibleContexts, LambdaCase, RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} import Graphics.UI.GLFW.Pal import Graphics.GL.Pal import Graphics.VR.Pal import Control.Monad import Control.Monad.State import Control.Monad.Reader import Control.Lens.Extra import Data.Map (Map) import qualified Data.Map...
lukexi/bullet-mini
test/GhostObjects.hs
bsd-3-clause
6,319
10
30
2,348
1,630
776
854
-1
-1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RebindableSyntax #-} {-# OPTIONS_GHC -Wall #-} -- | SVG path manipulation module Data.Path.Parser ( -- * Parsing -- $parsing parsePath, svgToPathData, pat...
tonyday567/chart-svg
src/Data/Path/Parser.hs
bsd-3-clause
15,006
0
65
3,056
4,676
2,437
2,239
325
2
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.EXT.RescaleNormal -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portabilit...
haskell-opengl/OpenGLRaw
src/Graphics/GL/EXT/RescaleNormal.hs
bsd-3-clause
652
0
5
91
47
36
11
7
0
import Data.Aeson import qualified Data.ByteString.Lazy as L import Data.Text as T import Data.Monoid import Data.Maybe import Data.Foldable import Data.Functor import System.Environment import System.Exit import System.Cmd (rawSystem) -- NOTE that the map keys are not included jsonArgs :: Value -> [String] jsonArgs ...
np/json-tools
json-xargs.hs
bsd-3-clause
939
6
11
288
315
168
147
26
7
{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} module Query where import Control.Monad import Database.Esqueleto import qualified Database.Persist as P --import Database.Persist.Class as PC import ...
nrolland/persistentBHStyle
src/Query.hs
bsd-3-clause
4,246
0
21
997
1,203
603
600
75
3
{-# LANGUAGE TemplateHaskell #-} module TapeAllocation ( TapeAccessSequence(..) , Allocation , findAllocation ) where import Control.Lens import Control.Monad.State.Strict import Control.Monad.Writer.Strict import qualified Data.HashMap.Strict as Map import qualified Data.HashSet a...
benma/bfc
src/TapeAllocation.hs
bsd-3-clause
3,815
0
21
1,317
1,111
582
529
-1
-1
module PolyPt2 ( PolyPt2 , polyAreaPt2 , polyMidPt2 , polyAreaMidPt2 , polyNormPt2 , polyPt2Lines , pt2InsideWindingPoly , pt2InsideAlternatingPoly , pt2PolyCrossingNumber, polyPt2Intersections , polyPt2WindingIntersections, polyPt2AlternatingIntersections , module LinePt2 , modu...
trenttobler/hs-asteroids
src/PolyPt2.hs
bsd-3-clause
3,189
0
11
800
1,155
598
557
68
3
{-| Interactive Event-Log Browser TODO Handle CTRL-D -} module Urbit.King.EventBrowser (run) where import Urbit.Prelude import Data.Conduit import Urbit.Arvo import Urbit.Time import Urbit.Vere.Pier.Types import Control.Monad.Trans.Maybe (MaybeT(..)) import Urbit.Vere.Log (EventLog) import qual...
jfranklin9000/urbit
pkg/hs/urbit-king/lib/Urbit/King/EventBrowser.hs
mit
5,652
0
15
1,936
1,748
840
908
-1
-1
{- | Module : ./CASL/CCC/FreeTypes.hs Description : consistency checking of free types Copyright : (c) Mingyi Liu and Till Mossakowski and Uni Bremen 2004-2005 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-portable (impor...
spechub/Hets
CASL/CCC/FreeTypes.hs
gpl-2.0
29,070
0
32
8,621
9,780
5,021
4,759
537
14
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} -- {-# LANGUAGE TypeSynonymInstances #-} module Main where import Control.Applicative import Control.Monad import Foreign.C.Types import Foreign.Marshal.Alloc import Foreign.Ptr...
wavewave/HROOT-generate
HROOT-generate/template/HROOT/example/treetest.hs
gpl-3.0
1,560
0
19
391
506
260
246
36
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Main where import Data.String ( IsString(fromString) ) import Foreign.C.Types ( CDouble, CInt ) import Foreign.C.String ( CString, newCString ) import Foreign.Marshal.Alloc ( alloca ...
wavewave/HROOT
examples/random2d.hs
gpl-3.0
1,264
0
15
285
452
232
220
36
1
-- Copyright (c) 2015 Eric McCorkle. All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditi...
emc2/saltlang
src/salt/Language/Salt/Format.hs
bsd-3-clause
6,863
0
15
1,724
1,147
650
497
84
2
--{-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} -- | A monad transformer for Maybe module Control.Monad.Maybe ( MaybeT , runMaybeT ...
themattchan/tandoori
library/Control/Monad/Maybe.hs
bsd-3-clause
2,135
0
15
626
720
372
348
55
0
module Grammatik.CF.Nullable where -- $Id$ import Grammatik.Type import Autolib.Set import Autolib.Util.Fix import Control.Monad ( guard ) -- | alle Variablen V mit V ->> Eps nullable :: Grammatik -> Set Char nullable g = fix ( \ ns -> mkSet $ do ( [ lhs ] , rhs ) <- rules g guard $ and [ x `elementOf` n...
florianpilz/autotool
src/Grammatik/CF/Nullable.hs
gpl-2.0
489
2
15
104
154
85
69
12
1
{- Copyright 2015 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
Ye-Yong-Chi/codeworld
codeworld-base/src/Foreign/ForeignPtr/Safe.hs
apache-2.0
761
0
4
136
25
19
6
4
0
{-# LANGUAGE DeriveDataTypeable #-} {-# OPTIONS_HADDOCK hide #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.VertexAttributes -- Copyright : (c) Sven Panne 2002-2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenp...
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/VertexAttributes.hs
bsd-3-clause
11,930
0
12
2,644
5,316
2,753
2,563
265
1
data Foo = Foo1 | Foo2 data Bar = Bar1 | Bar2 test = let v1 = Foo1 v2 = Bar1 (v3, v4) = (Foo2, Bar2) in (v1, v2, v3, v4)
bitemyapp/tandoori
input/var.hs
bsd-3-clause
161
0
9
71
72
42
30
6
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="pl-PL"> <title>&gt;Run Applications | ZAP Extensions</title> <maps> <homeID>top</homeID> ...
thc202/zap-extensions
addOns/invoke/src/main/javahelp/org/zaproxy/zap/extension/invoke/resources/help_pl_PL/helpset_pl_PL.hs
apache-2.0
985
81
41
159
407
213
194
-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="fr-FR"> <title>Image Locaiton and Privacy Scanner | ZAP Extension</title> <maps> <homeID>top...
thc202/zap-extensions
addOns/imagelocationscanner/src/main/javahelp/org/zaproxy/zap/extension/imagelocationscanner/resources/help_fr_FR/helpset_fr_FR.hs
apache-2.0
995
83
52
162
402
212
190
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-| Utility functions for several parsers This module holds the definition for some utility functions for two parsers. The parser for the @/proc/stat@ file and the parser for the @/proc/diskstats@ file. -} {- Copyright (C) 2013 Google Inc. All rights reserved. Redistribution and ...
apyrgio/ganeti
src/Ganeti/Parsers.hs
bsd-2-clause
2,266
0
10
353
135
81
54
12
1
{-# LANGUAGE MultiParamTypeClasses, RankNTypes #-} module T15438 where class C a b foo :: (forall a b. C a b => b -> b) -> Int foo = error "urk"
sdiehl/ghc
testsuite/tests/typecheck/should_fail/T15438.hs
bsd-3-clause
149
0
9
34
53
29
24
-1
-1
{-# LANGUAGE RecordWildCards, ViewPatterns #-} module Distribution.Server.Features.PreferredVersions.Backup ( restorePreferredVersions , backupPreferredVersions ) where import Distribution.Server.Framework.BackupRestore import Distribution.Server.Framework.BackupDump import Distribution.Server.Features.Preferred...
ocharles/hackage-server
Distribution/Server/Features/PreferredVersions/Backup.hs
bsd-3-clause
4,865
0
12
1,034
1,125
595
530
87
2
module Maps where {-@ prop0 :: x:_ -> y:{_ | y == x} -> TT @-} prop0 x y = (a == b) where a = get x emp b = get y emp {-@ prop1 :: x:_ -> y:{_ | y /= x} -> TT @-} prop1 x y = (z == 10) where m1 = put x 10 emp m2 = put y 20 m1 z = get x m2 {-@ prop2 :: x:_ -> y:{_ | y =...
ssaavedra/liquidhaskell
tests/pos/maps.hs
bsd-3-clause
941
0
8
319
237
128
109
19
1
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module T10598_fail1 where class Z f where z :: f a b data A = A Int deriving newtype Show newtype B = B Int deriving stock Num data C a b = C Int deriving anyclass Z
ezyang/ghc
testsuite/tests/deriving/should_fail/T10598_fail1.hs
bsd-3-clause
298
0
7
70
69
41
28
9
0
-- Exercise G type Date = (Int, Int, Int) months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] suffix :: Int -> String suffix n | n == 11 || n == 21 || n == 31 = "st" | n == 12 || n == 22 = "nd" | otherwise = "th" showDate...
dirkz/Thinking_Functionally_With_Haskell
2/Chapter2.hs
isc
694
0
12
182
316
169
147
20
1
{-# LANGUAGE OverloadedStrings #-} module Shed.Types where import Data.Aeson.Types (FromJSON (..), ToJSON (..), Value (..), typeMismatch) import Data.ByteString (ByteString) import qualified Data.Map as M import Data.Text (Text) import qu...
dbp/shed
src/Shed/Types.hs
isc
962
0
10
342
257
149
108
22
0
test x = case x of [y,' '] -> init x _ -> "sdf" test2 x = case x of (t:e:d:e') -> unwords e' _ -> "all"
mauriciofierrom/cis194-homework
homework02/test.hs
mit
161
0
11
84
76
38
38
6
2
---------------------------------------------------------------- -- -- | aartifact -- http://www.aartifact.org/ -- -- @src\/ValidationComp.hs@ -- -- Representation of partially or completely computedresult -- of a validation attempt. -- ---------------------------------------------------------------- -- module ...
aartifact/aartifact-verifier
src/ValidationComp.hs
mit
2,498
0
16
571
1,007
506
501
64
12
{-# LANGUAGE CPP #-} module GHCJS.DOM.CanvasRenderingContext ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.CanvasRenderingContext #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHC...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/CanvasRenderingContext.hs
mit
379
0
5
33
33
26
7
4
0
{-# LANGUAGE OverloadedStrings #-} module Y2021.M02.D22.Exercise where {-- OKAY! We now have a graph-store of wines, wineries, reviews, prices, scores, ... We good? We GOOD! So, there are several directions we can go from here. One Direction, ... ... eheh, ... One Direction is to track which Boy Bands buy what...
geophf/1HaskellADay
exercises/HAD/Y2021/M02/D22/Exercise.hs
mit
10,130
0
10
2,244
661
378
283
56
1
module ShortestPath ( module KleeneAlgebra , ShortestPath , extract , annotate , labels , distances , distances' , shortestPathsRegExps , shortestPaths ) where import Graph import KleeneAlgebra import Language import RegExp import TropicalSemiring data ShortestPath a b = ShortestPath (Tropica...
mietek/experiment-floyd-warshall
src/ShortestPath.hs
mit
2,632
0
13
806
1,034
519
515
75
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DeriveGeneric #-} module Nauva.Product.Nauva.Book.App ( bookApp , catalogPages ) where import Data.Text import Da...
wereHamster/nauva
product/nauva/shared/src/Nauva/Product/Nauva/Book/App.hs
mit
3,106
0
15
835
734
422
312
81
1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Application ( getApplicationDev , appMain , develMain , makeFoundation , makeLogWare -- * for DevelMain , getApplicationRepl , shutdownApp -- * for GHCI , handler , db ) where import Control.Lens (set) ...
mrb/tee-io
src/Application.hs
mit
7,165
0
13
1,890
1,189
627
562
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-| Module : Data.Makefile Copyright : (c) 2016 Nicolas Mattia License : MIT Maintainer : Nicolas Mattia <nicolas@nmattia.com> Stability : experimental This module defines the different types used when working with a Makefile. @ # File: Makefile hello = wor...
nmattia/mask
src/Data/Makefile.hs
mit
1,807
0
9
443
259
155
104
20
0
module GRPDictionaryGenerator ( mkDictionary ) where import System.Process (readProcessWithExitCode) import System.Directory (removeFile, renameFile) import Debug.Trace import System.Random import Data.Char (isSpace) import Data.List import Data.List.Split import Language.Haskell.Exts.Parser import Language.Haskell.Ex...
vektordev/GP
src/GRPDictionaryGenerator.hs
gpl-2.0
5,408
0
15
861
1,721
905
816
89
4
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Keymap.Vim.Ex.Commands.BufferDelete -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable module Yi.Keymap.Vim.Ex.Commands.BufferDelete (parse) w...
atsukotakahashi/wi
src/library/Yi/Keymap/Vim/Ex/Commands/BufferDelete.hs
gpl-2.0
951
0
14
217
190
115
75
18
1
module SongMaker.Read.Sheet (isSheetLine) where import SongMaker.Common import Data.List isSheetLine :: Line -> Bool isSheetLine = ("|" `isPrefixOf`)
firefrorefiddle/songmaker
src/SongMaker/Read/Sheet.hs
gpl-2.0
152
0
5
19
42
27
15
5
1
---------------------------------------------------------------------------- -- | -- Module : Text.XML.Schema.Validator -- Copyright : (c) Simon Foster 2004 -- License : GPL version 2 (see COPYING) -- -- Maintainer : aca01sdf@shef.ac.uk -- Stability : experimental -- Portability : non-portable (ghc...
twopoint718/haifa
src/Text/XML/Schema/Validator.hs
gpl-2.0
6,104
0
22
1,995
1,399
730
669
62
15
module Eval(Val(..),eval,evalCall,numToVal,valToNum) where import Parse(Def(..),Expr(..),Fn,Pattern(..)) data Val = Ptr Val | Nil | Concat Val Val numToVal :: Integer -> Val numToVal x | x > 0 = Ptr (numToVal (x - 1)) | otherwise = Nil valToNum :: Val -> Integer valToNum x = toNum 0 x where toNum n Nil = n ...
qpliu/esolang
:_/hs/eval.hs
gpl-3.0
1,828
0
11
415
909
464
445
41
7
{-# LANGUAGE OverloadedStrings #-} import Control.Arrow import Control.Exception import Control.Monad import Control.Monad.Reader import qualified Data.ByteString.Char8 as B import Data.Char import Data.List import HIRC.Parser import Netwo...
Taeradan/hirc-bot
src/Main.hs
gpl-3.0
3,204
0
13
963
824
419
405
67
1
module PropT46 where import Prelude(Bool(..)) import Zeno -- Definitions True && x = x _ && _ = False False || x = x _ || _ = True not True = False not False = True -- Nats data Nat = S Nat | Z (+) :: Nat -> Nat -> Nat Z + y = y (S x) + y = S (x + y) (*) :: Nat -> Nat -> Nat Z * _ = Z (S x) * y = y + (x...
danr/hipspec
testsuite/prod/zeno_version/PropT46.hs
gpl-3.0
3,016
0
10
939
2,013
1,048
965
115
2
{- This file is part of HNH. HNH is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. HNH is distributed in the hope that ...
fferreira/hnh
TypeUtils.hs
gpl-3.0
6,527
0
15
1,888
2,260
1,149
1,111
140
4
module TestMain where import Test.HUnit import ConvertGrid --(toGrid, findEnemy, applyPlayerDamage, handlePlayerAttack, killDeadEnemies) import Model enemyA :: Enemy enemyA = Enemy (0,0) 5 5 1 enemyB :: Enemy enemyB = Enemy (1,1) 5 5 2 player :: Player player = Player (2,2) 5 5 1 0 testGs :: GameState testGs = Game...
Spacejoker/DDclone
src/Test.hs
gpl-3.0
1,445
0
14
336
498
281
217
39
1
module Tests.Hakyll.Shortcode.Service.YouTube ( service_test_youtube ) where import Hakyll.Shortcode import Test.Tasty import Test.Tasty.HUnit service_test_youtube :: TestTree service_test_youtube = testGroup "youtube" [ youtube_no_params ] -- | Must provide either @id@ or both @list@ and @list-type@. youtub...
nbloomf/hakyll-shortcode
test/Tests/Hakyll/Shortcode/Service/YouTube.hs
gpl-3.0
571
0
12
86
99
55
44
13
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/UpdateVTLDeviceType.hs
mpl-2.0
4,517
0
9
915
515
313
202
64
1
-- This Source Code Form is subject to the terms of the Mozilla Public -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. {-# LANGUAGE DataKinds #-} module Network.Kafka.Protocol.JoinGroup ( JoinGroupRequest , JoinGroupRequestFie...
kim/kafka-protocol
src/Network/Kafka/Protocol/JoinGroup.hs
mpl-2.0
1,602
0
7
310
227
143
84
39
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-customsearch/gen/Network/Google/Resource/Search/CSE/List.hs
mpl-2.0
25,636
0
46
8,800
3,240
1,877
1,363
448
1
module Expr where import Data.List (intercalate) data Token = FUN | LET | IN | FORALL | IDENT String | LPAREN | RPAREN | LBRACKET | RBRACKET | EQUALS | ARROW | COMMA deriving (...
scturtle/InferW
Expr.hs
unlicense
1,042
0
10
441
384
208
176
37
1
module Palindromes.A249642 (a249642) where import Helpers.PalindromeCounter (countPalindromes) a249642 :: Int -> Integer a249642 = (!!) a249642_list a249642_list :: [Integer] a249642_list = countPalindromes 9
peterokagey/haskellOEIS
src/Palindromes/A249642.hs
apache-2.0
211
0
5
25
56
33
23
6
1
module BrownPLT.TypedJS.Prelude ( module Data.Generics , module Control.Monad , ErrorT , MonadError , module Data.List , module Data.Maybe , module Data.Tree , SourcePos , initialPos , setSourceName , sourceName , sourceLine , sourceColumn , (!) , Map , Set , Foldable , Traversable ...
brownplt/strobe-old
src/BrownPLT/TypedJS/Prelude.hs
bsd-2-clause
2,046
0
12
512
506
291
215
-1
-1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} -------------------------------------------------------------------- -- | -- Copyright : (c) Edward Kmett and Dan Doel 2014 -- License : BSD3 -- Maintainer: ...
ekmett/ermine
src/Ermine/Core/Optimizer.hs
bsd-2-clause
6,364
0
18
1,581
2,583
1,287
1,296
105
9
-- -- Copyright (c) 2013, Carl Joachim Svenn -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- 1. Redistributions of source code must retain the above copyright notice...
karamellpelle/MEnv
source/Main.hs
bsd-2-clause
2,243
0
12
495
217
131
86
7
1
{-| An implementation of the mutex from <http://zookeeper.apache.org/doc/trunk/recipes.html#sc_recipes_Locks>. The mutex node will be automatically created and removed as necessary, and must not be used for any other purposes. The parent node of the mutex node must already exist. -} module Zookeeper.Mutex ( ...
jnb/zookeeper
src/Zookeeper/Mutex.hs
bsd-2-clause
2,778
0
19
632
619
334
285
33
3
module Main where import qualified Options as O import System.Console.CmdArgs import System.Environment import System.IO import Data.Maybe import Control.Monad import Misc.Misc import System.Exit import qualified System.Random as R import qualified Math.Misc.Nat as Nat import qualified Math.VectorSpaces.Euclidean as ...
michiexile/hplex
pershom/src/Main.hs
bsd-3-clause
5,358
0
35
1,796
1,368
707
661
116
10
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE TypeFamilies #-} {- | Type safe combination of expressions that represent scalars or signals. -} module EFA.Symbolic.Mixed where import qualified EFA.Equation.Arithmetic as Arith import EFA.Equation.Arithmetic (Sum, (~+), (~...
energyflowanalysis/efa-2.1
src/EFA/Symbolic/Mixed.hs
bsd-3-clause
5,900
0
12
1,328
2,102
1,091
1,011
156
2
module Main where import LOGL.Application import Foreign.Ptr import Graphics.UI.GLFW as GLFW import Graphics.Rendering.OpenGL.GL as GL import Graphics.GLUtil import System.FilePath import Graphics.Rendering.OpenGL.GL.Shaders.ProgramObjects import Linear.Matrix import Linear.V3 import Linear.Quaternion vertices :: [GL...
atwupack/LearnOpenGL
app/1_Getting-started/5_Transformations/Transformations.hs
bsd-3-clause
3,104
0
17
715
921
478
443
66
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE StandaloneDeriving #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Distributed.Process.Platform.Async.AsyncChan -- Copyright : (c) Tim Watson 201...
haskell-distributed/distributed-process-platform
src/Control/Distributed/Process/Platform/Async/AsyncChan.hs
bsd-3-clause
12,236
0
19
2,656
2,065
1,113
952
159
4
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-} module Transformations.Optimising.DeadFunctionEliminationSpec where import Test.Hspec import Test.Hspec.PipelineExample import Pipeline.Pipeline hiding (pipeline) import Grin.TH runTests :: IO () runTests = hspec spec spec :: Spec spec = do describe "Dead Function E...
andorp/grin
grin/test/Transformations/Optimising/DeadFunctionEliminationSpec.hs
bsd-3-clause
2,796
0
15
1,260
364
193
171
37
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.GHC -- Copyright : Isaac Jones 2003-2007 -- License : BSD3 -- -- Maintainer : cabal-devel@haskell.org -- ...
mydaum/cabal
Cabal/Distribution/Simple/GHC.hs
bsd-3-clause
78,398
19
25
23,305
13,621
7,088
6,533
1,154
19
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} module Facebook.Object.Marketing.AdVideo where import Facebook.Records hiding (get) import q...
BeautifulDestinations/fb
src/Facebook/Object/Marketing/AdVideo.hs
bsd-3-clause
9,820
0
21
1,872
2,862
1,501
1,361
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Azure.DocDB.Auth ( DocDBSignature(..), SigningParams(..), MSDate(..), signRequestInfo, signingPayload, ) where import qualified Crypto.Hash.Algorithms as CH import qualified Crypto.MAC.HMAC as HM import qualified Data.ByteArray as BA import qualified Data.ByteStr...
jnonce/azure-docdb
lib/Azure/DocDB/Auth.hs
bsd-3-clause
2,977
0
13
580
750
438
312
64
1
{-# LANGUAGE OverloadedStrings, MultiParamTypeClasses, FlexibleInstances #-} module Data.Iota.Stateful.Tests.Text where import Blaze.ByteString.Builder import Blaze.ByteString.Builder.Internal.Buffer import Data.Attoparsec.Text import Data.Iota.Stateful.Text import Data.Functor.Identity import Control.Monad.Identity ...
AaronFriel/Iota
Data/Iota/Stateful/Tests/Text.hs
bsd-3-clause
3,445
0
19
891
979
512
467
78
1
module Signal.Wavelet.ReferenceITest where import Data.Array.Repa as R import Data.Vector.Generic as V import qualified Signal.Wavelet.C1 as C1 import qualified Signal.Wavelet.Eval1 as E1 import qualified Signal.Wavelet.Eval2 as E2 import qualified Signal.Wavelet.List1 as L1 import qualified Signal.Wav...
jstolarek/lattice-structure-hs
tests/Signal/Wavelet/ReferenceITest.hs
bsd-3-clause
7,609
0
13
1,578
1,974
1,093
881
104
1
{-# LANGUAGE TemplateHaskell #-} module Data.API.TH ( applicativeE , optionalInstanceD , funSigD , simpleD , simpleSigD ) where import Data.API.Tools.Combinators import Control.Applicative import Control.Monad import Language.Haskell.TH -- ...
adinapoli/api-tools
src/Data/API/TH.hs
bsd-3-clause
1,821
0
14
520
597
313
284
35
3
----------------------------------------------------------------------------- -- | -- Module : Codec.Archive.Tar.Read -- Copyright : (c) 2007 Bjorn Bringert, -- 2008 Andrea Vezzosi, -- 2008-2009 Duncan Coutts, -- 2011 Max Bolingbroke -- License : BS...
Kludgy/tar-fork
Codec/Archive/Tar/Read.hs
bsd-3-clause
7,815
0
19
2,342
1,857
974
883
138
15
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. module Duckling.Temperature.KO.Tests ( tests ) where import Prelude import Data.String import Test.Tasty impo...
facebookincubator/duckling
tests/Duckling/Temperature/KO/Tests.hs
bsd-3-clause
516
0
9
78
79
50
29
11
1
{-# LANGUAGE DataKinds, Arrows, ScopedTypeVariables #-} {-# LANGUAGE CPP #-} -- #define DEBUG module Main where #ifdef DEBUG import Debug.Trace (trace) #define maybeTrace trace #define maybeTraceIO putStrLn #else #define maybeTrace (\ (_ :: String) t -> t) #define maybeTraceIO (\ (_ :: String) -> return ()) #endif im...
michalkonecny/aern2
aern2-real/attic/bench/BenchMain.hs
bsd-3-clause
8,818
10
19
2,665
2,580
1,320
1,260
198
26
module LOGL.Objects ( simpleCube, cubeWithTexture, cubeWithNormals, cubeWithNormalsAndTexture, cubeMesh ) where import Graphics.Rendering.OpenGL.GL as GL hiding (normal, position, Vertex) import LOGL.Mesh import Linear.V2 import Linear.V3 cubeMesh :: [Texture] -> IO Mesh cubeMesh = createMesh vertices indices ...
atwupack/LearnOpenGL
src/LOGL/Objects.hs
bsd-3-clause
6,033
0
14
1,929
3,159
1,996
1,163
167
1
module FileStat ( FileStat , createFileStat , getFSPath , getFSChanges , getFSAdditions , getFSDeletions ) where data FileStat = FileStat { path :: FilePath , additions :: Int , deletions :: Int } deriving (Show) createFileStat :: String -> St...
LFDM/hstats
src/lib/FileStat.hs
bsd-3-clause
697
0
8
178
196
114
82
21
1
module UnbalancedTree where import Bit data UnbalancedTree = Leaf | Branch Int UnbalancedTree UnbalancedTree deriving Show sizeOf Leaf = 1 sizeOf (Branch size _ _) = size newSubTree 0 = Leaf newSubTree depth = let t = newSubTree (depth - 1) in Branch (2 * sizeOf t) t t unbalanc...
cullina/Extractor
src/UnbalancedTree.hs
bsd-3-clause
4,580
0
13
1,140
1,500
776
724
80
3
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} module React.Flux.Mui.Card.CardTitle where import Protolude import Data.Aeson import Data.Aeson.Casing import Data.String (String) import React.Flux import React.Flux.Mui.Util data CardTitle = CardTitle { cardTitleActAsExpander :: !(Maybe Bool) ,...
pbogdan/react-flux-mui
react-flux-mui/src/React/Flux/Mui/Card/CardTitle.hs
bsd-3-clause
1,089
0
11
172
280
158
122
43
1
{-# LANGUAGE RecordWildCards #-} module Pos.Core.Common.Script ( Script (..) , ScriptVersion ) where import Universum import Data.Aeson (FromJSON (..), ToJSON (toJSON), object, withObject, (.:), (.=)) import Data.SafeCopy (base, deriveSafeCopySi...
input-output-hk/pos-haskell-prototype
core/src/Pos/Core/Common/Script.hs
mit
1,493
0
12
378
387
224
163
-1
-1
{-# LANGUAGE CPP #-} module WeiXin.PublicPlatform ( module WeiXin.PublicPlatform.Error , module WeiXin.PublicPlatform.Types , module WeiXin.PublicPlatform.Class , module WeiXin.PublicPlatform.WS #if defined(VERSION_acid_state) , module WeiXin.PublicPlatform.Acid #endif , module WeiXin.PublicPlat...
yoo-e/weixin-mp-sdk
WeiXin/PublicPlatform.hs
mit
3,330
0
5
363
500
357
143
68
0
-- | Read numbers from a file with a just a number on each line, find the -- minimum of those numbers. The file contains different kinds of numbers: -- -- * Decimals -- -- * Hexadecimals -- -- * Floating point numbers -- -- * Floating point numbers in scientific notation -- -- The different benchmarks will only take in...
text-utf8/text
benchmarks/haskell/Benchmarks/ReadNumbers.hs
bsd-2-clause
3,232
0
17
892
1,039
561
478
57
2
{-# LANGUAGE CPP, DeriveDataTypeable #-} {-# OPTIONS -Wall #-} -- | An 'Annotation' that selects whether the data should be -- stored globally on memory or to be calculated. module Language.Paraiso.Annotation.Allocation ( Allocation(..), AllocationChoice(..) ) where import Data.Dynamic import Language.Paraiso.Pr...
nushio3/Paraiso
Language/Paraiso/Annotation/Allocation.hs
bsd-3-clause
693
0
7
115
108
69
39
14
0
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Encoding.Failure -- Copyright : (c) The University of Glasgow, 2008-2011 -- License : see libraries/base/LICENSE -- -- Maintainer : libra...
rahulmutt/ghcvm
libraries/base/GHC/IO/Encoding/Failure.hs
bsd-3-clause
8,360
0
17
1,756
1,049
603
446
83
5
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS -Wall #-} module Sample ( helloWorld ) where import Claris as C import Data.Dynamic import Util tInt :: TypeRep tInt = typeOf (undefined :: Int) helloWorld :: C.Program helloWorld = C.Program { progName = "hello", topLevel = [PragmaDecl $ PragmaIn...
nushio3/Paraiso
attic/Protoclaris/Sample.hs
bsd-3-clause
740
0
10
201
214
121
93
25
1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Data/CaseInsensitive/Unsafe.hs" #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} {-# LANGUAGE Unsafe #-} ----------------------------------------------------------------------------- -- | -- Module : Data.CaseInsensitive...
phischu/fragnix
tests/packages/scotty/Data.CaseInsensitive.Unsafe.hs
bsd-3-clause
743
0
5
153
37
29
8
6
0
---Factorial------------------- myFactorial :: Int -> Int myFactorial 0 = 1 myFactorial n = n * myFactorial (n-1) ---------Add 2 Vectors----------- addVectors :: (Double, Double)->(Double, Double)->(Double,Double) addVectors (x1, y1) (x2, y2) = (x1+x2, y1+y2) --------Third element in tuple--- third :: (a,b,c)->c third ...
sushantmahajan/programs
haskell/practise.hs
cc0-1.0
2,474
6
11
411
1,195
643
552
56
3
-- C->Haskell Compiler: interface to C processing routines -- -- Author : Manuel M. T. Chakravarty -- Created: 12 August 99 -- -- Version $Revision: 1.3 $ from $Date: 2005/06/22 16:01:20 $ -- -- Copyright (c) 1999 Manuel M. T. Chakravarty -- -- This file is free software; you can redistribute it and/or modify -- ...
phischu/gtk2hs
tools/c2hs/c/C.hs
lgpl-3.0
4,260
48
12
1,094
671
417
254
68
2
{-# LANGUAGE GADTs, PolyKinds, RankNTypes #-} module T11963 where -- this module should be rejected without TypeInType import Data.Proxy -- see code in RnTypes.extract_hs_tv_bndrs which checks for these bad cases -- bndr_kvs vs body_tvs data Typ k t where Typ :: (forall (a :: k -> *). a t -> a t) -> Typ k t...
ezyang/ghc
testsuite/tests/typecheck/should_fail/T11963.hs
bsd-3-clause
684
0
11
156
209
120
89
13
1
module TiProp where import PropSyntax import TI --import TiBaseStruct import FreeNamesProp import DefinedNamesProp import NameMapsProp import TiPropStruct(tcPD,checkPredicateRec) import TiBaseStruct(tcE,tcD,checkTypeSynRec,checkClassRec) import TiPropInstances import PrettyPrint --import MUtils(( # )) instance (TypeId...
forste/haReFork
tools/property/TI/TiProp.hs
bsd-3-clause
1,248
2
9
231
519
268
251
-1
-1
import "hint" HLint.HLint
ivanperez-keera/hcwiid
tests/HLint.hs
gpl-2.0
27
0
4
4
7
4
3
-1
-1
module UtilSpec ( main , spec ) where import Pwn.Internal import qualified System.Directory as SD import System.Environment import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = do describe "Util.getTemporaryDirectory" $ do it "use $XDG_RUNTIME_DIR if avail...
Tosainu/pwn.hs
test/UtilSpec.hs
mit
616
0
14
154
138
71
67
20
1
import Infix import RPN import Tokenize evaluate :: String -> Float evaluate = evaluateRpn . translateToRpn . tokenizeExpr
DanielBrookRoberge/learning-calculator
haskell/evaluate.hs
mit
123
0
6
18
32
18
14
5
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.InternalSettings (js_setTouchEventEmulationEnabled, setTouchEventEmulationEnabled, js_setStandardFontFamily, setStandardFontFamily, js_setSerifFontFamily, setSerifFontFamily, js_setS...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/InternalSettings.hs
mit
21,896
258
9
4,117
3,357
1,771
1,586
335
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} module Hate.UI.Controls.Button where import Hate.UI.Types import Hate.UI.Controls.Label import Hate.UI.Util import Hate.Graphics impor...
bananu7/Hate-UI
src/Hate/UI/Controls/Button.hs
mit
1,275
0
11
279
439
237
202
23
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-method-integration-integrationresponse.html module Stratosphere.ResourceProperties.ApiGatewayMeth...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/ApiGatewayMethodIntegrationResponse.hs
mit
4,487
0
13
352
514
292
222
43
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} module IHaskell.Display.Widgets.Button ( -- * The Button Widget Button, -- * Create a new button mkButton) where -- To keep `cabal repl` happy when running from the i...
beni55/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Button.hs
mit
2,024
0
17
550
456
249
207
48
1
{-# LANGUAGE FlexibleContexts #-} module IAFinance.Environment.Context( Has(..), EnvContext, Context, insert, select, remove ) where ----------------------------------------------------------------------------- -- import import qualified Data.Map.Strict as Map import Data.Text (Text) import D...
wiryls/HomeworkCollectionOfMYLS
2018.ProjectV/src/IAFinance/Environment/Context.hs
mit
2,564
0
12
534
889
487
402
60
2
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE TypeSynonymInstances #-} -- This module is public domain as far as I'm concerned module NLP.GenI.ErrorIO where import Control.Monad.Trans.Error import Data.Text (Text) import qualified Data.Text as T type ErrorIO =...
kowey/GenI
src/NLP/GenI/ErrorIO.hs
gpl-2.0
515
0
7
134
131
73
58
12
1
{-# LANGUAGE RecordWildCards , BangPatterns #-} module Texture.IsoSphere ( IsoSphere (subLevel, vertices, faces, centers) , isoSphereZero , isoSphere , refineIsoSphere , scaleIsoSphere , angularDistance , nearestPoint , genIsoSphereSO3Grid , getOptSubDivisionLevel , renderIsoSphereFaces , ...
lostbean/sledge
src/Texture/IsoSphere.hs
gpl-3.0
8,851
0
18
2,323
3,073
1,659
1,414
177
2
module Language.Lambda.Codegen (genProg) where import Language.Lambda.AST import Language.Haskell.Syntax genProg :: Program -> HsModule genProg = mkMain . genExp 0 mkMain :: HsExp -> HsModule mkMain exp = HsModule emptySrcLoc (Module "Main") Nothing [] $ [ HsFunBind $ [ HsMatch emptySrcLoc (HsIdent "main") [] b...
justinmanley/lambda
src/Language/Lambda/Codegen.hs
gpl-3.0
1,558
0
11
377
526
267
259
33
7
module Main ( main ) where import Test.Tasty import Test.Tasty.Golden import Functions main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "Empty" [] --tests = testGroup "Golden File Tests" [part1] --part1 = test "Part 1" "..\data\output1_1.txt" --let --goldenVsString "Part 1"...
cable729/plc2
tests/tests.hs
gpl-3.0
515
2
6
99
70
44
26
10
1
module Tests.SharedTestData where import Data.Maybe import Wordify.Rules.Tile import Wordify.Rules.Pos import Wordify.Rules.Square import Wordify.Rules.Pos.Internal import qualified Data.Map as M import Wordify.Rules.LetterBag horizontalPositions = catMaybes $ map posAt $ iterate (\(x,...
Happy0/haskellscrabble
test/Tests/SharedTestData.hs
gpl-3.0
1,264
0
10
272
530
284
246
21
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
olorin/amazonka
amazonka-iam/gen/Network/AWS/IAM/AttachUserPolicy.hs
mpl-2.0
3,691
0
9
728
445
272
173
62
1