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 Handler.PostLogin where
import Import
getPostLoginR :: Handler Html
getPostLoginR = do
app <- getYesod
redirectUltDest $ loginDest app
| chreekat/snowdrift | Handler/PostLogin.hs | agpl-3.0 | 152 | 0 | 8 | 29 | 39 | 20 | 19 | 6 | 1 |
module Propellor.Property.HostingProvider.CloudAtCost where
import Propellor
import qualified Propellor.Property.Hostname as Hostname
import qualified Propellor.Property.File as File
import qualified Propellor.Property.User as User
-- Clean up a system as installed by cloudatcost.com
decruft :: Property NoInfo
decruf... | avengerpenguin/propellor | src/Propellor/Property/HostingProvider/CloudAtCost.hs | bsd-2-clause | 814 | 14 | 10 | 102 | 162 | 95 | 67 | 17 | 1 |
{- | The public face of Template Haskell
For other documentation, refer to:
<http://www.haskell.org/haskellwiki/Template_Haskell>
-}
module Language.Haskell.TH(
-- * The monad and its operations
Q,
runQ,
-- ** Administration: errors, locations and IO
reportError, -... | vikraman/ghc | libraries/template-haskell/Language/Haskell/TH.hs | bsd-3-clause | 6,267 | 0 | 5 | 1,727 | 1,212 | 847 | 365 | 101 | 0 |
module Test14 where
f = let x = 45 in (x, 45)
| kmate/HaRe | old/testing/refacRedunDec/Test14AST.hs | bsd-3-clause | 47 | 0 | 8 | 13 | 26 | 15 | 11 | 2 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-- This code defines a default method with a highly dubious type,
-- because 'v' is not mentioned, and there are no fundeps
--
-- However, arguably the instance declaration should be accepted,
-- beause it's equivalent to
-- instance Baz Int Int where { foo x = x }
-- which *does* typec... | hvr/jhc | regress/tests/1_typecheck/2_pass/ghc/uncat/tc199.hs | mit | 1,013 | 0 | 7 | 212 | 65 | 45 | 20 | -1 | -1 |
module Foo where
{-@ type Range Lo Hi = {v:Int | Lo <= v && v < Hi} @-}
{-@ bow :: Range 0 100 @-}
bow :: Int
bow = 12
| mightymoose/liquidhaskell | tests/pos/tyExpr.hs | bsd-3-clause | 121 | 0 | 4 | 34 | 16 | 11 | 5 | 3 | 1 |
{-# LANGUAGE DeriveFunctor, RankNTypes #-}
module Lamdu.Sugar.AddNames.CPS
( CPS(..)
) where
import Control.Applicative (Applicative(..))
data CPS m a = CPS { runCPS :: forall r. m r -> m (a, r) }
deriving (Functor)
instance Functor m => Applicative (CPS m) where
pure x = CPS $ fmap ((,) x)
CPS cpsf <*> CP... | sinelaw/lamdu | Lamdu/Sugar/AddNames/CPS.hs | gpl-3.0 | 405 | 0 | 12 | 99 | 187 | 103 | 84 | 11 | 0 |
module OverD where
-- Tests that we verify consistency of type families between
-- transitive imports.
import OverB
import OverC
| ezyang/ghc | testsuite/tests/indexed-types/should_fail/OverD.hs | bsd-3-clause | 129 | 0 | 3 | 20 | 12 | 9 | 3 | 3 | 0 |
{-# LANGUAGE TemplateHaskell, FlexibleInstances, ScopedTypeVariables,
GADTs, RankNTypes, FlexibleContexts, TypeSynonymInstances,
MultiParamTypeClasses, DeriveDataTypeable, PatternGuards,
OverlappingInstances, UndecidableInstances, CPP #-}
module T1735_Help.Xml (Element(..), Xml, ... | ezyang/ghc | testsuite/tests/typecheck/should_run/T1735_Help/Xml.hs | bsd-3-clause | 4,655 | 0 | 14 | 1,632 | 1,441 | 748 | 693 | 106 | 3 |
{-# LANGUAGE TemplateHaskell #-}
module AFM where
class Functor f where
fmap :: (a -> b) -> f a -> f b
fmap id x == x
fmap f . fmap g == fmap (f . g)
class Functor f =>
Applicative f where
pure :: a -> f a
(<*>) :: f (a -> b) -> f a -> f b -- LiftA
fmap f x == liftA f x
liftA id x == x
liftA3 (.) f ... | mortum5/programming | haskell/usefull/AMP.hs | mit | 800 | 0 | 11 | 251 | 425 | 217 | 208 | -1 | -1 |
module Main () where
import Data.List (elemIndex)
type Header = String
type Row a = [a]
data Table a = Table { headers :: [Header]
, rows :: [Row a]
}
create :: Table a -> Row a -> Table a
create (Table headers rows) newRow = Table headers $ [newRow] ++ rows
type Predicate... | bmuk/PipeDBHs | Main.hs | mit | 687 | 0 | 10 | 165 | 271 | 144 | 127 | 14 | 1 |
{-# LANGUAGE OverloadedStrings #-}
--------------------------------------------------------------------------------
-- |
-- Module : Network.MQTT.Broker.RetainedMessages
-- Copyright : (c) Lars Petersen 2016
-- License : MIT
--
-- Maintainer : info@lars-petersen.net
-- Stability : experimental
------... | lpeterse/haskell-mqtt | src/Network/MQTT/Broker/RetainedMessages.hs | mit | 4,172 | 0 | 14 | 1,013 | 1,238 | 637 | 601 | 83 | 6 |
module Main where
import Parser
import Control.Monad.Trans
import System.Console.Haskeline
process line = do
let res = parseTopLevel line
case res of
Left err -> print err
Right ex -> mapM_ print ex
main = runInputT defaultSettings loop
where
loop = do
minput <- getInputLine "ready> "
... | waterlink/hgo | ParserRepl.hs | mit | 432 | 0 | 15 | 112 | 138 | 67 | 71 | 15 | 2 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Control.Monad.Zipkin
( Identifier, parseIdentifier
, TraceInfo(..), fromHeaders, toHeaders, newTraceInfo
, TraceT, getTraceInfo, forkTraceInfo, runTraceT
) where
import Control.Monad.State.Strict
import System.Random.Mersenne.Pure64
import Data.Zipkin.Types
... | srijs/haskell-zipkin | src/Control/Monad/Zipkin.hs | mit | 851 | 0 | 8 | 124 | 243 | 137 | 106 | 19 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE RankNTypes #-}
module Web.Stripe.Test.Subscription where
import Data.Either
import Data.Maybe
import Test.Hspec
import Web.Stripe.Test.Prelude
import Web... | dmjio/stripe | stripe-tests/tests/Web/Stripe/Test/Subscription.hs | mit | 6,399 | 0 | 22 | 2,450 | 1,481 | 693 | 788 | 165 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- we infect all the other modules with instances from
-- this module, so they don't appear orphaned.
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Network.Datadog.Internal
( prependMaybe
, prependBool
, datadogHttp
, decodeDatadog
, baseRequest
, defaultMonitorOptions
, DatadogCreden... | iand675/datadog | src/Network/Datadog/Internal.hs | mit | 16,829 | 0 | 33 | 4,633 | 4,741 | 2,490 | 2,251 | 284 | 2 |
-- | Module for providing various functionals used in calculations involving
-- quantum mathematics. This includes the fidelity and trace norm.
module Hoqus.Fidelity where
import Numeric.LinearAlgebra.Data
import Numeric.LinearAlgebra
import Hoqus.MtxFun
-- | Function 'fidelity' calculates the fidelity between two q... | jmiszczak/hoqus | Hoqus/Fidelity.hs | mit | 1,022 | 0 | 13 | 194 | 227 | 123 | 104 | 9 | 1 |
module Pretty where
-- see: http://stackoverflow.com/questions/5929377/format-list-output-in-haskell
import Data.List ( transpose, intercalate )
-- a type for fill functions
type Filler = Int -> String -> String
-- a type for describing table columns
data ColDesc t = ColDesc { colTitleFill :: Filler
... | nyorem/skemmtun | src/Pretty.hs | mit | 1,773 | 0 | 13 | 548 | 529 | 284 | 245 | 29 | 1 |
module TestSafePrelude where
import Test.HUnit
import SafePrelude
testSafeHeadForEmptyList :: Test
testSafeHeadForEmptyList =
TestCase $ assertEqual "Should return Nothing for empty list"
Nothing (safeHead ([]::[Int]))
testSafeHeadForNonEmptyList :: Test
testSafeHe... | Muzietto/transformerz | haskell/hunit/TestSafePrelude.hs | mit | 572 | 0 | 10 | 137 | 121 | 68 | 53 | 13 | 1 |
-- ref: https://en.wikibooks.org/wiki/Haskell/Arrow_tutorial
{-# LANGUAGE Arrows #-}
module Main where
import Control.Arrow
import Control.Monad
import qualified Control.Category as Cat
import Data.List
import Data.Maybe
import System.Random
-- Arrows which can save state
newtype Circuit a b = Circuit { unCircuit :: ... | Airtnp/Freshman_Simple_Haskell_Lib | Intro/WIW/Circuit_and_Arrow.hs | mit | 2,639 | 6 | 14 | 709 | 1,038 | 553 | 485 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Applicative
import Control.Arrow
import qualified Data.Attoparsec.Text.Lazy as A
import Data.List
import Data.Maybe
import Data.Monoid
import qualified Data.String as S
import qualified Data.Text.Lazy as T
main :: IO ()
main = print ("Hi!" :: String... | andregrigon/Lambda | executable/Main.hs | mit | 5,389 | 0 | 13 | 1,428 | 2,503 | 1,299 | 1,204 | 122 | 11 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeSynonymInstances #-}
module PostgREST.DbStructure (
getDbStructure
, accessibleTables
) where
import qualified Hasql.Decoders as... | NotBrianZach/postgrest | src/PostgREST/DbStructure.hs | mit | 31,146 | 0 | 19 | 8,472 | 3,968 | 2,090 | 1,878 | 208 | 3 |
module GHCJS.DOM.SVGViewElement (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/SVGViewElement.hs | mit | 44 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-spend.html
module Stratosphere.ResourceProperties.BudgetsBudgetSpend where
import Stratospher... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/BudgetsBudgetSpend.hs | mit | 1,728 | 0 | 13 | 220 | 265 | 151 | 114 | 29 | 1 |
module Pos.Infra.Binary () where
import Pos.Infra.Binary.DHTModel ()
| input-output-hk/pos-haskell-prototype | infra/src/Pos/Infra/Binary.hs | mit | 80 | 0 | 4 | 18 | 20 | 14 | 6 | 2 | 0 |
module Text.Spoonerize ( spoonerize ) where
import System.Random
import Data.Array.IO
import Control.Monad
import Data.List (sort)
import Data.Char (isLower, toLower, toUpper)
type Sequence = Int
type Word = String
type IsSpoonerizable = Bool
data WordInfo = WordInfo Sequence Word IsSpoonerizable
... | jsl/spoonerize | Text/Spoonerize.hs | mit | 4,556 | 0 | 13 | 1,062 | 1,401 | 748 | 653 | 100 | 2 |
{-# LANGUAGE FlexibleContexts #-}
module Plots.Theme where
import Diagrams.Prelude
import Diagrams.TwoD.Text
import Plots
import Plots.Axis.Line
import Plots.Style
import Control.Monad.Trans.State.Lazy
publishableTheme :: Control.Monad.Trans.State.Lazy.StateT (Axis b V2 Double) Identity ()
publishableTheme = do
... | GregorySchwartz/dotfiles | .config/diagrams/plot-theme/src/Plots/Theme.hs | gpl-2.0 | 1,336 | 0 | 12 | 303 | 357 | 182 | 175 | -1 | -1 |
{- |
Module : $Header$
Description : Generic Prover GUI.
Copyright : (c) Klaus Luettich, Rainer Grabbe, Uni Bremen 2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : needs POSIX
Generic GUI for automatic theorem provers. Bas... | nevrenato/Hets_Fork | GUI/HTkGenericATP.hs | gpl-2.0 | 34,711 | 0 | 41 | 13,149 | 7,856 | 3,780 | 4,076 | 660 | 20 |
module Render.Backend.GNUPlot where
import Control.Wire
import Prelude hiding ((.),id)
import Render.Render
import Utils.Wire.TestWire
gnuPlotBackend ::
(Real t, Monoid e, Show e)
=> t
-> Int
-> Backend (Timed t ()) e IO (IO ()) a
gnuPlotBackend dt n = Backend runGnuplot
where
runGnuplot r wr... | mstksg/netwire-experiments | src/Render/Backend/GNUPlot.hs | gpl-3.0 | 422 | 0 | 11 | 95 | 167 | 90 | 77 | 14 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, OverloadedStrings, FlexibleContexts #-}
module Sound.Tidal.Control where
import Prelude hiding ((<*), (*>))
import qualified Data.Map.Strict as Map
import Data.Maybe (fromMaybe, isJust, fromJust)
import Data.Ratio
import Sound.Tidal.Pattern
import Soun... | d0kt0r0/Tidal | src/Sound/Tidal/Control.hs | gpl-3.0 | 14,997 | 0 | 19 | 3,465 | 3,496 | 1,800 | 1,696 | 137 | 2 |
module CPU where
import Control.Monad.ST
import Control.Wire
import qualified Data.ByteString as B
import Data.Map.Strict
import qualified Data.Vector.Unboxed as V
import qualified Data.Vector.Unboxed.Mutable as M
import Data.Word
import Mem
import Opcodes
import Types
cpu :: (HasTime t s) => B.ByteString -> Wire s ... | npdawson/arrowGB | src/CPU.hs | gpl-3.0 | 1,729 | 0 | 19 | 546 | 478 | 248 | 230 | 36 | 3 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
-- FIXME: better types in checkLevel
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
-- |
-- Copyright : (c) 2010-2012 Simon Meier & Benedikt Schmidt
-- License ... | tamarin-prover/tamarin-prover | lib/theory/src/Theory/Proof.hs | gpl-3.0 | 44,308 | 0 | 17 | 11,911 | 10,668 | 5,468 | 5,200 | 687 | 7 |
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Constraint.Strategy.Cyclic
( CyclicStrategy
-- , selectCyclicArrangement
) where
import Constraint.Strategy
import Control.Applicative ((<$>),(<*>),(<|>))
import Control.Arrow (second)
import Control.Monad.State
... | recursion-ninja/SecretSanta | Constraint/Strategy/Cyclic.hs | gpl-3.0 | 5,382 | 0 | 14 | 1,283 | 1,274 | 680 | 594 | 86 | 3 |
-- Laatste element van een lijst
laatste::[Int]->Int
laatste l = last l
-- Herhaal n keer het getal x in een lijst
herhaal::Int->Int->[Int]
herhaal n x = take n (repeat x)
-- Metalijst -> Platte lijst
lineariseer::[[Int]]->[Int]
lineariseer a = concat a
-- Lijst van getallen tussen 2 gegeven getallen
bereik::Int->Int->... | jorenverspeurt/joren-assignments-haskell | horsdoeuvres-lf.hs | gpl-3.0 | 621 | 0 | 11 | 103 | 273 | 148 | 125 | 12 | 1 |
import Control.Monad
import System.Directory
import System.IO
reverseList :: [a] -> [a]
reverseList [] = []
reverseList (x:xs) = reverseList xs ++ [x]
rename :: FilePath -> String -> IO ()
rename a filePath = renameFile filePath (filePath ++ a)
bulkRename :: FilePath -> String -> I... | jgonsior/haskellCourse | ex5.hs | gpl-3.0 | 1,650 | 0 | 15 | 383 | 576 | 287 | 289 | 42 | 1 |
module Text.Parse.SvgPath.Parsing
( svgPath
, p_moveto_drawto_command_group
, p_drawto_command
, p_moveto
, p_lineto
, p_closepath
, p_comma_wsp
, p_coordinate_pair
, p_float
, p_number
, PathInstruction
( MoveTo
, LineTo
, HorizontalLineTo
, VerticalLineTo
, CurveTo
, SmoothCurveTo
, QuadraticBezierCurve... | r24y/svg2gcode | Text/Parse/SvgPath/Parsing.hs | gpl-3.0 | 3,355 | 0 | 11 | 1,072 | 866 | 468 | 398 | 89 | 2 |
import Text.Parsec.String (Parser)
import Text.ParserCombinators.Parsec
main = do
input <- readFile "input.txt"
case parse_str input of
Left err -> print err
Right n -> print (n-1)
parse_str :: String -> Either ParseError Int
parse_str s = parse message "(unkwown)" s
message :: Parser Int
message = many... | ayron/AoC | 2016/Day 9/solution2.hs | gpl-3.0 | 714 | 0 | 12 | 168 | 299 | 141 | 158 | 28 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Datastore.Types.Sum
-- Copyright : (c) 2015-2016 Brend... | rueshyna/gogol | gogol-datastore/gen/Network/Google/Datastore/Types/Sum.hs | mpl-2.0 | 11,442 | 0 | 11 | 2,546 | 1,731 | 926 | 805 | 206 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-ec2/gen/Network/AWS/EC2/ImportKeyPair.hs | mpl-2.0 | 5,214 | 0 | 9 | 1,166 | 633 | 384 | 249 | 74 | 1 |
{-
Created : 2014 May 23 (Fri) 14:32:50 by Harold Carr.
Last Modified : 2014 Sep 17 (Wed) 10:08:02 by Harold Carr.
-}
module HW01_HC where
import Data.List (unfoldr)
import qualified Test.HUnit as T
import qualified Test.HUnit.Util as U
-----------------------------------------------------... | haroldcarr/learn-haskell-coq-ml-etc | haskell/course/2014-06-upenn/cis194/src/HW01_HC.hs | unlicense | 5,646 | 0 | 13 | 1,357 | 2,192 | 1,287 | 905 | 95 | 2 |
{-# LANGUAGE GADTs,RankNTypes,DeriveFunctor #-}
module Faceted.FIORef (
FIORef,
newFIORef,
readFIORef,
writeFIORef,
) where
import Faceted.Internal
import Data.IORef
-- | Variables of type 'FIORef a' are faceted 'IORef's
data FIORef a = FIORef (IORef (Faceted a))
-- | Allocate a new 'FIORef'
newFIORef ::... | haskell-faceted/haskell-faceted | Faceted/FIORef.hs | apache-2.0 | 986 | 0 | 12 | 257 | 277 | 137 | 140 | 21 | 1 |
#!/usr/bin/env stack
{- stack --install-ghc
runghc
--package Command
--package text
--package hflags
-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
import Control.Monad
import Data.Version
import HFlags
import System.Command
import Text.ParserCombinators.ReadP
defineFlag "versi... | zchn/ethereum-analyzer | scripts/release_to_hackage.hs | apache-2.0 | 1,919 | 0 | 26 | 514 | 427 | 211 | 216 | 48 | 2 |
{-# LANGUAGE OverloadedStrings #-}
-- | NSIS (Nullsoft Scriptable Install System, <http://nsis.sourceforge.net/>) is a tool that allows programmers
-- to create installers for Windows.
-- This library provides an alternative syntax for NSIS scripts, as an embedded Haskell language, removing much
-- of the hard w... | idleberg/NSIS | Development/NSIS.hs | apache-2.0 | 4,801 | 0 | 8 | 967 | 669 | 467 | 202 | 47 | 1 |
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
import Data.Monoid (mappend)
import Hakyll
type RenderingFunction = FeedConfiguration
-> Context String
-> [Item String]
-> Compiler (Item String)
myFeedConfiguration :: FeedConfigurat... | NCrashed/blog | src/site.hs | apache-2.0 | 3,002 | 0 | 21 | 647 | 562 | 271 | 291 | 64 | 1 |
-- 1
-- 2, 1
-- 6, 2, 1
-- 24, 9, 2, 1
-- 120, 44, 13, ?, 1
type Board = [(Int, Int)]
-- patternAvoidingPermutations board n = ???
-- Not smart, since it doesn't use the results from (k-1) to help compute k.
-- Also, not tail recursive.
nonAttackingRookCount 0 _ = 1
nonAttackingRookCount _ [] = 0
nonAtta... | peterokagey/haskellOEIS | src/Sandbox/Richard/table.hs | apache-2.0 | 467 | 0 | 12 | 106 | 128 | 73 | 55 | 5 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module TH.HSCs where
import Language.Haskell.TH
import TH.API
import TH.APIs
import TH.HSC
$(do
runIO $ putStrLn "HSC generation"
apis <- generateAPIs "apis"
generateHSCs apis
runIO $ putStrLn "..Done"
return []
)
| fabianbergmark/APIs | src/TH/HSCs.hs | bsd-2-clause | 277 | 0 | 10 | 64 | 79 | 38 | 41 | 12 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
module Application.DiagramDrawer.ProgType where
import System.Console.CmdArgs
data Diagdrawer = Test
deriving (Show,Data,Typeable)
test :: Diagdrawer
test = Test
mode = modes [test]
| wavewave/diagdrawer | lib/Application/DiagramDrawer/ProgType.hs | bsd-2-clause | 241 | 0 | 6 | 48 | 57 | 34 | 23 | 8 | 1 |
{-|
Module : Idris.Elab.Interface
Description : Code to elaborate interfaces.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE PatternGuards #-}
{-# OPTIONS_GHC -fwarn-missing-signatures #-}
module Idris.Elab.Interface(elabInterface) where
import Idris.AbsSyntax
import Idris.AST... | enolan/Idris-dev | src/Idris/Elab/Interface.hs | bsd-3-clause | 15,877 | 0 | 20 | 5,269 | 5,921 | 3,065 | 2,856 | 277 | 32 |
-- | This module reexport everything which is needed for message
-- definition in generated code. There is no need import this module
-- in user code.
module Data.Protobuf.Imports (
-- * Data types
Word32
, Word64
, Int32
, Int64
, Bool
, Double
, Float
, String
, Maybe(..)
, Seq
, ByteS... | Shimuuar/protobuf | protobuf-lib/Data/Protobuf/Imports.hs | bsd-3-clause | 2,306 | 0 | 11 | 571 | 631 | 373 | 258 | 67 | 1 |
module Hackage.Twitter.Bot.Types where
import Data.Time ()
import Data.Time.Clock
data FullPost = FullPost { fullPostAuthor :: String, fullPostDescription :: String, fullPostTime :: UTCTime, fullPostTitle :: String, fullPostLink :: String} deriving (Show)
data PartialPost = PartialPost {aut... | KevinCotrone/hackage-twitter-bot | src/Hackage/Twitter/Bot/Types.hs | bsd-3-clause | 396 | 0 | 8 | 75 | 102 | 65 | 37 | 5 | 0 |
module Main(main) where
import System.Environment (getArgs, getProgName)
import Web.Zenfolio.API
import qualified Web.Zenfolio.Categories as Categories
dumpCategories :: ZM ()
dumpCategories = do
categories <- Categories.getCategories
liftIO $ putStrLn ("Categories: " ++ show categories)
main ::... | md5/hs-zenfolio | examples/GetCategories.hs | bsd-3-clause | 506 | 0 | 14 | 142 | 148 | 78 | 70 | 16 | 2 |
{-# LANGUAGE TupleSections, OverloadedStrings, QuasiQuotes, TemplateHaskell, TypeFamilies, RecordWildCards,
DeriveGeneric ,MultiParamTypeClasses ,FlexibleInstances #-}
module Protocol.ROC.PointTypes.PointType121 where
import GHC.Generics
import qualified Data.ByteString as BS
import Data.Word
import Dat... | jqpeterson/roc-translator | src/Protocol/ROC/PointTypes/PointType121.hs | bsd-3-clause | 30,295 | 0 | 9 | 9,947 | 3,414 | 1,865 | 1,549 | 781 | 1 |
module UnionFind(UF, Replacement((:>)), newSym, (=:=), rep, frozen, runUF, S, isRep) where
import Prelude hiding (min)
import Control.Monad.State.Strict
import Data.IntMap(IntMap)
import qualified Data.IntMap as IntMap
data S = S {
links :: IntMap Int,
sym :: Int
}
type UF = State S
data Replacement ... | jystic/QuickSpec | qs1/UnionFind.hs | bsd-3-clause | 1,225 | 0 | 16 | 323 | 625 | 317 | 308 | 46 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
module Sys.CreateProcess(
CreateProcess(..)
, AsCreateProcess(..)
, AsWorkingDirectory(..)
, AsEnvironment(..)
, AsStdin(..)
, AsStdout(..)
, AsStderr(..)
, AsCloseDescriptors(..)
, AsCreateGroup(..)
, AsDele... | NICTA/sys-process | src/Sys/CreateProcess.hs | bsd-3-clause | 6,412 | 0 | 12 | 1,549 | 2,477 | 1,318 | 1,159 | 163 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.Digest.MD5
-- Copyright : (c) Dominic Steinitz 2004
-- License : BSD-style (see the file ReadMe.tex)
--
-- Maintainer : dominic.steinitz@blueyonder.co.uk
-- Stability : experimental
-- Portability : ... | astro/HTTPbis | Network/HTTP/MD5.hs | bsd-3-clause | 1,331 | 1 | 10 | 290 | 244 | 147 | 97 | 16 | 3 |
module ParserSpec where
import qualified Data.Vector as Vec
import Function
import qualified Library as Lib
import Parser
import Test.Hspec
import Text.Trifecta
toEither :: Result a -> Either String a
toEither (Success a) = Right a
toEither (Failure e) = Left $ show e
... | hrsrashid/nummet | tests/ParserSpec.hs | bsd-3-clause | 5,553 | 0 | 26 | 1,476 | 2,104 | 1,039 | 1,065 | 111 | 1 |
module Main (main) where
import System.Environment
import CAN
main :: IO ()
main = do
args <- getArgs
case args of
"-h" : _ -> help
"--help" : _ -> help
["--std", id, payload] -> do
initCAN
bus <- openBus 0 Standard
sendMsg bus $ Msg (read id) (toPayload $ read payload)
closeB... | tomahawkins/ecu | src/CANSend.hs | bsd-3-clause | 778 | 0 | 16 | 247 | 255 | 129 | 126 | 32 | 5 |
-- Copyright (c) 1998 Chris Okasaki.
-- See COPYRIGHT file for terms and conditions.
module AssocDefaults
where
import Prelude hiding (null,map,lookup,foldr,foldl,foldr1,foldl1,filter)
import Assoc
import qualified Sequence as S
-- import qualified ListSeq as L
fromSeqUsingInsertSeq ::
(AssocX m k,S.Sequence... | OS2World/DEV-UTIL-HUGS | oldlib/AssocDefaults.hs | bsd-3-clause | 5,161 | 0 | 12 | 1,330 | 2,286 | 1,134 | 1,152 | 99 | 2 |
{-# LANGUAGE BangPatterns #-}
module Language.Hakaru.Tests.ImportanceSampler where
import Data.Dynamic
import Language.Hakaru.Distribution
import Test.QuickCheck.Monadic
testBeta = undefined
mu a b = a / (a + b)
var a b = a*b / ((sqr $ a + b) * (a + b + 1))
where sqr x = x * x
| zaxtax/hakaru-old | Language/Hakaru/Tests/Distribution.hs | bsd-3-clause | 284 | 0 | 10 | 55 | 113 | 64 | 49 | 9 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ViewPatterns #-}
module Cgs (
main
) where
import Cgs.Args (runParseArgsIO, CgsOptions(..))
import Control.Exception (assert)
import Control.Monad ((<=<))
import Control.Monad.Identity (runIdentity)
import Control.Monad.ListM (takeWhileM)
import Control.Monad.State.... | thomaseding/cgs | src/Cgs.hs | bsd-3-clause | 6,013 | 0 | 19 | 1,740 | 1,900 | 982 | 918 | 150 | 7 |
{-# LANGUAGE FlexibleInstances #-}
module Language.Haskell.GhcMod.Types where
-- | Output style.
data OutputStyle = LispStyle -- ^ S expression style.
| PlainStyle -- ^ Plain textstyle.
-- | The type for line separator. Historically, a Null string is used.
newtype LineSeparator = LineSeparator Stri... | vikraman/ghc-mod | Language/Haskell/GhcMod/Types.hs | bsd-3-clause | 3,690 | 0 | 13 | 882 | 764 | 451 | 313 | 71 | 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.
module Duckling.D... | rfranek/duckling | tests/Duckling/Distance/CS/Tests.hs | bsd-3-clause | 588 | 0 | 9 | 94 | 77 | 49 | 28 | 10 | 1 |
import ConllReader
import Control.Monad
import Data.List.Split (splitOn)
import Data.Maybe
import System.Console.ParseArgs
import System.Exit
import System.IO
import Text.Printf
arg =
[ Arg 0 Nothing Nothing (argDataRequired "corpus" ArgtypeString)
"corpus in CoNLL format" ]
main :: IO ()
main = do
args ... | jsnajder/conll-corpus | src/conll-filter.hs | bsd-3-clause | 508 | 1 | 12 | 105 | 157 | 77 | 80 | 19 | 2 |
-- | Changes to alex's grammar:
--
-- * All sets include their unicode equivalents by default
--
-- * @%language MultiParamTypeClasses@ to allow language extensions in code fragments
--
-- * The @%wrapper@ directive doesn\'t make sense any more and so is removed
--
-- * Since it is parsed by TH, some fixities in code f... | ekmett/luthor | Text/Luthor/Parser.hs | bsd-3-clause | 13,475 | 221 | 17 | 3,572 | 2,324 | 1,481 | 843 | -1 | -1 |
module SpatulaStart where
import Rumpus
start :: Start
start entityID = do
chan <- traverseM (use (wldComponents . myPdPatch . at entityID)) $ \patch -> do
pd <- view wlsPd
toDyn <$> makeReceiveChan pd (local patch "freq")
return chan
| lukexi/rumpus | util/DevScenes/scenes-old/spatula/SpatulaStart.hs | bsd-3-clause | 260 | 0 | 15 | 64 | 95 | 46 | 49 | 8 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Semigroup ((<>))
import qualified Data.Text as Text
import qualified Data.Text.IO as Text
import Options.Applicative
import System.Environment (getEnvironment)
import qualified Web.JWT as J... | channable/icepeak | server/app/IcepeakTokenGen/Main.hs | bsd-3-clause | 3,623 | 0 | 18 | 1,130 | 834 | 433 | 401 | 74 | 2 |
-- | Provides definitions of associated Legendre functions used in spherical harmonic models.
module Math.SphericalHarmonics.AssociatedLegendre
(
associatedLegendreFunction
, schmidtSemiNormalizedAssociatedLegendreFunction
)
where
import Data.Poly (VPoly, eval, deriv)
import Data.Poly.Orthogonal (legendre)
import Da... | dmcclean/igrf | src/Math/SphericalHarmonics/AssociatedLegendre.hs | bsd-3-clause | 2,251 | 0 | 12 | 489 | 403 | 220 | 183 | 25 | 1 |
module Main where
import Data.Sequence as S
import Data.List
import Data.Foldable
import System.IO
import Prelude as P
import qualified Data.Text as T
import Control.Lens
import Types
import MeshGenerator
import Linear
import FractalSurface
import MarchingCubes
sphere :: V3 Double -> Double
sphere v = norm v - 1.0
... | zobot/MeshGenerator | src/Main.hs | bsd-3-clause | 3,113 | 0 | 11 | 590 | 590 | 306 | 284 | 36 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : TestSuite.Puzzles.Euler185
-- Copyright : (c) Levent Erkok
-- License : BSD3
-- Maintainer : erkokl@gmail.com
-- Stability : experimental
--
-- Test suite for Data.SBV.Examples.Puzzles.Euler185
------------... | josefs/sbv | SBVTestSuite/TestSuite/Puzzles/Euler185.hs | bsd-3-clause | 640 | 0 | 9 | 88 | 65 | 43 | 22 | 7 | 1 |
module FizzBuzzKata.Day2 (fizzbuzz) where
fizzbuzz :: [Int] -> [String]
fizzbuzz [] = []
fizzbuzz (n:ns)
| isFizz n
&& isBuzz n = "fizz!buzz!" : fizzbuzz ns
| isFizz n = "fizz!" : fizzbuzz ns
| isBuzz n = "buzz!" : fizzbuzz ns
| otherwise = show n :... | Alex-Diez/haskell-tdd-kata | old-katas/src/FizzBuzzKata/Day2.hs | bsd-3-clause | 648 | 0 | 10 | 252 | 244 | 122 | 122 | 15 | 1 |
module Wholemeal
where
fun1 :: [Integer] -> Integer
fun1 = product . map (\x -> x - 2) . filter even
fun2 :: Integer -> Integer
fun2 1 = 0
fun2 n
| even n = n + fun2 (n `div` 2)
| otherwise = fun2 (3 * n + 1)
fun3 :: Integer -> Integer
fun3 = sum . filter even . takeWhile (>1) . iterate (\x ... | richard12511/bobs-orders | app/Wholemeal.hs | bsd-3-clause | 466 | 0 | 11 | 149 | 224 | 119 | 105 | 12 | 2 |
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Finance.Exchange.OrderBook
( OrderBook
... | schernichkin/exchange | src/Finance/Exchange/OrderBook.hs | bsd-3-clause | 13,633 | 23 | 17 | 3,778 | 3,117 | 1,673 | 1,444 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
module RRTTest (tests) where
import Test.Framework
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.Framework.TH (testGroupGenerator)
import Test.QuickCheck.Property ((==>))
import Data.MetricSpace
import Data.RRT
tests :: Test
tests = $(testGroupGenerator)
... | jdmarble/rrt | test/RRTTest.hs | bsd-3-clause | 749 | 0 | 10 | 139 | 222 | 129 | 93 | 18 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module TW.CodeGen.Flow
( makeFileName, makeModule
)
where
import TW.Ast
import TW.BuiltIn
import TW.JsonRepr
import Data.Monoid
import System.FilePath
import qualified Data.List as L
import qualified Data.Text as T
makeFileName :: ModuleName -> FilePath
makeFileName (Module... | agrafix/typed-wire | src/TW/CodeGen/Flow.hs | mit | 3,368 | 0 | 20 | 1,046 | 1,095 | 548 | 547 | 93 | 4 |
square :: (Num a) => a -> a
square n = n * n
isDivisor :: (Integral a) => a -> a -> Bool
isDivisor a b = b `mod` a == 0
findDivisor :: (Integral a) => a -> a -> a
findDivisor divisor n
| square divisor > n = n
| isDivisor divisor n = divisor
| otherwise = findDivisor (divisor + 1) n
smal... | slideclick/sicp-examples | chapters/1/1.2.6/smallest-divisor.hs | mit | 486 | 0 | 9 | 135 | 228 | 116 | 112 | 15 | 1 |
factorial :: Integer -> Integer
factorial 0 = 1
factorial n = n * factorial (n - 1) | Sergey-Pravdyukov/Homeworks | term4/hw1/1/1.hs | mit | 83 | 0 | 8 | 17 | 40 | 20 | 20 | 3 | 1 |
{-# LANGUAGE ViewPatterns #-}
-- | Specification of Pos.Chain.Lrc.OBFT (which is basically a pure
-- version of 'Pos.DB.Lrc.OBFT').
module Test.Pos.Chain.Lrc.ObftRoundRobinSpec
( spec
) where
import Universum hiding (sort)
import Data.List.NonEmpty (sort, (!!))
import Tes... | input-output-hk/pos-haskell-prototype | chain/test/Test/Pos/Chain/Lrc/ObftRoundRobinSpec.hs | mit | 2,466 | 0 | 18 | 573 | 491 | 271 | 220 | 52 | 2 |
--
--
--
-----------------
-- Exercise 4.23.
-----------------
--
--
--
module E'4'23 where
import Test.QuickCheck ( quickCheck )
-- Subsection 4.5 (extended definition) ...
regions' :: Integer -> Integer
regions' n
| n < 0 = 0
| n == 0 = 1
| otherwise = regions' ( n - 1 ) + n
-- Subsect... | pascal-knodel/haskell-craft | _/links/E'4'23.hs | mit | 924 | 0 | 9 | 283 | 309 | 160 | 149 | 25 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
-- Module : Khan.CLI.Ansible
-- Copyright : (c) 2013 Brendan Hay <brendan.g.hay@gmail.com>
-- License : This Source Code Form is subject to the terms of
-- ... | zinfra/khan | khan-cli/src/Khan/CLI/Ansible.hs | mpl-2.0 | 6,636 | 0 | 19 | 1,974 | 1,625 | 846 | 779 | 155 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
module Stack.Options.DockerParser where
import Data.Char
import Data.List (intercalate)
import qualified Data.Text as T
import Distribution.Version (anyVersion)
import Options.Applica... | MichielDerhaeg/stack | src/Stack/Options/DockerParser.hs | bsd-3-clause | 6,868 | 0 | 33 | 2,922 | 1,241 | 613 | 628 | 140 | 4 |
{-# LANGUAGE Haskell2010, OverloadedStrings #-}
{-# LINE 1 "Network/Wai/EventSource.hs" #-}
{-|
A WAI adapter to the HTML5 Server-Sent Events API.
-}
module Network.Wai.EventSource (
ServerEvent(..),
eventSourceAppChan,
eventSourceAppIO
) where
import Data.Function (fix)
import ... | phischu/fragnix | tests/packages/scotty/Network.Wai.EventSource.hs | bsd-3-clause | 1,337 | 0 | 16 | 317 | 266 | 148 | 118 | 26 | 2 |
<?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="ro-RO">
<title>Requester</title>
<maps>
<homeID>requester</homeID>
<mapref location="ma... | kingthorin/zap-extensions | addOns/requester/src/main/javahelp/help_ro_RO/helpset_ro_RO.hs | apache-2.0 | 960 | 77 | 66 | 155 | 404 | 205 | 199 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Mode.Interactive
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
--
-- Collection of 'Mode's for working with Haskell.
module Yi.Mode.Inter... | siddhanathan/yi | yi-core/src/Yi/Mode/Interactive.hs | gpl-2.0 | 4,603 | 0 | 16 | 1,210 | 1,169 | 612 | 557 | 99 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveDataTypeable #-}
-- | Versions for packages.
module Stack.Types.Version
(Version
,Cabal... | CRogers/stack | src/Stack/Types/Version.hs | bsd-3-clause | 6,337 | 0 | 15 | 1,521 | 1,638 | 867 | 771 | 163 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
module Stack.FileWatch
( fileWatch
, printExceptionStderr
) where
import Blaze.ByteString.Builder (toLazyByteString, copyByteString)
import Blaze.ByteString.Builder.Char.Utf8 (fromShow)
import Control.Concurrent.Async (race_)
import Control.... | CRogers/stack | src/Stack/FileWatch.hs | bsd-3-clause | 3,671 | 0 | 25 | 1,314 | 910 | 454 | 456 | 84 | 6 |
import Control.Concurrent
import Control.Exception
-- check that async exceptions are restored to their previous
-- state after an exception is raised and handled.
main = do
main_thread <- myThreadId
m1 <- newEmptyMVar
m2 <- newEmptyMVar
m3 <- newEmptyMVar
forkIO (do
takeMVar m1
throwTo main_th... | urbanslug/ghc | testsuite/tests/concurrent/should_run/conc017a.hs | bsd-3-clause | 1,238 | 6 | 21 | 307 | 345 | 171 | 174 | 31 | 1 |
{-# LANGUAGE ForeignFunctionInterface #-}
module Main where
-- Test for #1648
import Foreign
import Data.Int
import Data.Word
f :: Int64 -> IO Int64
f x = return $ x + 1
g :: Word64 -> IO Word64
g x = return $ x + 2
type WCall = Word64 -> IO Word64
foreign import ccall "wrapper" mkWCall :: WCall -> IO (FunPtr WCal... | tibbe/ghc | testsuite/tests/ffi/should_run/ffi019.hs | bsd-3-clause | 645 | 0 | 9 | 137 | 238 | 122 | 116 | 20 | 1 |
{-# OPTIONS_GHC -fdefer-type-errors #-}
module Main where
data Foo = MkFoo
data Bar = MkBar Foo deriving Show
main = do { print True; print (MkBar MkFoo) }
| siddhanathan/ghc | testsuite/tests/deriving/should_run/T9576.hs | bsd-3-clause | 160 | 0 | 9 | 32 | 50 | 28 | 22 | 5 | 1 |
module Main where
import System.Environment
import Text.ParserCombinators.Parsec hiding (spaces)
main :: IO ()
main = do args <- getArgs
putStrLn (readExpr (args !! 0))
symbol :: Parser Char
symbol = oneOf "!$%&|*+-/:<=>?@^_~#"
readExpr :: String -> String
readExpr input = case parse symbol "lisp" input of... | tismith/tlisp | write-yourself-a-scheme/listings/listing3.1.hs | mit | 394 | 0 | 11 | 82 | 131 | 67 | 64 | 12 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module WordProblem (answer) where
import Data.Text (pack)
import Data.List (foldl')
import Control.Applicative -- (pure, (<|>), (<$>), (<*>), (<*), (*>))
import Data.Attoparsec.Text
( Parser, signed, decimal, space, maybeResult, parse, many' )
import Prelude
answerParser :: Parser ... | stevejb71/xhaskell | wordy/example.hs | mit | 836 | 0 | 12 | 191 | 276 | 150 | 126 | 22 | 1 |
-- Copyright 2017 Maximilian Huber <oss@maximilian-huber.de>
-- SPDX-License-Identifier: MIT
{-# OPTIONS_GHC -W -fwarn-unused-imports -fno-warn-missing-signatures #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
module XMonad.MyConfig
( runMyConfig
, composeMyConfig
) where
import Syste... | maximilianhuber/myconfig | xmonad/lib/XMonad/MyConfig.hs | mit | 1,920 | 0 | 12 | 368 | 333 | 190 | 143 | 37 | 1 |
module Symmath.Functiontable where
import Text.Printf
import Text.PrettyPrint
import qualified Data.Map.Strict as M
import Symmath.Terms
import Symmath.Eval
data FuncValue = Value Double | Undefined
instance Show FuncValue where
show (Value n) = show n
show Undefined = "undef"
-- Use show on the returned... | Spheniscida/symmath | Symmath/Functiontable.hs | mit | 2,477 | 0 | 17 | 579 | 795 | 411 | 384 | 37 | 2 |
-- Countdown example from chapter 11 of Programming in Haskell,
-- Graham Hutton, Cambridge University Press, 2007. With help
-- from chapter 20 of Pearls of Functional Algorithm Design,
-- Richard Bird, Cambridge University Press, 2010.
import System.CPUTime
import Numeric
import System.IO
-- Expressions
-- -----... | anwb/fp-one-on-one | lecture-10-hw.hs | mit | 8,958 | 0 | 19 | 5,073 | 2,472 | 1,280 | 1,192 | 144 | 3 |
module Data.DirectoryTreeSpec where
import qualified Data.Aeson as AE
import qualified Data.Aeson.Encode.Pretty as AE
import qualified Data.ByteString.Lazy.Char8 as BS
import Data.Tree
import Data.DirectoryTree
import Data.Either (isRight)
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
de... | gust/feature-creature | legacy/lib/test/Data/DirectoryTreeSpec.hs | mit | 1,802 | 0 | 16 | 260 | 397 | 215 | 182 | 31 | 1 |
{-# htermination intersect :: [Ordering] -> [Ordering] -> [Ordering] #-}
import List
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/List_intersect_7.hs | mit | 85 | 0 | 3 | 12 | 5 | 3 | 2 | 1 | 0 |
{-# LANGUAGE OverloadedStrings #-}
import SMTLib1.QF_AUFBV as BV
import System.Process
import System.IO
main :: IO ()
main =
do let txt = show (pp script)
putStrLn txt
putStrLn (replicate 80 '-')
-- putStrLn =<< readProcess "yices" ["-smt", "-tc"] txt
putStrLn =<< readProcess "yices" ["-f"] txt
... | yav/smtLib | test/Test1.hs | mit | 641 | 0 | 12 | 160 | 258 | 128 | 130 | 22 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
module Json.UserSpec (spec) where
import Data.Aeson.Lens
import Lastfm
import Lastfm.User
import Test.Hspec
import SpecHelper
spec :: Spec
spec = do
it "getRecentStations" $
privately (getRecentStations <*> user "liblastfm" <* limit 10)
`shouldH... | supki/liblastfm | test/api/Json/UserSpec.hs | mit | 4,242 | 0 | 15 | 761 | 1,256 | 600 | 656 | -1 | -1 |
{-|
Module : Database.Orville.PostgreSQL.Internal.Expr.NameExpr
Copyright : Flipstone Technology Partners 2016-2018
License : MIT
-}
{-# LANGUAGE OverloadedStrings #-}
module Database.Orville.PostgreSQL.Internal.Expr.NameExpr where
import Data.String
import Database.Orville.PostgreSQL.Internal.MappendCompat ((<... | flipstone/orville | orville-postgresql/src/Database/Orville/PostgreSQL/Internal/Expr/NameExpr.hs | mit | 1,208 | 0 | 10 | 178 | 303 | 169 | 134 | 24 | 1 |
{-# LANGUAGE NoMonomorphismRestriction, OverloadedStrings #-}
import Text.XML.HXT.Core
import Data.List
import Text.HandsomeSoup
import System.Random
import System.Environment
import Network.HTTP.Base
import System.Process
import Network.HTTP.Enumerator
import Network.HTTP.Types (methodPost)
import qualified Data.ByteS... | Okasu/randwp | RandWP.hs | mit | 1,923 | 0 | 18 | 648 | 556 | 282 | 274 | 41 | 2 |
{- |
Description : logic for Maude (rewriting logic)
Copyright : (c) Otto-von-Guericke University of Magdeburg
License : GPLv2 or higher, see LICENSE.txt
The "Maude" folder contains the skeleton of
an instance of "Logic.Logic" for Maude, see
<https://en.wikipedia.org/wiki/Maude_system>
M. Codescu, T. Mossak... | spechub/Hets | Maude.hs | gpl-2.0 | 765 | 0 | 2 | 105 | 5 | 4 | 1 | 1 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.