code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
import Control.Concurrent (forkIO, threadDelay)
import Control.Concurrent.Chan (Chan, newChan, readChan, writeChan, writeList2Chan)
import Control.Exception (catch, IOException)
import Control.Monad (forever, forM_, when)
--import Debug.Trace (traceIO)
import Net... | cdepillabout/brazile-web-scraper | src/Search-Results-Main.hs | gpl-2.0 | 7,214 | 4 | 15 | 2,767 | 1,220 | 664 | 556 | 84 | 2 |
-- FINISHED
groupCheck :: String -> Bool
groupCheck input =
let subs = iterate removeSubformula input in
stableTail subs == ""
removeSubformula :: String -> String
removeSubformula = helper ""
where
helper acc str =
case str of
"" -> acc
'(' : ')' : rest -> acc ++ rest
'[' : ... | friedbrice/codewars | haskell/GroupCheck.hs | gpl-3.0 | 822 | 0 | 11 | 238 | 389 | 200 | 189 | 27 | 5 |
import Control.Monad
import qualified Data.Map as Map
import qualified Data.ByteString.Lazy as BSL
import qualified Data.ByteString.Lazy.UTF8 as BUL
import Data.List
import Data.Maybe
import Hellnet
import Hellnet.Crypto
import Hellnet.Fi... | Voker57/hellnet | hell-dir.hs | gpl-3.0 | 11,052 | 612 | 10 | 2,307 | 3,200 | 1,898 | 1,302 | 231 | 12 |
{-# LANGUAGE CPP #-}
-- |
-- Module : Commands.Install
-- Copyright : (C) 2012-2020 Jens Petersen
--
-- Maintainer : Jens Petersen <petersen@fedoraproject.org>
-- Stability : alpha
-- Portability : portable
--
-- Explanation: installs rpms of package and dependencies
-- This program is free software: y... | juhp/cabal-rpm | src/Commands/Install.hs | gpl-3.0 | 2,310 | 0 | 18 | 412 | 519 | 273 | 246 | 40 | 2 |
{-# LANGUAGE OverloadedStrings #-}
-- | This module exports definitions for some most used classes and methods from standard Java java.io package.
module Java2js.Java.IO where
import Data.String
import Java2js.JVM.Common () -- import instances only
import Java2js.JVM.ClassFile
import qualified Java2js.Java.Lang
--... | ledyba/java.js | lib/Java2js/Java/IO.hs | gpl-3.0 | 964 | 0 | 9 | 158 | 187 | 106 | 81 | 18 | 1 |
main = putStr "Hello, World!\n"
| jmahler/shootout | hello/haskell/hello.hs | gpl-3.0 | 33 | 1 | 4 | 6 | 12 | 4 | 8 | 1 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
-- Module : Network.AWS.EC2
-- Copyright : (c) 2013 Brendan Hay <brendan.g.hay@gmail.com>
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public License, v. 2.0... | zinfra/khan | amazonka-limited/src/Network/AWS/EC2.hs | mpl-2.0 | 270,992 | 0 | 10 | 63,474 | 10,152 | 7,722 | 2,430 | 836 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/RegionInstanceGroupManagers/Delete.hs | mpl-2.0 | 5,453 | 0 | 17 | 1,157 | 554 | 332 | 222 | 91 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetMultipleForAllPlayers.hs | mpl-2.0 | 3,661 | 0 | 13 | 756 | 316 | 195 | 121 | 54 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/Hl7V2Stores/Delete.hs | mpl-2.0 | 5,654 | 0 | 15 | 1,186 | 699 | 410 | 289 | 111 | 1 |
module Main where
import qualified Snap.Assets as A
import Snap.Core
import Snap.Http.Server
import System.Directory
import Control.Applicative
assets :: [ A.Asset ]
assets =
[ A.Asset "frameworks.js" $ A.concatBuilder
[ "frameworks/jquery-1.7.1.js"
, "frameworks/backbone.js"
, "framework... | wereHamster/snap-assets | src/CLI.hs | unlicense | 607 | 0 | 11 | 137 | 161 | 87 | 74 | 19 | 1 |
-- Copyright 2016 TensorFlow authors.
--
-- 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 agree... | tensorflow/haskell | tensorflow/src/TensorFlow/Types.hs | apache-2.0 | 20,476 | 0 | 14 | 4,724 | 4,739 | 2,631 | 2,108 | -1 | -1 |
import Data.List
mark = ["R", "G", "B"]
f [] = True
f a@(h:t) = (r1 && (f (a \\ [h,h,h]))) || (r2 && (f (a \\ [h,h+1,h+2])))
where
nh = length $ filter (== h) a
r1 = nh >= 3
r2 = (elem (h+1) a) && (elem (h+2) a)
tst c =
let n = sort $ map snd c
in
f n
ans' c =
let cc = map (\m -> filter (\cc ... | a143753/AOJ | 2102.hs | apache-2.0 | 616 | 16 | 17 | 218 | 466 | 223 | 243 | 25 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE Trustworthy #-}
-- |
-- Module : Criterion.Report
-- Copyright : (c) 2009-2014 Bryan O'Sullivan
--
-- Lice... | bos/criterion | Criterion/Report.hs | bsd-2-clause | 11,556 | 0 | 15 | 2,772 | 2,236 | 1,254 | 982 | 169 | 4 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.ARB.FragmentShader
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/FragmentShader.hs | bsd-3-clause | 871 | 0 | 4 | 103 | 59 | 47 | 12 | 8 | 0 |
import Music.Prelude
rh :: Music
rh = [((1/2) <-> (3/4),e)^.event,((3/4) <-> (15/16),cs')^.event,((15/16) <-> 1,d')^.event,(1 <-> (5/4),d)^.event,(1 <->
(5/4),gs)^.event,(1 <-> (5/4),b)^.event,((5/4) <-> (3/2),d)^.event,((5/4) <-> (3/2),gs)^.event,((5/4) <->
(3/2),b)^.event,((3/2) <-> 2,d)^.event,((3/2) <-> 2,gs)... | music-suite/music-preludes | examples/chopin.hs | bsd-3-clause | 2,272 | 2 | 11 | 223 | 2,218 | 1,279 | 939 | 25 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Gfx.TextRendering
( createTextRenderer
, renderText
, renderTextToBuffer
, addCodeTextureToLib
, resizeTextRendererScreen
, changeTextColour
, TextRenderer
) where
import Control.Monad (foldM_)
import Data.Maybe (li... | rumblesan/proviz | src/Gfx/TextRendering.hs | bsd-3-clause | 12,937 | 0 | 19 | 4,540 | 3,195 | 1,678 | 1,517 | -1 | -1 |
-- 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.
{-# LANGUAGE GADT... | rfranek/duckling | Duckling/Rules/TR.hs | bsd-3-clause | 1,004 | 0 | 7 | 166 | 290 | 159 | 131 | 23 | 1 |
module Network.Tangaroa.Role
( becomeFollower
, becomeLeader
, becomeCandidate
, checkElection
, setVotedFor
) where
import Network.Tangaroa.Timer
import Network.Tangaroa.Types
import Network.Tangaroa.Combinator
import Network.Tangaroa.Util
import Network.Tangaroa.Sender
import Control.Lens hiding (Index)... | chrisnc/tangaroa | src/Network/Tangaroa/Role.hs | bsd-3-clause | 2,033 | 0 | 11 | 385 | 599 | 301 | 298 | -1 | -1 |
{-# LANGUAGE DataKinds, TypeFamilies, TypeOperators #-}
module Text.Printf.Safe.Combinators (-- * Smart constructors
type (<>), (><), (%), (+++),
-- * Basic formatters
s, _S, _shows,
... | konn/safe-printf | src/Text/Printf/Safe/Combinators.hs | bsd-3-clause | 2,980 | 4 | 14 | 840 | 1,122 | 616 | 506 | -1 | -1 |
{-
THIS FILE IS COPY FROM PROJECT: https://github.com/chrisdone/haskellnews
-}
-- | Display times as a relative duration. E.g. x days ago.
module Data.Time.Relative where
import Data.List
import Data.Time
import Text.Printf
-- | Display a time span as one time relative to another.
relativeZoned :: ZonedTime -- ^... | HaskellCNOrg/snap-web | src/Data/Time/Relative.hs | bsd-3-clause | 1,935 | 0 | 17 | 578 | 580 | 348 | 232 | 41 | 4 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
module Dhall.JSON.Util
( pattern V
, pattern FA
) where
import Data.Text (Text)
import Dhall.Core (Expr, FieldSelection)
import qualified Dhall.Core as Core
pattern V :: Int -> Expr s a
pattern V n = Core.Var (Core.V "_" n)
pattern ... | Gabriel439/Haskell-Dhall-Library | dhall-json/src/Dhall/JSON/Util.hs | bsd-3-clause | 430 | 0 | 9 | 87 | 136 | 75 | 61 | 13 | 0 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- | Contains a debug function to dump parts of the GHC.Hs AST. It uses a syb
-- traversal which falls back to displaying based on the constructor name, so... | sdiehl/ghc | compiler/GHC/Hs/Dump.hs | bsd-3-clause | 7,670 | 0 | 25 | 3,073 | 2,063 | 1,074 | 989 | 150 | 18 |
{-# LANGUAGE JavaScriptFFI, GeneralizedNewtypeDeriving #-}
module GHCJS.Three.FontLoader
( FontLoader(..), mkFontLoader, loadFont
) where
import GHCJS.Types
import qualified GHCJS.Marshal as M
import GHCJS.Foreign.Callback
import GHCJS.Concurrent
import GHCJS.Three.Monad
newtype FontLoader = FontLoader {
... | manyoo/ghcjs-three | src/GHCJS/Three/FontLoader.hs | bsd-3-clause | 1,083 | 16 | 9 | 187 | 311 | 165 | 146 | 23 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
--our libraries
import Demo2Shared
--vchan library
import VChanUtil
-- crypto libraries
import Crypto.Random
import Crypto.PubKey.HashDescr
import Crypto.PubKey.RSA
import Crypto.PubKey.RSA.PKCS15
-- utility libraries
import Control.Exception hiding (evaluate)
import Control.Mon... | armoredsoftware/protocol | demos/demo2/Attestation.hs | bsd-3-clause | 4,564 | 5 | 15 | 1,303 | 1,400 | 666 | 734 | 124 | 2 |
{-# OPTIONS -XOverlappingInstances
-XTypeSynonymInstances
-XFlexibleInstances
-XUndecidableInstances
-XOverloadedStrings
#-}
-----------------------------------------------------------------------------
--
-- Module : Data.RefSerialize
-- Copyright ... | agocorona/RefSerialize | Data/RefSerialize - copia.hs | bsd-3-clause | 17,844 | 0 | 26 | 5,492 | 4,075 | 2,129 | 1,946 | 279 | 6 |
module Renderer
(
AgentObservable
, renderSugarScapeFrame
) where
import FRP.BearRiver
import qualified Graphics.Gloss as GLO
import AgentMonad
import Discrete
import Model
type SugEnvironmentRenderer = EnvRendererDisc2d SugEnvCell
type SugarScapeAgentRenderer = Ag... | thalerjonathan/phd | thesis/code/concurrent/sugarscape/SugarScapePure/src/Renderer.hs | gpl-3.0 | 3,199 | 0 | 14 | 1,003 | 929 | 500 | 429 | 65 | 1 |
import Graphics.UI.GLUT
import Data.IORef
type Point3 = (GLfloat,GLfloat,GLfloat)
type Point2 = (GLfloat,GLfloat)
type RadiusF = GLfloat
type Vertices = Int
main :: IO ()
main = do
(_progName, _args) <- getArgsAndInitialize
_window <- createWindow "Hello world"
object <- newIORef 0.5
displayCallback $= display ob... | hherman1/BindingOfHaskell | OldMain.hs | gpl-3.0 | 1,105 | 7 | 13 | 190 | 485 | 239 | 246 | 31 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main ( main ) where
import Prelude hiding (putStr)
import Control.Arrow ((&&&))
import Data.ByteString (putStr)
import Data.List (intercalate, sort)
import Data.String (fromString)
import Data.Yaml
import System.Environment (getArgs)
omg cartridgeVersion torVersions = object
... | xkollar/tor-openshift | utils/manifestgen/main.hs | agpl-3.0 | 1,824 | 0 | 13 | 327 | 693 | 393 | 300 | 43 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ViewPatterns #-}
module WithCli.ResultSpec where
import Data.Char
import Data.List
import Safe
import System.Exit
import Test.Hspec
import Test.QuickCheck hiding (Result(..))
import WithCli.Result
... | kosmikus/getopt-generics | test/WithCli/ResultSpec.hs | bsd-3-clause | 1,648 | 0 | 31 | 538 | 537 | 268 | 269 | 45 | 3 |
-----------------------------------------------------------------------------
--
-- Makefile Dependency Generation
--
-- (c) The University of Glasgow 2005
--
-----------------------------------------------------------------------------
{-# LANGUAGE CPP #-}
module ETA.Main.DriverMkDepend (
doMkDependHS
) wher... | pparkkin/eta | compiler/ETA/Main/DriverMkDepend.hs | bsd-3-clause | 14,939 | 11 | 36 | 4,651 | 2,759 | 1,454 | 1,305 | 214 | 6 |
{-# LANGUAGE ForeignFunctionInterface #-}
module Network.LambdaBridge where
-- Nothing right now | andygill/lambda-bridge | Network/LambdaBridge.hs | bsd-3-clause | 99 | 0 | 3 | 13 | 8 | 6 | 2 | 2 | 0 |
module Binpack.ParamTH where
import Binpack.Param
import Inter.Types () -- get some default instances
| Erdwolf/autotool-bonn | src/Binpack/ParamTH.hs | gpl-2.0 | 107 | 0 | 4 | 18 | 20 | 13 | 7 | 3 | 0 |
{-# LANGUAGE CPP #-}
module RnSplice (
rnTopSpliceDecls,
rnSpliceType, rnSpliceExpr, rnSplicePat, rnSpliceDecl,
rnBracket,
checkThLocalName
#ifdef GHCI
, traceSplice, SpliceInfo(..)
#endif
) where
#include "HsVersions.h"
import Name
import NameSet
import HsSyn
import RdrName... | oldmanmike/ghc | compiler/rename/RnSplice.hs | bsd-3-clause | 30,024 | 0 | 21 | 9,152 | 2,261 | 1,176 | 1,085 | 160 | 5 |
module Yi.Keymap.Vim.TextObject
( TextObject(..)
, CountedTextObject(..)
, regionOfTextObjectB
, changeTextObjectCount
, changeTextObjectStyle
, stringToTextObject
) where
import Control.Monad (replicateM_, (<=<))
import Yi.Buffer.Adjusted
import Yi.Keymap.Vim.StyledRegion (StyledRegion (..)... | TOSPIO/yi | src/library/Yi/Keymap/Vim/TextObject.hs | gpl-2.0 | 2,626 | 0 | 10 | 572 | 711 | 388 | 323 | 59 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
-- | Generate haddocks
module Stack.Build.Haddock
( copyDepHaddocks
, generat... | Denommus/stack | src/Stack/Build/Haddock.hs | bsd-3-clause | 10,081 | 0 | 22 | 3,345 | 1,993 | 1,003 | 990 | 209 | 7 |
<?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="az-AZ">
<title>Report Generation</title>
<maps>
<homeID>reports</homeID>
<mapref locati... | thc202/zap-extensions | addOns/reports/src/main/javahelp/org/zaproxy/addon/reports/resources/help_az_AZ/helpset_az_AZ.hs | apache-2.0 | 966 | 77 | 66 | 156 | 407 | 206 | 201 | -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="fil-PH">
<title>AJAX Spider | ZAP Extensions</title>
<maps>
<homeID>top</homeID>
<mapr... | ccgreen13/zap-extensions | src/org/zaproxy/zap/extension/spiderAjax/resources/help_fil_PH/helpset_fil_PH.hs | apache-2.0 | 975 | 80 | 66 | 160 | 415 | 210 | 205 | -1 | -1 |
{-# LANGUAGE RankNTypes, ScopedTypeVariables #-}
module ShouldCompile where
import Control.Monad.ST
import Data.STRef
-- (Modified now that we don't have result type signatures)
f:: forall s. ST s Int
f = do v <- newSTRef 5
let g :: ST s Int
-- ^ should be in scope
g = readSTRef v
... | urbanslug/ghc | testsuite/tests/typecheck/should_compile/tc105.hs | bsd-3-clause | 326 | 0 | 10 | 94 | 73 | 39 | 34 | 9 | 1 |
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
{-# LANGUAGE RecordWildCards #-}
import Data.Foldable (for_)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Scrabble (scoreLetter, scoreWord)
main :: IO ()
main = hspecWith defaultConfi... | exercism/xhaskell | exercises/practice/scrabble-score/test/Tests.hs | mit | 2,527 | 0 | 12 | 1,134 | 514 | 307 | 207 | 54 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StandaloneDeriving #-}
module Web.Socket where
import Control.Applicative
import Control.Concurrent.Async as Async
import Control.Exception ... | tonyday567/web-play | src/Web/Socket.hs | mit | 6,605 | 0 | 32 | 2,350 | 1,935 | 953 | 982 | 175 | 3 |
{-# OPTIONS_GHC -Wall #-}
module LeftistHeap where
import Control.Arrow
data Heap a = Leaf | Node Int a (Heap a) (Heap a) deriving (Eq, Show)
empty :: Heap a
empty = Leaf
isEmpty :: Heap a -> Bool
isEmpty Leaf = True
isEmpty _ = False
merge :: Ord a => Heap a -> Heap a -> Heap a
merge h Leaf = h
merge Leaf h =... | jtobin/okasaki | working/LeftistHeap.hs | mit | 2,428 | 0 | 10 | 623 | 1,048 | 520 | 528 | 57 | 4 |
module Grammar.Greek.Script.Rounds.WordPunctuationElision where
import Data.Either
import Data.Either.Validation
import Grammar.Common.Round
import Grammar.Common.Types
import Grammar.Greek.Script.Types
data InvalidWordPunctuation
= InvalidWordPunctuation [WordPunctuation]
| EmptyWord
deriving (Show)
wordPunct... | ancientlanguage/haskell-analysis | greek-script/src/Grammar/Greek/Script/Rounds/WordPunctuationElision.hs | mit | 1,233 | 0 | 19 | 257 | 450 | 238 | 212 | -1 | -1 |
module ReaderPractice where
import Control.Applicative
import Data.Maybe
x = [1, 2, 3]
y = [4, 5, 6]
z = [7, 8, 9]
-- lookup :: Eq a => a -> [(a, b)] -> Maybe b
-- zip x and y using 3 as the lookup key
xs :: Maybe Integer
xs = lookup 3 $ zip x y
-- zip y and z using 6 as the lookup key
ys :: Maybe Integer
ys = loo... | mudphone/HaskellBook | src/ReaderPractice.hs | mit | 1,771 | 0 | 12 | 456 | 755 | 407 | 348 | 48 | 1 |
{-# htermination (maximumMyInt :: (List MyInt) -> MyInt) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data MyInt = Pos Nat | Neg Nat ;
data Nat = Succ Nat | Zero ;
data Ordering = LT | EQ | GT ;
foldl :: (b -> a -> b) -> b -> (List a) -> b;
foldl... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/maximum_5.hs | mit | 1,963 | 0 | 9 | 454 | 883 | 474 | 409 | 54 | 1 |
module Simulation.Node.Endpoint.Behavior.Descriptor
( Descriptor (..)
) where
import Control.Concurrent.Async (Async)
import Control.Concurrent.STM (TVar)
import Data.Text (Text)
import Simulation.Node.SystemCounter (SystemCounter)
-- | A descriptor for an installed, active, behavior.
data Descriptor c ... | kosmoskatten/programmable-endpoint | src/Simulation/Node/Endpoint/Behavior/Descriptor.hs | mit | 626 | 0 | 10 | 162 | 157 | 91 | 66 | 16 | 0 |
{-# LANGUAGE UnicodeSyntax #-}
{-|
Module : LinearRegression
Description : Gradient Descent
Copyright : (c) Fabrício Olivetti, 2017
License : GPL-3
Maintainer : fabricio.olivetti@gmail.com
Applies gradient descent to a linear regression problem.
-}
module LinearRegression where
import Control.Parallel.S... | folivetti/BIGDATA | 07 - Regressão/LinearRegression.hs | mit | 1,676 | 0 | 12 | 428 | 671 | 361 | 310 | 33 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ViewPatterns #-}
module Nix.Expr where
import qualified Prelude as P
import Nix.Common
import qualified Data.HashMap.Strict as H
import qualified Data.HashSet as HS
import qualified Data.Text as T
data FuncA... | adnelson/simple-nix | src/Nix/Expr.hs | mit | 8,108 | 0 | 21 | 2,087 | 3,292 | 1,629 | 1,663 | 212 | 7 |
module Withdrawal where
import qualified Rest
import Network.HTTP.Conduit
import Network.HTTP.Types
import qualified Data.ByteString.Char8 as C8
import qualified Data.ByteString.Lazy.Char8 as LC8
import Data.String (fromString)
requests :: IO (Response LC8.ByteString)
requests = Rest.post "/withdrawal_requests/" []
... | GildedHonour/BitstampApi | src/Withdrawal.hs | mit | 590 | 0 | 10 | 119 | 154 | 88 | 66 | 12 | 1 |
{-# LANGUAGE GADTs, OverloadedStrings, ScopedTypeVariables, FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances, DefaultSignatures, DeriveGeneric #-}
-- | Types representable as columns in Selda's subset of SQL.
module Database.Selda.SqlType
( SqlType (..), SqlEnum (..)
, Lit (..), UUID, UUID', RowID, ID, SqlVa... | valderman/selda | selda/src/Database/Selda/SqlType.hs | mit | 14,615 | 0 | 10 | 3,461 | 4,313 | 2,254 | 2,059 | 359 | 1 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.ScriptProfileNode (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.ScriptProfileNode
#else
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
import GHCJS.DOM.JSF... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/ScriptProfileNode.hs | mit | 364 | 0 | 5 | 33 | 33 | 26 | 7 | 4 | 0 |
module Verba.Utils where
-- Checks if the first list is contained in the
-- second list.
supersetOf :: (Eq a) => [a] -> [a] -> Bool
supersetOf set maybeSs = all (\x -> x `elem` maybeSs) set
| Jefffrey/Verba | src/Verba/Utils.hs | mit | 191 | 0 | 8 | 38 | 65 | 38 | 27 | 3 | 1 |
module EDDA.Types where
import qualified Data.Text as T
import qualified Data.Text.Encoding as TE
import qualified Data.ByteString.Char8 as C
import qualified Data.HashSet as HS
import qualified Data.HashMap.Strict as HM
import qualified Data.Vector as V
import Control.Monad.Trans.Reader
import Data.Time
import Data.... | troydm/edda | src/EDDA/Types.hs | mit | 6,752 | 0 | 10 | 2,088 | 1,239 | 726 | 513 | 118 | 2 |
module Entity
where
import Control.Monad.State
import Graphics.Rendering.OpenGL as OpenGL
import OpenGLUtils
import Utils
-- Entity stuff
data Entity = Entity {
position :: GLvector3
, velocity :: GLvector3
, acceleration :: GLvector3
, rotation :: GLdouble
, angVelocity :: GLdouble
, ang... | anttisalonen/starrover2 | src/Entity.hs | mit | 2,435 | 0 | 15 | 483 | 866 | 462 | 404 | 50 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #-}
{-# LANG... | ricardopenyamari/ir2haskell | clir-parser-haskell-master/lib/sexp-grammar/test/Main.hs | gpl-2.0 | 8,533 | 0 | 20 | 1,766 | 2,752 | 1,387 | 1,365 | 194 | 1 |
-- udisksevt source file
-- Copyright (C) Vladimir Matveev, 2010
-- Datatypes collection module
module UDisksEvt.Datatypes where
import Data.Map (Map)
import DBus.Client (Client)
import DBus.Types
import Control.Concurrent.STM (TVar)
import Text.ParserCombinators.Parsec (GenParser)
-- Main configuration datatype
d... | netvl/udisksevt | UDisksEvt/Datatypes.hs | gpl-2.0 | 2,569 | 0 | 11 | 1,059 | 420 | 251 | 169 | 41 | 0 |
import System.Random
import System.IO (hFlush, stdout)
import Data.Maybe (fromJust)
import Data.List.Split (chunksOf)
import Data.Map (Map)
import qualified Data.Map as Map
import qualified System.IO.Strict as S
accumF a b = (a + b, a + b)
ns = [7,6..1]
lastTplLst s = Map.singleton (last s) 1
lastN n xs = reverse (tak... | jsavatgy/dit-doo | too-old/too-old-01.hs | gpl-2.0 | 3,405 | 0 | 13 | 607 | 975 | 497 | 478 | 64 | 1 |
{-# LANGUAGE OverloadedStrings, TypeFamilies #-}
module Lamdu.GUI.ExpressionEdit
( make
) where
import Control.Lens.Operators
import Control.Lens.Tuple
import qualified Data.List as List
import qualified Graphics.UI.Bottle.Font as Font
import qualified Graphics.UI.Bottle.Widget as Widget
im... | da-x/lamdu | Lamdu/GUI/ExpressionEdit.hs | gpl-3.0 | 3,900 | 0 | 20 | 960 | 925 | 525 | 400 | -1 | -1 |
{-# LANGUAGE FlexibleInstances, FlexibleContexts, TypeSynonymInstances,
ScopedTypeVariables, OverloadedStrings, NoMonomorphismRestriction #-}
-----------------------------------------------------------------------------
-- |
-- Module : HEP.Parser.LHE.Sanitizer
-- Copyright : (c) 2011-2013 Ian-Woo... | wavewave/LHE-sanitizer | src/HEP/Parser/LHE/Sanitizer.hs | gpl-3.0 | 1,895 | 0 | 15 | 373 | 419 | 229 | 190 | 28 | 1 |
{-# LANGUAGE ViewPatterns, OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
module VSim.Data.NamePath (
Ident
, NamePathElem
) where
import Data.Typeable
import Data.Generics
import Data.Bits (xor)
import qualified Data.ByteString.Char8 as B
import Data.List
import Data.Maybe
import Control.Mon... | grwlf/vsim | src/VSim/Data/NamePath.hs | gpl-3.0 | 2,619 | 0 | 10 | 503 | 504 | 283 | 221 | 60 | 5 |
-- Exercício 02: Crie uma função projectEuler5 que retorna o primeiro número natural que retorna True para a função do exercício anterior. Pense em como reduzir o custo computacional.
divisivel20 :: Integer -> Bool
divisivel20 x = dividir x 20
dividir :: Integer -> Integer -> Bool
dividir x y
| y == 1 = T... | danielgoncalvesti/BIGDATA2017 | Atividade01/Haskell/Activity1/Exercises3/Ex2.hs | gpl-3.0 | 462 | 0 | 12 | 117 | 129 | 64 | 65 | 9 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-affiliates/gen/Network/Google/Resource/GAN/Links/Get.hs | mpl-2.0 | 3,575 | 0 | 14 | 850 | 478 | 286 | 192 | 68 | 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 #-}
-- ... | fmapfmapfmap/amazonka | amazonka-iam/gen/Network/AWS/IAM/CreateAccessKey.hs | mpl-2.0 | 4,926 | 0 | 14 | 999 | 561 | 345 | 216 | 70 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Settings/GetPop.hs | mpl-2.0 | 4,828 | 0 | 19 | 1,173 | 713 | 417 | 296 | 108 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Model.Excerpt.SQL
( selectAssetSlotExcerpt
, selectContainerExcerpt
, selectVolumeExcerpt
, insertExcerpt
, updateExcerpt
, deleteExcerpt
) where
import qualified Language.Haskell.TH as TH
import Model.SQL.Select
import Model.Audit.SQL
import Model.Release.Types
i... | databrary/databrary | src/Model/Excerpt/SQL.hs | agpl-3.0 | 3,286 | 0 | 10 | 535 | 765 | 426 | 339 | 81 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
-- | A minimal wrapper for libgirepository.
module Data.GI.CodeGen.LibGIRepository
( girRequire
, setupTypelibSearchPath
, FieldInfo(..)
, girStructFieldInfo
, girUnionFieldInfo
, girLoadGType
) where
#if !MIN_VERSION_base(4,8,0)
import Control.Applicati... | ford-prefect/haskell-gi | lib/Data/GI/CodeGen/LibGIRepository.hs | lgpl-2.1 | 7,302 | 0 | 18 | 1,451 | 1,713 | 894 | 819 | 124 | 2 |
x = 2 -- глобальное связывание
y = 42
foo = let z = x + y -- глобальное (foo) локальное (z)
s = z * z
in print s -- отступ (layout rule)
--oops = print 1 + 2
printThree = print (1 + 2)
z = 1 -- ok, связали
-- z = 2 -- ошибка
q q = \ q -> q -- ok, но...
... | SPbAU-ProgrammingParadigms/materials | haskell_1/hello.hs | unlicense | 3,439 | 0 | 12 | 1,024 | 721 | 384 | 337 | 57 | 2 |
module Main where
import Network.MicrosoftAzure.ACS
import Network.HTTP.Conduit
import Network.HTTP.Client.Conduit
import Network.Connection (TLSSettings (..))
import qualified Data.ByteString.Char8 as C
import Control.Concurrent
acsNS = "XXXX"
issuerKey = C.pack "YYYYYYYYYYYYYYYYYYYYYYY=="
issuerName = C.pack "own... | kapilash/hs-azure | azure-acs/examples/Example.hs | apache-2.0 | 687 | 0 | 12 | 112 | 177 | 94 | 83 | 17 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module GhWeekly.Report
( renderObject
, renderCommits
, renderIssues
) where
import Control.Applicative
import Control.Arrow
import Control.Lens
import Data.Aeson
import Data.Aeson.Lens
import Data.Foldabl... | erochest/gh-weekly | src/GhWeekly/Report.hs | apache-2.0 | 2,998 | 0 | 19 | 979 | 830 | 438 | 392 | -1 | -1 |
-- Copyright (c) 2013-2014 PivotCloud, Inc.
--
-- Aws.DynamoDb.Streams.Commands.GetRecords
--
-- Please feel free to contact us at licensing@pivotmail.com with any
-- contributions, additions, or other feedback; we would love to hear from
-- you.
--
-- Licensed under the Apache License, Version 2.0 (the "License"); you... | jonsterling/hs-aws-dynamodb-streams | src/Aws/DynamoDb/Streams/Commands/GetRecords.hs | apache-2.0 | 5,148 | 0 | 12 | 883 | 924 | 522 | 402 | 122 | 1 |
module Bugs.Bug9 (main) where
import Control.Applicative (empty)
import Control.Monad (void)
import Text.Megaparsec
import Text.Megaparsec.Expr
import Text.Megaparsec.String (Parser)
import qualified Text.Megaparsec.Lexer as L
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit hiding (Tes... | neongreen/megaparsec | old-tests/Bugs/Bug9.hs | bsd-2-clause | 1,073 | 0 | 12 | 184 | 322 | 180 | 142 | 31 | 1 |
-- | Create a large HTML table and dump it to a handle
--
-- Tested in this benchmark:
--
-- * Creating a large HTML document using a builder
--
-- * Writing to a handle
--
{-# LANGUAGE CPP, OverloadedStrings #-}
module Benchmarks.Programs.BigTable
( benchmark
) where
import Test.Tasty.Bench (Benchmark, bench,... | bos/text | benchmarks/haskell/Benchmarks/Programs/BigTable.hs | bsd-2-clause | 1,317 | 0 | 11 | 245 | 317 | 179 | 138 | 25 | 1 |
{-# Language ParallelListComp #-}
module StaticAsteroids (benchmark, summary) where
import Control.Monad hiding (sequence_)
import Graphics.Blank
import System.Random
import Utils
benchmark :: CanvasBenchmark
benchmark ctx = do
xs <- replicateM numAsteroids $ randomXCoord ctx
ys <- replicateM numAsteroids $ ran... | ku-fpg/blank-canvas-mark | hs/StaticAsteroids.hs | bsd-3-clause | 1,194 | 2 | 16 | 314 | 459 | 237 | 222 | 33 | 1 |
------------------------------------------------------------------------
-- |
-- Module : ALife.Creatur.Wain.Audio.GeneratePopulation
-- Copyright : (c) Amy de Buitléir 2012-2016
-- License : BSD-style
-- Maintainer : amy@nualeargais.ie
-- Stability : experimental
-- Portability : portable
--
-- ???... | mhwombat/exp-audio-id-wains | src/ALife/Creatur/Wain/AudioID/GeneratePopulation.hs | bsd-3-clause | 2,255 | 0 | 13 | 334 | 544 | 295 | 249 | 46 | 1 |
markup = <div>
<h1>Installation == Pain, Pain == Love</h1>
<p>
Given the relative immaturity of Haskell's package installation tools, installation of Turbinado is fairly challenging. With <% anchorTag "http://hackage.haskell.org/trac/hackage/wiki/CabalInstall" "cabal-inst... | alsonkemp/turbinado-website | App/Views/Home/Install.hs | bsd-3-clause | 2,566 | 98 | 148 | 857 | 1,007 | 494 | 513 | -1 | -1 |
-- | The children elements of the @osm@ element of a OSM file.
module Data.Geo.OSM.Children
(
Children
, osmUser
, osmGpxFile
, osmApi
, osmChangeset
, osmNodeWayRelation
, foldChildren
) where
import Text.XML.HXT.Arrow.Pickle
import Data.Geo.OSM.User
import Data.Geo.OSM.Preferences
import Data.Geo.OSM.GpxFile
impor... | tonymorris/geo-osm | src/Data/Geo/OSM/Children.hs | bsd-3-clause | 2,639 | 0 | 13 | 833 | 719 | 401 | 318 | 87 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-|
'Snap.Extension.Less.Less' is an implementation of the 'MonadLess'
interface defined in 'Snap.Extension.Less'.
As always, to use, add 'LessState' to your application's state, along with an
instance of 'HasLessState' for your application's state, making sure to use a
'lessInitia... | duairc/snap-extensions | src/Snap/Extension/Less/Less.hs | bsd-3-clause | 5,911 | 0 | 13 | 1,127 | 1,097 | 579 | 518 | 80 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
module EventTests (
specTests
) where
import qualified Data.ByteString as BS
import Data.ByteString.Arbitrary
import Data.ByteString.Internal
import Data.Serialize
import Event
import Foreign.ForeignPt... | fatlazycat/eventjournal | test/EventTests.hs | bsd-3-clause | 2,232 | 0 | 17 | 615 | 633 | 310 | 323 | 56 | 1 |
import Test.Hspec
main :: IO ()
main = putStrLn "Test suite not yet implemented"
| jpanda109/Hcommand | test/Spec.hs | bsd-3-clause | 82 | 0 | 6 | 15 | 24 | 12 | 12 | 3 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TypeSynon... | aedanlombardo/HaskellPS | DSP-PBE/src/Types/Filter.hs | bsd-3-clause | 7,242 | 0 | 18 | 1,722 | 2,058 | 1,078 | 980 | 111 | 7 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS -Wall #-}
module GOA (
module Prelude,
lambdabot,
wakeup,
query,
setLambdabotHome,
findPosixLambdabot,
setLambdabotFlags
) where
import Data.List (isPrefixOf, find)
import Data.Char (isSpace)
import Data.Maybe
impor... | chrisdone/goa | GOA.hs | bsd-3-clause | 5,570 | 0 | 21 | 1,632 | 1,305 | 669 | 636 | 123 | 3 |
foo :: String -> Int -> Bool
foo i _
| (length i) < 5 = False
foo [] _ = False
foo (_ : _) j = j < 5
-- λ> foo "" 2
-- False
-- λ> foo "fdafdsdas" 2
-- True
-- λ> foo "fdafdsdas" 7
-- False
-- λ>
| redfish64/IrcScanner | src/Learn/guards.hs | bsd-3-clause | 207 | 0 | 10 | 61 | 80 | 43 | 37 | 5 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.UI.GLUT.Window
-- Copyright : (c) Sven Panne 2002-2005
-- License : BSD-style (see the file libraries/GLUT/LICENSE)
--
-- Maintainer : sven.panne@aedion.de
-- Stability : stable
-- Portability ... | FranklinChen/hugs98-plus-Sep2006 | packages/GLUT/Graphics/UI/GLUT/Window.hs | bsd-3-clause | 22,355 | 238 | 10 | 3,780 | 2,331 | 1,354 | 977 | -1 | -1 |
module Main where
import Control.DeepSeq
import qualified Criterion.Main as C
import Data.Array.Repa hiding ((++))
import Data.Array.Repa.Eval
import Data.Array.Repa.Repr.ForeignPtr
import Data.Word
import Foreign (castForeignPtr)
import qualified Graphics.Rendering.OpenGL as GL
import System.Environment (getArgs, wit... | mainland/nikola | examples/mandelbrot/Main.hs | bsd-3-clause | 7,380 | 0 | 17 | 1,859 | 2,216 | 1,123 | 1,093 | 147 | 9 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE CPP, TemplateHaskell #-}
{-# LANGUAGE ScopedTypeVariables, TupleSections #-}
module Llvm.AsmHirConversion.MapLabels(compMapping) where
import Llvm.ErrorLoc
#define FLC (FileLoc $(srcLoc))
import qualified Compiler.Hoopl as H
import qualified Control.Monad as Md
import qualified Da... | mlite/hLLVM | src/Llvm/AsmHirConversion/MapLabels.hs | bsd-3-clause | 89,369 | 8 | 27 | 31,243 | 35,144 | 17,397 | 17,747 | 1,487 | 91 |
module Problem50 where
import Data.Array
import Prime
lim :: Int
lim = 1000000
main :: IO ()
main =
print
. head
. filter isPrimeNaive
$ [ sms ! (i, j) | j <- [ml - 1, ml - 2 .. 0], i <- [0 .. ml - j - 1] ]
where
primes' = getPrimesUpto lim
ml = length . takeWhile (<= lim) ... | adityagupta1089/Project-Euler-Haskell | src/problems/Problem50.hs | bsd-3-clause | 628 | 0 | 16 | 257 | 322 | 182 | 140 | 20 | 1 |
module Spec where
import Control.Monad.State.Lazy
import Control.Monad.Trans.Maybe
import LineCount
import LineCount.Counter
import LineCount.Counter.Base
import LineCount.Counter.Values
import LineCount.Filter.Base
import LineCount.Filte... | JustusAdam/hlinecount | testsuite/Spec.hs | bsd-3-clause | 5,990 | 0 | 17 | 1,431 | 1,349 | 663 | 686 | -1 | -1 |
{-# OPTIONS -XCPP #-}
module Grid ( grid) where
import Data.String
import Text.Blaze.Html5.Attributes as At hiding (step)
#define ALONE -- to execute it alone, uncomment this
#ifdef ALONE
import MFlow.Wai.Blaze.Html.All
main= runNavigation "" $ transientNav grid
#else
import MFlow.Wai.Blaze.Html.All hiding(retry, pa... | agocorona/MFlow | Demos/Grid.hs | bsd-3-clause | 1,183 | 0 | 16 | 385 | 316 | 168 | 148 | 24 | 1 |
module Robozzle.Haskell.Internal
(
) where
| reborg/robozzle-haskell | src/Robozzle/Haskell/Internal.hs | bsd-3-clause | 51 | 0 | 3 | 13 | 10 | 7 | 3 | 2 | 0 |
{-# LANGUAGE OverloadedStrings, PackageImports #-}
import "monads-tf" Control.Monad.State
import Data.Pipe
import Data.Pipe.ByteString
import System.IO
import Network.Sasl
import Network.Sasl.DigestMd5.Client
import qualified Data.ByteString as BS
data St = St [(BS.ByteString, BS.ByteString)] deriving Show
instance... | YoshikuniJujo/sasl | examples/clientD.hs | bsd-3-clause | 969 | 12 | 14 | 166 | 362 | 197 | 165 | 30 | 3 |
{-# LANGUAGE BangPatterns #-}
module FRP.Reactive
( Behavior
, Event
-- * Interface
, newBehavior
, newEvent
, animate
, on
, Cacheable(..)
-- * Combinators
, filterJust
, hold
, switch
, execute
, (<@>)
, (<@)
) where
import Control.Applica... | knrafto/reactive | src/FRP/Reactive.hs | bsd-3-clause | 5,092 | 0 | 18 | 1,963 | 1,995 | 990 | 1,005 | 155 | 2 |
import List
-- Same factorization algorithm as from #3
-- Kind of stupid to use it here as it's totally stateless and will sieve
-- repeatedly (herp derp).
-- Pick out which primes divide the given integer.
-- Helper uses accfactors for tail recursion.
-- Takes in number to factor, list of things that are possibly pr... | akerber47/haskalah | test/files/euler/12.hs | bsd-3-clause | 1,390 | 0 | 16 | 371 | 429 | 236 | 193 | 17 | 3 |
{-# LANGUAGE TypeSynonymInstances, GeneralizedNewtypeDeriving, OverloadedStrings #-}
-- | This module offers a simple implementation of @Localized@ class via @StateT@ transformer.
-- This implementation is usable if you have nothing against adding yet another transformer to
-- your already complicated monadic stack. Ot... | portnov/localize | Text/Localize/State.hs | bsd-3-clause | 2,211 | 0 | 9 | 404 | 505 | 265 | 240 | 44 | 1 |
{-# LANGUAGE CPP #-}
module Package
( packageRules
)
where
import Control.Applicative ((<$>))
import Data.Graph (flattenSCCs, stronglyConnComp)
import Data.List (isPrefixOf, isInfixOf)
#if MIN_VERSION_base(4,6,0)
import Data.Ord (Down(..))
#endif
import Data.Version (showVersion)
import Development.Shake
im... | erantapaa/haskell-platform | hptool/src/Package.hs | bsd-3-clause | 3,784 | 0 | 22 | 1,113 | 1,001 | 512 | 489 | 82 | 5 |
module Game where
import MExp
import Data.Char
import Data.Maybe
import Data.Function (on)
import Data.List
data Move = Move {
x :: Int
, y :: Int
, m :: String
} deriving (Eq,Ord,Show)
emptyMove = (Move (-1) (-1) "")
valuesListToMoves :: [Value] -> [Move] -> [Move]
valuesListToMoves [] [] = []
valuesListT... | tomas-stuina/fp | src/Game.hs | bsd-3-clause | 6,558 | 0 | 18 | 1,716 | 2,714 | 1,404 | 1,310 | 172 | 4 |
module Kite.Optimizer where
import Data.List
import Control.Monad.State
import Control.Monad.Error
import Kite.Syntax
-- | The optimizer error type.
data OptiError = OptiError String
| UnknownError
deriving (Show, Eq)
instance Error OptiError where
noMsg = UnknownError
strMsg = Op... | kite-lang/kite | src/Kite/Optimizer.hs | mit | 3,316 | 0 | 20 | 932 | 1,106 | 580 | 526 | 81 | 3 |
module Main where
import REPL (repl)
main :: IO ()
main = repl
| juanbono/tapl-haskell | untyped/app/Main.hs | gpl-3.0 | 65 | 0 | 6 | 15 | 27 | 16 | 11 | 4 | 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 #-}
-- ... | fmapfmapfmap/amazonka | amazonka-cloudtrail/gen/Network/AWS/CloudTrail/DescribeTrails.hs | mpl-2.0 | 4,342 | 0 | 13 | 986 | 603 | 362 | 241 | 78 | 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 #-}
-- ... | fmapfmapfmap/amazonka | amazonka-glacier/gen/Network/AWS/Glacier/DeleteVaultNotifications.hs | mpl-2.0 | 5,060 | 0 | 9 | 867 | 442 | 276 | 166 | 62 | 1 |
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies,
GeneralizedNewtypeDeriving,
TemplateHaskell, CPP, UndecidableInstances #-}
{-| All RPC calls are run within this monad.
It encapsulates:
* IO operations,
* failures,
* working with the daemon state.
Code that is specific either to the config... | bitemyapp/ganeti | src/Ganeti/WConfd/Monad.hs | bsd-2-clause | 17,648 | 0 | 24 | 4,029 | 3,233 | 1,690 | 1,543 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.