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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
main = print "Hello, World!"
| charleso/intellij-haskforce | tests/gold/parser/Hello00001.hs | apache-2.0 | 29 | 0 | 5 | 5 | 9 | 4 | 5 | 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="it-IT">
<title>Directory List v1.0</title>
<maps>
<homeID>directorylistv1</homeID>
<map... | thc202/zap-extensions | addOns/directorylistv1/src/main/javahelp/help_it_IT/helpset_it_IT.hs | apache-2.0 | 976 | 78 | 66 | 157 | 412 | 209 | 203 | -1 | -1 |
module Type4 where
data Data = C1 Int Char | C2 Int | C3 Float
errorData field dat function
= errorData
("the binding for " ++ field ++ " in a pattern binding involving " ++ dat ++ " has been removed in function " ++ function)
f :: Data -> Data -> a
f (C1 b c) (C1 b1 b2) = errorData "a1" "C1" "f"... | kmate/HaRe | old/testing/removeField/Type4_TokOut.hs | bsd-3-clause | 372 | 0 | 11 | 114 | 151 | 78 | 73 | -1 | -1 |
module Oops where
-- highlight >x +< in f, then select IntroNewDef
main = print ((f 1) 2, gaga True)
where f x y = x + y
gaga h = ("g: " ++) (show h)
| SAdams601/HaRe | old/testing/introNewDef/Oops.hs | bsd-3-clause | 163 | 0 | 9 | 49 | 68 | 36 | 32 | 4 | 1 |
{-# LANGUAGE BangPatterns, ScopedTypeVariables #-}
-- |
-- Module : Data.Text.Search
-- Copyright : (c) Bryan O'Sullivan 2009
--
-- License : BSD-style
-- Maintainer : bos@serpentine.com, rtomharper@googlemail.com,
-- duncan@haskell.org
-- Stability : experimental
-- Portability : GHC
--
--... | mightymoose/liquidhaskell | benchmarks/text-0.11.2.3/Data/Text/Search.hs | bsd-3-clause | 6,324 | 0 | 24 | 2,392 | 1,046 | 600 | 446 | 57 | 11 |
{-# LANGUAGE OverloadedStrings #-}
module Heather where
import Data.Text (Text)
import Data.Aeson
import Control.Applicative
import Control.Monad
import Control.Exception
import Network.HTTP.Conduit
import qualified Data.ByteString.Lazy as BS
data Weather = Weather {
weather :: String,
description ... | anobi/Heather | src/Heather.hs | mit | 1,564 | 0 | 19 | 567 | 449 | 258 | 191 | 38 | 2 |
module Eval where
import Parse
data Store = StoreEmpty
| StoreEntry String Parse.Term Store
store_get :: Store -> String -> Maybe Parse.Term
store_get StoreEmpty _ = Nothing
store_get (StoreEntry s t store) query
| s == query = Just t
| otherwise = store_get store query
store_put :: Store -> String -... | mkfifo/lambda_calculus | impl/untyped/haskell/eval.hs | mit | 1,937 | 0 | 13 | 406 | 731 | 352 | 379 | 49 | 3 |
import Control.Monad (join)
import Data.Char (isHexDigit)
import Data.List.Split (chunksOf)
import Numeric (readHex)
myTail :: String -> String
myTail "" = ""
myTail (_:xs) = xs
extractDigits :: String -> String
extractDigits = takeWhile isHexDigit . myTail . dropWhile (\c -> c /= 'x')
splitHex :: String -> [String... | reubensammut/SLAE32 | Scripts/pushprint.hs | mit | 812 | 0 | 11 | 163 | 268 | 143 | 125 | 24 | 1 |
{-# LANGUAGE Haskell2010, TemplateHaskell #-}
import Control.Monad
import NumericalMethods.Simple
import Test.QuickCheck
import Test.QuickCheck.All
import System.Exit
mysqrttest m guess = sqrt m
main = do
success <- $(quickCheckAll)
(if success then exitSuccess else exitFailure)
| rfdickerson/numerical-methods | quickcheck-tests.hs | mit | 296 | 0 | 9 | 49 | 71 | 39 | 32 | 10 | 2 |
module Functions.Math
(
collatz,
factorial,
fib,
isMultipleOfAny,
quicksort,
multiplesOfFactors
) where
collatz :: (Integral a) => a -> [a]
collatz 1 = [1]
collatz n
| even n = n:collatz (n `div` 2)
| odd n = n:collatz (n*3 + 1)
factorial :: (Integral a) => a -> a
factorial 0 = 1
factorial n
| n > 0 = ... | anshbansal/general | Haskell/Functions/Math.hs | mit | 929 | 0 | 10 | 211 | 448 | 241 | 207 | 29 | 1 |
{-# LANGUAGE OverloadedStrings, QuasiQuotes, RecordWildCards #-}
module Main where
import JSONKit.Base
import JSONKit.KeyPath
import Data.Aeson
import Data.Monoid
import qualified Data.Map.Strict as M
import Data.Text (Text)
import qualified Data.Text.Encoding as T (decodeUtf8)
import Data.List (intersperse)
import qua... | danchoi/jsonkit | TSV.hs | mit | 4,265 | 0 | 20 | 985 | 1,173 | 633 | 540 | 93 | 4 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module TriggerTest where
import Control.Exception (Exception)
import Control.Monad (void)
import Control.Monad.Catch (MonadCatch, MonadThrow, catch, throwM)
import Control.Monad.IO.Class (MonadIO(liftIO))
import qualified Data.Te... | flipstone/orville | orville-postgresql/test/TriggerTest.hs | mit | 6,332 | 0 | 25 | 1,846 | 1,270 | 650 | 620 | -1 | -1 |
module Chat where
import Chat.Packet
import Chat.Room
import Chat.Session
import Chat.Types
import Network.Wai
import Network.HTTP.Types
import Network.WebSockets as WS
import Network.Wai.Handler.WebSockets
import Servant
import System.IO.Unsafe
import Util
type ChatAPI = "chat" :> Capture "alias" String :> Capture ... | thchittenden/GeoChat | src/Chat.hs | mit | 1,214 | 0 | 10 | 208 | 297 | 156 | 141 | -1 | -1 |
{-# LANGUAGE
OverloadedStrings
#-}
{-|
Module : HSat.Problem.Instances.CNF.Parser.Internal
Description : Exports the Internal tests for the CNF Parser
Copyright : (c) Andrew Burnett 2014-2015
Maintainer : andyburnett88@gmail.com
Stability : experimental
Portability : Unknown
Module containing the In... | aburnett88/HSat | tests-src/Test/Problem/Instances/CNF/Parser/Internal.hs | mit | 13,217 | 0 | 20 | 3,562 | 3,210 | 1,686 | 1,524 | 298 | 3 |
{-# LANGUAGE CPP #-}
-- !!! Testing Typeable instances
module Main(main) where
import Data.Dynamic
import Data.Typeable (TyCon, TypeRep, typeOf)
import Data.Array
import Data.Array.MArray
import Data.Array.ST
import Data.Array.IO
import Data.Array.Unboxed
import Data.Complex
import Data.Int
import Data.Word
import Da... | ghcjs/ghcjs | test/pkg/base/dynamic002.hs | mit | 3,233 | 0 | 13 | 606 | 1,548 | 799 | 749 | 86 | 1 |
module Ternary.TestKernel (
qcChain, testChainForSpaceLeak) where
import Ternary.Core.Kernel (Kernel, chain)
type S = Int
fancyKernel :: Int -> Kernel Int Int S
fancyKernel n a b = (a*b+n, a+b)
qcChain :: Int -> Int -> Int -> S -> S -> Bool
qcChain n0 n1 a0 s0 s1 =
let (a1,t0) = fancyKernel n0 a0 s0
(a2,... | jeroennoels/exact-real | test/Ternary/TestKernel.hs | mit | 473 | 0 | 9 | 99 | 233 | 127 | 106 | 12 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module System.Authinfo (readAuthinfo, getPassword) where
import System.Environment
import Data.Attoparsec.Text hiding (take)
import Data.List
import Control.Applicative
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Control.Monad
import Network
import Data.M... | robgssp/authinfo-hs | System/Authinfo.hs | mit | 1,818 | 0 | 15 | 449 | 754 | 414 | 340 | 45 | 2 |
module Language.BioPepa.OdesTranslate
( biopepaToOdes )
where
{- Standard Library Modules Imported -}
{- External Library Modules Imported -}
import qualified Horddes.Solve
import qualified Horddes.Odes as Odes
import Horddes.Odes
( ChangeFunction ( .. ) )
{- Local Modules Imported -}
import Language.Pepa.Qual... | allanderek/ipclib | Language/BioPepa/OdesTranslate.hs | gpl-2.0 | 3,690 | 0 | 11 | 851 | 832 | 437 | 395 | 73 | 12 |
module Portfolio where
import Data.List
import GHC.Exts
import Text.Printf
import Comm
import Etran
import Types
import Utils
data Flow = Flow { flName :: String
, flFolio :: String
, flBefore :: Pennies
, flFlow :: Pennies
, flProfit :: Pennies
... | blippy/sifi | src/Portfolio.hs | gpl-3.0 | 3,889 | 0 | 11 | 1,112 | 1,271 | 688 | 583 | 104 | 1 |
module Data.NonEmpty (NonEmpty, initNE, updNE, getNE) where
-- | A non-empty container for stuff of type a is an item of type a along with a (possibly empty) list of the same type
--
-- Is this already defined somewhere ?
-- data NonEmpty a = NE
-- !a -- ^ Current state
-- [a] -- ^ Buffer of previous states
-- ... | ocramz/sparse-linear-algebra | src/Data/NonEmpty.hs | gpl-3.0 | 1,496 | 0 | 11 | 412 | 486 | 252 | 234 | 34 | 1 |
-- Make it more efficient
-- Get Grammers checked
-- Expr type for the rest
-- ask about the evaluator - both for formal as well as for the rest
module Parser (
parser
) where
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Pos
import Syntax
import Token
-- Begin silly boilerplate
type... | vyasa/satvc | Parser.hs | gpl-3.0 | 5,856 | 2 | 12 | 2,157 | 1,588 | 748 | 840 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable, TypeFamilies, CPP #-}
module Main where
import Data.Typeable
import Hip.HipSpec
import Test.QuickCheck hiding (Prop)
import Test.QuickSpec
import Prelude hiding ((+),(*),even,odd,pred,sum,id)
import qualified Prelude as P
data Nat = Z | S Nat deriving (Show,Eq,Ord,Typeable)
infix... | danr/hipspec | examples/old-examples/quickspec/Nat2.hs | gpl-3.0 | 7,003 | 2 | 17 | 1,968 | 591 | 328 | 263 | 46 | 1 |
module Amoeba.Middleware.Config.Facade (module X) where
import Data.Either.Utils as X (forceEither)
import Amoeba.Middleware.Config.Config as X (Configuration(..), getOption, loadConfiguration, intOption, strOption, extract)
import Amoeba.Middleware.Config.Extra as X | graninas/The-Amoeba-World | src/Amoeba/Middleware/Config/Facade.hs | gpl-3.0 | 268 | 0 | 6 | 24 | 69 | 49 | 20 | 4 | 0 |
module Main (
main
) where
import Graphics.Rendering.OpenGL
import Graphics.UI.GLUT
import Data.IORef
import Stars_Display
import Star_Rec
-- | Main method.
-- Entry point of the program.
main :: IO ()
main = do
(progname,args) <- getArgsAndInitialize
initialDisplayMode $= [getBufferMode args, RGBMode, Wit... | rmcmaho/Haskell_OpenGL_Examples | Stars/Stars.hs | gpl-3.0 | 741 | 0 | 10 | 136 | 195 | 97 | 98 | 22 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ViewPatterns #-}
import Control.Concurrent (ThreadId, forkIO, killThread)
import Control.Concurrent.Async (mapConcurrently)
import ... | input-output-hk/rscoin-haskell | bench/Remote/Wrapper.hs | gpl-3.0 | 22,780 | 0 | 27 | 7,154 | 5,418 | 2,788 | 2,630 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Namespaces/Update.hs | mpl-2.0 | 6,245 | 0 | 19 | 1,537 | 1,013 | 588 | 425 | 141 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/SetIAMPolicy.hs | mpl-2.0 | 6,389 | 0 | 18 | 1,486 | 938 | 546 | 392 | 136 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-kms/gen/Network/AWS/KMS/RevokeGrant.hs | mpl-2.0 | 3,351 | 0 | 9 | 771 | 414 | 253 | 161 | 54 | 1 |
module Lupo.Config where
import qualified Data.ByteString as BS
import qualified Data.Text as T
import Text.XmlHtml
import qualified Lupo.Entry as E
import Lupo.Import
data LupoConfig = LupoConfig
{ _lcSiteTitle :: T.Text
, _lcSqlitePath :: FilePath
, _lcLanguage :: T.Text
, _lcLocaleFile :: FilePath
, _lc... | keitax/lupo | src/Lupo/Config.hs | lgpl-3.0 | 748 | 0 | 10 | 133 | 213 | 123 | 90 | -1 | -1 |
data RegEx = Eset | Estr | Literal Char | Concat RegEx RegEx | Alter RegEx RegEx | Star RegEx
instance Show RegEx where
show Eset = "0"
show Estr = "$"
show (Literal c) = [c]
show (Concat r1 r2) = (show r1) ++ (show r2)
show (Alter r1 r2) = "(" ++ show r1 ++ "|" ++ show r2 ++ ")"
show (... | vedgar/mlr | 2016 Kolokvij/Z4.hs | unlicense | 767 | 0 | 9 | 199 | 363 | 181 | 182 | 20 | 1 |
module Week2 (specs) where
import Test.Hspec
import Test.QuickCheck
import Week2.LogAnalysis
import Week2.Log
specs :: SpecWith ()
specs = ex1
ex1 :: SpecWith ()
ex1 = do
describe "Week 2 - Ex. 1" $ do
describe "parseMessage" $ do
it "parses info log messages" $ property $ \time msg ->
... | raphaelnova/cis194 | test/Week2.hs | unlicense | 2,626 | 0 | 26 | 1,106 | 693 | 339 | 354 | 51 | 4 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
module Network.Haskoin.Transaction.Types
( Tx(..)
, txHash
, TxIn(..)
, TxOut(..)
, OutPoint(..)
, TxHash(..)
, hexToTxHash
, txHashToHex
, nosigTxHash
, nullOutPoint
) where
import Control.Applicative ((<|>))
i... | xenog/haskoin | src/Network/Haskoin/Transaction/Types.hs | unlicense | 8,362 | 0 | 11 | 2,554 | 2,273 | 1,182 | 1,091 | -1 | -1 |
{-
Created : 2014 Mar 16 (Sun) 12:23:18 by Harold Carr.
Last Modified : 2014 Mar 16 (Sun) 12:41:23 by Harold Carr.
-}
{-# LANGUAGE DeriveDataTypeable #-}
module Uni2 where
import Data.Data
import Data.Generics.Uniplate.Data
import Data.Typeable
data Request
= Expand { shortUrl ... | haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/generics/uniplate/src/Uni2.hs | unlicense | 862 | 0 | 9 | 329 | 149 | 92 | 57 | 18 | 0 |
#!/usr/bin/env stack
{- stack
script
--resolver lts-12.14
--package directory
--package filepath
--package unix
-}
import Control.Monad (foldM)
import System.Directory (listDirectory)
import System.Environment (getArgs)
import System.FilePath ((</>))
import ... | haroldcarr/learn-haskell-coq-ml-etc | haskell/playpen/filewalker.hs | unlicense | 1,022 | 1 | 13 | 283 | 322 | 163 | 159 | 28 | 2 |
ans :: Double -> String
ans x
| x <= 48.0 = "light fly"
| x <= 51.0 = "fly"
| x <= 54.0 = "bantam"
| x <= 57.0 = "feather"
| x <= 60.0 = "light"
| x <= 64.0 = "light welter"
| x <= 69.0 = "welter"
| x <= 75.0 = "light middle"
| x <= 81.0 = "middle"
| x <= 91.0 = "light heavy"
| otherwise = "heavy"... | a143753/AOJ | 0048.hs | apache-2.0 | 431 | 10 | 11 | 134 | 212 | 98 | 114 | 18 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE PackageImports #-}
{-
Copyright 2019 The CodeWorld Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http:... | pranjaltale16/codeworld | codeworld-base/src/Prelude.hs | apache-2.0 | 3,375 | 0 | 5 | 610 | 147 | 112 | 35 | 17 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
module HERMIT.Dictionary.Local.Let
( -- * Rewrites on Let Expressions
externals
-- ** Let Elimination
, letNonRecSubstR
, letNonRecSu... | beni55/hermit | src/HERMIT/Dictionary/Local/Let.hs | bsd-2-clause | 32,721 | 0 | 22 | 9,083 | 7,348 | 3,745 | 3,603 | 430 | 6 |
{-
Jacob Albers
CMSC 22311 - Functional Systems in Haskell
Instructors: Stuart Kurtz & Jakub Tucholski
-}
{-# OPTIONS_GHC -Wall #-}
module TestDB (main) where
import Control.Distributed.Process
import Control.Distributed.Process.Backend.SimpleLocalnet
import Control.Monad
import System.Exit (exitSuccess)
import Dis... | jalberz/distro-db | src/TestDB.hs | bsd-2-clause | 2,590 | 0 | 10 | 518 | 591 | 271 | 320 | 51 | 1 |
{-# LANGUAGE Arrows #-}
module Data.OpenDataTable.Parser
( parseBindings
, parseInput
, parseInputInfo
, parsePaging
, parsePagingNextPage
, parsePagingPageSize
, parsePagingStart
, parsePagingTotal
, parseMeta
, parseOpenDataTable
, parseSe... | fabianbergmark/OpenDataTable | Data/OpenDataTable/Parser.hs | bsd-2-clause | 9,484 | 15 | 17 | 3,388 | 2,605 | 1,266 | 1,339 | 237 | 3 |
module BoxTest where
import Elm.Utils ((|>))
import Test.Tasty
import Test.Tasty.HUnit
import qualified Data.Text.Lazy as LazyText
import qualified Data.Text as Text
import Box
trim :: String -> String
trim text =
text
|> LazyText.pack
|> LazyText.lines
|> map LazyText.stripEnd
... | nukisman/elm-format-short | tests/BoxTest.hs | bsd-3-clause | 1,840 | 0 | 12 | 606 | 509 | 260 | 249 | 57 | 1 |
module Main where
import qualified Data.Text as Text
import Lib
import System.Environment
main :: IO ()
main = do
args <- getArgs
case args of
[from, to] -> rename (Text.pack from) (Text.pack to)
_ -> putStrLn "Usage: pinboard-tag-rename OLD_TAG NEW_TAG"
| lmartel-sundry/pinboard-tag-rename | app/Main.hs | bsd-3-clause | 269 | 0 | 13 | 54 | 91 | 49 | 42 | 10 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Servant.ChinesePod.API (
api
-- * API specification
, ChinesePod
-- ** Account
, Login
, Logout
, GetUserInfo
-- *** Request types
, ReqLogin(..)
, ReqLogout(..)
, ReqGetUserInfo(..)
, ReqSignature(..)
-- *** Response types
, RespLogin(..)
... | edsko/ChinesePodAPI | src/Servant/ChinesePod/API.hs | bsd-3-clause | 45,756 | 0 | 21 | 13,198 | 9,049 | 4,794 | 4,255 | -1 | -1 |
-- ------------------------------------------------------ --
-- Copyright © 2012 AlephCloud Systems, Inc.
-- ------------------------------------------------------ --
module Aws.Route53.Commands
( -- * Actions on Hosted Zones
module Aws.Route53.Commands.CreateHostedZone
, module Aws.Route53.Commands.GetHostedZone
, ... | memcachier/aws-route53 | Aws/Route53/Commands.hs | bsd-3-clause | 1,025 | 0 | 5 | 85 | 135 | 100 | 35 | 18 | 0 |
module Main where
import Control.Monad
import Data.List
import System.Environment
main = do
fmap f getContents >>= putStr
f ('$':'|':ls) = '|': f ls
f ('|':'$':ls) = '|': f ls
f (l:ls) = l : f ls
f [] = []
| glutamate/tnutils | UnTextBar.hs | bsd-3-clause | 218 | 0 | 8 | 52 | 122 | 63 | 59 | 10 | 1 |
-- | Represent do\/don't, is\/isn't, with\/without flags with 'Choice'.
--
-- <https://existentialtype.wordpress.com/2011/03/15/boolean-blindness/ Boolean blindness>
-- refers to the problem that boolean literals on their own aren't very
-- informative. In any given context, what does 'True' mean? What does 'False'
-- ... | mboes/choice | src/Data/Choice.hs | bsd-3-clause | 4,193 | 0 | 9 | 790 | 676 | 379 | 297 | 61 | 1 |
module Tests.Frenetic.Slices.TestVerification where
import Frenetic.NetCore.Semantics
import Test.Framework
import Test.Framework.TH
import Test.Framework.Providers.QuickCheck2
import Test.HUnit
import Test.Framework.Providers.HUnit
import Frenetic.Pattern
import Frenetic.NetCore
import Frenetic.NetCore.Short
import F... | frenetic-lang/netcore-1.0 | testsuite/Tests/Frenetic/Slices/TestVerification.hs | bsd-3-clause | 1,610 | 0 | 9 | 521 | 535 | 275 | 260 | -1 | -1 |
import Common.Numbers.Primes (primes')
import Common.Numbers.Numbers (powMod)
check :: Int -> Int -> Bool
check _ 2 = False
check _ 5 = False
check n p = powMod 10 (gcd n (p-1)) p == 1 && ((sum0 xs) * q `rem` p + sum0 (take r xs)) `rem` p == 0
where
get xs = 1 : takeWhile (/= 1) (tail xs)
xs = get $ iterate ... | foreverbell/project-euler-solutions | src/132.hs | bsd-3-clause | 489 | 0 | 13 | 130 | 291 | 157 | 134 | 11 | 1 |
module Homework1.Solution where
--Credit card
--Exercise 1
toDigits :: Integer -> [Integer]
toDigits 0 = []
toDigits x
| x < 0 = []
| otherwise = toDigits (x `div` 10) ++ [x `mod` 10]
toDigitsRev :: Integer -> [Integer]
toDigitsRev x = reverse $ toDigits x
toDigitsRev' :: Integer -> [Integer]
toDigitsRev... | gabluc/CIS194-Solutions | src/Homework1/Solution.hs | bsd-3-clause | 1,579 | 0 | 11 | 474 | 600 | 314 | 286 | 35 | 3 |
import Data.Byteable (toBytes)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as C8
import Data.Char (chr)
import Data.Maybe (fromMaybe)
import Crypto.Hash
import Crypto.HKDF
import Test.Hspec
import Text.Printf
hex :: BS.ByteString -> String
hex = concatMap (printf "%02x") . BS.unpack
... | j1r1k/hkdf | test/Spec.hs | bsd-3-clause | 4,419 | 0 | 15 | 1,152 | 984 | 521 | 463 | 82 | 1 |
{-# LANGUAGE CPP #-}
module Distribution.Simple.GHCJS (
configure, getInstalledPackages, getPackageDBContents,
buildLib, buildExe,
replLib, replExe,
startInterpreter,
installLib, installExe,
libAbiHash,
hcPkgInfo,
registerPackage,
componentGhcOptio... | fugyk/cabal | Cabal/Distribution/Simple/GHCJS.hs | bsd-3-clause | 40,909 | 0 | 23 | 13,168 | 8,053 | 4,206 | 3,847 | 703 | 6 |
import qualified Data.PQueue.Prio.Min as PQ
import qualified Data.HashSet as Set
import qualified Data.HashMap.Strict as Map
import Data.Hashable (Hashable)
import Data.List (foldl')
import Data.Maybe (fromJust)
-- A* search: Finds the shortest path from a start node to a goal node using a heuristic function.
astarSea... | trxeste/wrk | haskell/TrabalhoIA/docs/astar_documented.hs | bsd-3-clause | 3,086 | 0 | 20 | 919 | 692 | 383 | 309 | 38 | 2 |
module System.Console.Types where
data Option a => OptionsList a = OptionList { aboveScreen :: [a]
, above :: [a]
, current :: a
, below :: [a]
... | shockone/interactive-select | src/System/Console/Types.hs | bsd-3-clause | 1,855 | 0 | 11 | 663 | 500 | 261 | 239 | 32 | 1 |
module Repl where
import Control.Monad
import Eval
import Parser
import System.IO
import Environment
flushStr :: String -> IO ()
flushStr str = putStr str >> hFlush stdout
readPrompt :: String -> IO String
readPrompt prompt = flushStr prompt >> getLine
evalString ::... | juanbono/my-scheme | src/Repl.hs | bsd-3-clause | 889 | 0 | 12 | 211 | 341 | 168 | 173 | 22 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module QCommon.FileLinkT where
import Control.Lens (makeLenses)
import qualified Data.ByteString as B
import Types
makeLenses ''FileLinkT | ksaveljev/hake-2 | src/QCommon/FileLinkT.hs | bsd-3-clause | 196 | 0 | 6 | 44 | 36 | 22 | 14 | 6 | 0 |
{-# LANGUAGE FlexibleContexts #-}
module Util
( values
, removeUnicode
, lookupWithDefault
, shorten
, shortenWithEllipsis
, addUnique
, mergeUnique
, normalizePath
, removeLeading
, removeLeadingSlash
, replaceLeading
, trimL
, trimR
, trim
, sortByAccessorDesc
, shortenFileName
, renderAsTree
, sumMap
, StringTree(S... | LFDM/hstats | src/lib/Util.hs | bsd-3-clause | 4,128 | 0 | 13 | 878 | 1,759 | 936 | 823 | 113 | 4 |
{-# LANGUAGE NoMonomorphismRestriction #-}
module Test.AES (test) where
import Test.Util
test = standardTest AES modeLine "KEY"
modeLine = string "AESVS " *> many anySym *> string " test data for " *> anyVal
| GaloisInc/hacrypto | calf/lib/Test/AES.hs | bsd-3-clause | 210 | 0 | 8 | 35 | 55 | 29 | 26 | 5 | 1 |
module TestLojysambanLib (lojysambanLib) where
import Test.HUnit
import Control.Applicative
import System.IO.Unsafe
import LojysambanLib
import Crypto.Hash.MD5
main = maybe (return ()) putStrLn $ ask nonkanynacQ5 nonkanynac
lojysambanLib = "test of LojysambanLib" ~: test [
ask pendoQ1 pendo ~?= pendoA1,
ask patfuQ... | YoshikuniJujo/lojysamban | tests/TestLojysambanLib.hs | bsd-3-clause | 2,465 | 36 | 13 | 436 | 461 | 240 | 221 | 47 | 1 |
{-# LANGUAGE TemplateHaskell, QuasiQuotes #-}
module Fuga (fuga, piyo) where
import Hoge (hoge)
fuga :: String
fuga = [hoge|
hoge
fuga
piyo
|]
piyo :: String
piyo = [hoge| hoge fuga piyo |]
| CementTheBlock/.vim | vim/bundle/ghcmod-vim/test/data/th/Fuga.hs | mit | 192 | 0 | 5 | 35 | 49 | 34 | 15 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Network.MPD.Applicative.Database
Copyright : (c) Joachim Fasting 2012
License : MIT
Maintainer : joachim.fasting@gmail.com
Stability : stable
Portability : unportable
The music database.
-}
module Network.MPD.Applicative.Database where
import ... | beni55/libmpd-haskell | src/Network/MPD/Applicative/Database.hs | mit | 3,720 | 0 | 14 | 996 | 818 | 444 | 374 | 60 | 2 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
-- @
{-# LANGUAGE TypeApplications #-}
-- to bring stuff like (r, c) into scope
{-# LANGUAGE ScopedTypeV... | bollu/symengine.hs-1 | src/Symengine/VecBasic.hs | mit | 3,398 | 0 | 14 | 577 | 701 | 378 | 323 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Chorebot.Distributor ( distribute
) where
import Data.Time
import Data.List
import System.Random
import Control.Monad.Random
import Control.Monad.State
import Control.Monad.Identity
import Control.Monad.Reade... | mjhoy/chorebot | src/Chorebot/Distributor.hs | gpl-2.0 | 9,441 | 0 | 26 | 2,566 | 2,347 | 1,213 | 1,134 | 188 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module: TestMaker.Test
Description: Manages the database of questions.
Copyright: (c) Chris Godbout
License: GPLv3
Maintainer: chris@mathologist.net
Stability: experimental
Portability: portable
-}
module TestMaker.Database where
import qualified Data.Map as M
import ... | mathologist/hTestMaker | testmaker/src/TestMaker/Database.hs | gpl-3.0 | 2,658 | 0 | 12 | 623 | 820 | 444 | 376 | 46 | 3 |
module Data.Time.Moment.Interval
(
-- * Interval
Interval (fromInterval)
, toInterval
)
where
import Data.Time.Moment.Private
toInterval :: Integer -> Interval
toInterval = Interval
| hellertime/time-recurrence | src/Data/Time/Moment/Interval.hs | lgpl-3.0 | 210 | 0 | 5 | 50 | 42 | 28 | 14 | 9 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANG... | AndrewRademacher/stack | src/Stack/Package.hs | bsd-3-clause | 51,644 | 0 | 22 | 15,730 | 12,053 | 6,233 | 5,820 | -1 | -1 |
module Modal.Formulas where
import Control.Applicative hiding ((<|>))
import Control.Arrow ((***))
import Control.Monad (ap)
import Data.List
import Data.Monoid
import Data.Maybe
import Data.Map (Map)
import qualified Data.Map as M
import Data.Text (Text)
import qualified Data.Text as T
import Modal.Display
import Moda... | daniel-ziegler/provability | src/Modal/Formulas.hs | bsd-3-clause | 16,257 | 0 | 16 | 3,728 | 5,727 | 3,031 | 2,696 | 337 | 10 |
--------------------------------------------------------------------------------
-- Copyright © 2011 National Institute of Aerospace / Galois, Inc.
--------------------------------------------------------------------------------
{-# LANGUAGE ExistentialQuantification, GADTs #-}
module Copilot.Compile.C99.C2A
( c2aE... | leepike/copilot-c99 | src/Copilot/Compile/C99/C2A.hs | bsd-3-clause | 8,479 | 113 | 26 | 2,547 | 2,543 | 1,347 | 1,196 | 165 | 23 |
-- |
-- Module : Control.Monad.Numeric
-- Copyright : (c) 2011 Aleksey Khudyakov
-- License : BSD3
--
-- Maintainer : Aleksey Khudyakov <alexey.skladnoy@gmail.com>
-- Stability : experimental
-- Portability : portable
--
-- Function useful for writing numeric code which works with mutable
-- data.
module Contro... | KevinCotrone/numeric-tools | Control/Monad/Numeric.hs | bsd-3-clause | 1,243 | 0 | 13 | 438 | 271 | 143 | 128 | 22 | 1 |
{-# LANGUAGE CPP #-}
module Eta.TypeCheck.TcInteract (
solveSimpleGivens, -- Solves [EvVar],GivenLoc
solveSimpleWanteds, -- Solves Cts
solveCallStack, -- for use in TcSimplify
) where
import Eta.BasicTypes.BasicTypes ()
import Eta.HsSyn.HsTypes ( HsIPName(..) )
import Eta.Utils.FastString
i... | rahulmutt/ghcvm | compiler/Eta/TypeCheck/TcInteract.hs | bsd-3-clause | 93,135 | 109 | 23 | 27,454 | 11,430 | 6,012 | 5,418 | -1 | -1 |
module Language.Mecha.Primitives
( sphere
, cube
, cylinder
) where
import Language.Mecha.Solid
-- | A sphere with radius 1 centered at origin.
sphere :: Solid
sphere = Solid $ \ (x, y, z) -> sqrt (x ** 2 + y ** 2 + z ** 2) <= 1
-- | A sphere with edge length 2 centered at origin.
cube :: Solid
cube = Solid ... | tomahawkins/mecha | attic/Primitives.hs | bsd-3-clause | 548 | 0 | 14 | 141 | 223 | 129 | 94 | 11 | 1 |
{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving, Rank2Types #-}
-- |
-- Module: Data.Aeson.Types.Internal
-- Copyright: (c) 2011, 2012 Bryan O'Sullivan
-- (c) 2011 MailRank, Inc.
-- License: Apache
-- Maintainer: Bryan O'Sullivan <bos@serpentine.com>
-- Stability: experimental
--... | jprider63/aeson-ios-0.8.0.2 | Data/Aeson/Types/Internal.hs | bsd-3-clause | 11,828 | 0 | 14 | 3,305 | 2,228 | 1,274 | 954 | 220 | 4 |
module HLearn.Metrics.Mahalanobis.LegoPaper
where
import Control.Monad
import Control.Monad.Random hiding (fromList)
import Control.Monad.ST
import Data.Array.ST
import GHC.Arr
import qualified Data.Foldable as F
import qualified Data.Vector.Generic as VG
import Debug.Trace
import Foreign.Storable
import Numeric.... | iamkingmaker/HLearn | src/HLearn/Metrics/Mahalanobis/LegoPaper.hs | bsd-3-clause | 5,034 | 0 | 21 | 1,491 | 1,737 | 913 | 824 | -1 | -1 |
import System.Environment
import System.Exit
import System.IO
import Codec.Text.Detect
import qualified Data.ByteString.Lazy as L
main :: IO ()
main = do
args <- getArgs
bs <- case args of
[fp] -> L.readFile fp
[] -> L.getContents
case detectEncodingName bs of
Nothing -> hP... | beni55/charsetdetect | example/Main.hs | lgpl-2.1 | 432 | 1 | 13 | 108 | 137 | 68 | 69 | 14 | 3 |
{-# LANGUAGE RecordWildCards #-}
-- |
-- Module : Criterion
-- Copyright : (c) 2009-2014 Bryan O'Sullivan
--
-- License : BSD-style
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : GHC
--
-- Core benchmarking code.
module Criterion
(
-- * Benchmarkable code
Be... | paulolieuthier/criterion | Criterion.hs | bsd-2-clause | 1,628 | 0 | 11 | 333 | 278 | 160 | 118 | 35 | 1 |
module ExportList_C where
c = 42
| beni55/fay | tests/ExportList_C.hs | bsd-3-clause | 34 | 0 | 4 | 7 | 9 | 6 | 3 | 2 | 1 |
{-# LANGUAGE OverloadedStrings, RecordWildCards, TemplateHaskell, TupleSections #-}
-- | Extensions to Aeson parsing of objects.
module Data.Aeson.Extended (
module Export
-- * Extended failure messages
, (.:)
, (.:?)
-- * JSON Parser that emits warnings
, WarningParser
, JSONWarning (..)
, withObjec... | wskplho/stack | src/Data/Aeson/Extended.hs | bsd-3-clause | 4,960 | 0 | 19 | 1,263 | 1,375 | 754 | 621 | 116 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TupleSections #-}
-- | Names for packages.
module Stack.Types.PackageName
(PackageName
,Pack... | akhileshs/stack | src/Stack/Types/PackageName.hs | bsd-3-clause | 6,040 | 0 | 20 | 1,382 | 1,433 | 748 | 685 | 134 | 3 |
module Scope3 where
f = let square x = x + x in g 55
where
g x = square x
square x = x * x
| kmate/HaRe | old/testing/whereToLet/Scope3_TokOut.hs | bsd-3-clause | 133 | 0 | 9 | 69 | 55 | 27 | 28 | 4 | 1 |
{-# LANGUAGE GADTs #-}
module ShouldFail2 where
data T a where
C :: Int -> T Int
D :: Bool -> T Bool
-- should fail because variable is wobbly
foo (C x) = x
foo (D b) = b
| urbanslug/ghc | testsuite/tests/gadt/gadt-dim2.hs | bsd-3-clause | 185 | 0 | 7 | 54 | 63 | 35 | 28 | 7 | 1 |
-- !!! Check the handling of 'qualified' and 'as' clauses
module ShouldCompile where
import Data.List as L ( intersperse )
x = L.intersperse
y = intersperse
| wxwxwwxxx/ghc | testsuite/tests/parser/should_compile/read025.hs | bsd-3-clause | 162 | 0 | 5 | 31 | 29 | 19 | 10 | 4 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE StandaloneDeriving, GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
module Control.OperationalTransformation.Selection.Tests (tests) where
import Control.OperationalTransformation
import Control.OperationalTransformation.Selection
import Control.Ope... | thomasjm/ot.hs | test/Control/OperationalTransformation/Selection/Tests.hs | mit | 2,203 | 0 | 12 | 307 | 606 | 314 | 292 | 50 | 1 |
import Data.List
import Data.Char
import Data.Tree hiding (Tree )
data Tree a b = Branch b (Tree a b) (Tree a b)
| Leaf a deriving (Eq,Ord,Show)
data BTree a = BNil | BNode a (BTree a) (BTree a) deriving Show
data Move = SM Board Pos Pos | KM | MKM
data Fig = W | B | WD | BD | E deriving (Show, Eq)
typ... | RAFIRAF/HASKELL | warcaby.hs | mit | 7,234 | 11 | 15 | 1,681 | 2,565 | 1,371 | 1,194 | 111 | 1 |
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Hadoop.Protos.HdfsProtos.CryptoProtocolVersionProto (CryptoProtocolVersionProto(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import... | alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/HdfsProtos/CryptoProtocolVersionProto.hs | mit | 2,945 | 0 | 11 | 421 | 601 | 327 | 274 | 53 | 1 |
import Test.Hspec
import Test.QuickCheck
import Control.Exception (evaluate)
import List1
import List2
import List3
import Arithmetic
main :: IO ()
main = hspec $ do
describe "lists 1" $ do
it "1. Find the last element of a list" $ do
myLast [1,2,3,4] `shouldBe` (4 :: Int)
myLast ['x','y','z'] `shouldBe` ... | matteosister/haskell-exercises | spec.hs | mit | 3,481 | 1 | 19 | 647 | 1,399 | 779 | 620 | 63 | 1 |
-- file: ch14/MultiplyTo.hs
-- Found at http://book.realworldhaskell.org/read/monads.html
module ListMonadExample where
multiplyTo :: Int -> [(Int, Int)]
multiplyTo n = do
x <- [1..n]
y <- [x..n]
guarded (x * y == n) $ return (x, y)
where
guarded :: Bool -> [a] -> [a]
guarded True xs = xs
guarded F... | iduhetonas/haskell-projects | HelloWorld/listMonad.hs | mit | 333 | 0 | 11 | 76 | 129 | 70 | 59 | 9 | 2 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Blunt.App.Application where
import qualified Blunt.App.Markup as Markup
import qualified Blunt.Component as Component
import Control.Category ((>>>))
import qualified Control.Exception as Exception
import qualifi... | tfausak/blunt | library/Blunt/App/Application.hs | mit | 4,412 | 0 | 19 | 1,233 | 1,062 | 584 | 478 | 106 | 3 |
import Control.FRPNow
import Control.FRPNow.Vty.Core
import Control.FRPNow.Vty.Widgets
import Data.Monoid
import Graphics.Vty hiding (Event)
showImage :: Show a => a -> Image
showImage = string defAttr . show
sumWidget :: EvStream VEvent -> MakeWidget
sumWidget eEv bDis bVis = do
sum <- foldEs (+) 0 $ 1 <$ (filte... | edwardwas/FRPNow-Vty | src/Example/Main.hs | mit | 1,323 | 1 | 15 | 265 | 525 | 261 | 264 | 26 | 2 |
{-# OPTIONS_GHC -O0 #-}
{-# LANGUAGE CPP, DeriveGeneric, LambdaCase, MagicHash, StandaloneDeriving #-}
{- |
Communication between the compiler (GHCJS) and runtime (on node.js) for
Template Haskell
-}
module GHCJS.Prim.TH.Types ( Message(..)
, THResultType(..)
... | ghcjs/ghcjs-prim | GHCJS/Prim/TH/Types.hs | mit | 5,422 | 0 | 9 | 1,165 | 723 | 384 | 339 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses, RecordWildCards, GADTs, FlexibleContexts, ExistentialQuantification #-}
module SpaceShip.Class.State (
GameObjectClass (..)
, GameObject (..)
, updatePhysicalMovement
, toroidFixedPhysicalPosition
, key
, render
, animateStart
, animateEnd
, deviceInputs
, kind
, update... | josejuan/Haskell-Spaceship-Meteorite | SpaceShip/Class/State.hs | mit | 4,156 | 0 | 14 | 1,277 | 1,092 | 589 | 503 | 85 | 1 |
module Proteome.Project.Resolve where
import qualified Control.Lens as Lens (over, view)
import Control.Monad (foldM)
import Control.Monad.Extra (firstJustM)
import Data.List (nub)
import Data.Map.Strict ((!?))
import qualified Data.Map.Strict as Map (toList, union)
import Path (Abs, Dir, Path, parent, parseRelDir, to... | tek/proteome | packages/proteome/lib/Proteome/Project/Resolve.hs | mit | 8,708 | 1 | 14 | 1,455 | 2,779 | 1,439 | 1,340 | -1 | -1 |
import Control.Concurrent.ParallelIO
import Text.HandsomeSoup
import Text.XML.HXT.Core
textFromUrl url = do
doc <- parsePage url
print $ (url, length $ clean doc)
main = do
links <- runX $ fromUrl "http://www.datatau.com" >>> css "td.title a" !"href"
parallel_ $ map textFromUrl links
stopGlobalPool
parseP... | slon1024/haskell_parallel_io | Scraper.hs | mit | 755 | 0 | 11 | 127 | 269 | 145 | 124 | 18 | 2 |
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
module Main where
import Benchmarks
import Criterion.Main
sizeSmall :: Int
sizeSmall = 10^7
sizeMedium :: Int
sizeMedium = 10^8
sizeLarge :: Int
si... | MichielDeCuyper/Algebraic-Effect-Handlers | src/Main.hs | mit | 1,305 | 0 | 10 | 436 | 264 | 133 | 131 | 27 | 1 |
{-|
Scry helpers
-}
module Urbit.King.Scry
( scryNow
, module Urbit.Vere.Pier.Types
)
where
import Urbit.Prelude
import Urbit.Vere.Serf.Types
import Urbit.Arvo.Common (Desk)
import Urbit.Vere.Pier.Types (ScryFunc)
scryNow :: forall e n
. (HasLogFunc e, FromNoun n)
=> ScryFunc
-> Term ... | urbit/urbit | pkg/hs/urbit-king/lib/Urbit/King/Scry.hs | mit | 876 | 0 | 14 | 243 | 309 | 169 | 140 | -1 | -1 |
{-# OPTIONS_GHC -XRank2Types #-}
{- Implements a translation between monadic parametric representation of RHS
- and Strategy Trees. (Andrej Bauer, Martin Hofmann and Aleksandr Karbyshev.
- "On Monadic Parametricity of Second-Order Functionals", FoSSaCS 2013.) -}
import Control.Monad
import Control.Monad.Cont
import ... | vesalvojdani/haskell-fm | nice.hs | gpl-2.0 | 1,971 | 1 | 14 | 554 | 941 | 493 | 448 | 46 | 2 |
{-|
This module is intended to be a pretty printer for pepa models.
It should be updated to use 'Text.PrettyPrint.HughesPJ'
-}
module Language.Pepa.Srmc.Print
( hprintSrmcModel )
where
{- Imported Standard Libraries -}
{- Imported Local Libraries -}
import Language.Pepa.Srmc.Syntax
( SrmcModel ( .. )
,... | allanderek/ipclib | Language/Pepa/Srmc/Print.hs | gpl-2.0 | 2,229 | 0 | 11 | 721 | 468 | 260 | 208 | 57 | 1 |
{- ============================================================================
| Copyright 2011 Matthew D. Steele <mdsteele@alum.mit.edu> |
| |
| This file is part of Fallback. |
... | mdsteele/fallback | src/Fallback/View/Upgrade.hs | gpl-3.0 | 12,433 | 142 | 19 | 3,594 | 3,152 | 1,669 | 1,483 | 215 | 5 |
{-# OPTIONS -Wall #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module Examples where
import GHC.TypeLits
import Data.Void
import Utils
import Generic
import Syntaxes
------------------... | gallais/potpourri | haskell/syntax-with-binding/Examples.hs | gpl-3.0 | 3,091 | 3 | 18 | 730 | 824 | 439 | 385 | 75 | 3 |
module TestSuites.RenderTextSpec (spec) where
import Test.Hspec.Contrib.HUnit(fromHUnitTest)
import Test.HUnit
import Test.Hspec (hspec)
import HsPredictor.Render.Text
import HsPredictor.SQL.Queries
import HsPredictor.CSV.Load
import HelperFuncs (removeIfExists)
main = hspec spec
spec = fromHUnitTest ... | jacekm-git/HsPredictor | tests/TestSuites/RenderTextSpec.hs | gpl-3.0 | 1,246 | 0 | 11 | 321 | 353 | 201 | 152 | 38 | 1 |
{-# LANGUAGE ViewPatterns #-}
module HipSpec.Heuristics.Associativity where
import Test.QuickSpec.Equation
import Test.QuickSpec.Term hiding (depth)
-- If term is a function applied to two terms, Just return them
unbin :: Term -> Maybe (Symbol,Term,Term)
unbin (App (App (Const f) x) y) = Just (f,x,y)
unbin _ = Nothin... | danr/hipspec | src/HipSpec/Heuristics/Associativity.hs | gpl-3.0 | 689 | 0 | 15 | 156 | 278 | 154 | 124 | 16 | 1 |
module Layout where
import Data.Time.Clock
data Error = CompileFail | MemoryExceeded | TimeExceeded | WriteFail | NoError deriving (Eq,Show)
type Rerror = Either Error (Bool,NominalDiffTime,String,Integer)
type Berror = Either Error Bool | prannayk/conj | Judge/Layout.hs | gpl-3.0 | 239 | 0 | 6 | 32 | 74 | 45 | 29 | 5 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.AppState.Types
-- Copyright : (c) 2015-2016 Brendan Ha... | brendanhay/gogol | gogol-appstate/gen/Network/Google/AppState/Types.hs | mpl-2.0 | 1,662 | 0 | 7 | 362 | 159 | 110 | 49 | 39 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.