code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
module Raskell.Parser.Whitespace ( whitespace , lexeme ) where import Text.Parsec (many) import Text.Parsec.String (Parser) import Text.Parsec.Char import Control.Monad (void) import Control.Applicative ((<*)) whitespace :: Parser () whitespace = void $ many $ oneOf " \t" lexeme :: Parser a -> Parser a lexeme p = p ...
joshsz/raskell
src/Raskell/Parser/Whitespace.hs
mit
334
0
6
51
117
67
50
12
1
module Checker where import Syntax import Data.Monoid hiding (Sum) import Control.Monad import qualified Data.List as List data Value = Literal Lit | Closure Name Type Expr Scope deriving (Eq, Show) type Scope = [(Name, Type)] check :: Expr -> Result (Elab Type) check = check' [] where check' :: ...
tclem/lilo
src/Checker.hs
mit
3,159
0
26
1,090
1,287
624
663
64
18
{-# LANGUAGE DeriveDataTypeable #-} {- Copyright (C) 2012-2017 Kacper Bak, Jimmy Liang <http://gsd.uwaterloo.ca> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including ...
juodaspaulius/clafer
src/Language/Clafer/ClaferArgs.hs
mit
8,888
0
15
1,943
1,643
907
736
138
6
import Linear import Linear.V import Data.Vector identity :: V 2 (V 2 Float) identity = V (fromList [ V (fromList [1, 0]), V (fromList [0, 1]) ]) calculation :: V 2 (V 2 Float) calculation = identity !*! identity
hibou107/algocpp
linear.hs
mit
214
0
12
40
109
58
51
-1
-1
-- Lucas numbers -- http://www.codewars.com/kata/55a7de09273f6652b200002e/ module Codewars.Exercise.Lucas where lucasnum :: Int -> Integer lucasnum n = (if (n<0) then (-1)^n' else 1) * (fibS n' + 2 * fibS (n'-1)) where n' = abs n fib = (map fibS [0 ..] !!) fibS 0 = 0 fibS 1 = 1 ...
gafiatulin/codewars
src/6 kyu/Lucas.hs
mit
421
0
11
133
205
109
96
9
4
-- 'filter', applied to a predicate and a list, -- returns the list of those elements that -- satisfy the predicate, i.e. -- > filter p xs = [ x | x <- xs, p x] filter :: (a -> Bool) -> [a] -> [a] filter _pred [] = [] filter pred (x:xs) | pred x = x : filter pred xs | otherwise = filter pred xs
iharh/fp-by-example
tex/src/filter_hof.hs
mit
316
0
8
88
94
48
46
5
1
import Data.List import Test.QuickCheck import Control.Monad {- Definim un tip de date pentru a reprezenta o rețea de mulțimi de puncte în plan: -} type Punct = (Int,Int) data Multime = X | Y | DX Int Multime | DY Int Multime | U Multime Multime {- Planul este c...
PavelClaudiuStefan/FMI
An_3_Semestru_1/ProgramareDeclarativa/Extra/Laborator/Modele test 2/Test2/test2-rezolvat.hs
cc0-1.0
14,659
0
16
3,790
4,118
2,129
1,989
200
7
import Data.Char main = do putStrLn "What's your first name?" firstName <- getLine putStrLn "What's your last name?" lastName <- getLine let bigFirstName = map toUpper firstName bigLastName = map toUpper lastName putStrLn $ "hey" ++ bigFirstName ++ " " ++ bigLastName ++ "how are you?"
softwaremechanic/Miscellaneous
Haskell/4.hs
gpl-2.0
305
0
11
65
84
38
46
9
1
import Graphics.UI.Gtk hiding (Settings) import Graphics.Rendering.Cairo import Data.Time.Clock.POSIX import Data.Time import System.Directory import Control.Exception import System.Locale (defaultTimeLocale) import Data.IORef import Control.Monad (when,forM) import Data.List import Text.Printf import Data.Char (toUppe...
jsavatgy/hatupist
code/settingsDialog.hs
gpl-2.0
28,189
0
18
6,814
10,495
5,292
5,203
869
4
module Machine.Class where import Autolib.Set import Autolib.Schichten import Autolib.Reporter hiding ( output ) import Autolib.ToDoc import Autolib.Size import Machine.History import Data.Typeable import qualified Data.Set as S -- for priority queue class ( ToDoc m, Size m , ToDoc dat, Ord dat , ToDoc...
florianpilz/autotool
src/Machine/Class.hs
gpl-2.0
3,251
5
19
931
942
496
446
-1
-1
module Ruab.Main (main) where -- imports {{{1 import Ruab.Options (options) import Ruab.Test (runTests) import System.Environment (getArgs, getProgName) import System.Exit (exitWith) import System.IO (stderr, hPutStrLn) import qualified Ruab.Frontend as F main :: IO () -- {{{1 main = do argv <- getArgs case argv...
copton/ocram
ruab/src/Ruab/Main.hs
gpl-2.0
711
0
11
144
263
138
125
22
2
{- | Module : Primitive Description : SVG primitives Copyright : (c) Frédéric BISSON, 2015 License : GPL-3 Maintainer : zigazou@free.fr Stability : experimental Portability : POSIX SVG primitives like a circle or rect for SVG generation. -} module Tank.SVG.Primitive (circle, rect, path, g, svg) where im...
Zigazou/Tank
src/Tank/SVG/Primitive.hs
gpl-3.0
1,926
0
8
692
402
227
175
41
1
{- Copyright (C) 2015 Michael Dunsmuir 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 3 of the License, or (at your option) any later version. This program i...
mdunsmuir/routequery-service
src/RoutequeryService/GTFS/Types.hs
gpl-3.0
4,695
0
12
903
1,173
624
549
117
0
{-# LANGUAGE OverloadedStrings #-} module Estuary.Help.Crudo where import Reflex import Reflex.Dom import Data.Text import GHCJS.DOM.EventM import Estuary.Widgets.Reflex import Estuary.Widgets.Reflex --render multiple sub-help files crudoHelpFile :: MonadWidget t m => m () crudoHelpFile = divClass "languageHelpConta...
d0kt0r0/estuary
client/src/Estuary/Help/Crudo.hs
gpl-3.0
2,495
0
11
356
538
253
285
61
1
-- Copyright (C) 2013 Michael Zuser mikezuser@gmail.com -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -...
bacchanalia/KitchenSink
KitchenSink/List.hs
gpl-3.0
4,786
0
12
1,021
1,553
857
696
69
3
module Utility.Rotate ( rotate , shuffle , choose , swap ) where import System.Random rotate :: Int -> [a] -> [a] rotate n xs | n > ln || n < 0 = rotate (n `mod` ln) xs | otherwise = drop n xs ++ take n xs where ln = length xs shuffle :: RandomGen g => [a] -> g -> ([a], g) shuffle [] g = ([], g) shuffle xs...
xaphiriron/maps
Utility/Rotate.hs
gpl-3.0
1,518
7
11
451
454
241
213
28
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.FirebaseDynamicLinks -- Copyright : (c) 2015-2016 Brendan Hay -- License :...
rueshyna/gogol
gogol-firebase-dynamiclinks/gen/Network/Google/FirebaseDynamicLinks.hs
mpl-2.0
3,357
0
5
779
302
218
84
81
0
{-# LANGUAGE GADTs #-} module Gonimo.Database.Effects.Servant where -- Little helpers integrating db functions with servant: import Control.Exception (SomeException) import Control.Monad ((<=<)) import Control.Monad.Freer import Control.Monad.Freer.Ex...
charringer/gonimo-back
src/Gonimo/Database/Effects/Servant.hs
agpl-3.0
929
0
9
231
243
133
110
-1
-1
module ViperVM.Runtime.Scheduler where import ViperVM.Platform.Platform import ViperVM.VirtualPlatform.Task import Control.Applicative ((<$>)) import Control.Concurrent.STM data Scheduler = Scheduler { platform :: Platform, submit :: Task -> IO TaskEvent } newtype TaskEvent = TaskEvent (TVar Bool) initEvent ...
hsyl20/HViperVM
lib/ViperVM/Runtime/Scheduler.hs
lgpl-3.0
467
0
10
69
138
78
60
13
1
-- -- Minio Haskell SDK, (C) 2017 Minio, Inc. -- -- 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 ...
donatello/minio-hs
test/Spec.hs
apache-2.0
4,560
0
21
1,508
954
532
422
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE RecursiveDo #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaske...
gcross/LogicGrowsOnTrees
LogicGrowsOnTrees/tests/test-Supervisor.hs
bsd-2-clause
21,352
0
31
6,902
4,404
2,139
2,265
357
3
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QSizePolicy.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:20 Warning : this file is machine generated - do n...
keera-studios/hsQt
Qtc/Gui/QSizePolicy.hs
bsd-2-clause
6,800
0
14
1,025
1,900
988
912
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} import System.Console.CmdArgs import Control.Applicative ((<$>)) import Control.Monad (forM_) import Data.List (intercalate) import qualified Data.Text as T import qualifie...
kawu/lexeme-clustering
tools/lexeme-clustering.hs
bsd-2-clause
2,374
0
15
650
580
309
271
54
1
{-# LANGUAGE OverloadedStrings #-} module Main where import Common import Web.Twitter.Conduit import Data.Conduit import qualified Data.Conduit.List as CL import qualified Data.Map as M import System.Environment main :: IO () main = do [screenName] <- getArgs twInfo <- getTWInfoFromEnv mgr <- newManager...
himura/twitter-conduit
sample/oslist.hs
bsd-2-clause
813
0
14
175
260
131
129
23
1
{-# LANGUAGE RankNTypes, NamedFieldPuns, RecordWildCards, RecursiveDo #-} module Distribution.Server.Features.Core ( CoreFeature(..), CoreResource(..), initCoreFeature, -- * Change events PackageChange(..), isPackageChangeAny, isPackageAdd, isPackageDelete, isPackageIndexChange, ...
chrisdotcode/hackage-server
Distribution/Server/Features/Core.hs
bsd-3-clause
25,162
0
22
6,163
4,588
2,448
2,140
350
13
{-# LANGUAGE RankNTypes #-} module Main where import Control.Applicative import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as C8 import qualified Data.ByteString.Lazy as LB import qualified Data.Map as Map import Data.String import qualified Data.Vector as V import ...
GaloisInc/elf
tests/Test.hs
bsd-3-clause
3,252
0
28
673
1,015
522
493
73
3
module Lib where import Data.Text import Database.PostgreSQL.Simple import Database.PostgreSQL.Simple.SqlQQ loginRole :: Connection -> Text -> Text -> IO (Maybe Text) loginRole c user pass = do res <- query c "select login_role(?,?)" (user, pass) return $ case res of [Only (Just role)] -> Just role _ -> N...
begriffs/jwt-auth-basic
src/Lib.hs
bsd-3-clause
327
0
14
62
118
62
56
10
2
module Bot.Source ( Source , fromText , toText ) where import Data.Text (Text) import qualified Data.Text as Text newtype Source = Source Text fromText :: Text -> Source fromText txt | Text.null txt = Source txt | Text.head txt == '@' = Source (Text.tail txt) ...
frublox/aichanbot
src/Bot/Source.hs
bsd-3-clause
410
0
10
134
138
72
66
13
1
{-# LANGUAGE TemplateHaskell #-} module Main where import Development.GitRev import qualified Data.ByteString.Lazy.Char8 as BC import qualified Data.Text.IO as T import qualified Data.Text.Lazy.IO as TL import System.IO import System.Environment import System.Exit import DataFlow.Reader import DataFlow.Core import qu...
sonyxperiadev/dataflow
cli/Main.hs
bsd-3-clause
3,157
0
14
756
950
495
455
91
8
module MultilineRe (multilineRe) where import Text.Regex.PCRE.Heavy import Text.Regex.PCRE.Light (multiline, utf8) import Language.Haskell.TH.Quote (QuasiQuoter) multilineRe :: QuasiQuoter multilineRe = mkRegexQQ [multiline, utf8]
FranklinChen/twenty-four-days2015-of-hackage
app/MultilineRe.hs
bsd-3-clause
233
0
6
23
62
40
22
6
1
{-# LANGUAGE Safe #-} ------------------------------------------------------------------------ -- | -- Module : AI.Rete -- Copyright : (c) 2015 Konrad Grzanek -- License : BSD-style (see the file LICENSE) -- Created : 2015-03-16 -- Maintainer : kongra@gmail.com -- Stability : experimental ------------...
kongra/rete
AI/Rete.hs
bsd-3-clause
1,053
0
4
306
121
86
35
31
0
{-# LANGUAGE FlexibleInstances, RecordWildCards, DeriveGeneric #-} -- | Scored tests and Gradescope JSON output for Tasty module Test.Tasty.GradeScope where import Test.Tasty import Test.Tasty.Providers import Test.Tasty.Options ( IsOption(..) , OptionSet(..) , OptionDescription(..) , lookupOption , safeRead...
PLSysSec/tasty-gradescope
src/Test/Tasty/GradeScope.hs
bsd-3-clause
8,005
0
24
1,832
1,935
1,050
885
164
4
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Stack.Init ( initProject , InitOpts (..) ) where import Control.Applicative import Co...
martin-kolinek/stack
src/Stack/Init.hs
bsd-3-clause
23,469
0
21
7,961
4,604
2,342
2,262
431
7
module Internal.Texture ( ImageTexture (..) , TextureAnimation (..) , unsafeLoadTexture , loadTexture , freeTexture ) where import Graphics.UI.SDL as SDL import Graphics.UI.SDL.Image import Graphics.Rendering.OpenGL import System.IO.Unsafe data ImageTexture = ImageTexture !TextureObject !GLfloat !GLfloat ...
c000/PaperPuppet
src/Internal/Texture.hs
bsd-3-clause
1,732
0
14
322
564
291
273
51
1
{-# language CPP #-} -- | = Name -- -- VK_FUCHSIA_external_semaphore - device extension -- -- == VK_FUCHSIA_external_semaphore -- -- [__Name String__] -- @VK_FUCHSIA_external_semaphore@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 366 -- -- [__Revision__] -- ...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_FUCHSIA_external_semaphore.hs
bsd-3-clause
27,563
0
17
5,049
3,026
1,830
1,196
-1
-1
module Data.BEncode.Type ( BEncode(..) ) where data BEncode a = BInt Integer | BString a | BList [BEncode a] | BDict [(a , BEncode a)] deriving (Eq, Ord, Read, Show) instance Functor BEncode where fmap _ (BInt x) = BInt x fmap f (BString x) = BString (f x) fmap f...
mat8913/bencode-unicode
Data/BEncode/Type.hs
bsd-3-clause
424
0
11
136
214
114
100
12
0
-- -------------------------------------------------- -- Examples of Functional images -- -------------------------------------------------- module FunctionalImages where import FunctionalImagesBase import Data.Bits -- The function to genrate a vertical strip vstrip :: Image Bool vstrip (x, y) = abs x < 0.5 -- The...
hansroland/FunctionalImages
src/FunctionalImages.hs
bsd-3-clause
1,358
0
11
261
387
205
182
27
1
-- | Generators in Haskell -- -- We translate the in-order tree traversal example from an old article -- Generators in Icon, Python, and Scheme, 2004. -- -- <http://okmij.org/ftp/Scheme/enumerators-callcc.html#Generators> -- -- using Haskell and delimited continuations rather than call/cc + mutation. -- The code is s...
suhailshergill/liboleg
Control/Generator1.hs
bsd-3-clause
2,818
2
13
650
640
340
300
34
2
{-# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE #-} ----------------------------------------------------------------------------- -- -- GHC Driver program -- -- (c) The University of Glasgow 2005 -- ----------------------------------------------------------------------------- module Main (main) wher...
mcmaniac/ghc
ghc/Main.hs
bsd-3-clause
29,902
0
27
8,294
6,414
3,314
3,100
-1
-1
{-# LANGUAGE ScopedTypeVariables, GADTs, RecordWildCards, TypeFamilies, TupleSections #-} module Llvm.Pass.Visualization where import Data.Maybe import qualified Data.Set as Ds import qualified Data.Map as Dm import qualified Data.List as L import qualified Compiler.Hoopl as H import Compiler.Hoopl import Llvm.Hir.Da...
sanjoy/hLLVM
src/Llvm/Pass/Visualization.hs
bsd-3-clause
8,625
0
21
2,572
2,994
1,518
1,476
142
8
module Main (main) where import Control.Arrow import Crypto.Random import Data.Ratio import Crypto.Ed25519.Pure import Text.Read import Data.Thyme.Clock import System.IO import System.FilePath import qualified Data.Yaml as Y import qualified Data.Set as Set import Data.Map.Strict (Map) import qualified Data.Map.Stric...
buckie/juno
executables/GenerateConfigFiles.hs
bsd-3-clause
3,927
0
22
881
1,237
652
585
78
2
{-# LINE 1 "Data.Type.Bool.hs" #-} {-# LANGUAGE Safe #-} {-# LANGUAGE TypeFamilies, TypeOperators, DataKinds, NoImplicitPrelude, PolyKinds #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Type.Bool -- License : BSD-style (see the LICENSE fi...
phischu/fragnix
builtins/base/Data.Type.Bool.hs
bsd-3-clause
1,455
0
7
371
277
164
113
-1
-1
{-# LANGUAGE TemplateHaskell #-} module Graph.VC.Input where -- $Id$ import Autolib.ToDoc import Autolib.Reader import Data.Typeable import SAT.Types data Input = Input { formel :: Formel , anzeige_groesse :: Int } deriving ( Typeable ) $(derives [makeReader, makeToDoc] [''Input]) ...
florianpilz/autotool
src/Graph/VC/Input.hs
gpl-2.0
476
7
9
123
117
71
46
14
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="ar-SA"> <title>شكل معالج | انطلق امتداد</title> <maps> <homeID>top</homeID> <mapref lo...
veggiespam/zap-extensions
addOns/formhandler/src/main/javahelp/org/zaproxy/zap/extension/formhandler/resources/help_ar_SA/helpset_ar_SA.hs
apache-2.0
1,003
90
61
160
398
203
195
-1
-1
module HOCon where import CLaSH.Prelude topEntity :: Vec 8 Int -> Vec 8 (Maybe Int) topEntity = map Just
christiaanb/clash-compiler
tests/shouldwork/Vector/HOCon.hs
bsd-2-clause
107
0
8
21
42
22
20
-1
-1
{-# OPTIONS_HADDOCK hide #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.DataType -- Copyright : (c) Sven Panne 2002-2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- P...
IreneKnapp/direct-opengl
Graphics/Rendering/OpenGL/GL/DataType.hs
bsd-3-clause
5,758
0
9
1,096
1,020
532
488
129
31
module MAAM.MonadStep where import FP class MonadStep ς m | m -> ς where mstepγ :: (a -> m b) -> ς a -> ς b mstepγP :: (MonadStep ς m) => P m -> (a -> m b) -> ς a -> ς b mstepγP P = mstepγ -- Identity instance MonadStep ID ID where mstepγ :: (a -> ID b) -> (ID a -> ID b) mstepγ = extend -- State instance (Mo...
FranklinChen/maam
src/MAAM/MonadStep.hs
bsd-3-clause
2,744
78
16
643
1,290
667
623
-1
-1
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section{SetLevels} *************************** Overview *************************** 1. We attach binding levels to Core bindings, in preparation for floating outwards (@FloatOut@). 2. We also let...
rahulmutt/ghcvm
compiler/Eta/SimplCore/SetLevels.hs
bsd-3-clause
47,432
0
21
13,761
7,629
4,077
3,552
-1
-1
-- -- Copyright © 2013-2014 Anchor Systems, Pty Ltd and Others -- -- The code in this file, and the program it is a part of, is -- made available to you by its authors as open source software: -- you can redistribute it and/or modify it under the terms of -- the 3-clause BSD licence. -- {-# LANGUAGE DeriveDataTypeable...
afcowie/vaultaire-common
lib/Vaultaire/Types/Common.hs
bsd-3-clause
2,032
0
11
377
443
252
191
40
1
import Testsuite import Data.Array.Parallel.Unlifted $(testcases [ "" <@ [t| ( (), Char, Bool, Int ) |] , "acc" <@ [t| ( (), Int ) |] , "num" <@ [t| ( Int ) |] , "ord" <@ [t| ( (), Char, Bool, Int ) |] , "enum" <@ [t| ( ...
mainland/dph
dph-test/old/Unlifted_Permutes.hs
bsd-3-clause
568
0
9
221
82
56
26
-1
-1
module WithCliSpec where import System.Environment import System.Exit import System.IO import System.IO.Silently import Test.Hspec import WithCli spec :: Spec spec = do describe "withCli" $ do context "no arguments" $ do it "executes the operat...
kosmikus/getopt-generics
test/WithCliSpec.hs
bsd-3-clause
1,614
0
22
505
485
239
246
37
1
{-# LANGUAGE OverloadedStrings #-} module Fm where import Data.List import qualified Data.Text as T import System.Random impossibles :: [[Double]] impossibles = [[1.0,1.0,1.0,4.0], [1.0,1.0,1.0,5.0], [1.0,1.0,1.0,6.0], [1.0,1.0,1.0,7.0], [1.0,1.0,1.0,12.0], [1.0,1.0,1.0,13.0...
dschalk/monads-for-functional-javascript
Fm.hs
mit
12,241
0
27
4,218
5,962
3,390
2,572
299
2
-- | -- Module : Network.TLS.Record.Engage -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- -- Engage a record into the Record layer. -- The record is compressed, added some integrity field, then encrypted. -- {-# LANGUAGE Ban...
lancelotsix/hs-tls
core/Network/TLS/Record/Engage.hs
bsd-3-clause
4,003
0
19
974
1,028
524
504
81
4
module Test18 where f [x] = [x] ++ [x] g = f [1]
kmate/HaRe
old/testing/refacFunDef/Test18AST.hs
bsd-3-clause
52
0
6
16
36
21
15
3
1
module A1 where import D1 sumSq xs ys= sum (map sq xs) + sumSquares xs main = sumSq [1..4]
kmate/HaRe
old/testing/rmOneParameter/A1_TokOut.hs
bsd-3-clause
97
0
8
25
48
25
23
4
1
module Vectorise.Env ( Scope(..), -- * Local Environments LocalEnv(..), emptyLocalEnv, -- * Global Environments GlobalEnv(..), initGlobalEnv, extendImportedVarsEnv, extendFamEnv, setPAFunsEnv, setPRFunsEnv, modVectInfo ) where import HscTypes import InstEnv import FamInstEnv import CoreSyn im...
tjakway/ghcjvm
compiler/vectorise/Vectorise/Env.hs
bsd-3-clause
9,317
0
14
2,809
1,242
730
512
116
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -- | Get information on modules, expreesions, and identifiers module GHCi.UI.Info ( ModInfo(..) , SpanInfo(..) , spanInfoFromRealSrcSpan , collectInfo ...
tjakway/ghcjvm
ghc/GHCi/UI/Info.hs
bsd-3-clause
13,975
1
21
4,161
3,405
1,738
1,667
265
5
module LiquidArray where import Language.Haskell.Liquid.Prelude (liquidAssume) {-@ set :: forall a <p :: x0: Int -> x1: a -> Prop, r :: x0: Int -> Prop>. i: Int<r> -> x: a<p i> -> a: (j: {v: Int<r> | v != i} -> a<p j>) -> (k: Int<r> -> a<p k>) @-} set :: Int -> a -> (Int -> a) -> (Int -> a) se...
mightymoose/liquidhaskell
benchmarks/esop2013-submission/Fib.hs
bsd-3-clause
1,614
0
15
484
342
186
156
20
2
{-# LANGUAGE TemplateHaskell #-} module T9738 where import System.IO import Language.Haskell.TH data Foo = MkFoo $( do decs <- [d| {-# ANN type Foo "hi" #-} {-# ANN MkFoo "there" #-} {-# ANN module "Charley" #-} |] runIO $ print decs runIO $ hFlush ...
urbanslug/ghc
testsuite/tests/th/T9738.hs
bsd-3-clause
345
0
10
125
69
36
33
11
0
-- | Reuse the memory blocks of arrays. -- -- Enable by setting the environment variable MEMORY_BLOCK_MERGING_REUSE=1. module Futhark.Optimise.MemoryBlockMerging.Reuse ( reuseInProg ) where import Futhark.MonadFreshNames import Futhark.Representation.AST import Futhark.Representation.ExplicitMemory (ExplicitMemory...
ihc/futhark
src/Futhark/Optimise/MemoryBlockMerging/Reuse.hs
isc
1,500
0
10
242
297
161
136
29
1
module Absyn where data Cmd = Print | Print_P | Label String | Sub Regex String deriving (Show) data Address = DirectAddress Int | AddressRange Address Address | AddressRE Regex deriving (Show) data Regex = RELiteral String deriving (Show) data Sta...
Roguelazer/sedc
Absyn.hs
isc
447
2
7
158
110
64
46
14
0
{-# LANGUAGE ScopedTypeVariables #-} module InstVar where class Def a where def :: a data X a = MkX a instance Def a => Def (X a) where def = MkX (def :: a)
antalsz/hs-to-coq
examples/tests/InstVar.hs
mit
160
0
7
37
64
35
29
5
0
module TeX.Parser.Prim where import Prelude ( Maybe(Just, Nothing) , show, otherwise , (==), (<*) ) import Text.Parsec (tokenPrim, getState, putState) import TeX.Parser.Parser import TeX.Token import TeX.Category runGrouped :: TeXParser a -> TeXParser a runGrouped p = do ...
spicyj/tex-parser
src/TeX/Parser/Prim.hs
mit
1,125
0
10
269
343
178
165
35
2
module App where import Graphics.UI.GLFW as GLFW import Graphics.Rendering.OpenGL as GL import Control.Concurrent.STM import Control.Monad.Trans.RWS import Events import Graphics.Object import Objects.Paddle import Objects.Ball data AppEnv = AppEnv { envWindow :: !GLFW.Window , envPaddle :: !Object , envBall :...
xymostech/hpong
src/App.hs
mit
519
0
10
95
140
86
54
25
0
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-} module Types where import Control.Lens import qualified Data.Text as T import qualified Data.Map as M import Data.Monoid class SqlShow a where sqlShow :: a -> T.Text -- Column types. When have time get all from http://www.postgresql.org/docs/8.4/static/datatype.h...
mattyhall/MigrationMerger
Types.hs
mit
2,560
0
14
762
747
393
354
58
0
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-} module Eyeshadow.Data.Options (InvocationMode(..), InvocationOptions(..)) where import Eyeshadow.Diagnostic import Eyeshadow.Prelude data InvocationMode = HelpInvocationMode | CompilationInvocationMode data InvocationOptions = InvocationOptions ...
IreneKnapp/Eyeshadow
Haskell/Eyeshadow/Data/Options.hs
mit
430
0
8
69
65
42
23
13
0
{-# OPTIONS_HADDOCK hide, prune #-} module Handler.Mooc ( getMoocHomeR, postMoocHomeR ) where --import qualified Data.Map as Map import qualified Data.Maybe as Mb import Database.Esqueleto import Import hiding ((/=.), (==.), (=.), on, isNothing, count) import Handler.Mooc.BrowseProposals import Handler.Mooc.Ed...
mb21/qua-kit
apps/hs/qua-server/src/Handler/Mooc.hs
mit
9,103
0
20
3,175
1,799
916
883
-1
-1
module Ledger.Commodity where import Control.Exception import Data.Text import Data.Commodity.Errors import Data.Commodity.Types ifCommoditiesMatch :: Text -> Amount -> Amount -> a -> a ifCommoditiesMatch op x@(Amount _ xc _) y@(Amount _ yc _) z | xc == 0 || yc == 0 || xc == yc = z | otherwise = throw (CommodityM...
ledger/commodities
Data/Commodity.hs
mit
363
0
12
66
138
73
65
9
1
{-# LANGUAGE Safe, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances, GADTs #-} module Control.Monad.Operational.Class where import Data.Monoid (Monoid) import qualified Control.Monad.Operational as Operational import Control.Monad.Trans.Class (MonadTrans, lift) import Control.M...
srijs/haskell-operational-class
src/Control/Monad/Operational/Class.hs
mit
2,648
0
9
355
782
444
338
46
1
module Upgrade.Util where import Control.Exception import Control.Monad import Control.Monad.Reader import Database.HDBC import Database.HDBC.Sqlite3 import Upgrade.Core sqlite3Context :: Connection -> Ctx IO SqlValue sqlite3Context c = Ctx { runDDL = \q -> void $ run c q [] , runDQL = \q -> ...
csierra/didactic-upgrade-monads
src/Upgrade/Util.hs
gpl-2.0
883
0
11
242
309
163
146
20
1
-- -*- mode: haskell -*- module JVM.Check where import JVM.Type import JVM.Builtin import Machine.Numerical.Config import Autolib.Reporter import Autolib.ToDoc import Autolib.Reader import Autolib.Set import Data.Typeable data Checker = Builtins (Set Statement) | Smallnums Integer deriving Typeable in...
florianpilz/autotool
src/JVM/Check.hs
gpl-2.0
1,880
8
14
695
541
264
277
-1
-1
-- Copyright (C) 2002-2005,2007 David Roundy -- Copyright (C) 2009 Reinier Lamers -- -- 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, or (at your option) -- any later v...
DavidAlphaFox/darcs
harness/Darcs/Test/Email.hs
gpl-2.0
4,311
0
17
898
766
431
335
52
2
import Control.Concurrent.Async (mapConcurrently) import System.Directory (setCurrentDirectory) import System.Environment (getArgs) import System.FilePath ((</>)) import System.FilePath.Glob (namesMatching) import PackagesNG.ParsePa...
vikraman/packages-ng
parse-packages/src/Main.hs
gpl-2.0
628
0
13
192
160
85
75
16
2
{- Copyright 2009 Victor Nazarov This file is part of LambdaInterpreter. LambdaInterpreter 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 opt...
sviperll/LambdaInterpreter
src/Lambda/Parser.hs
gpl-3.0
2,804
0
13
658
533
276
257
47
6
module GLInit where import Control.Monad.Reader import Control.Concatenative import Control.DeepSeq import Data.IORef import Data.Metrology.Show() import Data.Metrology.SI.Poly import Data.Metrology.Poly import qualified Data.Map as Map import Linear import Linear.Affine import Graphics.GLUtil import Graphics.GLUtil.C...
hesiod/xenocrat
src/exec/GLInit.hs
gpl-3.0
3,482
0
16
755
1,257
633
624
-1
-1
-- | Propositional Logic Formulas in Conjunctive Normal Form. -- This module is a model implementation of the API -- (obviously correct, but also obviously non-efficient) module Satchmo.Form.Model ( module Satchmo.Form.Types , CNF, cnf, C , size , variables, clauses, clausesL , smallest_clauses , empty_clauses , get...
jwaldmann/satchmo-solver
src/Satchmo/Form/Model.hs
gpl-3.0
2,537
0
13
551
841
445
396
75
3
{-# LANGUAGE CPP, GeneralizedNewtypeDeriving, BangPatterns, ParallelListComp #-} {-# OPTIONS_GHC -Wall #-} import System.IO import qualified Data.Array import Control.Applicative import Control.DeepSeq import Control.Monad import Control.Monad.State import Control.Monad.Trans.Error import Control.Monad.ST import Data...
dasuxullebt/inflate.hs
inflate.runST.hs
gpl-3.0
26,165
0
21
7,681
7,204
3,732
3,472
423
10
-- Translation Module -- By Gregory W. Schwartz {- | Collects all functions pertaining to the translation of nucleotides to amino acids for Text. -} {-# LANGUAGE OverloadedStrings #-} module Data.Fasta.Text.Translation ( codon2aa , customCodon2aa ...
GregorySchwartz/fasta
src/Data/Fasta/Text/Translation.hs
gpl-3.0
4,340
0
15
1,809
1,078
587
491
62
2
{-# OPTIONS -Wall #-} module Data.MArray ( MArray, mEmpty, mIndex, mSubArray, arrayUpdate, killSub, order ) where -- Copyright 2007, 2010 Antoine Latter -- aslatter@gmail.com import Data.Map import ...
aslatter/hmumps
Data/MArray.hs
gpl-3.0
2,936
0
12
864
873
446
427
59
2
{- Created : 2014 Nov 25 (Tue) 18:20:43 by Harold Carr. Last Modified : 2014 Nov 25 (Tue) 21:29:27 by Harold Carr. -} import Parsing import Test.HUnit as T import Test.HUnit.Util as U -- HOMEWORK 7 -----------------------------------------------------------------------------...
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2014-10-edx-delft-fp101x-intro-to-fp-erik-meijer/hw07-parsing.hs
unlicense
2,371
0
17
493
628
359
269
51
1
import System.IO import Data.Char (toUpper) main :: IO () main = do inh <- openFile "input.txt" ReadMode outh <- openFile "out.txt" WriteMode inpStr <- hGetContents inh let result = processData inpStr hPutStr outh result hClose inh hClose outh processData :: String -> String processData =...
EricYT/Haskell
src/real_haskell/chapter-7/toupper-lazy.hs
apache-2.0
333
0
10
78
114
52
62
13
1
-- Digit Number -- http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0002 digits :: Int -> Int -> Int digits n a | a == 0 = n | otherwise = digits (n + 1) (a `div` 10) ans :: (Int,Int) -> Int ans (a,b) = digits 0 (a + b) main = do c <- getContents let i = map (map read . words) $ lines c :: [[...
a143753/AOJ
0002.hs
apache-2.0
413
0
15
111
215
113
102
12
1
{-# LANGUAGE BangPatterns, CPP, Rank2Types #-} {-# OPTIONS_HADDOCK not-home #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Text.Internal.Builder -- Copyright : (c) 2013 Bryan O'Sullivan -- (c) 2010 Johan Tibell -- License : BSD-style (se...
text-utf8/text
Data/Text/Internal/Builder.hs
bsd-2-clause
10,858
0
17
2,504
1,917
1,066
851
155
2
{- System.Process enhancements, including additional ways of running - processes, and logging. - - Copyright 2012-2015 Joey Hess <id@joeyh.name> - - License: BSD-2-clause -} {-# LANGUAGE CPP, Rank2Types #-} {-# OPTIONS_GHC -fno-warn-tabs #-} module Utility.Process ( module X, CreateProcess(..), StdHandle(..)...
np/propellor
src/Utility/Process.hs
bsd-2-clause
11,557
220
16
2,156
3,022
1,643
1,379
259
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} -- | -- Module: Database.Ocilib.Connection -- Copyright: (c) 2016 Thierry Bourrillon -- (c) 2016 FPInsight, Eurl. -- License: BSD3 -- Maintainer: Thierry Bourrillon <thierry.bourrillon@fpin...
fpinsight/hocilib
src/Database/Ocilib/Connection.hs
bsd-2-clause
6,818
0
17
1,188
390
224
166
38
1
{-# LANGUAGE TemplateHaskell,TypeFamilies,EmptyDataDecls,DeriveDataTypeable,GADTs #-} module Model where import Prelude import Yesod import Data.Text (Text) import Database.Persist.Quasi import Database.Persist.MongoDB hiding (master) import Language.Haskell.TH.Syntax import Data.Typeable (Typeable) import Data.Mayb...
hirokai/PaperServer
Model.hs
bsd-2-clause
3,145
0
15
788
537
301
236
44
1
{-# LANGUAGE FlexibleContexts #-} module Mote.Util where import Control.Monad ((<=<), liftM) import Control.Monad.IO.Class (MonadIO, liftIO) import Control.Concurrent.MVar(modifyMVar_, readMVar, newMVar) import qualified Data.Map as M import Data.Maybe ...
imeckler/mote
Mote/Util.hs
bsd-3-clause
4,101
0
13
1,121
1,392
731
661
-1
-1
{-# LANGUAGE OverloadedStrings #-} module DTX2MIDI.MIDISpec where import Codec.Midi (Midi (..)) import qualified Codec.Midi as Midi import DTX2MIDI.MIDI import Test.Hspec spec :: Spec spec = do describe "bpmToTempo" $ do it "returns tempo which has a specified bpm" $ do bpmToTempo 120 `shouldBe` 500000 ...
akiomik/dtx2midi
test/DTX2MIDI/MIDISpec.hs
bsd-3-clause
2,261
0
20
910
700
379
321
56
1
{-# LANGUAGE TypeFamilies #-} {-| Module : Numeric.AERN.RmToRn.Integration Description : integrators of function enclosures Copyright : (c) Michal Konecny License : BSD3 Maintainer : mikkonecny@gmail.com Stability : experimental Portability : portable Integra...
michalkonecny/aern
aern-realfn/src/Numeric/AERN/RmToRn/Integration.hs
bsd-3-clause
1,961
0
11
512
205
113
92
30
1
{-# LANGUAGE DeriveDataTypeable #-} module Language.JavaScript.Parser.AST ( Node (..) , JSNode(..) , SrcSpan (..) , AlexPosn(..) , showStripped ) where import Data.Data import Data.List import Language.JavaScript.Parser.SrcLocation (SrcSpan(..), AlexPosn(..)...
thdtjsdn/language-javascript
src/Language/JavaScript/Parser/AST.hs
bsd-3-clause
7,732
0
13
2,013
2,540
1,294
1,246
129
1
{-# LANGUAGE OverloadedStrings, TemplateHaskell, Trustworthy #-} -- | -- Maintainer : Ricky Elrod <ricky@elrod.me> -- Stability : stable -- -- Contains data types/constructors for individual sandbox runs. -- For example, the compile step will produce a 'SandboxResult', which is -- defined in this module. The executi...
eval-so/cruncher-types
src/Evalso/Cruncher/SandboxResult.hs
bsd-3-clause
1,730
0
15
444
286
167
119
32
0
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} -- | -- Module: $HEADER$ -- Description: Create Default instances using GHC Generics. -- Copyright: (c) 2016-2017 Peter Trško -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com...
trskop/data-default-instances-unordered-containers
extra/src/Data/Default/Generic.hs
bsd-3-clause
2,651
0
8
576
305
198
107
33
1
module DTD where import Xml2Haskell {-Type decls-} newtype Persons = Persons [Person] deriving (Eq,Show) data Person = Person_Male_FathersName Person_Attrs Male (Maybe FathersName) | Person_Female_MothersName Person_Attrs Female (Maybe MothersName) deriving (Eq,Show) data Person_Attrs = P...
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/bugs/malc.hs
bsd-3-clause
3,543
96
18
859
1,428
786
642
104
0
----------- -- Halma -- ----------- module Halma (Halma, halma) where import Game import Data.Array -- import Graphics.UI.WX import Graphics.UI.WX hiding (border, empty, point) import Graphics.UI.WXCore hiding (empty, point) import Tools data Halma = Halma (Array (Int, Int) (Maybe Player)) deriving (Eq, Show) ...
HJvT/GeBoP
Halma.hs
bsd-3-clause
10,720
0
27
3,949
5,591
2,973
2,618
188
8
----------------------------------------------------------------------------- -- | -- Module : Berp.Compile.PrimName -- Copyright : (c) 2010 Bernie Pope -- License : BSD-style -- Maintainer : florbitous@gmail.com -- Stability : experimental -- Portability : ghc -- -- Names for primtive functions used in t...
bjpop/berp
libs/src/Berp/Compile/PrimName.hs
bsd-3-clause
4,753
0
7
878
1,510
813
697
174
2
-- Lightweight calculus for composing patterns as functions. {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ViewPatterns #-} {- | Module : Verifier.SAW.Recognizer Copyright : Galois, Inc. 2012-2015 License ...
iblumenfeld/saw-core
src/Verifier/SAW/Recognizer.hs
bsd-3-clause
7,871
166
9
1,849
3,202
1,740
1,462
187
3
----------------------------------------------------------------------------- -- | -- Copyright : (C) 2015 Dimitri Sabadie -- License : BSD3 -- -- Maintainer : Dimitri Sabadie <dimitri.sabadie@gmail.com> -- Stability : experimental -- Portability : portable -- --------------------------------------------------...
phaazon/igl
src/Graphics/Rendering/IGL/Texture.hs
bsd-3-clause
2,670
0
15
332
606
325
281
50
1
-- Copyright (c) 2016 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/iridium
src/IR/FlatIR/LLVMGen/Types.hs
bsd-3-clause
6,684
4
18
1,668
1,495
811
684
96
5
-- 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. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. module Duckling.Ti...
rfranek/duckling
tests/Duckling/Time/HE/Tests.hs
bsd-3-clause
590
0
9
95
80
51
29
11
1
import Test.QuickCheck myReverse :: [a] -> [a] myReverse [] = [] myReverse (x:xs) = myReverse xs ++ [x] prop_revReverse :: [Int] -> Bool prop_revReverse xs = xs == (myReverse $ myReverse xs) prop_revConcat :: [Int] -> [Int] -> Bool prop_revConcat xs ys = myReverse (xs ++ ys) == myReverse ys ++ myReverse xs main = ...
SandeepTuniki/99-Haskell-Problems
src/problem5.hs
bsd-3-clause
384
0
9
73
162
83
79
11
1