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 : Network.Transport.Memory
-- Copyright : (c) Phil Hargett 2013
-- License : MIT (see LICENSE file)
--
-- Maintainer : phil@haphazardhouse.net
-- Stability : experimental
-- Portability : non-portable (requi... | hargettp/courier | src/Network/Transport/Memory.hs | mit | 3,646 | 0 | 18 | 731 | 729 | 368 | 361 | 69 | 2 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.Geolocation
(js_getCurrentPosition, getCurrentPosition, js_watchPosition,
watchPosition, js_clearWatch, clearWatch, Geolocation,
castToGeolocation, gTypeGeolocation)
where
import Prel... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/Geolocation.hs | mit | 3,234 | 32 | 11 | 625 | 710 | 408 | 302 | 56 | 1 |
-- Problems/Problem025Spec.hs
module Problems.Problem025Spec (main, spec) where
import Test.Hspec
import Problems.Problem025
main :: IO()
main = hspec spec
spec :: Spec
spec = describe "Problem 25" $
it "Should evaluate to 4782" $
p25 `shouldBe` 4782
| Sgoettschkes/learning | haskell/ProjectEuler/tests/Problems/Problem025Spec.hs | mit | 266 | 0 | 8 | 51 | 73 | 41 | 32 | 9 | 1 |
module Dataset.Backend.Histogram
( dataset
) where
import Dataset.Internal.Types
-- | The dataset for a histogram is not terribly interesting, it's basically
-- just a list.
dataset :: Dataset Point
dataset = Dataset
{ _insert = (:)
, _removeEnd = id
, _dataset = []
, _toList = id
,... | SilverSylvester/cplot | src/Dataset/Backend/Histogram.hs | mit | 383 | 0 | 7 | 104 | 81 | 51 | 30 | 11 | 1 |
{-# LANGUAGE RecordWildCards #-}
module UART.FIFO (fifo) where
import CLaSH.Prelude hiding (empty)
--import CLaSH.Signal.Bundle
--import CLaSH.Signal.Internal
import Control.Lens
import Control.Monad
import Control.Monad.Trans.State
import Data.Tuple
import Types
type FifoAddr = Unsigned 8 -- this has to match the s... | aufheben/Y86 | SEQ/UART/FIFO.hs | mit | 2,531 | 0 | 19 | 630 | 648 | 356 | 292 | -1 | -1 |
-- |
-- Module: Hakyll.Web.Sass
-- Copyright: (C) 2015 Braden Walters
-- License: MIT (see LICENSE file)
-- Maintainer: Braden Walters <vc@braden-walters.info>
-- Stability: experimental
-- Portability: ghc
module Hakyll.Web.Sass (sassCompiler) where
import Data.Default.Class
import Data.Functor
import Hakyll.Core.Co... | relrod/hakyll-sass | src/Hakyll/Web/Sass.hs | mit | 1,284 | 0 | 18 | 213 | 267 | 142 | 125 | 24 | 3 |
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
-- In addition, you can configure a number of different aspects of Yesod
-- by overriding methods in the Yesod typeclass. That instance is
-- declared in the Foundation.hs file.... | mostalive/yesod-splittest | Settings.hs | mit | 3,244 | 0 | 10 | 604 | 399 | 244 | 155 | -1 | -1 |
-- Dieses Modul stellt Funktionen zur Verfügung die beim erstellen von Beispielen nützlich sind.
module System.ArrowVHDL.Circuit.Tools
where
-- Eingebunden werden für die Demo-Funktionen aus den
-- Systembibliotheken die folgenden Module:
import System.IO (writeFile)
import System.Cmd (system)
-- Daneben wird noc... | frosch03/arrowVHDL | src/System/ArrowVHDL/Circuit/Tools.hs | cc0-1.0 | 5,831 | 0 | 19 | 1,253 | 1,245 | 703 | 542 | 63 | 2 |
import System.Environment
import System.IO
import Data.Matrix
import qualified Data.Vector
import qualified Debug.Trace
import qualified Data.Vector.Generic
main = do
putStrLn "Please type file name with board data:"
filename <- getLine
putStrLn ("Opening: " ++ filename)
handle <- openFile filename Rea... | lgadawski/spop-logical-pics | logical-pics.hs | epl-1.0 | 9,068 | 118 | 19 | 1,720 | 2,994 | 1,531 | 1,463 | 145 | 1 |
{-| Unittests for 'Ganeti.JQueue.Objects'.
-}
{-
Copyright (C) 2012, 2013 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later... | ribag/ganeti-experiments | test/hs/Test/Ganeti/JQueue/Objects.hs | gpl-2.0 | 1,815 | 0 | 14 | 317 | 281 | 154 | 127 | 29 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
module Operate.Login where
import Gateway.CGI
import Control.Types ( VNr, toString, TimeStatus (..) )
import Control.Monad ( when, mzero )
import qualified Control.Vorlesung as V
import qualified Control.Semester
import qualified Control.Schule as U
import qualified Control.Vorles... | marcellussiegburg/autotool | db/src/Operate/Login.hs | gpl-2.0 | 2,436 | 26 | 16 | 580 | 677 | 369 | 308 | 60 | 2 |
module ConnectFour
( module ConnectFour.Board
, module ConnectFour.Move
, module ConnectFour.GameState
, module ConnectFour.Piece
) where
import ConnectFour.Board
import ConnectFour.Move
import ConnectFour.GameState
import ConnectFour.Piece
| RyanBeatty/Falcon | src/ConnectFour.hs | gpl-2.0 | 260 | 6 | 5 | 43 | 56 | 35 | 21 | 9 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
import Data.Ratio as Ra
{- Type of a dyadic rational, a bit like floating point except that operations can be performed exactly.
resource tells you which maximum denominator to use for inexact operations
(exact operations send dyadic rationals to dyadic rationals.)
-}
data... | gregory-nisbet/IntervalArithmetic | arithmetic.hs | gpl-2.0 | 4,966 | 103 | 17 | 1,059 | 2,010 | 1,031 | 979 | 89 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Debug
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
--
-- Debug utilities us... | atsukotakahashi/wi | src/library/Yi/Debug.hs | gpl-2.0 | 3,013 | 0 | 19 | 749 | 793 | 403 | 390 | 59 | 2 |
import Data.Maybe
import Data.Monoid
import Text.Pandoc
import Text.Pandoc.JSON
main :: IO ()
main = toJSONFilter toMinted
toMinted :: Block -> Block
toMinted = bottomUp toMintedBlock . bottomUp toMintedInline
toMintedBlock :: Block -> Block
toMintedBlock (CodeBlock (identity,... | ncaq/pandoc-minted | src/Main.hs | gpl-2.0 | 999 | 1 | 12 | 213 | 305 | 159 | 146 | 23 | 3 |
{-# LANGUAGE EmptyDataDecls,
FlexibleContexts,
FlexibleInstances,
GADTs,
GeneralizedNewtypeDeriving,
MultiParamTypeClasses,
OverloadedStrings,
DeriveGeneric,
QuasiQuotes,
TemplateHaskell,
Ty... | pkukulak/courseography | hs/Database/Tables.hs | gpl-3.0 | 4,672 | 0 | 10 | 1,270 | 459 | 267 | 192 | 53 | 1 |
{-
This is the bootstrapping compiler for the Bzo programming language.
Copyright (C) 2020 Charles Rosenbauer
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 y... | charlesrosenbauer/Bzo-Compiler | src/Tokens.hs | gpl-3.0 | 3,560 | 0 | 10 | 1,045 | 1,016 | 552 | 464 | 147 | 1 |
import qualified Data.Text as T
wordcount :: String -> Int
wordcount "" = 0
wordcount start = let count = T.splitOn (T.pack " ") (T.pack start) in
length count
main :: IO ()
main = do
line <- getLine
print $ wordcount line | torchhound/projects | haskell/wordcount.hs | gpl-3.0 | 229 | 3 | 12 | 49 | 109 | 52 | 57 | 9 | 1 |
{-# LANGUAGE ViewPatterns, ConstraintKinds, FlexibleContexts #-}
module Language.SecreC.TypeChecker.Conversion where
import Language.SecreC.TypeChecker.Base
import Language.SecreC.TypeChecker.Environment
import Language.SecreC.Prover.Base
import Language.SecreC.Syntax
import Language.SecreC.Location
import Language.S... | haslab/SecreC | src/Language/SecreC/TypeChecker/Conversion.hs | gpl-3.0 | 14,274 | 0 | 21 | 2,975 | 5,927 | 2,841 | 3,086 | 235 | 9 |
module Main (main) where
import Test.Framework
import Test.Framework.Providers.QuickCheck2
import Test.Framework.Providers.HUnit
import SimulateTests
import CompileTests
main :: IO ()
main = defaultMain tests
tests :: [Test]
tests =
[
testGroup "Simulater"
[
testProperty "Converting to and from bits... | aparent/jcc | tests/tests.hs | gpl-3.0 | 618 | 0 | 8 | 121 | 113 | 64 | 49 | 19 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-codedeploy/gen/Network/AWS/CodeDeploy/ListApplications.hs | mpl-2.0 | 4,167 | 0 | 12 | 858 | 524 | 315 | 209 | 60 | 1 |
-- -----------------------------------------------------------------------------
-- This file is part of Skema-Common.
-- Skema-Common 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... | SkemaPlatform/skema-common | src/Skema/DataValue.hs | agpl-3.0 | 15,418 | 0 | 12 | 3,400 | 5,074 | 2,857 | 2,217 | 268 | 1 |
-- GSoC 2015 - Haskell bindings for OpenCog.
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
-- | This Module defines the main functions to interact with the AtomSpace
-- creating/removing/modifying ... | ceefour/atomspace | opencog/haskell/OpenCog/AtomSpace/Api.hs | agpl-3.0 | 13,025 | 0 | 34 | 4,830 | 3,322 | 1,649 | 1,673 | 312 | 7 |
module Main where
import System.Environment
import Sum
import Nope
import PhhhbbtttEither
import Identity
import List
main :: IO ()
main = getArgs >>= checkBasedOnArgs
checkBasedOnArgs :: [String] -> IO ()
checkBasedOnArgs ("Sum":_) = checkSum
checkBasedOnArgs ("Nope":_) = checkNope
checkBasedOnArgs ("PhhhbbtttEithe... | dmp1ce/Haskell-Programming-Exercises | Chapter 18/MonadInstances/app/Main.hs | unlicense | 817 | 0 | 9 | 130 | 218 | 110 | 108 | 25 | 1 |
module Mdb.Types (
FileId,
PersonId,
AlbumId,
SerialId, SeasonId, EpisodeId,
TagId
) where
import Data.Int (Int64)
type FileId = Int64
type AlbumId = Int64
type PersonId = Int64
type SerialId = Int64
type SeasonId = Int64
type EpisodeId = Int64
type TagId = Int64
| waldheinz/mdb | src/lib/Mdb/Types.hs | apache-2.0 | 319 | 0 | 5 | 98 | 81 | 53 | 28 | 14 | 0 |
{- |
Module : Data.DRS.Variables
Copyright : (c) Harm Brouwer and Noortje Venhuizen
License : Apache-2.0
Maintainer : me@hbrouwer.eu, n.j.venhuizen@rug.nl
Stability : provisional
Portability : portable
DRS variables
-}
module Data.DRS.Variables
(
-- * Conversion
drsRefToDRSVar
, drsRelToString
... | hbrouwer/pdrt-sandbox | src/Data/DRS/Variables.hs | apache-2.0 | 7,009 | 0 | 13 | 1,375 | 1,822 | 971 | 851 | 84 | 11 |
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-}
module Types ( Game
, Model
, readGamesFromCsv
, team1
, team2
, result
, gameID
, gameOdds
)where
import Control.Applicative ( (<$>), (<*>) )
import ... | mkiefel/trueskill | Types.hs | bsd-2-clause | 1,827 | 0 | 19 | 602 | 488 | 280 | 208 | 53 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell, QuasiQuotes #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
-- In addition, you can configure a number of different aspects of Yesod
--... | snoyberg/yesodcms | Settings.hs | bsd-2-clause | 5,305 | 0 | 13 | 915 | 762 | 442 | 320 | 66 | 2 |
import Data.List
tst = do
getLine
xstr <- getLine
let xs = map read (words xstr)
putStrLn $ intercalate " " $ map show $ map (uncurry lcm) (zip (1 : xs) (xs ++ [1]))
main = do
tstr <- getLine
mapM_ (const tst) [1 .. read tstr]
| pbl64k/HackerRank-Contests | 2014-08-04-Weekly/JohnAndGcdList/jagl.accepted.hs | bsd-2-clause | 254 | 2 | 13 | 75 | 139 | 64 | 75 | 9 | 1 |
{-|
/NOTE/: This module is preliminary and may change at a future date.
If you wish to use its features, please email me and I will
help evolve an API that suits you.
This module is intended to help converting a list of tags into a
tree of tags.
-}
module Text.HTML.TagSoup.Tree
{-# DEPRECATED ... | nfjinjing/yuuko | src/Text/HTML/TagSoup/Tree.hs | bsd-3-clause | 2,481 | 0 | 15 | 773 | 895 | 462 | 433 | 44 | 7 |
-------------------------------------------------------------------------------
-- |
-- Module : Control.Monad.Trans.Supply
-- Copyright : (C) 2013 Merijn Verstraaten
-- License : BSD-style (see the file LICENSE)
-- Maintainer : Merijn Verstraaten <merijn@inconsistent.nl>
-- Stability : experimental
... | merijn/transformers-supply | Control/Monad/Trans/Supply.hs | bsd-3-clause | 7,980 | 0 | 13 | 1,605 | 1,622 | 864 | 758 | 77 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module VectorTests.TH (TestType (..), writeTests, aggregateTests) where
import Test.Framework
import Data.List (sortBy, groupBy, intersectBy, foldl1')
import Data.Function (on)
import Data.Geometry
import Language.Haskell.TH
import VectorTests.VectorGenerators ()
import Control.Mon... | achirkin/fastvec | test/VectorTests/TH.hs | bsd-3-clause | 5,661 | 0 | 20 | 1,640 | 1,707 | 926 | 781 | 91 | 3 |
import Data.Map
class (Ord c) => IdEntity c a where
entt :: c -> a
code :: a -> c
main :: IO()
main =
putStrLn("It has Begun!")
| rafaelbfs/bovhistory | src/Main.hs | bsd-3-clause | 144 | 1 | 7 | 44 | 68 | 34 | 34 | -1 | -1 |
{-# LANGUAGE Safe, PatternGuards, BangPatterns #-}
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
{- | Simplification.
The rules in this module are all conditional on the expressions being
well-defined.
So, for example, consider the formula `P`, which corresponds to `fin e`.
`P` says the following:
if e... | ntc2/cryptol | src/Cryptol/TypeCheck/Solver/Numeric/Simplify1.hs | bsd-3-clause | 13,571 | 0 | 19 | 5,289 | 5,195 | 2,536 | 2,659 | 294 | 35 |
--
-- Operation:
-- * When one or more filenames are specified the program will look for audio
-- tags in those files (and ignore files with no tag). If an option to
-- modify a tag is used then the files will be modified. Otherwise all
-- recognized tags are printed to stdout.
-- * When no filenames are s... | b4winckler/tag | src/Main.hs | bsd-3-clause | 7,112 | 0 | 19 | 1,914 | 2,209 | 1,123 | 1,086 | 185 | 3 |
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -freduction-depth=100 #-}
{-# OPTIONS_GHC -fno-warn-deprecations #-}
-- | Instances for 'Generic' and 'HasMetadata'.
--
-- We define instances for datatypes from @generics-sop@ and
-- @base@ that are suppor... | well-typed/generics-sop | generics-sop/src/Generics/SOP/Instances.hs | bsd-3-clause | 10,468 | 0 | 7 | 1,232 | 2,695 | 1,561 | 1,134 | 236 | 0 |
{-|
Copyright : (c) Dave Laing, 2017
License : BSD3
Maintainer : dave.laing.80@gmail.com
Stability : experimental
Portability : non-portable
-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
module Fragment.Record.Rules.Type.Infer.Offline (
RecordInferTypeContext
, recordInferTypeRule... | dalaing/type-systems | src/Fragment/Record/Rules/Type/Infer/Offline.hs | bsd-3-clause | 749 | 0 | 8 | 151 | 165 | 99 | 66 | 13 | 1 |
-- Copyright 2021 Google LLC
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- https://developers.google.com/open-source/licenses/bsd
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
-- NOTE: Use... | google-research/dex-lang | src/lib/LLVM/HEAD/JIT.hs | bsd-3-clause | 4,836 | 0 | 23 | 946 | 1,256 | 649 | 607 | -1 | -1 |
module Main where
import Test.Hspec
import Test.QuickCheck
import Lib(fibs, buzz, isPrime)
numFibs = 10000
main :: IO ()
main = hspec $ do
describe "Fibonacci Numbers" $ do
it "Numbers equal to the sum of the last two" $ lastTwoSum $ take numFibs fibs
it "First 10 equal 0, 1, 1, 2, 3, 5, 8, 13, 21, 34" $ t... | DrewBarclay/fibbuzz | test/Spec.hs | bsd-3-clause | 1,107 | 0 | 13 | 261 | 421 | 218 | 203 | 23 | 1 |
{-
-}
module HCParser where
import HOCHC.Parser
import HOCHC.Tokeniser
import Text.Parsec.Prim
import Text.Parsec.Combinator
import Data.Char
import Data.Maybe
import Data.List(sortBy)
import Data.Ord(comparing)
import HOCHC.DataTypes
import Control.Applicative((<**>))
lineParser :: MyParser [Term]
lineParser = (f... | penteract/HigherOrderHornRefinement | HOCHC/Refinement/HCParser.hs | bsd-3-clause | 1,568 | 0 | 14 | 338 | 580 | 295 | 285 | 43 | 1 |
module RPF.State where
import Data.IP
import Network.DNS.Types (Domain)
import Network.DomainAuth
import RPF.Types
type ConstName = String
type ConstTable = [(ConstName, Constant)]
data ParserState = ParserState {
consttbl :: ConstTable
, used :: [ConstName]
, unused :: [ConstName]
, iplol :: [[I... | kazu-yamamoto/rpf | RPF/State.hs | bsd-3-clause | 748 | 0 | 10 | 212 | 241 | 155 | 86 | 31 | 1 |
module Language.BCoPL.DataLevel.EvalML1Err where
-- import Debug.Trace
import Data.Char (toLower)
import Language.BCoPL.DataLevel.ML1
import Language.BCoPL.DataLevel.Derivation (Tree(..),Deducer,sessionGen,sessionGen')
data Judge = EvalTo Exp (Maybe Val)
| Plus {k,m,n :: Int}
| Minus {k,m,n :: ... | nobsun/hs-bcopl | src/Language/BCoPL/DataLevel/EvalML1Err.hs | bsd-3-clause | 8,283 | 1 | 30 | 3,950 | 3,557 | 1,855 | 1,702 | 169 | 20 |
{-# OPTIONS -XCPP -XDeriveDataTypeable #-}
module SearchCart (
searchCart
) where
import Data.TCache.DefaultPersistence
import Data.TCache.DefaultPersistence
import Data.TCache.IndexQuery as Q
import Data.TCache.IndexText
import Data.Maybe
import qualified Data.Map as M
import Control.Workflow.Configuration
import C... | agocorona/MFlow | Demos/SearchCart.hs | bsd-3-clause | 4,068 | 0 | 24 | 1,306 | 1,178 | 608 | 570 | 93 | 9 |
{-#LANGUAGE TypeOperators#-}
{-#LANGUAGE DataKinds#-}
module Problem700 where
import Data.Array
import Data.Modular
import Data.Maybe
type ModN = Integer / 4503599627370517
b = 4503599627370517 :: Integer
a = 1504170715041707 :: ModN
a' = fromJust $ inv (-a)
bigOnes = take 16 $ iterate (\x -> head $ filter (< x) $... | adityagupta1089/Project-Euler-Haskell | src/problems/Problem700.hs | bsd-3-clause | 1,391 | 0 | 14 | 236 | 286 | 158 | 128 | 20 | 1 |
-------------------------------------------------------------------------------
---- |
---- Module : Language.MUDA.PPrint
---- Copyright : (c) Syoyo Fujita
---- License : BSD-style
----
---- Maintainer : syoyo@lighttransport.com
---- Stability : experimental
---- Portability : GHC 6.10
----
---- PPr... | syoyo/MUDA | Language/MUDA/PPrint.hs | bsd-3-clause | 786 | 0 | 8 | 130 | 112 | 66 | 46 | 9 | 0 |
-- | This module reexports 'Data.ListTrie.RegExp.Weighted' for now.
module Data.ListTrie.RegExp
( module Data.ListTrie.RegExp.Weighted
)
where
import Data.ListTrie.RegExp.Weighted
| baldo/regexp-tries | src/Data/ListTrie/RegExp.hs | bsd-3-clause | 191 | 0 | 5 | 28 | 25 | 18 | 7 | 3 | 0 |
module CodeWidget.CodeWidgetUtil where
import qualified Graphics.UI.Gtk as G
import Text.Parsec
import Text.Parsec.Pos
import Data.List
import Util
import CodeWidget.CodeWidgetTypes
maybePrtStrLn :: Bool -> String -> IO ()
maybePrtStrLn b s = do if' (b == True) (putStrLn s) (return ())
dbgPrints :: Bool
... | termite2/code-widget | CodeWidget/CodeWidgetUtil.hs | bsd-3-clause | 6,839 | 0 | 19 | 1,841 | 2,021 | 1,012 | 1,009 | 135 | 3 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
module Util where
import Conduit
import Control.Monad
import Control.Monad.Primitive
import qualified Data.Vector.Generic as V
conduitVectorBounded :: ( MonadBase base m, V.Vector v a, PrimMonad base
, Num size, Ord si... | pavelkogan/es-reindex | src/Util.hs | bsd-3-clause | 1,458 | 0 | 13 | 439 | 517 | 269 | 248 | 36 | 2 |
{-# OPTIONS_GHC -fno-warn-deprecations #-}
module TagSoup.Test(test) where
import Text.HTML.TagSoup
import Text.HTML.TagSoup.Entity
import Text.HTML.TagSoup.Match
import Control.Monad
import Data.List
import Test.QuickCheck
-- * The Test Monad
type Test a = IO a
pass :: Test ()
pass = return ()
runTest :: Test (... | silkapp/tagsoup | TagSoup/Test.hs | bsd-3-clause | 9,462 | 0 | 15 | 2,040 | 2,873 | 1,445 | 1,428 | 165 | 6 |
-- Copyright (c) 2017, Travis Bemann
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- o Redistributions of source code must retain the above copyright notice, this
-- list of conditio... | tabemann/botwars | src/Robots/Genetic/HunterKiller/Intrinsics.hs | bsd-3-clause | 28,153 | 0 | 24 | 6,806 | 8,141 | 4,028 | 4,113 | 562 | 8 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Data.Conduit.Network.Stream.Internal where
import Control.Applicative
import Control.Concurrent.MVar
import Control.Monad.Reader
--import Control.Monad.Trans
import Control.Monad.Trans.Resource
import Data.Conduit
import Data.Conduit.Network
import Data.ByteString (B... | mcmaniac/conduit-network-stream | src/Data/Conduit/Network/Stream/Internal.hs | bsd-3-clause | 2,483 | 0 | 14 | 514 | 703 | 372 | 331 | 56 | 6 |
{-|
Description : Abstract syntax tree.
Representation of Uroboro programs as abstract syntax tree with
type annotations. This is the "internal" program representation
produced by the type checker.
-}
module Uroboro.Tree.Internal
( -- * Common parts
-- $common
Identifier
, Type (Type)
... | tewe/uroboro | src/Uroboro/Tree/Internal.hs | mit | 1,299 | 0 | 7 | 319 | 242 | 157 | 85 | 29 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
module InnerEar.Exercises.BoostOrCut (boostOrCutExercise) where
import Reflex
import Reflex.Dom
import Data.Map
import Text.JSON
import Text.JSON.Generic
import Sound.MusicW
import InnerEar.Exercises.MultipleChoice
import InnerEar.Types.ExerciseId
import InnerEar.Types.Exercise
im... | JamieBeverley/InnerEar | src/InnerEar/Exercises/BoostOrCut.hs | gpl-3.0 | 3,566 | 0 | 15 | 547 | 996 | 533 | 463 | 63 | 1 |
-- | Text.Tabular.AsciiArt from tabular-0.2.2.7, modified to treat
-- wide characters as double width.
module Text.Tabular.AsciiWide where
import Data.List (intersperse, transpose)
import Text.Tabular
import Hledger.Utils.String
-- | for simplicity, we assume that each cell is rendered
-- on a single line
render :... | mstksg/hledger | hledger/Text/Tabular/AsciiWide.hs | gpl-3.0 | 3,991 | 0 | 13 | 994 | 1,152 | 601 | 551 | 79 | 4 |
{-# 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-ec2/gen/Network/AWS/EC2/DescribeVolumes.hs | mpl-2.0 | 9,539 | 0 | 15 | 1,972 | 1,079 | 667 | 412 | 112 | 1 |
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Riak.Protocol.BucketProps.ReplMode (ReplMode(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import qu... | tmcgilchrist/riak-haskell-client | protobuf/src/Network/Riak/Protocol/BucketProps/ReplMode.hs | apache-2.0 | 2,796 | 0 | 11 | 487 | 748 | 411 | 337 | 63 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
#ifdef UNSAFETRICKS
{-# LANGUAGE MagicHash #-}
#endif
module Data.HashTable.Weak.Internal.UnsafeTricks
( Key
, toKey
, fromKey
, emptyRecord
, deletedRecord
, keyIsEmpty
, keyIsDeleted
, writeDeletedElement
, makeEmptyVector
) where
im... | cornell-pl/HsAdapton | weak-hashtables/src/Data/HashTable/Weak/Internal/UnsafeTricks.hs | bsd-3-clause | 2,496 | 0 | 11 | 523 | 399 | 227 | 172 | 43 | 1 |
-- Copyright (c) 2013 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... | saltlang/compiler-toolbox | src/Prelude/Extras/ExtraInstances.hs | bsd-3-clause | 2,483 | 0 | 13 | 431 | 348 | 192 | 156 | 25 | 0 |
module Perceptron where
type Gate = Float -> Float -> Float
makeGate :: Float -> Float -> Float -> Gate
makeGate w1 w2 b x1 x2
| x1 * w1 + x2 * w2 + b <= 0 = 0
| otherwise = 1
-- |
-- >>> andGate 0 0
-- 0.0
-- >>> andGate 0 1
-- 0.0
-- >>> andGate 1 0
-- 0.0
-- >>> andGate 1 1
-- 1.0
andGate :: Gate
andGate = ma... | kayhide/deep-learning-from-scratch | src/Perceptron.hs | bsd-3-clause | 871 | 0 | 12 | 219 | 233 | 137 | 96 | 14 | 1 |
{-# LANGUAGE TypeFamilies #-}
module Tuura.Concurrency (
ConcurrencyOracle, oracleMokhovCarmona, reduce, reduceLog
) where
import Data.List
import Tuura.Log
import Tuura.Graph
type ConcurrencyOracle a = a -> a -> Bool
-- Given a log determine if two events are concurrent
oracleMokhovCarmona :: Ord e => Log e... | tuura/process-mining | src/Tuura/Concurrency.hs | bsd-3-clause | 2,191 | 0 | 12 | 566 | 845 | 442 | 403 | 42 | 3 |
{-# LANGUAGE BangPatterns,
ScopedTypeVariables,
RecordWildCards,
FlexibleContexts,
TypeFamilies #-}
-- |
-- Module : AI.HNN.FF.Network
-- Copyright : (c) 2012 Alp Mestanogullari
-- License : BSD3
-- Maintainer : alpmestan@gmail.com
-- Stability : ... | fffej/hnn | AI/HNN/FF/Network.hs | bsd-3-clause | 17,075 | 0 | 13 | 3,668 | 2,578 | 1,417 | 1,161 | 116 | 2 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "Network/Wai/Handler/Warp/SendFile.hs" #-}
{-# LANGUAGE CPP, ForeignFunctionInterface #-}
module Network.Wai.Handler.Warp.SendFile (
sendFile
, readSendFile
... | phischu/fragnix | tests/packages/scotty/Network.Wai.Handler.Warp.SendFile.hs | bsd-3-clause | 3,680 | 0 | 13 | 1,007 | 1,131 | 576 | 555 | 83 | 3 |
{-# LANGUAGE DeriveDataTypeable, MagicHash, PolymorphicComponents, RoleAnnotations, UnboxedTuples #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.Haskell.Syntax
-- Copyright : (c) The University of Glasgow 2003
-- License : BSD-style (see the fi... | ryantm/ghc | libraries/template-haskell/Language/Haskell/TH/Syntax.hs | bsd-3-clause | 49,614 | 36 | 14 | 13,678 | 8,709 | 4,791 | 3,918 | 622 | 9 |
{-+
PrettyM redefines the combinators in Pretty, so that they pass an
environment around. This can be used to adust the behaviour of the layout,
spacing etc., without parameterising the whole pretty printer. To the user
it all appears the same.
May be useful to rewrite this as a state transformer, rather than a
stat... | kmate/HaRe | old/tools/base/pretty/PrettyM.hs | bsd-3-clause | 7,873 | 10 | 12 | 1,952 | 2,100 | 1,148 | 952 | 146 | 2 |
{-# LANGUAGE GeneralizedNewtypeDeriving, ConstraintKinds, PatternGuards, TupleSections #-}
module Idris.ParseExpr where
import Prelude hiding (pi)
import Text.Trifecta.Delta
import Text.Trifecta hiding (span, stringLiteral, charLiteral, natural, symbol, char, string, whiteSpace, Err)
import Text.Parser.LookAhead
impo... | mrmonday/Idris-dev | src/Idris/ParseExpr.hs | bsd-3-clause | 52,608 | 1 | 37 | 19,383 | 15,979 | 7,843 | 8,136 | -1 | -1 |
{-# LANGUAGE CPP #-}
-- ----------------------------------------------------------------------------
-- | Pretty print helpers for the LLVM Code generator.
--
module LlvmCodeGen.Ppr (
pprLlvmHeader, pprLlvmCmmDecl, pprLlvmData, infoSection
) where
#include "HsVersions.h"
import Llvm
import LlvmCodeGen.Ba... | tjakway/ghcjvm | compiler/llvmGen/LlvmCodeGen/Ppr.hs | bsd-3-clause | 7,704 | 0 | 17 | 2,003 | 1,166 | 607 | 559 | 113 | 14 |
module Test (R(..)) where
data R = R { x :: Char, y :: Int, z :: Float }
| S { x :: Char }
| T { y :: Int, z:: Float }
| W
| forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/ghci/scripts/T4015.hs | bsd-3-clause | 148 | 0 | 8 | 62 | 71 | 46 | 25 | 5 | 0 |
module Oden.Compiler where
import Oden.Predefined
import Oden.Environment
import Oden.Core.Monomorphed
import Oden.Core.Typed
import Oden.Compiler.Environment
import Oden.Compiler.Monomorphization
import Control.Arrow
data CompilationError = Mon... | oden-lang/oden | src/Oden/Compiler.hs | mit | 763 | 0 | 8 | 182 | 160 | 88 | 72 | 17 | 1 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.SourceBuffer
(appendBuffer, abort, remove, setMode, getMode, getUpdating,
getBuffered, setTimestampOffset... | ghcjs/jsaddle-dom | src/JSDOM/Generated/SourceBuffer.hs | mit | 6,924 | 0 | 12 | 827 | 1,369 | 760 | 609 | 82 | 1 |
module Main where
import Data.Set.Class as Sets
import qualified Data.Set as Set
import qualified Data.Map as Map
import qualified Data.Sequence as Seq
import qualified Data.IntSet as IntSet
import qualified Data.IntMap as IntMap
import qualified Data.List as List
import qualified Data.HashSet as HashSet
import quali... | athanclark/sets | bench/Profile.hs | mit | 5,167 | 0 | 12 | 1,039 | 1,776 | 1,043 | 733 | 118 | 1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
{- |
Module : Network.MPD.Applicative.Internal
Copyright : (c) Simon Hengel 2012
License : MIT
Maintainer : joachifm@fastmail.fm
Stability : stable
Portability : unportable
Applicative MPD command interface... | matthewleon/libmpd-haskell | src/Network/MPD/Applicative/Internal.hs | mit | 2,998 | 0 | 13 | 733 | 740 | 405 | 335 | 58 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
module Text.Greek.Mounce.Phonology where
import Data.Data
import Data.Text (Text)
data Euphony = Euphony
{ euphonyName :: Text
, euphonyRules :: [EuphonyRule]
}
deriving (Show, Eq)
data EuphonyRule = EuphonyRule
{ euphonyRuleFirst :: Text
, euphonyRuleSecond :: Text
... | scott-fleischman/greek-grammar | haskell/greek-grammar/src/Text/Greek/Mounce/Phonology.hs | mit | 392 | 0 | 9 | 73 | 105 | 64 | 41 | 13 | 0 |
module Vidar.Parser
( parse
) where
import Vidar
import Text.ParserCombinators.ReadP
import Data.Char
import Control.Applicative ((<$>))
parse :: String -> Either ParseError [Vidar]
parse s = case readP_to_S (many1 element) s of
[(e, "")] -> Right e
_ -> Left ParseError
data ParseError = ParseError
... | Tayacan/Vidar | Vidar/Parser.hs | mit | 1,930 | 0 | 12 | 501 | 723 | 350 | 373 | 77 | 2 |
module Y2016.M10.D03.Exercise where
-- below imports available from 1HaskellADay git repository:
import Data.BlockChain.Block.Types
import Data.Tree.Merkle
import Y2016.M09.D22.Exercise (latestTransactions)
{-
*SIIIIIGGGGGGHHHHHH* <<- imagine the long sigh of a clerical worker when you
han... | geophf/1HaskellADay | exercises/HAD/Y2016/M10/D03/Exercise.hs | mit | 2,510 | 0 | 7 | 484 | 109 | 68 | 41 | 10 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE TemplateHaskell #-}
module Yage.TH where
import Yage.Prelude
import Language.Haskell.TH.Syntax
instance Lift FilePath where
lift fp = [| fpToString fp |] | MaxDaten/yage-contrib | src/Yage/TH.hs | mit | 211 | 0 | 6 | 32 | 39 | 25 | 14 | 7 | 0 |
-- |
--
-- Module : AprioriSpec.Data
-- License : MIT
module TestData (
AprioriTestData(..)
, AprioriDebugData(..)
, AssocRulesTestData(..)
) where
import DataAssociation.Definitions
import DataAssociation.APriori.Debug
data AprioriTestData set it = AprioriTestData{
tTransactions :: [set it]
, tM... | fehu/min-dat--a-priori | core/test/TestData.hs | mit | 578 | 0 | 10 | 119 | 143 | 91 | 52 | 15 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Test where
import Bencode (Bencode(..), parseBencode, antiParse)
import Control.Monad (replicateM)
import Data.Attoparsec.Lazy (Result(..), parse)
import Data.Map (fromList)
import Test.QuickCheck (Arbitrary, Gen, Property, arbitrary, choo... | nabilhassein/bitcurry | test/Test.hs | mit | 2,321 | 3 | 21 | 599 | 532 | 288 | 244 | 40 | 2 |
{-# LANGUAGE QuasiQuotes #-}
module Y2018.M01.D10.Exercise where
{--
Today's Haskell exercise is a bit of a warming-up exercise. Today we'll store
packet information in the packet table (the structure of the table matching
Packet (see Y2017.M12.D20.Exercise), and also write the fetch function that
retrieves packet in... | geophf/1HaskellADay | exercises/HAD/Y2018/M01/D10/Exercise.hs | mit | 2,148 | 0 | 14 | 302 | 273 | 163 | 110 | 24 | 1 |
{-# htermination enumFrom :: Bool -> [Bool] #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_enumFrom_7.hs | mit | 48 | 0 | 2 | 8 | 3 | 2 | 1 | 1 | 0 |
module Sockets (
newServer,
Broadcaster
) where
import BasePrelude hiding ((\\))
import Control.Concurrent.Suspend (sDelay)
import Control.Concurrent.Timer
import Control.Monad.Trans (lift)
import Control.Monad.Trans.Maybe (runMaybeT)
import qualified Data.Aeson as... | jackbowman/basilica | Sockets.hs | mit | 3,991 | 0 | 21 | 858 | 1,257 | 648 | 609 | -1 | -1 |
module Melchior.EventSources.Keyboard (
keyDownSignal
, keyPressSignal
, keyUpSignal
, keyCode
, presses
) where
import Control.Applicative
import Melchior.Control
import Melchior.Data.String
import Melchior.Dom
import Melchior.Dom.Events
keyDownSignal :: Element -> Signal KeyboardEvent
keyDownSignal e ... | kjgorman/melchior | Melchior/EventSources/Keyboard.hs | mit | 982 | 1 | 9 | 181 | 296 | 157 | 139 | 25 | 1 |
import Text.Trifecta
import Data.Word
import Data.Bits
import Data.Char
import Control.Applicative
import Data.List
-- i guess Word64 is as big as we have?
data IPAddress6 = IPAddress6 Word64 Word64
deriving (Eq, Ord)
foldNibbles :: [Word8] -> Word64
foldNibbles xs
| length xs > 16 = error "foldNibbles overf... | JustinUnger/haskell-book | ch24/ch24-ipv6.hs | mit | 4,160 | 181 | 9 | 924 | 1,414 | 749 | 665 | 106 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
module Week6 where
import Data.List (foldl')
import Data.Bits (xor, popCount)
fib :: Integer -> Integer
fib 0 = 0
fib 1 = 1
fib n = fib (n - 1) + fib (n - 2)
fibs1 :: [Integer]
fibs1 = map fib [0..]
fibs2 :: [Integer]
fibs2 = map snd $... | taylor1791/cis-194-spring | src/Week6.hs | mit | 2,538 | 0 | 12 | 594 | 1,045 | 547 | 498 | 53 | 1 |
module Reverse where
rvrs :: String -> String
rvrs x = concat [awesome, " ", is, " ", curry]
where
awesome = drop 9 x
curry = take 5 x
is = take 2 $ drop 6 x
main :: IO ()
main = print $ rvrs "Curry is awesome"
data Mood = Blah | Woot deriving Show
changeMood :: Mood -> Mood
changeMood... | NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/chapter3.hsproj/Chapter3.hs | mit | 659 | 0 | 8 | 193 | 352 | 195 | 157 | 23 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-bucketencryption.html
module Stratosphere.ResourceProperties.S3BucketBucketEncryption where
import... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/S3BucketBucketEncryption.hs | mit | 1,880 | 0 | 13 | 162 | 177 | 105 | 72 | 24 | 1 |
module Main where
import qualified Data.ByteString.Char8 as BS8
import Database.PostgreSQL.Simple ( connectPostgreSQL, withTransaction)
import Database.PostgreSQL.Simple.Migration (MigrationCommand(..), MigrationContext(..), MigrationResult, runMigration)
import System.Environment (getArg... | robertjlooby/scotty-story-board | db/Migrate.hs | mit | 996 | 0 | 13 | 227 | 257 | 135 | 122 | 23 | 2 |
module NetworkClient (startClient) where
import Control.Concurrent
import Network
import System.Environment
import System.Exit
import System.IO
import Types
startClient:: String -> String -> MVar [Object] -> MVar [Object] -> IO ()
startClient host port getMVar sendMVar = withSocketsDo (handleConnection host (readP... | NemoNessuno/SuperAwesomePictureChatOfDoom | NetworkClient.hs | gpl-2.0 | 1,077 | 0 | 16 | 208 | 382 | 182 | 200 | 30 | 2 |
module Expr where
import qualified Data.Map as M
-- (3 балла)
data Value = I Integer | B Bool deriving (Eq, Show)
data BinOp = Plus | Mul | Minus | Less | Greater | Equals
data UnOp = Neg | Not
data Expr = BinOp BinOp Expr Expr | UnOp UnOp Expr | Const Value | Var String
data Statement = Assign String Expr | If Expr... | nkartashov/haskell | hw06/Expr.hs | gpl-2.0 | 4,674 | 0 | 13 | 1,080 | 1,921 | 964 | 957 | 75 | 10 |
{-# LANGUAGE ViewPatterns #-}
module OverlayMsg (
OverlayMsg(..), hGetOverlayMsg, hPutOverlayMsg
) where
import Control.Monad
import Control.Applicative
import Control.Exception
import Data.Binary
import Data.Binary.Put
import Data.Binary.Get
import qualified Data.ByteString.Lazy as L
import qualified Data.ByteStri... | ben0x539/hoverlay | OverlayMsg.hs | gpl-3.0 | 3,209 | 1 | 16 | 944 | 956 | 494 | 462 | 78 | 8 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE TypeOperators #-}
... | cosmoharrigan/atomspace | tests/haskell/src/OpenCog/Test.hs | agpl-3.0 | 1,498 | 0 | 13 | 432 | 602 | 318 | 284 | 35 | 1 |
{-# LANGUAGE ExistentialQuantification #-}
--------------------------------------------------------------------------------
{-| Module : Attributes
Copyright : (c) Daan Leijen 2003
License : wxWindows
Maintainer : wxhaskell-devel@lists.sourceforge.net
Stability : provisional
Portability : port... | thielema/wxhaskell | wx/src/Graphics/UI/WX/Attributes.hs | lgpl-2.1 | 13,292 | 2 | 24 | 3,528 | 3,754 | 1,959 | 1,795 | 168 | 13 |
{-# LANGUAGE RecordWildCards #-}
import Control.Monad (msum)
import Data.List (intercalate)
{- port from http://www.joshondesign.com/2014/09/17/rustlang -}
data Vector = Vector {x,y,z :: Double}
data Ray = Ray {orig,dir :: Vector}
data Color = Color {r,g,b :: Double}
data Sphere = Sphere {center :: Vector, radius :: ... | scturtle/fun.hs | raytracer.hs | unlicense | 4,439 | 0 | 19 | 1,212 | 1,522 | 832 | 690 | 66 | 2 |
module GPartialApplication (koans) where
import Test.Hspec
import Test.HUnit (assertBool, assertEqual)
import Koan
__ = error "Replace __ with a valid value"
-- the `add` function takes two parameters and adds the results together
add x y = x + y
koanSimpleApplication = koan "simple standard application" $ do
add ... | gregberns/HaskellKoans | src/koans/GPartialApplication.hs | apache-2.0 | 899 | 0 | 11 | 169 | 193 | 96 | 97 | 20 | 1 |
module FRP.Extra.Yampa where
import Control.Arrow
import FRP.Yampa
futureDSwitch :: SF a (b, Event c) -> (c -> SF a b) -> SF a b
futureDSwitch sf cont = dSwitch (sf >>> (arr id *** notYet)) cont
| no-moree-ria10/utsuEater | src/FRP/Extra/Yampa.hs | apache-2.0 | 199 | 0 | 10 | 40 | 93 | 49 | 44 | 5 | 1 |
import Data.List
import Data.Maybe
c [i1,u1,a1,p1] [i2,u2,a2,p2] =
if ca /= EQ
then ca
else if cp /= EQ
then cp
else ci
where
ca = compare a2 a1
cp = compare p1 p2
ci = compare i1 i2
r1 h@[i,u,a,p] t =
if l < 3 then (h:t) else t
where
l = l... | a143753/AOJ | 1043.hs | apache-2.0 | 1,150 | 0 | 14 | 487 | 686 | 365 | 321 | 44 | 3 |
{-# LANGUAGE RecordWildCards #-}
module Choice where
import Text.Parsec.Char (char, satisfy)
import Text.Parsec.Combinator (sepBy, many1, notFollowedBy, option)
import Text.Parsec.Prim (try, many)
import ClassyPrelude hiding (try)
import JEPFormula
import Common
-- most of the parsers are stubbed out -- not sure ho... | gamelost/pcgen-rules | src/Choice.hs | apache-2.0 | 11,931 | 0 | 49 | 3,048 | 2,358 | 1,260 | 1,098 | 210 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleInstances #-}
module Openshift.Apis (
api
, API
) where
import Openshift.OapivApi (OapivApi)
import Data.Proxy
type API = OapivApi
api :: Proxy API
api = Proxy
| minhdoboi/deprecated-openshift-haskell-api | openshift/lib/Openshift/Apis.hs | apache-2.0 | 318 | 0 | 5 | 62 | 53 | 34 | 19 | 13 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QVariant.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:36
Warning : this file is machine generated - do not ... | keera-studios/hsQt | Qtc/Enums/Core/QVariant.hs | bsd-2-clause | 5,599 | 0 | 18 | 1,061 | 1,413 | 772 | 641 | 196 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
{-
- The actual Earley-style parser.
-}
module NLP.LTAG.Early3.Earley where
import Control.Applicative ((<$>))
import Control.Monad (guard)
import qualified Control.Monad.State.Strict as St
import Control.Monad.Trans.C... | kawu/ltag | src/NLP/LTAG/Early3/Earley.hs | bsd-2-clause | 12,147 | 0 | 11 | 3,827 | 901 | 647 | 254 | 56 | 2 |
{-# LANGUAGE NamedFieldPuns #-}
module Language.Epilog.IR.Program
( irProgram
) where
--------------------------------------------------------------------------------
import Language.Epilog.AST.Program
import Language.Epilog.Common
import Language.Epilog.IR.Expression
import ... | adgalad/Epilog | src/Haskell/Language/Epilog/IR/Program.hs | bsd-3-clause | 1,837 | 0 | 18 | 516 | 461 | 255 | 206 | 40 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.