code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE DeriveAnyClass, GeneralizedNewtypeDeriving #-}
module T15839a () where
class C a
newtype T a = MkT a deriving C
| sdiehl/ghc | testsuite/tests/typecheck/should_compile/T15839a.hs | bsd-3-clause | 127 | 0 | 5 | 22 | 27 | 17 | 10 | -1 | -1 |
{-# LANGUAGE CPP #-}
-- |
-- Module: Data.Aeson.Internal.Time
-- Copyright: (c) 2015 Bryan O'Sullivan
-- License: Apache
-- Maintainer: Bryan O'Sullivan <bos@serpentine.com>
-- Stability: experimental
-- Portability: portable
module Data.Aeson.Internal.Time
(
TimeOfDay64(..)
, fromPico
... | abbradar/aeson | Data/Aeson/Internal/Time.hs | bsd-3-clause | 1,332 | 0 | 9 | 296 | 280 | 163 | 117 | 26 | 1 |
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE FlexibleInstances #-}
module Foo (A(P,Q)) where
data A a = A a
pattern P :: Show a => a -> A a
pattern P a = A a
pattern Q :: (A ~ f) => a -> f a
pattern Q a = A a
| tjakway/ghcjvm | testsuite/tests/patsyn/should_compile/poly-export2.hs | bsd-3-clause | 213 | 0 | 8 | 54 | 101 | 54 | 47 | 11 | 0 |
module T1735_Help.State where
import Control.Applicative (Applicative(..))
import Control.Monad (ap, liftM)
newtype StateT s m a = StateT { runStateT :: s -> m (a,s) }
instance Monad m => Monad (StateT s m) where
return a = StateT $ \s -> return (a, s)
m >>= k = StateT $ \s -> do
~(a, ... | beni55/ghcjs | test/ghc/typecheck/T1735_Help/State.hs | mit | 719 | 0 | 12 | 218 | 342 | 182 | 160 | 19 | 1 |
{-# OPTIONS_GHC -XImpredicativeTypes -fno-warn-deprecated-flags #-}
-- Sept 16: now scraping through with -XImpredicateTypes
module Main where
data Foo x y = Foo {foo1 :: x, foo2 :: y}
instance Functor (Foo x) where
fmap f (Foo x y) = Foo x (f y)
bar :: a -> Foo (forall s. s) a
bar a = Foo undefined a
main = p... | ezyang/ghc | testsuite/tests/boxy/T2193.hs | bsd-3-clause | 353 | 0 | 11 | 76 | 139 | 76 | 63 | -1 | -1 |
{-# LANGUAGE TypeOperators #-}
module GTL.Game.TwoPlayer.RockPaperScissors ( module GTL.Game.TwoPlayer
, Action1(..), Signal1, u1
, Action2(..), Signal2, u2
, Actions, Signals
... | dudebout/game-theoretic-learning | GTL/Game/TwoPlayer/RockPaperScissors.hs | isc | 995 | 0 | 6 | 353 | 368 | 208 | 160 | 31 | 1 |
module ProjectEuler.Problem117
( problem
) where
import ProjectEuler.Types
import Data.Monoid
import Data.MemoTrie (memoFix)
problem :: Problem
problem = pureProblem 117 Solved result
{-
Despite that this problem is based on Problem116,
I doubt how much code we can reuse, as now tiles of
diffferent lengths... | Javran/Project-Euler | src/ProjectEuler/Problem117.hs | mit | 1,645 | 0 | 18 | 453 | 206 | 110 | 96 | 18 | 6 |
module Main where
import Cycles.Maxcy
import Cycles.Findcy
import Cycles.IO
import Cycles.Aux
import Cycles.Reap
--import Data.GList
import Control.Exception (catch, SomeException, throwIO)
import Control.Monad
import Data.List (sort, group)
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Gen
import ... | michaeljklein/HCy2C | Main.hs | mit | 22,161 | 0 | 17 | 4,562 | 4,872 | 2,525 | 2,347 | 302 | 3 |
fib 0 = 0
fib 1 = 0
fib 2 = 1
fib n = fib (n - 1) + fib (n - 2)
| ariedov/AwesomeHaskellApp | fib.hs | mit | 64 | 0 | 8 | 24 | 57 | 28 | 29 | 4 | 1 |
data Tree a = Empty | Node (Tree a) a (Tree a)
find :: Ord a => Tree a -> a -> Bool
find Empty _ = False
find (Node lhs val rhs) needle
| val == needle = True
| val > needle = find lhs needle
| val < needle = find rhs needle
insert :: Ord a => Tree a -> a -> Tree a
insert Empty item = (Node Empty item Emp... | WesleyAC/toybox | functional/tree.hs | mit | 794 | 0 | 11 | 208 | 432 | 210 | 222 | 19 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-
The time-machine app transformer
-}
module Blaze.React.Examples.TimeMachine
( withTimeMachine
) where
import Blaze.React
... | LumiGuide/blaze-react | src/Blaze/React/Examples/TimeMachine.hs | mit | 6,825 | 0 | 22 | 1,723 | 1,661 | 857 | 804 | 149 | 7 |
module Cook.Util where
import Cook.Types
import Control.Monad
import Control.Monad.Trans
import Control.Retry
import System.Exit
import System.IO
import System.Log.Formatter
import System.Log.Handler hiding (setLevel)
import System.Log.Handler.Simple
import System.Log.Logger
import System.Process (system, rawSystem, ... | factisresearch/dockercook | src/lib/Cook/Util.hs | mit | 2,456 | 0 | 15 | 555 | 771 | 396 | 375 | 61 | 2 |
--import Data.List
--import Data.Maybe
--import Data.Set as S
--import Data.List.Split
--pentagon :: Int -> Int
pentagon n = (n * (3*n-1)) `div` 2
triangle n = (n * (n+1)) `div` 2
hexagonal n = n * (2*n-1)
pentagon_pos 1 = 1
pentagon_pos pn = (1 + sqrt (1 + 24 * pn)) / 6
trianglePos tn = (-1 + sqrt (1 +... | stefan-j/ProjectEuler | q44.hs | mit | 676 | 0 | 11 | 162 | 290 | 155 | 135 | 12 | 1 |
-- | Various types for the Checkpage utility.
module Checkpage.Types (
Config (..)
, Comparison (..)
, URL
, HTML
) where
import Data.ByteString (ByteString)
-- | Program configuration.
data Config = Config {
loginURL :: Maybe String
-- ^ URL of the page to log in with, if any.
, c... | nathyong/checkpage | src/Checkpage/Types.hs | mit | 673 | 0 | 10 | 185 | 125 | 79 | 46 | 14 | 0 |
-- Problems/Problem023Spec.hs
module Problems.Problem023Spec (main, spec) where
import Test.Hspec
import Problems.Problem023
main :: IO()
main = hspec spec
spec :: Spec
spec = describe "Problem 23" $
it "Should evaluate to 4179871" $
p23 `shouldBe` 4179871
| Sgoettschkes/learning | haskell/ProjectEuler/tests/Problems/Problem023Spec.hs | mit | 272 | 0 | 8 | 51 | 73 | 41 | 32 | 9 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
module Yesod.Auth.OAuth2.Exception
( YesodOAuth2Exception(..)
) where
import Control.Exception.Safe
import Data.ByteString.Lazy (ByteString)
import Data.Text (Text)
data YesodOAuth2Exception
= OAuth2Error Text ByteString
-- ^ HTTP error during OAuth2 handshake
... | thoughtbot/yesod-auth-oauth2 | src/Yesod/Auth/OAuth2/Exception.hs | mit | 724 | 0 | 6 | 162 | 100 | 65 | 35 | 12 | 0 |
-- |
-- Copyright : (c) 2013-2014 Sam Truzjan
-- License : MIT
-- Maintainer : pxqr.sta@gmail.com
-- Stability : expermental
-- Portability : portable
--
-- Basic backward raytracer.
--
{-# LANGUAGE RecordWildCards #-}
module Graphics.Tracy.Render
( -- * Environment
Samples
... | pxqr/tracy | src/Graphics/Tracy/Render.hs | mit | 7,540 | 2 | 15 | 1,667 | 2,298 | 1,180 | 1,118 | 157 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-privateipadd.html
module Stratosphere.ResourceProperties.EC2LaunchTemplatePrivateIpAdd whe... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/EC2LaunchTemplatePrivateIpAdd.hs | mit | 2,123 | 0 | 12 | 205 | 264 | 151 | 113 | 27 | 1 |
{-# LANGUAGE OverloadedStrings, NoMonomorphismRestriction, FlexibleContexts, ScopedTypeVariables, DeriveDataTypeable, DeriveFunctor, GADTs #-}
module EZCouch.ReadAction where
import Prelude ()
import ClassyPrelude.Conduit
import EZCouch.Action
import EZCouch.Entity
import EZCouch.Types
import EZCouch.Parsing
import EZ... | nikita-volkov/ez-couch | src/EZCouch/ReadAction.hs | mit | 4,637 | 0 | 17 | 991 | 1,387 | 716 | 671 | -1 | -1 |
{-# LANGUAGE CPP #-}
module Import.NoFoundation
( module Import
) where
import ClassyPrelude.Yesod as Import
import Settings as Import
import Settings.StaticFiles as Import
import Yesod.Core.Types as Import (loggerSet)
import Yesod.Default.Config2 as Import
| random-j-farmer/hs-little-helper | Import/NoFoundation.hs | mit | 288 | 0 | 5 | 62 | 53 | 38 | 15 | 8 | 0 |
module Handler.Home where
import Import
getHomeR :: Handler ()
getHomeR = redirect $ StaticR index_html
| Dridus/alexandria | server/Handler/Home.hs | mit | 107 | 0 | 6 | 18 | 31 | 17 | 14 | 4 | 1 |
{-# LANGUAGE Arrows #-}
{-# LANGUAGE RankNTypes #-}
module Haskeroids.FRP.Game where
import Control.Arrow
import Control.Coroutine
import Control.Coroutine.FRP
import Control.Coroutine.FRP.Collections
import Data.Maybe
import Haskeroids.Geometry
import Haskeroids.Keyboard
import Haskeroids.FRP.Asteroid
import Hasker... | shangaslammi/haskeroids-frp | Haskeroids/FRP/Game.hs | mit | 3,452 | 2 | 17 | 880 | 1,055 | 587 | 468 | 91 | 2 |
import Graphics.Gloss
win = InWindow "" (400, 300) (10, 10)
main = animate win white draw
draw t = Pictures (map f [1..20])
where f n = Rotate (t*n*5) blob
blob = Translate 100 0 (Color c (ThickCircle 10 20))
c = withAlpha 0.3 azure
| dominicprior/gloss-demo | demo3.hs | mit | 235 | 1 | 9 | 47 | 133 | 67 | 66 | 7 | 1 |
module Main where
import System.Environment
import System.Directory
import System.FilePath
import System.Posix.Files
import System.Posix.Types
import System.Console.Terminfo.Base
-- System.Console.Terminfo.Color
import System.Console.Terminfo.Cursor
import Data.List
import Data.Maybe
main :: IO ()
main = do
term <-... | PuZZleDucK/Hls | Hls.hs | gpl-3.0 | 12,049 | 0 | 19 | 4,229 | 2,289 | 1,308 | 981 | 168 | 8 |
module Logistic.Logistic where
import System.IO
import Data.List
import Control.Monad
import Data.Text
import System.IO.Unsafe
num_iter=2
readI::String ->Int
readI=read
readIList []=[]
readIList x=Data.List.map (readI . unpack) (splitOn (pack "\t") (pack x))
readD::String ->Double
readD=read
readDList []=[]
readDLi... | rahulaaj/ML-Library | src/Logistic/Logistic.hs | gpl-3.0 | 3,445 | 0 | 15 | 1,145 | 1,153 | 604 | 549 | -1 | -1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Application
( getApplicationDev
, appMain
, develMain
, makeFoundation
, makeLogWare
-- * for DevelMain
, getApplicationRepl
, shutdownApp
-- * for GHCI
, handler
, db
) where
import Control.Monad.Logger (liftL... | opentower/carnap | Carnap-Server/Application.hs | gpl-3.0 | 8,016 | 0 | 15 | 1,991 | 1,286 | 699 | 587 | -1 | -1 |
import Control.DeepSeq
import Control.Monad
import System.Environment
import System.IO
import System.Random
import Args
import GetKey
import Prompts
import Pwgen
import Storage
import XOut
version :: String
version = "2.0.2"
getDB :: Options -> String -> IO (String, DB)
getDB opt loc =
case optKey opt of
Nothi... | frozencemetery/haskey | src/Main.hs | gpl-3.0 | 3,622 | 2 | 21 | 1,524 | 1,046 | 488 | 558 | 93 | 17 |
{-# LANGUAGE NoImplicitPrelude, TemplateHaskell, GeneralizedNewtypeDeriving #-}
module Graphics.UI.Bottle.WidgetsEnvT
( WidgetEnvT, runWidgetEnvT
, mapWidgetEnvT
, readCursor, subCursor, isSubCursor
, Env(..), envCursor, envTextStyle
, readEnv
, localEnv
, envAssignCursor, envAssignCurso... | da-x/lamdu | bottlelib/Graphics/UI/Bottle/WidgetsEnvT.hs | gpl-3.0 | 3,461 | 0 | 10 | 738 | 1,001 | 545 | 456 | -1 | -1 |
module Problems54Athru60 where
import ADT.Tree
import Control.Monad (replicateM)
import Problems21thru28 (combinations)
import Util (powerOf2, flg)
-- Problem 55
--
-- (**) Construct completely balanced binary trees
--
-- In a completely balanced binary tree, the following property holds for
-- every node: The numb... | zcesur/h99 | src/Problems54Athru60.hs | gpl-3.0 | 4,305 | 0 | 12 | 975 | 1,060 | 562 | 498 | 54 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/Insert.hs | mpl-2.0 | 5,774 | 0 | 19 | 1,310 | 786 | 457 | 329 | 120 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DeleteTags.hs | mpl-2.0 | 4,026 | 0 | 10 | 886 | 482 | 296 | 186 | 56 | 1 |
-- Copyright 2017 Lukas Epple
--
-- This file is part of likely music.
--
-- likely music is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) ... | sternenseemann/likely-music | backend/Api.hs | agpl-3.0 | 2,211 | 0 | 13 | 549 | 396 | 226 | 170 | 44 | 0 |
--------------------------------------------------------------------------------
-- $Id: SwishScript.hs,v 1.10 2004/02/09 22:22:44 graham Exp $
--
-- Copyright (c) 2003, G. KLYNE. All rights reserved.
-- See end of this file for licence information.
-------------------------------------------------------------... | amccausl/Swish | Swish/HaskellRDF/SwishScript.hs | lgpl-2.1 | 37,023 | 0 | 24 | 13,822 | 8,454 | 4,381 | 4,073 | 681 | 8 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
module Main where
import GHC.Generics ( Generic1 )
import Dyno.Vectorize
import Dyno.SimpleOcp
-- state
data X a = X { xTheta :: a, xOmega :: a }
deriving (Functor, Generic1, Show)
instance Applicative X where {pure = v... | ghorn/dynobud | dynobud/examples/ToyOcp.hs | lgpl-3.0 | 1,192 | 0 | 13 | 295 | 496 | 278 | 218 | 36 | 2 |
{-# LANGUAGE FlexibleInstances, DeriveGeneric, DeriveAnyClass #-}
import FPPrac.Trees -- Contains now also the function toRoseTree. Re-install it!
import GHC.Generics -- Necessary for correct function of FPPrac
import FP_Grammar
import FP_TypesEtc -- Extend the file TypesEtc with yo... | Pieterjaninfo/PP | FP/block3s6.hs | unlicense | 1,524 | 0 | 8 | 382 | 312 | 162 | 150 | 19 | 1 |
{-
Copyright 2015 Tristan Aubrey-Jones
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | flocc-net/flocc | v0.1/Compiler/Back/Maps/VTemplates.hs | apache-2.0 | 34,951 | 0 | 28 | 9,017 | 9,548 | 4,764 | 4,784 | 542 | 2 |
{-# LANGUAGE UnicodeSyntax #-}
import Options.Applicative (fullDesc,progDesc)
import LogicGrowsOnTrees.Parallel.Main
import LogicGrowsOnTrees.Parallel.Adapter.Threads
import LogicGrowsOnTrees.Utils.WordSum
import LogicGrowsOnTrees.Examples.Queens
main :: IO ()
main =
mainForExploreTree
driver
bo... | gcross/LogicGrowsOnTrees | LogicGrowsOnTrees/examples/count-all-nqueens-solutions.hs | bsd-2-clause | 732 | 0 | 15 | 187 | 150 | 79 | 71 | 18 | 3 |
{- This isn't a lexer in the sense that it provides a JavaScript token-stream.
- This module provides character-parsers for various JavaScript tokens.
-}
module BrownPLT.TypedJS.Lexer(lexeme,identifier,reserved,operator,
reservedOp,charLiteral, stringLiteral,natural,integer,float,naturalOrFloat,
decimal,hexadecima... | brownplt/strobe-old | src/BrownPLT/TypedJS/Lexer.hs | bsd-2-clause | 2,656 | 2 | 8 | 683 | 728 | 435 | 293 | 56 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QDirModel.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:35
Warning : this file is machine generated - do not... | uduki/hsQt | Qtc/Enums/Gui/QDirModel.hs | bsd-2-clause | 2,345 | 0 | 18 | 530 | 606 | 309 | 297 | 54 | 1 |
module Utils where
import qualified Data.UUID as U -- UUID
import qualified Data.UUID.V4 as U4 -- UUID
import Data.Word
import Data.List.Split
import Control.Concurrent
import Data.Time
import System.Socket
import System.Socket.Family.Inet
import System.Socket.Type.Stream
import System.Socket.Protocol.TCP
gen... | weihu816/Adagio | src/Utils.hs | bsd-3-clause | 2,425 | 0 | 17 | 600 | 767 | 402 | 365 | 57 | 2 |
module HasOffers.API.Brand.AdManager
where
import Data.Text
import GHC.Generics
import Data.Aeson
import Control.Applicative
import Network.HTTP.Client
import qualified Data.ByteString.Char8 as BS
import HasOffers.API.Common
--------------------------------------------------------------------------------
add... | kelecorix/api-hasoffers | src/HasOffers/API/Brand/AdManager.hs | bsd-3-clause | 2,438 | 0 | 8 | 737 | 564 | 278 | 286 | 59 | 1 |
{-# LANGUAGE TupleSections, OverloadedStrings, QuasiQuotes, TemplateHaskell, TypeFamilies, RecordWildCards,
DeriveGeneric ,MultiParamTypeClasses ,FlexibleInstances #-}
module Protocol.ROC.PointTypes.PointType40 where
import GHC.Generics
import qualified Data.ByteString as BS
import Data.Word
import Data... | jqpeterson/roc-translator | src/Protocol/ROC/PointTypes/PointType40.hs | bsd-3-clause | 13,989 | 0 | 9 | 6,967 | 1,286 | 705 | 581 | 288 | 1 |
module Json.Moves.Deserialization
(deserialize)
where
import Text.Parsec
import Text.Parsec.String
deserialize:: String -> String
deserialize _ = "Bammmm"
| rubilnikas/haskell2 | src/Json/Deserialization.hs | bsd-3-clause | 161 | 0 | 5 | 22 | 40 | 24 | 16 | 6 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE UnicodeSyntax #-}
{-|
Module : Reflex.Dom.HTML5.Component.Tree.Common
Description : Common helpers to build tree-based components.
Copyright : (c) gspia 2018 -
License : BSD
Maintainer : gspia
= Tree.Common
... | gspia/reflex-dom-htmlea | lib/src/Reflex/Dom/HTML5/Component/Tree/Common.hs | bsd-3-clause | 4,537 | 0 | 10 | 926 | 701 | 400 | 301 | 63 | 1 |
module Main where
import Data.Holumn.ExperimentSerial
main = putStrLn "let the tests begin!"
| SamRoberts/holumn-experimental | Main.hs | bsd-3-clause | 95 | 0 | 5 | 14 | 18 | 11 | 7 | 3 | 1 |
module Main where
import Control.Monad (forever, when)
import Data.List (intercalate)
import Data.Traversable (traverse)
import Lib
import Morse (morseToChar, stringToMorse)
import System.Environment (getArgs)
import Sys... | vasily-kirichenko/haskell-book | app/Main.hs | bsd-3-clause | 1,589 | 2 | 18 | 545 | 420 | 206 | 214 | 49 | 4 |
module Doukaku.Poker2013 (solve) where
import Data.List (sort, group, tails)
import Data.Char (intToDigit)
solve :: String -> String
solve input
| 'T' `elem` (map fst cards) && 'A' `elem` (map fst cards) &&
samesuit cards == 5 && ordered cards == 5 = "RF"
| samesuit cards == 5 && ord... | hiratara/doukaku-past-questions-advent-2013 | src/Doukaku/Poker2013.hs | bsd-3-clause | 1,133 | 0 | 16 | 306 | 562 | 288 | 274 | 29 | 2 |
module Problem18
( maxTrianglePathSum
, maxTrianglePathSum'
, leftSubTriangle
, rightSubTriangle
, weight
, bigTriangle
) where
bigTriangle :: [[Int]]
bigTriangle = [ [ 75 ]
, [ 95, 64 ]
, [ 17, 47, 82 ]
, [ 18, 35, 87, 10 ]
, [ 20, 04, 82, 47, 65 ... | candidtim/euler | src/Problem18.hs | bsd-3-clause | 2,045 | 0 | 11 | 643 | 852 | 516 | 336 | 49 | 2 |
--
-- HTTP types for use with io-streams and pipes
--
-- Copyright © 2012-2014 Operational Dynamics Consulting, Pty Ltd and Others
--
-- The code in this file, and the program it is a part of, is
-- made available to you by its authors as open source software:
-- you can redistribute it and/or modify it under the terms... | afcowie/http-common | lib/Network/Http/RequestBuilder.hs | bsd-3-clause | 10,692 | 0 | 13 | 2,488 | 1,482 | 838 | 644 | 149 | 4 |
-- | Instances of the 'MonadIO' class for 'StateT', 'WriterT', 'ReaderT', 'ExcT',
-- 'ContT', and 'ListT'.
--
-- Re-exports "Control.Monad.IO.Class" for convenience.
module Control.Monatron.IO (module Control.Monad.IO.Class) where
import Control.Monatron.Monatron (MonadT(..), Monoid, StateT, WriterT, ReaderT, ExcT... | TobBrandt/Monatron-IO | Control/Monatron/IO.hs | bsd-3-clause | 824 | 0 | 7 | 147 | 262 | 145 | 117 | 15 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Network.HTTP.Date.Parser (parseHTTPDate) where
import Control.Applicative
import Control.Monad
import Data.Attoparsec.ByteString
import Data.Attoparsec.ByteString.Char8
import Data.ByteString
import Data.Char
import Network.HTTP.Date.Types
-----------------------------------... | kazu-yamamoto/http-date | Network/HTTP/Date/Parser.hs | bsd-3-clause | 2,483 | 0 | 28 | 718 | 822 | 415 | 407 | 85 | 2 |
{-# LANGUAGE Arrows #-}
module
Types.LoopSpec
where
import Data.Functor
import Control.Arrow
import Test.Hspec
import Control.Arrow.Machine as P
import Control.Monad.Trans (liftIO)
import Data.IORef
import Common.RandomProc
doubler = arr (fmap $ \x -> [x, x]) >>> P.fork
spec =
do
it "is possible that v... | as-capabl/machinecell | test/Types/LoopSpec.hs | bsd-3-clause | 1,929 | 4 | 33 | 880 | 703 | 354 | 349 | 61 | 1 |
{-# LANGUAGE CPP #-}
import Control.Monad (forM_, when)
import Distribution.Simple
import Distribution.Simple.InstallDirs (InstallDirs(..), fromPathTemplate, toPathTemplate)
import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..))
import Distribution.Simple.Setup (ConfigFlags(..), fromFlag, fromFlagOrDefault)
im... | comatose/redo | Setup.hs | bsd-3-clause | 1,441 | 0 | 16 | 207 | 321 | 177 | 144 | 21 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# L... | jwiegley/hnix | src/Nix/Expr/Types.hs | bsd-3-clause | 19,389 | 0 | 21 | 4,394 | 4,480 | 2,323 | 2,157 | -1 | -1 |
module YOLP.Weather.Result (
getWeathers,
Weather (..),
isForecast,
isObserved
) where
import YOLP.Weather.Result.Internal
| lesguillemets/rainfall-vim-hs | src/YOLP/Weather/Result.hs | bsd-3-clause | 140 | 0 | 5 | 29 | 32 | 22 | 10 | 6 | 0 |
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.SmallCheck
import Lib (inc)
main :: IO ()
main = defaultMain $ testGroup "all-tests" tests
tests :: [TestTree]
tests =
[ testGroup "SmallCheck" scTests
, testGroup "Unit tests" huTests
]
scTests :: [TestTree]
scTests =
[ testProperty "inc == succ" ... | mihaimaruseac/test-stack-templates | src-test/Main.hs | isc | 828 | 0 | 10 | 154 | 261 | 140 | 121 | 26 | 1 |
module Pos.DB.Ssc
( module Pos.DB.Ssc.GState
, module Pos.DB.Ssc.Logic
, module Pos.DB.Ssc.SecretStorage
, module Pos.DB.Ssc.State
) where
import Pos.DB.Ssc.GState
import Pos.DB.Ssc.Logic
import Pos.DB.Ssc.SecretStorage
import Pos.DB.Ssc.State
| input-output-hk/pos-haskell-prototype | db/src/Pos/DB/Ssc.hs | mit | 320 | 0 | 5 | 100 | 69 | 50 | 19 | 9 | 0 |
-- (c) 2000-2005 by Martin Erwig [see file COPYRIGHT]
-- | Breadth-First Search Algorithms
module Data.Graph.Inductive.Query.BFS(
-- * BFS Node List
bfs, bfsn, bfsWith, bfsnWith,
-- * Node List With Depth Info
level, leveln,
-- * BFS Edges
bfe, bfen,
-- * BFS Tree
bft, lbft, RTree,
... | antalsz/hs-to-coq | examples/graph/graph/Data/Graph/Inductive/Query/BFS.hs | mit | 4,151 | 0 | 19 | 1,231 | 1,734 | 913 | 821 | 72 | 2 |
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Window (
module Generated
, js_openDatabase
, openDatabase
) where
import Control.Monad.IO.Class (MonadIO(..))
import GHCJS.Types (JSString)
import GHCJS.DOM.Types
import GHCJS.DOM.JSFFI.Generated.Window as Generated hiding (js_o... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Window.hs | mit | 1,087 | 14 | 8 | 197 | 215 | 122 | 93 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
{- |
Module : ./Comorphisms/CASL2VSEImport.hs
Description : embedding from CASL to VSE, plus wrapping procedures
with default implementations
Copyright : (c) M.Codescu, DFKI Bremen 2008
License : GPLv2 or highe... | spechub/Hets | Comorphisms/CASL2VSEImport.hs | gpl-2.0 | 7,904 | 0 | 46 | 3,577 | 1,802 | 946 | 856 | 163 | 2 |
module CO4.Thesis.LoopStandalone
where
import Prelude hiding (elem)
import CO4.Prelude.Nat
data Pair a b = Pair a b deriving Show
data List a = Nill | Conss a (List a) deriving Show
data Term = Var Nat
| Node Nat (List Term)
deriving (Show)
data Unary = Z | S Unary deriving Show
data Step = S... | abau/co4 | test/CO4/Thesis/LoopStandalone.hs | gpl-3.0 | 4,629 | 0 | 18 | 1,552 | 1,850 | 913 | 937 | 126 | 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-elasticache/gen/Network/AWS/ElastiCache/DescribeReplicationGroups.hs | mpl-2.0 | 6,975 | 0 | 15 | 1,395 | 920 | 544 | 376 | 106 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Control.Functor.Algebra.Elgot
-- Copyright : (C) 2008 Edward Kmett
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : Edward Kmett <ekmett@gmail.com>
-- Stability : experimental
-- Portability... | urska19/MFP---Samodejno-racunanje-dvosmernih-preslikav | Control/Functor/Algebra/Elgot.hs | apache-2.0 | 1,205 | 4 | 12 | 198 | 226 | 132 | 94 | -1 | -1 |
{-# OPTIONS_GHC -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Marshal.Error
-- Copyright : (c) The FFI task force 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : ffi@haskell.org
-- St... | alekar/hugs | packages/base/Foreign/Marshal/Error.hs | bsd-3-clause | 2,601 | 16 | 12 | 646 | 445 | 259 | 186 | 27 | 2 |
-- | ISO 8601 Week Date format
module Data.Time.Calendar.WeekDate where
import Data.Time.Calendar.OrdinalDate
import Data.Time.Calendar.Days
import Data.Time.Calendar.Private
-- | convert to ISO 8601 Week Date format. First element of result is year, second week number (1-53), third day of week (1 for Monday to 7 for... | jwiegley/ghc-release | libraries/time/Data/Time/Calendar/WeekDate.hs | gpl-3.0 | 2,418 | 12 | 18 | 494 | 780 | 420 | 360 | 39 | 4 |
{-
Copyright 2015 Google Inc. 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://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | Ye-Yong-Chi/codeworld | codeworld-base/src/Control/Monad/ST/Strict.hs | apache-2.0 | 761 | 0 | 4 | 136 | 27 | 21 | 6 | 4 | 0 |
-- HLint configuration file
module HLint.HLint where
-- mimic default HLint.hs
-- https://github.com/ndmitchell/hlint/blob/master/data/HLint.hs
import "hint" HLint.Default
import "hint" HLint.Builtin.All
ignore "Use fewer imports" =
System.Process.Read -- Related to 'Hide post-AMP warnings' comment
Stack.Exec ... | AndreasPK/stack | HLint.hs | bsd-3-clause | 1,032 | 0 | 6 | 149 | 150 | 75 | 75 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
module T17566a where
import Data.Kind
class C1 (f :: k -> Type) z where
type T1 (x :: f a) :: f a
data D1 (x :: f a)
class C2 f z where
type T2 (x :: f a) :: f a
data D2 (x :: f a)
| sdiehl/ghc | testsuite/tests/typecheck/should_compile/T17566a.hs | bsd-3-clause | 315 | 0 | 8 | 76 | 109 | 64 | 45 | 12 | 0 |
<?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="sr-SP">
<title>Front-End Scanner | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<m... | thc202/zap-extensions | addOns/frontendscanner/src/main/javahelp/org/zaproxy/zap/extension/frontendscanner/resources/help_sr_SP/helpset_sr_SP.hs | apache-2.0 | 978 | 78 | 67 | 159 | 417 | 211 | 206 | -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="ro-RO">
<title>Sequence Scanner | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<ma... | thc202/zap-extensions | addOns/sequence/src/main/javahelp/org/zaproxy/zap/extension/sequence/resources/help_ro_RO/helpset_ro_RO.hs | apache-2.0 | 977 | 78 | 66 | 159 | 413 | 209 | 204 | -1 | -1 |
module Main where
import Test.HUnit
import System.IO
import qualified System.Cmd as System
import System.Exit
import System.Environment
import Data.List
data TestCases = TestCases {cacheCmd::String
,refactorCmd::String
,positive::[([String],([String],... | RefactoringTools/HaRe | old/testing/introThreshold/UTestCache.hs | bsd-3-clause | 4,826 | 0 | 18 | 1,494 | 1,303 | 670 | 633 | 72 | 1 |
module T15527 where
f :: (Int -> Int) -> (Int -> Int) -> (Int -> Int)
f = (.) @Int
| sdiehl/ghc | testsuite/tests/typecheck/should_fail/T15527.hs | bsd-3-clause | 85 | 0 | 8 | 22 | 50 | 29 | 21 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
import TestUtils
import qualified Data.Generics as SYB
import qualified GHC.SYB.Utils as SYB
import qualified Bag ... | RefactoringTools/HaRe | experiments/AzStrafunskiPlay.hs | bsd-3-clause | 9,884 | 11 | 13 | 2,414 | 1,281 | 730 | 551 | 83 | 1 |
-- In this example, make the used items explicit in the first import decl.
module B1 (myFringe)where
import D1 ()
import D1 (fringe)
import C1 hiding (myFringe)
myFringe:: Tree a -> [a]
myFringe (Leaf x ) = [x]
myFringe (Branch left right) = myFringe right
sumSquares (x:xs)= x^2 + sumSquares xs
sumSquares [] =0
... | kmate/HaRe | old/testing/mkImpExplicit/B1_TokOut.hs | bsd-3-clause | 325 | 0 | 7 | 65 | 120 | 66 | 54 | 9 | 1 |
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies, OverloadedStrings #-}
import Yesod.Core
import Yesod.WebSockets
import qualified Data.Text.Lazy as TL
import Control.Monad (forever)
import Control.Monad.Trans.Reader
import Control.Concurrent (threadDelay)
import Data.Time
import Conduit
import Data.Monoid ((<>)... | ygale/yesod | yesod-websockets/chat.hs | mit | 2,570 | 0 | 17 | 909 | 363 | 191 | 172 | 39 | 1 |
module Main where
foreign import ccall "power2" power2 :: Int -> Int
main = print $ power2 4
| sdiehl/ghc | testsuite/tests/rts/linker/T11223/power.hs | bsd-3-clause | 95 | 0 | 6 | 20 | 32 | 18 | 14 | 3 | 1 |
-- @Author: Zeyuan Shang
-- @Date: 2016-07-28 23:49:48
-- @Last Modified by: Zeyuan Shang
-- @Last Modified time: 2016-07-29 20:35:29
data Graph a = Graph [a] [(a, a)]
deriving (Show, Eq)
depthfirst :: (Eq a) => Graph a -> a -> [a]
depthfirst graph src = depthfirst' graph [src]
depthfirst' :: (Eq a) => Graph... | zeyuanxy/haskell-playground | ninety-nine-haskell-problems/vol9/88.hs | mit | 1,101 | 0 | 12 | 270 | 576 | 315 | 261 | 18 | 2 |
import System.Random
fb_starts = ["Zygo", "Prepro", "Mutually ", "Lazy "]
fb_middles = ["histomorphic ", "semi-recursive ", "monadic co-generator ", "tail call transflecting "]
fb_qualifiers = ["quasi-typed ", "union typed ", "non-lambda typed ", "duck typed ", "zermelo franklin typed ", "secretly ML "]
fb_fin... | StoneCypher/forest_belton | forest_belton.hs | mit | 750 | 0 | 11 | 140 | 210 | 114 | 96 | 17 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE ScopedTypeVariable... | houshuang/frame | src/Data/Frame/Internal.hs | mit | 7,237 | 0 | 12 | 1,407 | 2,077 | 1,124 | 953 | -1 | -1 |
module DrvDiffToString where
import DrvDiff
import Derivation
import Data.List
import Data.Maybe
drvDiffToString :: DrvDiff -> String
drvDiffToString (DrvDiff l r) =
(drvPartToString "- " l) ++
(drvPartToString "+ " r)
drvPartToString :: String -> DrvPart -> String
drvPartToString prefix p =
joinLines prefix (... | DavidEGrayson/drvdiff | src/DrvDiffToString.hs | mit | 1,695 | 0 | 16 | 289 | 558 | 290 | 268 | 39 | 1 |
{-# LANGUAGE OverloadedStrings, TypeApplications #-}
module Main where
import MockAPI
import Servant
import Network.Wai.Handler.Warp
import Data.Text (Text)
import Control.Concurrent (threadDelay)
import Control.Monad.IO.Class
import qualified Data.Map as M
import Network.Wai.Middleware.Gzip
server :: Server MockApi... | vacationlabs/haskell-webapps | UI/ReflexFRP/mockLoginPage/mockServer/Main.hs | mit | 1,290 | 0 | 11 | 267 | 354 | 190 | 164 | 27 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE MultiWayIf #-}
module Text.Docvim.Printer.Vim (vimHelp) where
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative ((<$>))
#endif
import Control.Arrow
import Control.Monad
import Control.Monad.Reader
import Control.Monad.State
import Data.Char
import Data.List
import Data.List.Spl... | wincent/docvim | lib/Text/Docvim/Printer/Vim.hs | mit | 11,436 | 0 | 17 | 3,357 | 3,242 | 1,646 | 1,596 | 229 | 29 |
module Holyhaskell.Swallow.Test
(swallowSuite)
where
import Test.Tasty (testGroup, TestTree)
import Test.Tasty.HUnit
import Holyhaskell.Swallow
swallowSuite :: TestTree
swallowSuite = testGroup "Swallow"
[testCase "swallow test" testSwallow]
testSwallow :: Assertion
testSwallow = "something" @=? swallow "some... | duikboot/holyhaskell | test/Holyhaskell/Swallow/Test.hs | mit | 330 | 0 | 7 | 43 | 78 | 45 | 33 | 10 | 1 |
module GraphDB.Util.TH.Parsers where
import GraphDB.Util.Prelude
import qualified Language.Haskell.TH as T
import qualified Text.Parsec as P
import qualified Data.Char as Char
import qualified GraphDB.Util.TH.Type as Type
type Parse = P.ParsecT String ()
runParse :: (Monad m) => String -> Parse m r -> m r
runParse ... | nikita-volkov/graph-db | library/GraphDB/Util/TH/Parsers.hs | mit | 3,220 | 0 | 19 | 972 | 1,092 | 544 | 548 | -1 | -1 |
module NetHack.Control.More
(skipMores)
where
import Data.Foldable hiding(any, concat)
import Control.Monad(when)
import NetHack.Monad.NHAction
import NetHack.Control.Screen
import qualified Regex as R
harmlessMores :: [NHAction Bool]
harmlessMores = [itIsWrittenInTheBook, welcomeBackToNetHack]
questionify :: A... | Noeda/Megaman | src/NetHack/Control/More.hs | mit | 2,243 | 5 | 17 | 589 | 483 | 269 | 214 | 54 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module DBPnet.Correlation
( cisCorMat
, transCorMat
) where
import Bio.Data.Bed
import Conduit
import Lens.Micro
import Control.Monad
import qualified Data.ByteString.Char8 as B
import Data.... | kaizhang/DBPnet | src/DBPnet/Correlation.hs | mit | 3,118 | 0 | 34 | 1,278 | 1,240 | 645 | 595 | 70 | 2 |
module Examples.Addition where
import Test.Scher
test = forAll "i" \(i :: Int) ->
forAll "j" \(j :: Int) ->
i + j == j + i
| m-alvarez/scher | Examples/Addition.hs | mit | 139 | 0 | 11 | 42 | 62 | 34 | 28 | -1 | -1 |
module Eval (alpha, beta, freeVariables) where
import Types
alpha target replacement body@(V _) | target == body = replacement
| otherwise = body
alpha target replacement (L param body) = L (alpha target replacement param) (alpha target replacement body)
alpha target replaceme... | MichaelBaker/lambda-calculus | src/Eval.hs | mit | 2,894 | 0 | 10 | 875 | 999 | 502 | 497 | 36 | 2 |
{-# htermination (fromDoubleRatio :: Double -> Ratio MyInt) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data Double = Double MyInt MyInt ;
data MyInt = Pos Nat | Neg Nat ;
data Nat = Succ Nat | Zero ;
data Ordering = LT | EQ | GT ;
data Ratio a = CnPc a ... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/fromDouble_1.hs | mit | 7,013 | 0 | 11 | 1,415 | 3,324 | 1,734 | 1,590 | 170 | 1 |
module Verba.Dictionary where
import Data.Map (Map)
import Data.Maybe (fromMaybe)
import qualified Data.Map as Map
import System.IO
import Paths_Verba
import Data.Foldable (foldrM)
type Dictionary = Map Int [String]
-- Pushes a word in the right bucket
-- based on its length.
insertWord :: String -> Dictionary -> Di... | Jefffrey/Verba | src/Verba/Dictionary.hs | mit | 1,172 | 0 | 14 | 233 | 344 | 182 | 162 | 23 | 2 |
{- Basic Window Setup and Display -}
{-# LANGUAGE OverloadedStrings #-}
module Lesson01 where
--
import qualified SDL
import Linear.V4 (V4(..))
--
import Control.Concurrent (threadDelay)
--
import qualified Config
--
lesson01 :: IO ()
lesson01 = do
SDL.initialize [SDL.InitVideo]
window <- SDL.createWindow "Lesso... | jaiyalas/sdl2-examples | src/Lesson01.hs | mit | 766 | 0 | 9 | 149 | 162 | 85 | 77 | 18 | 1 |
--and the exceedingly quick way
main = print (sum [x | x <- [1..1000-1], x `mod` 3 == 0 || x `mod` 5 == 0])
| beforan/project-euler | Problem-0001/Haskell/short.hs | mit | 108 | 0 | 14 | 25 | 64 | 35 | 29 | 1 | 1 |
module Main (main) where
import CabalFull (projectName)
main :: IO ()
main = putStrLn ("Tests for " ++ projectName)
| vrom911/hs-init | summoner-cli/examples/cabal-full/test/Spec.hs | mit | 119 | 0 | 7 | 22 | 42 | 24 | 18 | 4 | 1 |
-- solveRPN :: (Num a, Read a) => String -> a
-- solveRPN input = head . foldl foldingFunc [] (words input)
-- where foldingFunc (x:y:ys) "*" = (x*y):ys
-- foldingFunc (x:y:ys) "+" = (x+y):ys
-- foldingFunc (x:y:ys) "-" = (x-y):ys
-- foldingFunc xs number = read number:xs
... | adizere/nifty-tree | playground/functionally.hs | mit | 1,955 | 0 | 12 | 614 | 560 | 311 | 249 | 38 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Lisper.Compiler
--
-- Public interface of lisper
-----------------------------------------------------------------------------
module Lisper.Compiler (Scheme, Env, read, evaluate, compile, exec)
where
import Prelude... | jaseemabid/lisper | src/Lisper/Compiler.hs | mit | 672 | 0 | 8 | 107 | 156 | 90 | 66 | 12 | 1 |
import Graphics.UI.Gtk hiding (Settings)
import Graphics.Rendering.Cairo
import Data.Time.Clock.POSIX
import Data.Time
import System.Directory
import Control.Exception
import System.Locale (defaultTimeLocale)
import Data.IORef
import Control.Monad (when,forM)
import Data.List
import Text.Printf
iDuration = 30
rDuratio... | jsavatgy/hatupist | code/statusbar.hs | gpl-2.0 | 21,728 | 0 | 17 | 5,192 | 7,934 | 3,979 | 3,955 | 681 | 4 |
module HEP.Automation.MadGraph.Dataset.Set20110712set3 where
import HEP.Storage.WebDAV.Type
import HEP.Automation.MadGraph.Model
import HEP.Automation.MadGraph.Machine
import HEP.Automation.MadGraph.UserCut
import HEP.Automation.MadGraph.SetupType
import HEP.Automation.MadGraph.Model.C8S
import HEP.Automation.MadGr... | wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110712set3.hs | gpl-3.0 | 1,947 | 0 | 10 | 637 | 578 | 372 | 206 | 50 | 1 |
module Render where
import Graphics.UI.SDL as SDL
import Graphics.UI.SDL.TTF as TTF
import Graphics.UI.SDL.Image as SDLi
import Dungeon
renderWorld :: GameState -> IO ()
renderWorld gs = do
s <- getVideoSurface
fillRect s (Just $ Rect 0 0 800 600) (Pixel 0)
renderLayer s 0 (gArea gs) (gGx gs)
renderPlayer ... | Spacejoker/DDclone | rpg/src/Render.hs | gpl-3.0 | 1,904 | 0 | 12 | 494 | 888 | 453 | 435 | 59 | 1 |
-- Propositional logic
-- THIS VERSION ENCODES NAMES AS INTEGERS, THUS ALLOWING MORE RAPID COMPARISON.
module PropLogicLib (
Form(F, T, Var, Neg, Conj, Disj, Imp, Equiv),
mkVar, encode, decode,
showForm, showName, readsForm, pf,
Theorem(),
projHyps, projForm,
taut, disch, mp,
andIntro, a... | ckaestne/CIDE | CIDE_Language_Haskell/test/fromviral/PropLogicLib-encoded.hs | gpl-3.0 | 11,347 | 62 | 17 | 4,324 | 3,207 | 1,769 | 1,438 | -1 | -1 |
module WebParsing.PostParser
(addPostToDatabase) where
import qualified Data.Text as T
import Control.Monad.Trans (liftIO)
import Text.HTML.TagSoup
import Text.HTML.TagSoup.Match
import Database.Tables
import Database.Persist.Sqlite (insert_, SqlPersistM)
import Database.Persist (insertUnique)
import qualified Tex... | hermish/courseography | app/WebParsing/PostParser.hs | gpl-3.0 | 3,129 | 0 | 17 | 738 | 866 | 441 | 425 | 60 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.