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
main = print hello -- test that layout has not been screwed up hello = "こんにちは 世界"
urbanslug/ghc
testsuite/tests/parser/unicode/T1744.hs
bsd-3-clause
102
0
5
20
15
8
7
2
1
module Network.JSONApi.ErrorSpec where import qualified Data.Aeson as AE import qualified Data.ByteString.Lazy.Char8 as BS import Data.Default (def) import Data.Maybe import Network.JSONApi import Prelude hiding (id) import TestHelpers (prettyEncode) import Test.Hspec main :: IO () main = hspec spec spec :: Spec spe...
toddmohney/json-api
test/Network/JSONApi/ErrorSpec.hs
mit
1,096
0
16
325
293
164
129
31
1
{- This is my xmonad configuration file. There are many like it, but this one is mine. If you want to customize this file, the easiest workflow goes something like this: 1. Make a small change. 2. Hit "super-q", which recompiles and restarts xmonad 3. If there is an error, undo your change and hit ...
status203/.xmonad
xmonad.hs
mit
14,229
0
18
2,945
1,535
914
621
135
1
-- Copyright (c) Microsoft. All rights reserved. -- Licensed under the MIT license. See LICENSE file in the project root for full license information. {-# LANGUAGE OverloadedStrings #-} module Bond.Util ( sepBy , sepEndBy , sepBeginBy , optional , angles , brackets , braces , parens ...
innovimax/bond
compiler/Bond/Util.hs
mit
1,570
0
9
515
650
338
312
52
1
-- | Events for Caramia. -- -- At the moment, this is just a thin layer of abstraction over the SDL2 -- library. -- {-# LANGUAGE LambdaCase #-} module Caramia.Events ( -- * Getting events. getEvents , SDL.Event(..) ) where import Caramia.Context import Caramia.Internal.Error import Graphics.UI....
Noeda/caramia-sdl2
src/Caramia/Events.hs
mit
1,858
0
15
498
377
205
172
40
2
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE DeriveGeneric #-} module Models.FeaturedComic (FeaturedComic(..)) where import BasicPrelude import Data.Aeson (FromJSON(..), ToJSON(..)) import GHC.Generics (Generic) import Models.Ids (ComicId) import Models.Image (Image) data FeaturedComic = FeaturedComic { id ::...
nicolashery/example-marvel-haskell
Models/FeaturedComic.hs
mit
461
0
8
67
123
75
48
15
0
module Roogle where import Roogle.Types import Roogle.Scope import Roogle.Document import System.Environment import Control.Monad.IO.Class import Data.Char import Text.Regex --- should have Scope -> Doc instead of [Code] -> Doc --- desireable: [Code] -> Scope -> Doc, Code -> Scope -> Doc extractTypeSignature :: Stri...
Azabuhs/Roogle
src/Roogle.hs
mit
1,235
0
11
271
335
177
158
27
2
----------------------------------------------------------------------------- -- -- Module : PSCi -- Copyright : (c) 2013-15 Phil Freeman, (c) 2014-15 Gary Burgess -- License : MIT (http://opensource.org/licenses/MIT) -- -- Maintainer : Phil Freeman <paf31@cantab.net> -- Stability : experimental -- P...
michaelficarra/purescript
psci/PSCi.hs
mit
22,518
1
27
4,842
6,577
3,359
3,218
416
9
module Main where import Types import Scheduler import Simulator import qualified Data.Heap as H import System.Random import Text.Show.Pretty (pPrint) main :: IO () main = do g <- newStdGen let randJobs = take 1000 (randomRs (Job 1 0 1 1, Job 8 1 1000 100) g :: [Job]) farmState = FarmState { currentTim...
mohsen3/haskell-tutorials
src/job-scheduling/src/Main.hs
mit
886
0
15
258
200
110
90
17
1
module HappySchedulerSpec (spec) where import Test.Hspec import Prelude import Data.Time.Calendar (Day, fromGregorian) import Data.Time.Clock (getCurrentTime, utctDay) import Database.Persist.Sql (Entity(..), toSqlKey) import Model import HappyScheduler aTask :: Task aTask = Task { taskName = "a task" , ...
frt/happyscheduler
test/HappySchedulerSpec.hs
mit
6,337
0
20
2,745
1,616
845
771
113
1
data RomanNumeral = I | V | X | L | C | D | M deriving (Show, Eq, Ord) convertThousands :: Int -> [RomanNumeral] convertThousands n = replicate n M convertHundreds :: Int -> [RomanNumeral] convertHundreds n | n < 4 = replicate n C | n == 4 = [C, D] | n == 5 = [D] | n < 9 = D : replicate (n - ...
RossMeikleham/Project-Euler-Haskell
89.hs
mit
2,183
0
12
544
932
479
453
70
2
-- You are given the following information, but you may prefer to do -- some research for yourself. -- 1 Jan 1900 was a Monday. -- Thirty days has September, -- April, June and November. -- All the rest have thirty-one, -- Saving February alone, -- Which has twenty-eight, rain or shine. -- And on...
whittle/euler
src/Euler/Problem019.hs
mit
1,513
0
18
397
416
242
174
29
2
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module QTuple where import Quipper -- |The 'Tuple' class creates a tuple out of a list. class QTuple a where tupleSize :: a -> Int tupleFromList :: [Qubit] -> a instance QTuple Qubit where tupleSize _ = 1 tupleFr...
miniBill/entangle
src/lib/QTuple.hs
mit
2,586
0
16
539
952
524
428
43
0
-- Danger! Danger! I haven't finished converting this file to the new system! -- type errors abound!! jcp ---------------------------------------------------------------- -- Stream Processors -- -- Choice of symbols is inspired by John Hughes' Arrow combinators ------------------------------------------------------...
jatinshah/autonomous_systems
project/fvision.hugs/sptalkcode2.hs
mit
5,065
14
12
1,270
1,337
702
635
-1
-1
module Self where class C a where f1 :: a -> a f2 :: a -> a data T = K -- Not actually recursive, just one function defined in terms of the others instance C T where f1 = \x -> x f2 = f1
antalsz/hs-to-coq
examples/tests/Self.hs
mit
202
0
7
61
62
35
27
8
0
{-# LANGUAGE CPP #-} module GHCJS.DOM.UIRequestEvent ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.UIRequestEvent #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI.Gen...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/UIRequestEvent.hs
mit
355
0
5
33
33
26
7
4
0
-- ------------------------------------------------------------------------------------- -- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved. -- For email, run on linux (perl v5.8.5): -- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0...
cbrghostrider/Hacking
HackerRank/FunctionalProgramming/AdHoc/mangoes_v1.hs
mit
1,264
0
13
246
309
164
145
11
1
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-} module GigSpider.Places where import GigSpider.URL import qualified GigSpider.Search as S import qualified GigSpider.Geocoding as G import Control.Applicative import Control.Monad.Trans.Either import Data.Aeson import GHC.Generics import Network.HTTP.Conduit (simple...
owickstrom/GigSpider
src/GigSpider/Places.hs
mit
2,136
0
12
480
616
335
281
54
1
{- | Module : $Header$ Description : Provers for propositional logic Copyright : (c) Till Mossakowski, Uni Bremen 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : till@informatik.uni-bremen.de Stability : experimental Portability : portable A truth table prover for propositional logic...
nevrenato/Hets_Fork
Propositional/ProveWithTruthTable.hs
gpl-2.0
17,262
0
25
5,635
4,176
2,222
1,954
326
10
-------------------------------------------------------------------------------- -- ///////////////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- module P_Shuffle where ---------------------------------------------------...
gennady-em/haskel
src/P_Shuffle.hs
gpl-2.0
13,141
19
14
2,493
1,070
583
487
39
7
module Data.AtFieldTH (make) where import qualified Data.Char as Char import qualified Data.List as List import Language.Haskell.TH.Syntax make :: Name -> Q [Dec] make typeName = do TyConI typeCons <- reify typeName (makeAtName, typeVars, ctor) <- case typeCons of DataD _ _ typeVars constr...
alonho/bottle
src/Data/AtFieldTH.hs
gpl-3.0
4,418
0
15
986
1,488
761
727
83
4
{-# OPTIONS_GHC -fno-warn-orphans #-} module Application ( makeApplication , getApplicationDev , makeFoundation ) where import Import import Settings import Yesod.Auth import Yesod.Default.Config import Yesod.Default.Main import Yesod.Default.Handlers import Network.Wai.Middleware.RequestLogger import ...
oqc/oqs
Application.hs
gpl-3.0
4,301
0
22
885
906
489
417
-1
-1
mu . bimap id mu . alpha = mu . bimap mu id
hmemcpy/milewski-ctfp-pdf
src/content/3.6/code/haskell/snippet12.hs
gpl-3.0
43
1
8
12
31
13
18
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} import Control.Lens import Control.Monad import Control.Monad.Trans (liftIO) import Control.Monad.Trans.Either (EitherT(..)) import Control.Monad.T...
wavewave/lhc-analysis-collection
analysis/histograms_ATLAS0L2to6JMET_8TeV.hs
gpl-3.0
11,615
0
17
2,400
2,886
1,552
1,334
177
2
-- -- Environment is formed via evaluation of definitions. This module -- describes minimal MIDA environment in form of monad transformer. -- -- Copyright © 2014–2017 Mark Karpov -- -- MIDA is free software: you can redistribute it and/or modify it under the -- terms of the GNU General Public License as published by th...
mrkkrp/mida
src/Mida/Language/Environment.hs
gpl-3.0
6,930
0
12
1,706
1,675
912
763
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-tpu/gen/Network/Google/Resource/TPU/Projects/Locations/List.hs
mpl-2.0
6,057
0
19
1,439
962
556
406
133
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Get.hs
mpl-2.0
3,341
0
12
684
301
186
115
52
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/DomainMAppings/Patch.hs
mpl-2.0
6,796
0
20
1,527
945
551
394
140
1
import Char resource = plugin { stringProcessor = map toUpper }
Changaco/haskell-plugins
testsuite/shell/simple/Plugin.hs
lgpl-2.1
73
0
7
20
20
11
9
3
1
import Chain import Control.Concurrent.STM main :: IO () main = do chain <- newTVarIO ([] :: [String]) atomically $ addTransaction chain "My transaction" atomically $ chain `addTransaction` "My transaction1" atomically $ addTransaction chain "My transaction2" transactions <- atomically $ readTVar chain pr...
mreluzeon/block-monad
examples/chain_example.hs
lgpl-3.0
555
0
10
91
157
72
85
15
1
-- | {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ...
byteally/webapi
webapi-docs/src/WebApi/Docs.hs
bsd-3-clause
6,723
0
13
1,733
2,551
1,310
1,241
138
1
{-# LANGUAGE TypeOperators #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : ForSyDe.MoC.SDF.Lib -- Copyright : (c) George Ungureanu, KTH/ICT/ESY 2015-2017 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : ugeo...
forsyde/forsyde-atom
src/ForSyDe/Atom/MoC/SDF/SDF.hs
bsd-3-clause
36,157
0
16
10,084
16,769
9,482
7,287
633
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} ------------------------------------------------------------------------------- -- | -- Module : Database.Bloodhound.Client -- Copyright : (C) 2014 Chris Allen -- License : BSD-style (see the file LICENSE) -- Maintainer : Chris Allen <cma@bitemy...
beni55/bloodhound
src/Database/Bloodhound/Client.hs
bsd-3-clause
31,282
0
15
6,499
5,269
2,823
2,446
350
6
module Debug.IDE(RIDE, IDEAlign(..), IDEPanel(..), IDEPanels(..), panelsAppend, panelCBNull, ideNew, ideWidget, ideAddLeft, ideAddCenter, ideAddRight, ideAddBottom, ideRemove, f...
termite2/debug
Debug/IDE.hs
bsd-3-clause
20,149
0
21
7,183
6,190
2,981
3,209
447
6
module Language.Eiffel.Summary where import qualified Data.ByteString.Char8 as B import Data.Binary import Language.Eiffel.Syntax import Language.Eiffel.Parser.Class import qualified Language.Eiffel.Parser.Lex as L import Language.Eiffel.Parser import Language.Eiffel.PrettyPrint import Text.Parsec import System.IO...
scottgw/language-eiffel
Language/Eiffel/Summary.hs
bsd-3-clause
886
0
13
115
241
136
105
22
1
module MyOwnMaybe where isJust :: Maybe a-> Bool isJust (Just _) = True isJust Nothing = False isNothing = not . isJust maybbe :: b -> (a -> b) -> Maybe a -> b maybbe acc f Nothing = acc maybbe acc f (Just n) = f n fromMaybe :: a -> Maybe a -> a fromMaybe a Nothing = a fromMaybe a (Just a1) = a1 listToMaybe :: [a]...
chengzh2008/hpffp
src/ch12-SignalingAdversity/myOwnMaybe.hs
bsd-3-clause
755
0
10
206
397
203
194
25
3
module Memory where data Memory = Memory [Int] Int [Int] deriving (Show) peek :: Memory -> Int peek (Memory _ c _) = c write :: Memory -> Int -> Memory write (Memory b _ f) i = Memory b i f next :: Memory -> Memory next (Memory b c []) = Memory (c:b) 0 [] next (Memory b c (f:fs)) = Memory (c:b) f fs prev :: Me...
pdpi/brainfuck.hs
src/memory.hs
bsd-3-clause
671
0
9
171
411
216
195
20
1
module Demo where import Control.Applicative import Happstack.Server hiding (timeout) import Happstack.Auth import Text.Blaze import Templates -- Session timeouts timeout :: Minutes timeout = 5 demoResponse :: Html -- ^ Body -> ServerPartT IO Response demoResponse html = do maybeSession <- ...
mcmaniac/happstack-auth
demo/Demo.hs
bsd-3-clause
1,798
0
16
474
440
219
221
43
2
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ARB.TextureGather -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portabilit...
haskell-opengl/OpenGLRaw
src/Graphics/GL/ARB/TextureGather.hs
bsd-3-clause
779
0
5
99
57
42
15
9
0
-- | -- Module : Streamly.Network.Socket -- Copyright : (c) 2018 Composewell Technologies -- -- License : BSD3 -- Maintainer : streamly@composewell.com -- Stability : experimental -- Portability : GHC -- -- A socket is a handle to a protocol endpoint. -- -- This module provides APIs to read and write stre...
harendra-kumar/asyncly
src/Streamly/Network/Socket.hs
bsd-3-clause
1,794
0
5
331
93
75
18
13
0
module SIGyM.Database (module X) where import SIGyM.Database.Pool as X import SIGyM.Database.TH as X
meteogrid/sigym-core
src/SIGyM/Database.hs
bsd-3-clause
103
0
4
15
28
20
8
3
0
module Language.Typo.Parser ( Language.Typo.Parser.parse -- :: FilePath -> String -> Either ParseError (Program Surface) , program -- :: Parsec String u Program , definition -- :: Parsec String u Definition , surface -- :: Parsec String u Surface , value -- :: Parsec String u V...
seliopou/typo
Language/Typo/Parser.hs
bsd-3-clause
2,575
0
14
617
767
424
343
60
2
{-# LANGUAGE FlexibleContexts #-} -- | -- Module: Network.Protocool.ZigBee.ZNet25.Encoder -- Copyright: (c) 2012 David Joyner -- License: BSD3 -- Maintainer: David Joyner <david@joynerhome.net> -- Stability: experimental -- Portability: portable -- -- XBee ZNet 2.5 (ZigBee) frame encoder/decoder function...
djoyner/zigbee-znet25
src/Network/Protocol/ZigBee/ZNet25/Encoder.hs
bsd-3-clause
7,343
0
14
1,775
1,346
736
610
84
4
{- Data/Singletons/Promote.hs (c) Richard Eisenberg 2013 eir@cis.upenn.edu This file contains functions to promote term-level constructs to the type level. It is an internal module to the singletons package. -} {-# LANGUAGE TemplateHaskell, MultiWayIf, LambdaCase, TupleSections #-} module Data.Singletons.Promote wh...
int-index/singletons
src/Data/Singletons/Promote.hs
bsd-3-clause
27,939
0
21
7,218
6,689
3,344
3,345
450
6
{-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -- -- Copyright (c) 2009-2011, ERICSSON AB -- All rights reserved. -- -- Redistribution and use in source and binary forms,...
rCEx/feldspar-lang-small
src/Feldspar/Core/Constructs/Trace.hs
bsd-3-clause
3,222
0
13
632
416
239
177
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Data.Singletons.TH.Deriving.Eq -- Copyright : (C) 2020 Ryan Scott -- License : BSD-style (see LICENSE) -- Maintainer : Ryan Scott -- Stability : experimental -- Portability : non-portable -- -- Implements ...
goldfirere/singletons
singletons-th/src/Data/Singletons/TH/Deriving/Eq.hs
bsd-3-clause
2,265
0
18
557
650
352
298
45
3
module Test.Rogue.Suite.DummySpec ( spec ) where import Control.Exception (evaluate) import Test.Hspec (Spec, anyException, describe, it, shouldBe, shouldThrow) import Test.QuickCheck (property) spec :: Spec spec = describe "Prelu...
ChShersh/rogue-lang
test/Test/Rogue/Suite/DummySpec.hs
bsd-3-clause
682
0
15
235
178
98
80
15
1
{-| Module : Data.Type.Lambda Description : Type level functions. Copyright : (c) Alexander Vieth, 2016 Licence : BSD3 Maintainer : aovieth@gmail.com Stability : experimental Portability : non-portable (GHC only) -} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAG...
avieth/type-lambda
Data/Type/Lambda.hs
bsd-3-clause
18,814
134
29
4,242
6,791
3,643
3,148
-1
-1
{-#LANGUAGE GADTs, StandaloneDeriving, GeneralizedNewtypeDeriving #-} module Genome.Data.FrequencyArray where import Data.List (sort) import Data.Set (Set) import Data.Sequence (Seq) import Data.Sequence ((><), (<|), (|>)) import qualified Data.Foldable as Foldable import Data.Map (Map, (!)) import qualified Data.Map ...
visood/bioalgo
src/lib/Genome/Data/FrequencyArray.hs
bsd-3-clause
2,515
0
13
770
901
485
416
50
2
{-| Description: path matching utility This module provides the tools you need to match the path of a request, extract data from it, and connect matches to Respond actions. -} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# ...
raptros/respond
src/Web/Respond/Path.hs
bsd-3-clause
9,176
0
11
1,544
1,779
960
819
103
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Web.Orion.Database where import Web.Orion import Network.OAuth.OAuth2 import Web.Orion.OAuth.Services import Database.HDBC import Control.Monad.IO.Class (liftIO) import Control.Monad import Data.Maybe import Database.HDBC.Sqlite3 import System....
schell/orion
src/Web/Orion/Database.hs
bsd-3-clause
5,813
0
21
1,810
1,445
730
715
140
3
{-# LANGUAGE DataKinds #-} module FRP.Basket.Signals.Common where import FRP.Basket.Signals import Control.Applicative import Prelude hiding (const) import Data.HList identity :: Signal '[] a a identity = Signal $ \_ s a -> (a, s) const :: c -> Signal '[] a c const = pure -- This should usually not be needed, bu...
jhstanton/Basket
src/FRP/Basket/Signals/Common.hs
bsd-3-clause
1,050
0
11
255
350
198
152
19
2
{-# LANGUAGE RecordWildCards #-} module Network.Hawk.Internal.Server where import Data.ByteString (ByteString) import Network.Hawk.Types import Network.Hawk.Internal.Server.Types import Network.Hawk.Internal serverMac :: Credentials -> HawkType -> HeaderArtifacts -> ByteString serverMac Credentials{..} = calculateM...
rvl/hsoz
src/Network/Hawk/Internal/Server.hs
bsd-3-clause
341
0
7
35
75
45
30
8
1
{-# LINE 1 "Control.Monad.IO.Class.hs" #-} {-# LANGUAGE Safe #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.IO.Class -- Copyright : (c) Andy Gill 2001, -- (c) Oregon Graduate Institute of Science and Technology, 2001 -- License ...
phischu/fragnix
builtins/base/Control.Monad.IO.Class.hs
bsd-3-clause
1,174
0
8
229
89
61
28
7
0
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module NixLanguageTests (genTests) where import Control.Arrow ( (&&&) ) import Control.Exception import Control.Monad import Control.Monad.IO.Class import ...
jwiegley/hnix
tests/NixLanguageTests.hs
bsd-3-clause
7,403
0
20
2,433
1,727
885
842
150
12
{-| This module contains test cases for functions on source locations. -} module SourceLocation(testSourceLocations) where import Test.Tasty import Test.Tasty.QuickCheck import Test.Tasty.HUnit import Prelude hiding (span) import Language.Astview.Language import Control.Exception(Exception,evaluate,try) import Control....
jokusi/Astview
test/SourceLocation.hs
mit
3,920
0
15
976
1,337
671
666
85
2
{-| Module : Graphics.Sudbury.State Description : Wayland state tracker Copyright : (c) Auke Booij, 2015-2017 License : MIT Maintainer : auke@tulcod.com Stability : experimental Wayland is a stateful protocol. This code can track that state. -} module Graphics.Sudbury.State where import Data.Word import...
abooij/sudbury
Graphics/Sudbury/State.hs
mit
3,369
0
16
562
436
240
196
34
2
{- Copyright (C) 2012-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; either version 2 of the License, or (at your option) any later version. This program is ...
alexvong1995/pandoc
benchmark/benchmark-pandoc.hs
gpl-2.0
2,146
0
16
484
522
272
250
34
2
{- | Module : ./utils/itcor/GenItCorrections.hs Copyright : (c) C. Maeder, DFKI GmbH 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : experimental Portability : portable -} module Main where import Text.ParserCombinators.Parsec import qualified Da...
spechub/Hets
utils/itcor/GenItCorrections.hs
gpl-2.0
5,688
0
19
1,531
1,599
816
783
146
9
-- GSoC 2015 - Haskell bindings for OpenCog. {-# LANGUAGE GADTs #-} {-# LANGUAGE DataKinds #-} -- | This Module defines some useful data types for proper interaction -- with the AtomSpace C wrapper library. -- Intended for internal use only. module OpenCog.AtomSpace.Internal ( Handle(..) , AtomTypeRaw(.....
jswiergo/atomspace
opencog/haskell/OpenCog/AtomSpace/Internal.hs
agpl-3.0
7,266
0
18
2,155
2,668
1,363
1,305
144
18
module Juno.Types.Event ( Event(..) ) where import Juno.Types.Message data Event = ERPC RPC | AERs AlotOfAERs | ElectionTimeout String | HeartbeatTimeout String deriving (Show)
buckie/juno
src/Juno/Types/Event.hs
bsd-3-clause
219
0
6
66
53
33
20
8
0
{-# LANGUAGE CPP #-} -- | Log message formatting and debuging functions. module Control.Super.Plugin.Log ( pprToStr, sDocToStr , missingCaseError , smErrMsg, smDebugMsg, smObjMsg, smWarnMsg , formatGroupSrcSpans , formatConstraint, formatSpan -- * Debug Functions , printTrace, printObjTrace, trace -- ...
jbracker/supermonad-plugin
src/Control/Super/Plugin/Log.hs
bsd-3-clause
6,401
0
14
1,200
1,278
700
578
102
8
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module Web.Scotty.Action ( addHeader , body , bodyReader , file , files , header , headers , html , json , jsonData , next , param , params , raise , raw ...
adamflott/scotty
Web/Scotty/Action.hs
bsd-3-clause
11,979
0
15
2,848
2,706
1,445
1,261
182
3
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "Web/Scotty/Internal/Types.hs" #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LA...
phischu/fragnix
tests/packages/scotty/Web.Scotty.Internal.Types.hs
bsd-3-clause
7,462
0
16
2,247
1,812
1,013
799
131
1
{-# OPTIONS_GHC -fno-warn-type-defaults #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {- Copyright (C) - 2017 Róman Joost <roman@bromeco.de> This file is part of gtfsschedule. gtfsschedule is free software: you can redistribute ...
romanofski/gtfsbrisbane
test/TestCSVImport.hs
bsd-3-clause
5,158
0
19
2,025
811
462
349
85
1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Network/HTTP/Types/Status.hs" #-} {-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-} module Network.HTTP.Types.Status ( Status(..) , mkStatus , status100 , continue100 , status101 , switchingProtocols101 , status200 , ok200 , status201 , created201 , status202 , accepted202 , ...
phischu/fragnix
tests/packages/scotty/Network.HTTP.Types.Status.hs
bsd-3-clause
13,515
0
9
2,242
2,374
1,387
987
364
1
-- Ensure we don't expose any unfoldings to guarantee quick rebuilds {-# OPTIONS_GHC -O0 #-} -- If you want to customise your build you should copy this file from -- hadrian/src/UserSettings.hs to hadrian/UserSettings.hs and edit your copy. -- If you don't copy the file your changes will be tracked by git and you can ...
sdiehl/ghc
hadrian/src/UserSettings.hs
bsd-3-clause
2,708
0
8
433
208
134
74
25
1
{-# LANGUAGE UnboxedTuples #-} f :: x -> (x, x); f x = (x, x)
mpickering/hlint-refactor
tests/examples/Extensions29.hs
bsd-3-clause
62
0
6
15
32
19
13
2
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE QuantifiedConstraints #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UndecidableInstances #-} module T16666 where $([d| class (c => d) => Implies c d instance (c => d) => Implies c d ...
sdiehl/ghc
testsuite/tests/th/T16666.hs
bsd-3-clause
324
0
6
59
21
16
5
-1
-1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Bits -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICE...
snoyberg/ghc
libraries/base/Data/Bits.hs
bsd-3-clause
21,758
0
14
6,340
3,651
2,037
1,614
254
2
module Opaleye.SQLite.Column (module Opaleye.SQLite.Column, Column, Nullable, unsafeCoerce, unsafeCoerceColumn) where import Opaleye.SQLite.Internal.Column (Column, Nullable, unsafeCoerce, unsafeCoerceColumn) import ...
alanz/haskell-opaleye
opaleye-sqlite/src/Opaleye/SQLite/Column.hs
bsd-3-clause
1,966
0
10
444
382
213
169
26
1
import StackTest import System.Directory (setPermissions, emptyPermissions, createDirectory) main :: IO () main = do createDirectory "unreachabledir" setPermissions "unreachabledir" $ emptyPermissions stack ["init"]
AndrewRademacher/stack
test/integration/tests/skip-unreachable-dirs/Main.hs
bsd-3-clause
230
0
8
36
60
30
30
7
1
module D200 where import A200
oldmanmike/ghc
testsuite/tests/driver/D200.hs
bsd-3-clause
30
0
3
5
7
5
2
2
0
{-# LANGUAGE GADTs #-} module T3638 where data T a where TInt :: T Int foo :: T Int -> Int {-# NOINLINE [1] foo #-} foo TInt = 0 {-# RULES "foo" forall x. foo x = case x of { TInt -> 0 } #-}
urbanslug/ghc
testsuite/tests/gadt/T3638.hs
bsd-3-clause
196
0
6
52
40
24
16
7
1
{-# LANGUAGE OverloadedStrings #-} module Main where import Data.Attoparsec.Text import Data.Bool (bool) import Data.Either (fromRight) import Data.Foldable (find, traverse_) import Data.Matrix (Matrix) import qualified Data.Matrix ...
genos/online_problems
advent_of_code_2021/day04/Main.hs
mit
2,125
0
13
588
985
529
456
53
2
module ZebraPuzzle (Resident(..), Solution(..), solve) where data Resident = Englishman | Spaniard | Ukrainian | Norwegian | Japanese deriving (Eq, Show) data Solution = Solution { waterDrinker :: Resident , zebraOwner :: Resident } deriving (Eq, Show) solve :: Sol...
exercism/xhaskell
exercises/practice/zebra-puzzle/src/ZebraPuzzle.hs
mit
380
0
8
105
98
60
38
8
1
{-# LANGUAGE Arrows #-} {-# LANGUAGE TemplateHaskell #-} import Text.XML.HXT.Core import Text.XML.HXT.Arrow.XmlArrow (ArrowXml) import Text.HandsomeSoup import Control.Arrow import Text.Read (readMaybe) import Control.Monad import Control.Lens import Data.Maybe (listToMaybe, fromMaybe) import Data.List (sortBy, filter...
ericmoritz/pitchfork-reviews
src/PitchforkReviews.hs
mit
3,584
1
15
762
1,115
577
538
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Cenary.Utils.EvmAsm where -------------------------------------------------------------------------------- import Data.Functor import Data.Functor.Identity (Id...
yigitozkavci/ivy
src/Cenary/Utils/EvmAsm.hs
mit
2,707
0
20
539
782
405
377
69
2
{-# LANGUAGE UnicodeSyntax #-} module Main (main) where import Options.Applicative import Prelude.Unicode -- my modules import M3U.Read (fromFile) import M3U.Write (toOrderedMarkdown, toYAML) data Options = Options { filePath ∷ String ...
siddharthist/m3u-convert
src/Main.hs
mit
1,353
0
15
569
297
153
144
28
4
module GameState where import Data.Array.IArray import GOL stepIntervalChange = 50.0 data GameState = GameState { world :: World, mode :: GOLState, timeSinceLastUpdate :: Float, lastIteration :: Integer, window :: WindowConfig, stepInterval :: Float } data WindowConfig = WindowConfig { w...
Lateks/gol
src/GameState.hs
mit
1,891
0
14
554
559
306
253
-1
-1
module Out.Other ( writeSonHier , writeCCs , writeLanguageTreeN , writeSoundChange ) where import ClassyPrelude import Data.Language import Data.Phoneme import Data.Soundchange import Out.Lexicon -- write the sonority hierarchy writeSonHier :: [Phoneme] -> [[Phoneme]] -> Text writeSonHier vows cns = "\n\nSonority h...
Brightgalrs/con-lang-gen
src/Out/Other.hs
mit
1,687
0
11
263
478
248
230
28
1
module ArgumentParser where -- This application has two flags -p and -h data Flag = P | H deriving Show data Arguments = Arguments {flag :: Maybe Flag, parser :: Maybe String, function :: Maybe String } | None deriving Show stringToFlag :: String -> Maybe Flag stringToFlag st...
iostreamer-X/FuncShell
src/ArgumentParser.hs
mit
1,144
0
10
291
350
174
176
30
3
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE RecordWildCards #-} module Data.Core.Graph ( Graph, Node, NodeSet, Edge(..) , empty, fromEdges, fromAdj, isConsistent , nodes, edges, children, parents, h...
factisresearch/graph-core
src/Data/Core/Graph.hs
mit
596
0
5
89
123
85
38
17
0
module L.CommandLine where import L.Compiler hiding (Parser) import Options.Applicative addInfo :: String -> Parser a -> ParserInfo a addInfo desc p = info (helper <*> p) (fullDesc <> progDesc desc <> (header "The L Programming Language")) osParser :: Parser String osParser = strOption ( long "o...
joshcough/L5-Haskell
src/L/CommandLine.hs
mit
852
0
10
154
214
107
107
23
1
{-# LANGUAGE OverloadedStrings #-} import Frequency (frequency) import Prelude hiding (unlines) import Data.Text (Text, unlines) import Criterion.Main (bench, bgroup, defaultMain, nf) import Criterion.Types (Benchmark) import Control.Concurrent (getNumCapabilities) import Data.List (nub, sort, replicate) odeAnDieFr...
exercism/xhaskell
exercises/practice/parallel-letter-frequency/bench/Benchmark.hs
mit
1,408
0
12
370
329
181
148
30
1
-- | Internal helpers that provide strict atomic MutVar access. -- -- These functions allow us to avoid the overhead of MVar as long -- as we can factor the impure sections of code out in such a way -- that the pure metric calculations can be executed without requiring -- access to multiple MutVars at a time. module Da...
graydon/metrics
src/Data/Metrics/Internal.hs
mit
1,620
0
18
352
462
248
214
24
1
module Data.Word ( Word(..) , Morpheme(..) , Meaning(..) , Syllable(..) , ConsCluster ) where import ClassyPrelude hiding (Word) import Data.List (elemIndex) import Data.Phoneme import Data.Inflection -- Words have a tree-like structure where leaves are morphemes data Word = Word { getMeaning :: Meaning, getLeft :: ...
Brightgalrs/con-lang-gen
src/Data/Word.hs
mit
2,370
0
10
569
436
284
152
30
0
-- Problems/Problem023.hs module Problems.Problem023 (p23) where import Data.IntSet (toList, fromList) import Helpers.Numbers main = print p23 p23 :: Int p23 = sum [1..20161] - (sum $ nub' $ abundantSums) where nub' = toList . fromList abundantSums :: [Int] abundantSums = [(x+y) | x <- ab, y <- ab, y >= x, (x+y...
Sgoettschkes/learning
haskell/ProjectEuler/src/Problems/Problem023.hs
mit
438
0
11
86
196
110
86
12
1
-- Copyright (c) Microsoft. All rights reserved. -- Licensed under the MIT license. See LICENSE file in the project root for full license information. {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} module Tests.Codegen ( verifyCodegen , verifyCppCodegen , verifyApplyCod...
alfpark/bond
compiler/tests/Tests/Codegen.hs
mit
4,370
0
15
1,057
1,047
552
495
94
6
----------------------------------------------------------------------------- -- | -- Module : Language.Krill.TypeChecker.Contractivity -- Description : Check that recursive types are contractive -- Maintainer : coskuacay@gmail.com -- Stability : experimental -- -- A (recursive) type is said to be contractive i...
cacay/language-sill
Language/Krill/TypeChecker/Contractivity.hs
mit
2,918
0
15
503
851
433
418
55
2
{-# OPTIONS_GHC -Wall #-} module Main where import Test.Framework import GHC.IO.Encoding import qualified Tests.Old import qualified Tests.Readers.LaTeX import qualified Tests.Readers.Markdown import qualified Tests.Writers.LaTeX import qualified Tests.Writers.HTML import qualified Tests.Writers.Native import qualifi...
timtylin/scholdoc
tests/test-scholdoc.hs
gpl-2.0
1,289
0
9
259
293
173
120
34
1
-- | Young tableaux and similar gadgets. -- See e.g. William Fulton: Young Tableaux, with Applications to -- Representation theory and Geometry (CUP 1997). -- -- The convention is that we use -- the English notation, and we store the tableaux as lists of the rows. -- -- That is, the following standard t...
garykrige/project_euler
Haskell/Math/Combinat/Tableaux.hs
gpl-2.0
5,031
0
15
1,140
1,631
885
746
84
9
{- Copyright (C) 2006-8 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 your option) any later version. This program is dis...
kowey/pandoc-old
src/Text/Pandoc/Writers/LaTeX.hs
gpl-2.0
15,320
0
25
4,407
4,284
2,171
2,113
286
16
module Compiler.Goto_While where import qualified While as W import qualified Goto as G compile :: G.Program -> W.Program compile p = let c = G.free_register p ; h = c+1 in W.Seq (W.Inc h) $ W.While h $ body c h $ zip [0..] p body c h ips = case ips of [] -> W.Skip (i,s) : rest -> W.IfZ c (statement c...
marcellussiegburg/autotool
collection/src/Compiler/Goto_While.hs
gpl-2.0
655
0
13
177
412
206
206
19
5
module Print where import Parse import Data.List import Data.String.Utils escapeField :: String->String showField :: Field->String showEntry :: Entry->String escapeField v = concat ["{",strip v,"}"] showField (k,v) = concat ["\n ",k," = ",escapeField v] showEntry (Entry name xs) = "@" ++ doctype...
zaxtax/hsbib
Print.hs
gpl-2.0
532
0
10
119
217
120
97
15
1
module ATP.Util.Debug ( err , assert , impossible , error , trace , trace' , traceIn , traceOut , tracef, tracef' , tracef2, tracef2' , tracef3, tracef3' , tracef4, tracef4' , tracef5, tracef5' , tracef6, tracef6' ) where import Prelude hiding (error) import qualified ATP.Util.Print as ...
andre-artus/handbook-of-practical-logic-and-automated-reasoning-haskell
src/ATP/Util/Debug.hs
gpl-3.0
4,259
0
15
1,058
2,260
1,196
1,064
100
2
{- ============================================================================ | Copyright 2011 Matthew D. Steele <mdsteele@alum.mit.edu> | | | | This file is part of Fallback. | ...
mdsteele/fallback
src/Fallback/View/Town.hs
gpl-3.0
11,074
0
26
3,367
2,465
1,243
1,222
190
17
import FRP.Helm import FRP.Helm.Graphics (Element(..)) import qualified FRP.Helm.Window as Window import FRP.Helm.Animation (Frame, AnimationStatus(..), animate, absolute) import FRP.Helm.Time (second, running, delta) import FRP.Elerea.Simple import Cell.Display (allGenFrames) import LifeGame.Data.CellGrid (CellGrid(....
qleguennec/bats
src/Main.hs
gpl-3.0
917
0
12
207
322
181
141
23
3
{-# LANGUAGE RecursiveDo, OverloadedStrings #-} module Estuary.Widgets.Reflex where -- This module is for definitions that extend the affordances of reflex and reflex-dom in -- ways that are specific to the Estuary client but generically useful across multiple -- widgets/settings/modules within the client. import Re...
d0kt0r0/estuary
client/src/Estuary/Widgets/Reflex.hs
gpl-3.0
42,233
0
25
8,486
13,959
7,015
6,944
549
6
{-# LANGUAGE NoMonomorphismRestriction #-} module Plugins.DiagramStuff ( module Diagrams.Backend.SVG ,module Diagrams.Core ,module Diagrams.Prelude ,module Text.Blaze.Svg.Renderer.String ,rdia ) where import Diagrams.Backend.SVG import Diagrams.Core import Diagrams.Prelude import Text.Blaze.S...
xpika/interpreter-haskell
Plugins/DiagramStuff.hs
gpl-3.0
488
0
11
78
128
76
52
13
1