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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- Problems/Problem055.hs
module Problems.Problem055 (p55) where
main = print p55
p55 :: Int
p55 = length $ filter (not . (flip isLynchel) 0) [1..9999]
isLynchel :: Integer -> Int -> Bool
isLynchel num i
| i >= 50 = False
| isPalindrom nextNum = True
| otherwise = isLynchel nextNum (i + 1)
where nex... | Sgoettschkes/learning | haskell/ProjectEuler/src/Problems/Problem055.hs | mit | 493 | 0 | 11 | 106 | 192 | 99 | 93 | 14 | 1 |
module Main where
import qualified Data.Map as M
errorsPerLine = M.fromList
[ ("Chris", 472), ("Don", 100), ("Simon", -5) ]
main = do putStrLn "Who are you?"
name <- getLine
case M.lookup name errorsPerLine of
Nothing -> putStrLn "I don't know you"
Just n -> do... | zaqwes8811/micro-apps | buffer/haskell/hello.hs | mit | 383 | 0 | 12 | 138 | 113 | 59 | 54 | 10 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module TestSuite where
import Control.Concurrent
import Control.Monad
import Control.Applicative
import Control.Monad.IO.Class
import Data.Either
import Data.Maybe
import Hexdump
import Test.Hspec
import Test.Hspec.HUnit
import Test.HUnit
import Data.ByteString(ByteString)
import q... | anchor/gearman-haskell | tests/TestSuite.hs | mit | 4,050 | 0 | 15 | 888 | 1,063 | 525 | 538 | 96 | 2 |
module Main where
import Data.Maybe (fromMaybe)
import Data.Monoid ((<>))
import System.Environment (lookupEnv)
import System.Log.Logger
import Persistence
import Server
main :: IO ()
main = do
let comp = "HComments.Main"
mPort <- lo... | ilya-murzinov/hcomments | app/Main.hs | mit | 776 | 0 | 12 | 208 | 185 | 91 | 94 | 19 | 1 |
-- | Data.Graph is sorely lacking in several ways, This just tries to fill in
-- some holes and provide a more convinient interface
{-# LANGUAGE RecursiveDo #-}
module Util.Graph(
Graph(),
fromGraph,
newGraph,
newGraph',
newGraphReachable,
reachableFrom,
Util.Graph.reachable,
fromScc,
... | m-alvarez/jhc | src/Util/Graph.hs | mit | 7,780 | 6 | 21 | 2,132 | 3,536 | 1,834 | 1,702 | -1 | -1 |
module GenHtmlDoc where
import Control.Monad.State
import Test.QuickCheck
import Text.PrettyPrint
import Css.CssTypes
import Html.HtmlNode
import Css.GenCss
import Html.GenHtml
import Css.ShowCss
import Html.ShowHtml
import HtmlDoc
instance Arbitrary HtmlDoc where
arbitrary = genHtml
shrink = shrinkHtml
genHtml ... | pbevin/toycss | src/GenHtmlDoc.hs | gpl-2.0 | 2,473 | 0 | 16 | 370 | 666 | 342 | 324 | 51 | 2 |
-- Cyclic nand embedded in a non-constructive context.
module T where
import Tests.Basis
c = arr (\() -> ()) >>> trueA >>> combLoop (andA >>> notA >>> arr dupA)
prop_correct = property (\xs -> simulate c xs == take (length xs) (repeat bottom))
test_constructive = isNothing (isConstructive c)
| peteg/ADHOC | Tests/01_CyclicCircuits/017_nand_embedded_not_cons.hs | gpl-2.0 | 298 | 0 | 11 | 53 | 111 | 58 | 53 | 5 | 1 |
{-# language NoMonomorphismRestriction #-}
{-# language FlexibleInstances #-}
{-# language FlexibleContexts #-}
{-# language TypeFamilies #-}
module Polynomial.Unary.Reader where
import Polynomial.Class
import Polynomial.Patch
import qualified Prelude
import Prelude ( return, ($), (.), Eq, Ord, read, Bool(..) )
impo... | marcellussiegburg/autotool | collection/src/Polynomial/Unary/Reader.hs | gpl-2.0 | 2,379 | 0 | 14 | 641 | 607 | 335 | 272 | 44 | 4 |
{- |
Module : $Header$
Description : Abstract syntax for propositional logic extended with QBFs
Copyright : (c) Jonathan von Schroeder, DFKI GmbH 2010
License : GPLv2 or higher, see LICENSE.txt
Maintainer : <jonathan.von_schroeder@dfki.de>
Stability : experimental
Portability : portable
Definitio... | nevrenato/Hets_Fork | QBF/AS_BASIC_QBF.hs | gpl-2.0 | 10,320 | 0 | 24 | 2,895 | 3,448 | 1,741 | 1,707 | 226 | 16 |
-- Copyright 2016, 2017 Robin Raymond
--
-- This file is part of Purple Muon
--
-- Purple Muon 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) an... | r-raymond/purple-muon | src/Client/States/InGameState/Types.hs | gpl-3.0 | 2,638 | 0 | 10 | 587 | 332 | 226 | 106 | 35 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Estuary.Help.ColombiaEsPasion 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
colombiaEsPasionHelpFile :: MonadWidget t m => m ()
colombiaEsPasionHelpFi... | d0kt0r0/estuary | client/src/Estuary/Help/ColombiaEsPasion.hs | gpl-3.0 | 1,944 | 0 | 11 | 298 | 413 | 196 | 217 | 44 | 1 |
module Main where
main :: IO ()
main = do
print("Hello World")
| danielgoncalvesti/BIGDATA2017 | Atividade01/Haskell/Hello.hs | gpl-3.0 | 75 | 0 | 8 | 24 | 28 | 15 | 13 | 4 | 1 |
{-# LANGUAGE CPP #-}
-- | The module 'UserIO' defines how to do the interaction with the user.
-- By default, we use a command-line interface (as defined by the module 'CLI').
-- To define a new mode of interaction (e.g., GUI), create a new module similar
-- to 'CLI' and export the new module in 'UserIO'.
module... | jff/TeLLer | src/UserIO.hs | gpl-3.0 | 505 | 0 | 4 | 102 | 24 | 20 | 4 | 4 | 0 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid 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 Lice... | karamellpelle/grid | designer/source/MEnv/Env/ScreenObject/GLFW.hs | gpl-3.0 | 1,932 | 0 | 12 | 536 | 243 | 138 | 105 | 24 | 1 |
module Test where
import Memory
import Lexer
import Parser
import Exception
import ParserCombinators
import Eval
te1 = (extract . lexer) $ "0 X23 PROGRAM (X12) WHILE DO () END"
p = runP pExpr te1
te2 = (extract . lexer) $ "SUC(X0) X23 PROGRAM (X12) WHILE DO () END"
p2 = runP pExpr te2
code = "PROGRAM (X0)" ++
... | jota191/PLang | src/Test.hs | gpl-3.0 | 765 | 0 | 7 | 218 | 195 | 108 | 87 | 27 | 1 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid 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 Lice... | karamellpelle/grid | source/Game/Memory/MemoryWorld/OutputState/Plain.hs | gpl-3.0 | 1,438 | 0 | 9 | 374 | 148 | 96 | 52 | 31 | 1 |
-- For interacting with an MPD server
address = "localhost"
port = 6600
data MPDStatus =
-- The order is important here
Song { songFile :: String
, songLastModified :: String
, songTime :: String
, songArtist :: String
, songTitle :: String
, songAlbum :: String
, songTra... | UndeadMastodon/ShrubBot | MPD.hs | gpl-3.0 | 455 | 0 | 8 | 154 | 88 | 57 | 31 | 14 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Jobs/Get.hs | mpl-2.0 | 5,593 | 0 | 20 | 1,334 | 859 | 500 | 359 | 127 | 1 |
{-# LANGUAGE GADTs #-}
module Gonimo.Database.Effects.Servant where
-- Little helpers integrating db functions with servant:
import Control.Monad ((<=<))
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.Base (MonadBase)
import Datab... | gonimo/gonimo-back | src/Gonimo/Database/Effects/Servant.hs | agpl-3.0 | 1,570 | 0 | 10 | 379 | 449 | 242 | 207 | -1 | -1 |
module Main where
import Data.Char
dnaT :: Char -> Char
dnaT c | c == 'a' = 't'
| c == 't' = 'a'
| c == 'g' = 'c'
| c == 'c' = 'g'
| otherwise = c
rnaT :: Char -> Char
rnaT c | c == 't' = 'a'
| c == 'a' = 'u'
| c == 'g' = 'c'
| c == 'c' = 'g'
| otherwise = c
dna_complemen... | davidnuon/candc-dna-challenge | haskell/main.hs | unlicense | 437 | 0 | 8 | 153 | 202 | 99 | 103 | 17 | 1 |
module Braxton.A284433Spec (main, spec) where
import Test.Hspec
import Braxton.A284433 (a284433)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A284433" $
it "correctly computes the first 5 elements" $
take 5 (map a284433 [1..]) `shouldBe` expectedValue where
expectedValue = [1,2,6,2,18]
| peterokagey/haskellOEIS | test/Braxton/A284433Spec.hs | apache-2.0 | 318 | 0 | 10 | 59 | 115 | 65 | 50 | 10 | 1 |
import Controller (withClog)
import Network.Wai.Handler.Warp (run)
main :: IO ()
main = withClog $ run 3000
| nkpart/clog | production.hs | bsd-2-clause | 109 | 0 | 6 | 17 | 43 | 24 | 19 | 4 | 1 |
import "hint" HLint.HLint
ignore "Reduce duplication"
ignore "Redundant lambda"
ignore "Use >=>"
ignore "Use const"
ignore "Avoid lambda"
ignore "Redundant flip"
ignore "Use let"
ignore "Redundant $"
| cartazio/monad-ste | Hlint.hs | bsd-2-clause | 201 | 0 | 5 | 28 | 55 | 20 | 35 | -1 | -1 |
{-# LANGUAGE CPP, OverloadedStrings, QuasiQuotes, TemplateHaskell, TypeOperators, ViewPatterns #-}
-- | YUI tools for Happstack.
--
-- Some of the examples assume you're using the @OverloadedStrings@ GHC
-- extension.
module Happstack.Server.YUI
( -- * Combo Handler
implYUISite
, YUISitemap(..)
, sitemap
,... | dag/happstack-yui | src/Happstack/Server/YUI.hs | bsd-2-clause | 9,852 | 0 | 17 | 2,485 | 1,741 | 982 | 759 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
{-
- Early parser for TAGs. Preliminary version.
-}
module NLP.LTAG.Early
(
-- * Traversal
Elem (..)
, Trav (..)
, treeTrav
, auxTrav
, toTree
-- * Grammar
, Grammar
-- * Chart state
, State (..)
, scan
, ignore
, subst
, adjoin
-- * Chart ent... | kawu/ltag | src/NLP/LTAG/Early.hs | bsd-2-clause | 15,632 | 0 | 15 | 4,420 | 3,936 | 2,078 | 1,858 | 304 | 5 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
module Lang.Php.Ast.Common
(
module Data.Binary
, module Data.Char
, module Data.Data
, module Data.List
, module Data.Maybe
, module Common
, module Parse
, module Unparse
, module Lang.Php.Ast.WS
)... | facebookarchive/lex-pass | src/Lang/Php/Ast/Common.hs | bsd-3-clause | 607 | 0 | 6 | 130 | 145 | 95 | 50 | 26 | 0 |
module Data.GraphQL.XXX.Schema.Info
( analyzeSchemaInfo
, getAnalyzedStatements
, SchemaInfo(..)
, emptySchemaInfo
, lookupField
) where
import Control.Monad
import Control.Monad.State
import qualified Data.Map as Map
import Data.Maybe
import qua... | uebayasi/haskell-graphql-schema | src/Data/GraphQL/XXX/Schema/Info.hs | bsd-3-clause | 17,140 | 0 | 15 | 5,395 | 5,191 | 2,583 | 2,608 | 438 | 6 |
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE NamedFieldPuns #-}
-- | This TextureAtlas structure is responsible for the packing of small
-- regions into a bigger texture. It is based on the skyline bottom left
-- algorith which appears to be well suited for storing glyps.
module Graphics.UI.Font.TextureAtlas
(... | christiaanb/glfont | src/Graphics/UI/Font/TextureAtlas.hs | bsd-3-clause | 8,342 | 0 | 18 | 2,528 | 2,679 | 1,448 | 1,231 | 213 | 4 |
-- Compiler Toolkit: pretty-printer combinators
--
-- Author : Manuel M. T. Chakravarty
-- Created: 16 February 95
--
-- Copyright (c) [1995..2000] Manuel M. T. Chakravarty
--
-- This file is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published ... | mwotton/ctkl | src/Text/CTK/Pretty.hs | bsd-3-clause | 13,452 | 0 | 14 | 4,195 | 2,882 | 1,633 | 1,249 | 197 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module Network.BitcoinRPC.MarkerAddressesTest
( markerAdressesTests
) where
import Control.Arrow
import Data.Foldable
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2
import Test.HUnit hiding (Test)
import Network.Bitcoi... | javgh/bitcoin-rpc | Network/BitcoinRPC/MarkerAddressesTest.hs | bsd-3-clause | 6,992 | 0 | 20 | 2,094 | 1,741 | 990 | 751 | 129 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ImpredicativeTypes #-}
{-# LANGUAGE RankNTypes #-}
-- | Representa la especificacion de una propiedad de CSS
module Data.Property (
-- * Tipos de Datos
Property
, FunctionComputed
, FunctionUsed
, PropertyValue (..)
-- ** Funciones Publicas
, mkProp
, getPrope... | carliros/Simple-San-Simon-Functional-Web-Browser | src/Data/Property.hs | bsd-3-clause | 13,404 | 0 | 17 | 4,282 | 3,013 | 1,643 | 1,370 | 214 | 6 |
{- Testfor Statement -}
module TestStatement where
import Statement
import Test.QuickCheck
test = do
quickCheck checkP1
quickCheck checkP2
quickCheck checkP3
quickCheck checkP4
quickCheck checkP5
quickCheck checkP6
quickCheck checkP7
quickCheck checkP8
... | DavidRutqvist/ParserOperators-D7012E-Lab2 | test/TestStatement.hs | bsd-3-clause | 2,010 | 0 | 8 | 413 | 348 | 178 | 170 | 39 | 1 |
{-# LANGUAGE RebindableSyntax #-}
-- Copyright : (C) 2009 Corey O'Connor
-- License : BSD-style (see the file LICENSE)
import Bind.Marshal.Prelude
import Bind.Marshal.Verify
import Bind.Marshal.StaticProperties
main = run_test $ do
returnM ()
| coreyoconnor/bind-marshal | test/verify_static_properties.hs | bsd-3-clause | 259 | 0 | 9 | 48 | 39 | 23 | 16 | 6 | 1 |
{-# language CPP #-}
-- No documentation found for Chapter "Promoted_From_VK_KHR_shader_float16_int8"
module Vulkan.Core12.Promoted_From_VK_KHR_shader_float16_int8 ( PhysicalDeviceShaderFloat16Int8Features(..)
, StructureType(..)
... | expipiplus1/vulkan | src/Vulkan/Core12/Promoted_From_VK_KHR_shader_float16_int8.hs | bsd-3-clause | 5,736 | 0 | 14 | 892 | 923 | 541 | 382 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables, StandaloneDeriving, GADTs, Rank2Types #-}
module Main where
import Control.Concurrent
-- from this package
-- import Control.Monad.Coroutine
import Control.Monad.Trans.Crtn.Driver
import Control.Monad.Trans.Crtn.Event
import Control.Monad.Trans.Crtn.EventHandler
-- import Contro... | wavewave/coroutine-object | example/coroutine-object.hs | bsd-3-clause | 2,420 | 0 | 15 | 670 | 392 | 210 | 182 | 35 | 4 |
--------------------------------------------------------------------
-- |
-- Module : Main
-- Copyright : (c) Oliver Braun
-- License : BSD3
--
-- Maintainer: Oliver Braun <ob@obraun.net>
-- Stability : provisional
-- Portability: portable
--
-- This module provides a CLI for a MovieStore using the "Movies" module... | obcode/moviestore_haskell | src/MovieStoreCLI.hs | bsd-3-clause | 4,141 | 0 | 15 | 1,293 | 683 | 344 | 339 | 74 | 7 |
{-# LANGUAGE RankNTypes #-}
import Control.Applicative
import Data.Set (Set)
import qualified Data.Set as S
newtype CodensityOrd m a = CodensityOrd { runCodensityOrd :: forall b. Ord b => (a -> m b) -> m b }
-- liftCodensityOrd :: Monad m => m a -> CodensityOrd m a
-- liftCodensityOrd m = CodensityOrd ((>>=) m)
-- ... | batterseapower/haskell-kata | CodensitySet.hs | bsd-3-clause | 1,409 | 0 | 17 | 321 | 576 | 297 | 279 | 25 | 1 |
module Test.FFmpeg where
import Test.Hspec
import System.Process
import FFmpeg.Config
import FFmpeg.Probe (ffprobe)
import FFmpeg.Process
import FFmpeg.Data.H264
import Data.Maybe
import Control.Exception
import System.Directory
import Text.Printf
test :: IO ()
test = hspec $ after_ cleanUp $ do
describe... | YLiLarry/compress-video | test/Test/FFmpeg.hs | bsd-3-clause | 2,289 | 0 | 19 | 743 | 740 | 362 | 378 | 60 | 1 |
{-# LANGUAGE ForeignFunctionInterface #-}
-------------------------------------------------------------------------------
-- |
-- Copyright : (c) 2015 Michael Carpenter
-- License : BSD3
-- Maintainer : Michael Carpenter <oldmanmike.dev@gmail.com>
-- Stability : experimental
-- Portability : portable
--
-... | oldmanmike/CsoundRaw | src/Sound/Csound/FunctionTableDisplay.hs | bsd-3-clause | 1,531 | 0 | 8 | 157 | 133 | 83 | 50 | 9 | 1 |
module Main where
import Determination
main :: IO ()
main = run
| 5outh/determination | app/Main.hs | bsd-3-clause | 76 | 0 | 6 | 24 | 22 | 13 | 9 | 4 | 1 |
module Network.Irc (
module Network.Irc.Configuration,
module Network.Irc.Types,
module Network.Irc.Run,
module Network.Irc.Client
)
where
import Network.Irc.Configuration
import Network.Irc.Types
import Network.Irc.Run
import Network.Irc.Client
| geoffhuston/Network.Irc | Network/Irc.hs | bsd-3-clause | 312 | 0 | 5 | 87 | 60 | 41 | 19 | 9 | 0 |
{-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving, TemplateHaskell,
OverloadedStrings, GADTs, FlexibleContexts #-}
{-# LANGUAGE EmptyDataDecls #-}
-- This handles the database interface for Ribot. This defines the schema and
-- the interface types, and it defines the "model" functions, i.... | erochest/ribot | src/Database/Ribot.hs | bsd-3-clause | 7,270 | 0 | 16 | 1,937 | 1,401 | 736 | 665 | 125 | 3 |
module TestCandSel (
testMakeCandidates
, testDropSafeOverlap
, testOverlaps
, testGetNextCandidates
, testMakeThenGetCandidates
)
where
-- import Debug.Trace (trace)
import Data.Char (ord)
import Data.List (sort)
import qualified Data.ByteString as B
import Utils
import InputText
import EnnGram
import C... | pcrama/message-compiler | test/TestCandSel.hs | bsd-3-clause | 13,020 | 0 | 24 | 5,619 | 3,831 | 2,307 | 1,524 | 204 | 2 |
{-# LANGUAGE PackageImports #-}
module Foreign.Marshal.Safe (module M) where
import "base" Foreign.Marshal.Safe as M
| silkapp/base-noprelude | src/Foreign/Marshal/Safe.hs | bsd-3-clause | 122 | 0 | 4 | 18 | 23 | 17 | 6 | 3 | 0 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
module Bench.Network.Commons
( MsgId
, Ping (..)
, Pong (..)
... | input-output-hk/pos-haskell-prototype | networking/src/Bench/Network/Commons.hs | mit | 5,363 | 0 | 13 | 1,577 | 1,337 | 749 | 588 | 132 | 2 |
{-# LANGUAGE ViewPatterns #-}
module U.Codebase.Reflog where
import Data.Text (Text)
import U.Codebase.HashTags (BranchHash)
data Entry = Entry {from :: BranchHash, to :: BranchHash, reason :: Text}
-- fromText :: Text -> Maybe Entry
-- fromText t =
-- case Text.words t of
-- (Hash.fromBase32Hex -> Just old) ... | unisonweb/platform | codebase2/codebase/U/Codebase/Reflog.hs | mit | 688 | 0 | 8 | 155 | 67 | 47 | 20 | 5 | 0 |
module Extra.List
( consperse
, surround
, changePrefix
, dropPrefix
, cartesianProduct
, wordsBy
, empty
, sortByMapped
, sortByMappedM
, partitionM
, listIntersection
, isSublistOf
) where
import Control.Monad
import Data.List
{-# DEPRECATED consperse "Use interca... | ddssff/haskell-extra | Extra/List.hs | bsd-3-clause | 3,096 | 0 | 13 | 759 | 1,173 | 638 | 535 | 63 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Bead.Domain.Entity.Comment where
import Control.Applicative
import Data.Data
import Data.Time (UTCTime)
#ifdef TEST
import Test.Tasty.Arbitrary
#endif
-- Comment type basically indicates that who left the comment... | andorp/bead | src/Bead/Domain/Entity/Comment.hs | bsd-3-clause | 1,623 | 0 | 8 | 372 | 342 | 197 | 145 | 38 | 4 |
module B1.Data.Range
( gradualRange
, linearRange
) where
-- | Get a gradual range containing values from start to end with step number
-- of elements.
gradualRange :: Fractional a => a -> a -> Int -> [a]
gradualRange start end steps
| steps < 0 = error "Number of steps cannot be negative."
| otherwise = m... | madjestic/b1 | src/B1/Data/Range.hs | bsd-3-clause | 1,203 | 0 | 10 | 281 | 479 | 240 | 239 | 24 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables, BangPatterns #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Storable
-- Copyright : (c) The FFI task force 2001
-- License : see libraries/base/LICENSE
--
-- ... | alexander-at-github/eta | libraries/base/Foreign/Storable.hs | bsd-3-clause | 8,644 | 0 | 16 | 2,245 | 1,525 | 823 | 702 | -1 | -1 |
{-|
Module : Language.Qux.Annotated.Syntax
Description : Abstract syntax tree nodes with annotations.
Copyright : (c) Henry J. Wylde, 2015
License : BSD3
Maintainer : hjwylde@gmail.com
Abstract syntax tree nodes with annotations.
The annotation style was inspired by haskell-src-exts.
Instances of 'Simpli... | hjwylde/qux-haskell | src/Language/Qux/Annotated/Syntax.hs | bsd-3-clause | 8,172 | 0 | 10 | 2,512 | 2,391 | 1,289 | 1,102 | 139 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- Usage:
-- ghc ../examples/Test.hs
-- ghc Unit.hs
-- ./Unit ../examples/Test
-- Requirements:
-- - Empty ~/.haskeline (or set to defaults)
-- - Assumes the dummy folder is in the current folder
-- - On Mac OS X, may need to clear out /usr/lib/charset.alias
-- (In particular,... | DavidAlphaFox/ghc | libraries/haskeline/tests/Unit.hs | bsd-3-clause | 10,756 | 0 | 23 | 3,267 | 3,111 | 1,594 | 1,517 | 201 | 3 |
<?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="es-ES">
<title>OAST Support Add-on</title>
<maps>
<homeID>oast</homeID>
<mapref locatio... | kingthorin/zap-extensions | addOns/oast/src/main/javahelp/org/zaproxy/addon/oast/resources/help_es_ES/helpset_es_ES.hs | apache-2.0 | 965 | 77 | 67 | 157 | 413 | 209 | 204 | -1 | -1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="hi-IN">
<title>Replacer | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref loc... | thc202/zap-extensions | addOns/replacer/src/main/javahelp/org/zaproxy/zap/extension/replacer/resources/help_hi_IN/helpset_hi_IN.hs | apache-2.0 | 969 | 78 | 66 | 158 | 411 | 208 | 203 | -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="bs-BA">
<title>Technology detection | ZAP Extension</title>
<maps>
<homeID>top</homeID>
... | kingthorin/zap-extensions | addOns/wappalyzer/src/main/javahelp/org/zaproxy/zap/extension/wappalyzer/resources/help_bs_BA/helpset_bs_BA.hs | apache-2.0 | 981 | 78 | 66 | 159 | 419 | 211 | 208 | -1 | -1 |
module TupleIn2 where
f :: (a, ([Int],c)) -> ([Int],c)
f (x, y@(b_1@[], b_2)) = y
f (x, y@(b_1@(b_4 : b_3), b_2)) = y
f (x, y@(b_1, b_2)) = y
f (x, y@([], m)) = y | kmate/HaRe | old/testing/subIntroPattern/TupleIn2_TokOut.hs | bsd-3-clause | 164 | 0 | 11 | 36 | 146 | 90 | 56 | 6 | 1 |
{-# LANGUAGE BangPatterns, CPP, DeriveFunctor, ScopedTypeVariables #-}
-- | This module allows for incremental decoding and encoding of CSV
-- data. This is useful if you e.g. want to interleave I\/O with
-- parsing or if you want finer grained control over how you deal with
-- type conversion errors.
--
-- Decoding e... | tibbe/cassava | Data/Csv/Incremental.hs | bsd-3-clause | 15,861 | 0 | 15 | 3,639 | 2,931 | 1,588 | 1,343 | 195 | 5 |
{-# LANGUAGE TypeFamilies, GADTs, ScopedTypeVariables, KindSignatures #-}
{-# LANGUAGE EmptyDataDecls #-}
-- Tests whether a type signature can refine a type
-- See the definition of bug2a
module ShouldCompile where
import qualified Data.Kind as K (Type)
data Typed
data Untyped
type family TU a b :: K.Type
type in... | sdiehl/ghc | testsuite/tests/indexed-types/should_compile/GADT12.hs | bsd-3-clause | 1,013 | 0 | 10 | 239 | 355 | 191 | 164 | -1 | -1 |
{-# OPTIONS_GHC -fwarn-safe -Werror #-}
-- | Basic test to see if Safe warning flags compile
-- Warn if module is infered safe
-- In this test the warning _should_ fire and cause a compile fail
module SafeFlags26 where
f :: Int
f = 1
| urbanslug/ghc | testsuite/tests/safeHaskell/flags/SafeFlags26.hs | bsd-3-clause | 236 | 0 | 4 | 47 | 18 | 13 | 5 | 4 | 1 |
-- | Imperative code with an OpenCL component.
--
-- Apart from ordinary imperative code, this also carries around an
-- OpenCL program as a string, as well as a list of kernels defined by
-- the OpenCL program.
--
-- The imperative code has been augmented with a 'LaunchKernel'
-- operation that allows one to execute a... | HIPERFIT/futhark | src/Futhark/CodeGen/ImpCode/OpenCL.hs | isc | 3,376 | 0 | 10 | 685 | 509 | 325 | 184 | 64 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Unison.Test.Term where
-- import Test.Tasty.QuickCheck as QC
-- import Test.Tasty.SmallCheck as SC
import Test.Tasty
import Test.Tasty.HUnit
import Unison.Hash (Hash)
import Unison.Codebase.MemCodebase ()
import Unison.Parsers (unsafeParseTerm)
import Unison.Reference as R
imp... | nightscape/platform | shared/tests/Unison/Test/Term.hs | mit | 5,039 | 0 | 16 | 1,259 | 864 | 510 | 354 | 59 | 2 |
-- counting intervals in the permutohedron
module Permutohedra where
import Data.List
import Formulas
import Bijections
inversions :: Perm -> [(Int,Int)]
inversions pi = [(i,j) | i <- dom pi, j <- dom pi \\ [i], i < j, act (inv pi) i > act (inv pi) j]
perm_le :: Perm -> Perm -> Bool
perm_le pi1 pi2 = all (\(i,j) -... | noamz/linlam-gos | src/Permutohedra.hs | mit | 1,263 | 0 | 19 | 271 | 632 | 336 | 296 | 23 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Types where
import Control.Monad (mzero)
import Data.Aeson
import Data.Text
import GHC.Generics
import Servant.API (FromText(..), ToText(..))
data Auth = Auth
{ csrf :: Text
, device_id :: Text
, logged :: Bool
, premium :: Boo... | ushfnuk/music | src/Types.hs | mit | 2,957 | 0 | 11 | 767 | 844 | 465 | 379 | 91 | 1 |
-- | Using Plugins with SimpleOptions
module Plugins.Commands
( commandsFromPlugins
, toCommand
) where
import Control.Monad.Trans.Either (EitherT)
import Control.Monad.Trans.Writer (Writer)
import Data.Text (Text, unpack)
import Data.Foldable (foldMap)
import Plugins
import Options.Applicative.Simple
-- | Gene... | fpco/stackage-cli | src/Plugins/Commands.hs | mit | 797 | 0 | 10 | 116 | 204 | 113 | 91 | 17 | 1 |
module Carbon.DataStructures.Trees.SelfBalancingBinarySearchTree.Scaffolding (get_tree, get_distributed_tree, insert_distributed_tree, search_tree, remove_tree, max_size, golden_ratio) where
import qualified Carbon.DataStructures.Trees.SelfBalancingBinarySearchTree as Tree
import qualified Carbon.DataStructures.Trees.... | Raekye/Carbon | haskell/testsuite/tests/Carbon/DataStructures/Trees/SelfBalancingBinarySearchTree/Scaffolding.hs | mit | 1,341 | 8 | 13 | 177 | 430 | 230 | 200 | 28 | 2 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.MediaStream
(newMediaStream, newMediaStream', newMediaStream'', getAudioTracks,
getAudioTracks_, getVideo... | ghcjs/jsaddle-dom | src/JSDOM/Generated/MediaStream.hs | mit | 7,231 | 0 | 12 | 957 | 1,464 | 809 | 655 | 95 | 1 |
module Week5Tests where
import Week5.Tests
import Test.Tasty
import Test.Tasty.HUnit
main = do tastyTests
tastyTests = defaultMain tests
tests :: TestTree
tests = testGroup "Tasty Week 5 Unit Tests" [week5UnitTests] | rglew/cis194 | src/Week5Tests.hs | mit | 222 | 0 | 6 | 35 | 54 | 31 | 23 | 8 | 1 |
module STMGraphs.Homogenous where
import STMGraphs.Prelude
import qualified ListT
import qualified GHC.Exts
import qualified STMContainers.Multimap as Multimap
import qualified STMContainers.Set as Set
import qualified STMContainers.Map as Map
import qualified Focus
-- |
-- A homogenous directed mutable graph in STM... | nikita-volkov/stm-graphs | library/STMGraphs/Homogenous.hs | mit | 2,059 | 0 | 14 | 478 | 835 | 433 | 402 | 65 | 1 |
-- Helpers/Numbers.hs
module Helpers.Numbers (
divisors,
divisorCount,
intToDigits,
lcm',
gcd',
collatz,
fact,
digitSum ) where
import Data.IntSet (toList, fromList)
import Data.List
import Data.Maybe
divisorCount :: Int -> Int
divisorCount num = length $ divisors num
divisors :: Int ... | Sgoettschkes/learning | haskell/ProjectEuler/Helpers/Numbers.hs | mit | 1,150 | 0 | 14 | 278 | 547 | 297 | 250 | 36 | 1 |
{-# LANGUAGE FlexibleInstances #-}
module CacheSpec where
import Bce.Cache
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Arbitrary
import Bce.TimeStamp
import qualified Data.Map as Map
import qualified Data.Set as Set
data SmallList a = SmallList [a] deriving Show
data BigList a = B... | dehun/bce | test/CacheSpec.hs | mit | 1,850 | 0 | 21 | 618 | 658 | 339 | 319 | 38 | 1 |
module S where
s :: [Int] -> Int
s lst = foldr (+) 0 lst
exponents :: Int -> [Int]
exponents base = base : (exponents (2*base))
addtwo :: [Int] -> [Int]
addtwo lst = map (2+) lst
| fodder008/VisualizingHaskellAST | testing/s.hs | mit | 182 | 0 | 9 | 41 | 102 | 57 | 45 | 7 | 1 |
{- |
Module : ./TPTP/Pretty.hs
Description : A pretty printer for the TPTP Syntax v6.4.0.7
Copyright : (c) Eugen Kuksa University of Magdeburg 2017
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Eugen Kuksa <kuksa@iks.cs.ovgu.de>
Stability : provisional
Portability : portable
A pretty pr... | spechub/Hets | TPTP/Pretty.hs | gpl-2.0 | 84,149 | 0 | 20 | 17,616 | 14,713 | 7,451 | 7,262 | 1,277 | 34 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeOperators #-}
{-# LANG... | ricardopenyamari/ir2haskell | clir-parser-haskell-master/lib/sexp-grammar/src/Language/SexpGrammar/Base.hs | gpl-2.0 | 10,853 | 0 | 18 | 2,942 | 4,215 | 2,133 | 2,082 | 260 | 1 |
{-# OPTIONS_GHC -Wall -fwarn-tabs -Werror #-}
-------------------------------------------------------------------------------
-- |
-- Module : Math.Vector.Types
-- Copyright : Copyright (c) 2014 Michael R. Shannon
-- License : GPLv2 or Later
-- Maintainer : mrshannon.aerospace@gmail.com
-- Stability ... | mrshannon/trees | src/Math/Vector/Types.hs | gpl-2.0 | 1,190 | 0 | 8 | 286 | 376 | 201 | 175 | 14 | 0 |
module Lib.Boolean (specialOperators) where
import Data.IORef
import Control.Monad (foldM)
import Control.Conditional (ifM, (<&&>), (<||>))
import Base
import Evaluator
default (Int)
biNot :: IORef Scope -> [SExpr] -> EvalM SExpr
biNot _ [SAtom p (ABool b)] = return $ SAtom p (ABool $ not b)
biNot _ [other] ... | Kotolegokot/Underlisp | src/Lib/Boolean.hs | gpl-3.0 | 1,166 | 0 | 12 | 286 | 452 | 240 | 212 | 22 | 1 |
-- Author: Viacheslav Lotsmanov
-- License: GPLv3 https://raw.githubusercontent.com/unclechu/xlib-keys-hack/master/LICENSE
{-# LANGUAGE DeriveGeneric, DeriveAnyClass, OverloadedLists #-}
{-# LANGUAGE TemplateHaskell, TupleSections, FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables, RankNTypes #-}
module Keys
... | unclechu/xlib-keys-hack | src/Keys.hs | gpl-3.0 | 26,170 | 0 | 19 | 7,453 | 6,558 | 3,924 | 2,634 | -1 | -1 |
module Request where
import Text.JSON
import Control.Applicative
import Control.Monad
data Request = Cps Double |
Hush |
Pattern Int String |
Info String |
Render String Double Double
instance Show Request where
show (Cps x) = "cps " ++ (show x)
show (H... | Moskau/estuary | server/Request.hs | gpl-3.0 | 2,151 | 0 | 12 | 470 | 1,008 | 500 | 508 | 39 | 2 |
module Balconies where
import Data.Maybe (mapMaybe)
import Algebra
import DataStructure
import Utils
-- check if balcony passes from startPoint
-- if no mark edges from start to end
-- if yes mark edges from end to end to edgeEnd and from edgeStart to start
-- check if balcony crosses the starting line
-- assume ba... | apanagio/easykenak | slicer2/src/Balconies.hs | gpl-3.0 | 2,486 | 0 | 14 | 491 | 752 | 395 | 357 | 31 | 2 |
p :: c -> a
q :: c -> b | hmemcpy/milewski-ctfp-pdf | src/content/1.5/code/haskell/snippet09.hs | gpl-3.0 | 23 | 0 | 5 | 9 | 19 | 10 | 9 | 2 | 0 |
{-# LANGUAGE GADTs, RankNTypes, ScopedTypeVariables, BangPatterns #-}
module Control.Fusion.List.Nu where
import Data.List (unfoldr)
import Control.Comonad
import Data.Foldable as T hiding (fold)
import Data.Monoid
---------------
-- Nu lists
-- List functor
data Step a s = Done | Yield a s
-- and its greatest fix... | jyp/ControlledFusion | Control/Fusion/List/Nu.hs | gpl-3.0 | 7,386 | 0 | 14 | 2,100 | 2,425 | 1,228 | 1,197 | 146 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- |
-- Module : Network.Google.PlayCustomApp
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozill... | brendanhay/gogol | gogol-playcustomapp/gen/Network/Google/PlayCustomApp.hs | mpl-2.0 | 1,533 | 0 | 5 | 293 | 106 | 83 | 23 | 22 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Agent/Sessions/EntityTypes/Get.hs | mpl-2.0 | 5,474 | 0 | 15 | 1,195 | 701 | 411 | 290 | 109 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE Rank2Types #-}
module Network.JsonRpc.Tests (tests) where
import Control.Concurrent
import Control.Concurrent.Async
import Control.Concurrent.STM
import Control.Exception hiding (assert)
import Control.Monad
import Data.Aeson.Types
im... | anton-dessiatov/json-rpc | test/Network/JsonRpc/Tests.hs | unlicense | 15,188 | 0 | 21 | 4,573 | 5,832 | 2,925 | 2,907 | 353 | 11 |
module CostasLikeArrays.A321534 where
import Helpers.CostasLikeArrays (distinctDirections, countPermutationsUpToDihedralSymmetry)
import Helpers.Records (allMax)
import Data.List (permutations)
a321534 :: Int -> Int
a321534 n = countPermutationsUpToDihedralSymmetry n $ allMax distinctDirections $ permutations [0..n-1]... | peterokagey/haskellOEIS | src/CostasLikeArrays/A321534.hs | apache-2.0 | 321 | 0 | 8 | 30 | 82 | 45 | 37 | 6 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ParallelListComp #-}
{-# LANGUAGE PatternGuards #-}
module GenBase where
import Data.Monoid
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Text.Regex.TDFA
import Text.Regex.TDFA.Text
generateBaseBundle ::
FilePa... | tgdavies/codeworld | codeworld-compiler/exec/GenBase.hs | apache-2.0 | 2,152 | 1 | 16 | 550 | 782 | 407 | 375 | 51 | 2 |
module Seraph.TypesSpec
( tests
) where
-------------------------------------------------------------------------------
import Test.QuickCheck.Property.Monoid
-------------------------------------------------------------------------------
import Seraph.Types
import SpecHelper
----... | MichaelXavier/Seraph | test/Seraph/TypesSpec.hs | bsd-2-clause | 689 | 0 | 10 | 92 | 89 | 52 | 37 | 10 | 1 |
{-# OPTIONS_HADDOCK hide #-}
-- |
--
-- Copyright:
-- This file is part of the package byline. It is subject to the
-- license terms in the LICENSE file found in the top-level
-- directory of this distribution and at:
--
-- https://github.com/pjones/byline
--
-- No part of this package, including this file... | pjones/byline | src/Byline/Internal/Prim.hs | bsd-2-clause | 2,207 | 0 | 8 | 418 | 572 | 326 | 246 | -1 | -1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QPixmapCache.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:16
Warning : this file is machine generated - do ... | keera-studios/hsQt | Qtc/Gui/QPixmapCache.hs | bsd-2-clause | 3,505 | 0 | 12 | 528 | 873 | 466 | 407 | 81 | 1 |
import Data.Array
import qualified Data.Array.Unboxed as U
import qualified Data.Foldable as Fld
import Data.List
import qualified Data.Map as Map
import Data.Maybe
import qualified Data.Sequence as Seq
import System.Random
import Data.Array.IO
import Control.Monad
import System.IO.Unsafe
shuffle :: [a] -> IO [a]
sh... | pbl64k/HackerRank-Contests | 2014-06-20-FP/BoleynSalary/bs.kdt.hs | bsd-2-clause | 5,111 | 0 | 20 | 1,629 | 2,377 | 1,269 | 1,108 | 95 | 5 |
module Linear.Quaternion.Utils where
import Linear.Affine
import Linear.Epsilon
import Linear.Matrix as M
import Linear.Metric
import Linear.Quaternion
import Linear.V3 (V3(..),cross)
import Linear.Vector
import qualified Debug.Trace as D
{- | This is an alternative to the Quaternion format,
following the THREE... | andygill/obj-tools | src/Linear/Quaternion/Utils.hs | bsd-3-clause | 5,171 | 0 | 14 | 1,326 | 1,211 | 622 | 589 | 72 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE PolyKinds #-}
module Language.Common where
data All (p :: k -> *) :: [k] -> * where
An :: All p '[]
Ac :: p x -> All p xs -> All p (x ': xs)
(.@.) :: p x -> All p xs -> All p (x ': xs)
(.@... | nazrhom/vcs-clojure | src/Language/Common.hs | bsd-3-clause | 355 | 0 | 10 | 83 | 140 | 81 | 59 | 13 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.ARB.VertexBufferObject
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : porta... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/VertexBufferObject.hs | bsd-3-clause | 1,872 | 0 | 4 | 208 | 169 | 120 | 49 | 45 | 0 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE FlexibleInstances #-}
-- | This is a legacy module from the pre-GHC HaRe, and will disappear
-- eventually.
module Language.Haskell.Refact.Utils.TypeSyn where
-- Modules from GHC
import qualified GHC as GHC
import qualified Name as GHC
import qualified... | kmate/HaRe | src/Language/Haskell/Refact/Utils/TypeSyn.hs | bsd-3-clause | 3,202 | 0 | 10 | 927 | 812 | 414 | 398 | 48 | 0 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}
module Laws where
import Test.QuickCheck
import Test.QuickCheck.Function
monadAssocProp :: forall m a b c. (Monad m, Eq (m c)) => m a -> Fun a (m b) -> Fun b (m c) -> Bool
monadAssocProp x (apply -> f) (apply -> g) = ((x >>= f) >>= g) == (x >>= (\x' -> f x'... | isovector/dependent-types | src/Laws.hs | bsd-3-clause | 579 | 0 | 12 | 128 | 301 | 163 | 138 | 11 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE... | IxpertaSolutions/freer-effects | src/Data/OpenUnion/Internal.hs | bsd-3-clause | 6,180 | 0 | 10 | 1,300 | 922 | 549 | 373 | 61 | 1 |
{-# LANGUAGE QuasiQuotes #-}
module Write.Type.FuncPointer
( writeFuncPointerType
) where
import Spec.Type
import Text.InterpolatedString.Perl6
import Text.PrettyPrint.Leijen.Text hiding ((<$>))
import Write.TypeConverter
import Write.WriteMonad
writeFuncPointerType :: FuncPointerType -> Write Doc
writeFuncPoint... | oldmanmike/vulkan | generate/src/Write/Type/FuncPointer.hs | bsd-3-clause | 428 | 0 | 10 | 56 | 95 | 56 | 39 | 12 | 1 |
--
-- HTTP client for use with io-streams
--
-- Copyright © 2012-2014 Operational Dynamics Consulting, Pty Ltd
--
-- 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 a BSD licence.
--
{-# LANGUA... | laurencer/confluence-sync | vendor/http-streams/tests/BasicSnippet.hs | bsd-3-clause | 1,110 | 0 | 13 | 206 | 175 | 103 | 72 | 20 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Reflex.Animation
( Animation (..)
, stretched
, delayed
, Clip (..)
, sampleClip
, toMaybe
, stretchTo
, apply
, crop
, clamped
, repeat
, replicate
, cropEnd
, cropStart
, reCrop
, linear
, linearIn
, linearOut
, piecewise
... | Saulzar/reflex-animation | src/Reflex/Animation.hs | bsd-3-clause | 7,113 | 0 | 12 | 1,758 | 2,466 | 1,303 | 1,163 | -1 | -1 |
{-|
Module: Codec.Parser.Common
Copyright: Jeremy List
License: BSD-3
Maintainer: quick.dudley@gmail.com
Common functions which do not need to be in 'Phaser.Core', mostly for using
'Phase's and 'Automaton's as parsers.
-}
{-# LANGUAGE MultiParamTypeClasses,FlexibleContexts,CPP #-}
module Codec.Phaser.Common (
... | quickdudley/phaser | Codec/Phaser/Common.hs | bsd-3-clause | 13,177 | 0 | 18 | 3,015 | 4,303 | 2,248 | 2,055 | 268 | 7 |
-----------------------------------------------------------------------------
-- |
-- Module : Plugins.Monitors.Common
-- Copyright : (c) 2010, 2011 Jose Antonio Ortega Ruiz
-- (c) 2007-2010 Andrea Rossato
-- License : BSD-style (see LICENSE)
--
-- Maintainer : Jose A. Ortega Ruiz <jao@gn... | raboof/xmobar | src/Plugins/Monitors/Common.hs | bsd-3-clause | 14,784 | 0 | 15 | 4,723 | 4,626 | 2,343 | 2,283 | 335 | 17 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.